@cognexuslabs/openclaw-artzain
v0.2.7
Published
OpenClaw plugin: CogNEXUS before_tool_call gate (deny/review/errors block; not /approve).
Maintainers
Readme
@cognexuslabs/openclaw-artzain
OpenClaw plugin that registers api.on("before_tool_call", …) and calls
the CogNEXUS Decision API before a host tool runs. deny, review, and
engine refusals (HTTP 503 / missing key) return { block: true }.
This is pattern C. Envelope pattern B (model base_url swap) is still
docs/sdk/recipes/openclaw-provider.json5.
What this is not
- Not a Connectors-panel card.
- Not published from the engine repository. Dest
(
CogNEXUSlabs/cognexus-tools) publishes the npm package through Trusted Publishing, with provenance, on anopenclaw-v*tag. The ClawHub listing (clawhub/SKILL.md) points at that package; it is not a code bundle. - Not a mapping of CogNEXUS
reviewonto OpenClaw/approve.
Install
openclaw plugins install @cognexuslabs/openclaw-artzainTo try a change that is not released yet, install the folder from a checkout instead, dest or the engine dual-home:
openclaw plugins install ./openclaw # CogNEXUSlabs/cognexus-tools
openclaw plugins install ./sdk/openclaw # the engine repositorySet COGNEXUS_API_KEY on the Gateway (sandbox key from /get-a-key, not
a dashboard JWT and not an envelope cnxe_… key). Optional:
COGNEXUS_API_BASE_URL, or plugin config apiKey / baseUrl / agentDid.
{
plugins: {
entries: {
"artzain-tool-gate": {
enabled: true,
config: {
// apiKey: "cnx_…", // or COGNEXUS_API_KEY
// baseUrl: "https://app.cognexuslabs.ai",
},
},
},
},
}Contract
| Outcome | Plugin result |
|---|---|
| allow | tool runs |
| deny | { block: true, blockReason } |
| review | { block: true } — human owns it in the CogNEXUS Review Queue |
| HTTP 503 / 401 / 422 / missing key | { block: true } (fail closed) |
| a redirect (HTTP 3xx) | { block: true }: not followed, so the key stays with the configured host |
Instance announce (v0.2, opt-in)
Instances no scanner can reach (laptops, home labs) can self-register with the CogNEXUS Agent Wrangler:
{
"announce": true,
"instance": "jeans-laptop",
"announceAgents": ["main"],
"announceSkills": ["artzain"]
}Once per process (on the first gated tool call), the plugin POSTs this
identity — names only, never content or config — to
POST /api/v1/registry/announce with the same Decision API key it already
holds. Rows land as source openclaw behind the standard sealed
registration gate, in the review queue like every other discovery.
announceAgents defaults to the hook's agentId (the identity on your
decision leaves), then agentDid. Pick a stable instance name (no #) —
changing it re-namespaces the rows. Announce is telemetry, not a gate: it
never blocks or delays tool gating, and its failure never fails closed.
Transient failures (network, 5xx, 429) retry on a later gated call; a 3xx or
4xx refusal means config — fix and restart. The success log line reports the
server's registered/seen/blocked/deferred/failed counts; deferred rows
are held by capacity and only submitted again on a re-announce, and
failed rows hit a server-side write error and were not stored at all —
an announce can be accepted (HTTP 200) and still catalogue nothing, so
read the counts, not the status.
Pull enroll (v0.2.5, default on)
Agents that already hold a Decision API key pull their adapter:
{
"enroll": true,
"instance": "jeans-laptop",
"enrollToken": "<one-shot token from Govern / the snippet pack>"
}enrollToken is optional. Without it the reply is { adapter, decision:
{ already_have_key: true }, envelope: null } — never a cnxe_. Set
enroll: false to skip. Enroll is telemetry, not a gate: it never blocks
or delays tool gating. Transient failures retry on a later gated call; a
3xx or 4xx means config — fix and restart.
