@atbash/atbash-openclaw 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/config.js +1 -1
- package/dist/index.js +2 -1
- package/openclaw.plugin.json +7 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -102,6 +102,12 @@ The `kinds` field shows which patterns matched. `anthropic` / `openai` / `aws_ac
|
|
|
102
102
|
|
|
103
103
|
The agent's own tool execution is unaffected — only the data sent to the judge is scrubbed. Full kind list and behaviour reference: see the [SDK README](https://www.npmjs.com/package/@atbash/sdk).
|
|
104
104
|
|
|
105
|
+
## Environment variables
|
|
106
|
+
|
|
107
|
+
| Variable | Default | What it does |
|
|
108
|
+
|---|---|---|
|
|
109
|
+
| `ATBASH_TELEMETRY` | `"true"` | Set to `"false"` to disable usage telemetry. Telemetry is opt-out — it's on unless you explicitly turn it off. |
|
|
110
|
+
|
|
105
111
|
## Troubleshooting
|
|
106
112
|
|
|
107
113
|
**Tool calls aren't being audited.**
|
package/dist/config.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var
|
|
1
|
+
"use strict";var u=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var w=(o,e)=>{for(var n in e)u(o,n,{get:e[n],enumerable:!0})},y=(o,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of h(e))!m.call(o,r)&&r!==n&&u(o,r,{get:()=>e[r],enumerable:!(a=b(e,r))||a.enumerable});return o};var E=o=>y(u({},"__esModule",{value:!0}),o);var v={};w(v,{default:()=>p});module.exports=E(v);var l=require("@atbash/sdk");var R="atbash-openclaw";function f(o){return o.config?.plugins?.entries?.[R]?.config??{}}function d(o,e){let n=o??{},a=n.toolName??e.tool?.name??e.toolName??e.name??"unknown",r=n.params??e.params??n.args??e.args??n.arguments??e.arguments;return{toolName:a,args:r,context:a}}function k(o){if(o.judgeEndpoint)return o.judgeEndpointPolicy==="self-hosted"?{policy:"self-hosted",endpoint:o.judgeEndpoint,verifyPubKey:o.judgeVerifyPubKey??""}:{policy:"default",endpoint:o.judgeEndpoint}}function p(o){let e=o,n=f(e);if(n.enabled===!1){e.logger?.info?.("[atbash] plugin disabled via config");return}(0,l.setupTelemetry)({enabled:!0,source:"plugin:openclaw"}),process.once("beforeExit",()=>(0,l.shutdownTelemetry)()),process.once("SIGINT",()=>(0,l.shutdownTelemetry)().finally(()=>process.exit(0))),process.once("SIGTERM",()=>(0,l.shutdownTelemetry)().finally(()=>process.exit(0)));let a;try{a=(0,l.createAtbashClient)({judge:k(n),keyPath:n.chromiaSecretPath,orgName:n.orgName,failClosed:!0,logger:e.logger})}catch(s){let i=s instanceof Error?s.message:String(s);throw e.logger?.warn?.("[atbash] init failed",{error:i}),s}let r=n.enforceDecision!==!1;if(e.logger?.info?.("[atbash] plugin loaded",{enforceDecision:r}),!e.on){e.logger?.warn?.("[atbash] on() API not available");return}e.on("before_tool_call",async(s,i)=>{let c=await a.auditToolCall(d(s,i)),t=c.reason??"";switch(c.verdict){case"BLOCK":return e.logger?.warn?.("[atbash] BLOCK",{reason:t}),r?{block:!0,blockReason:t,allow:!1,reason:t}:{allow:!0};case"HOLD":{let g=`Action held for operator review. The agent will not be jailed \u2014 please approve or reject this request from the Atbash dashboard, then ask the agent to try again.
|
|
2
|
+
Reason: ${t}`;return e.logger?.warn?.("[atbash] HOLD",{reason:t}),r?{block:!0,blockReason:g,allow:!1,reason:g}:{allow:!0}}case"ERROR":return e.logger?.warn?.("[atbash] ERROR",{reason:t}),r?{block:!0,blockReason:t,allow:!1,reason:t}:{allow:!0};case"ALLOW":default:return e.logger?.info?.("[atbash] ALLOW",{reason:t}),{allow:!0}}})}
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "openclaw",
|
|
2
|
+
"id": "atbash-openclaw",
|
|
3
3
|
"name": "ATBASH Plugin",
|
|
4
4
|
"configSchema": {
|
|
5
5
|
"type": "object",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"enum": ["default", "self-hosted"],
|
|
16
16
|
"default": "default"
|
|
17
17
|
},
|
|
18
|
-
"judgeVerifyPubKey": { "type": "string" }
|
|
18
|
+
"judgeVerifyPubKey": { "type": "string" },
|
|
19
|
+
"orgName": { "type": "string" }
|
|
19
20
|
}
|
|
20
21
|
},
|
|
21
22
|
"uiHints": {
|
|
@@ -36,6 +37,10 @@
|
|
|
36
37
|
"judgeVerifyPubKey": {
|
|
37
38
|
"label": "Judge Response Verify Pubkey (self-hosted only)",
|
|
38
39
|
"placeholder": "66 hex chars — secp256k1 compressed pubkey"
|
|
40
|
+
},
|
|
41
|
+
"orgName": {
|
|
42
|
+
"label": "Organization Name",
|
|
43
|
+
"placeholder": "e.g. ATBASH — set so the SDK queries the right chain (public vs private)"
|
|
39
44
|
}
|
|
40
45
|
}
|
|
41
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atbash/atbash-openclaw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "OpenClaw ATBASH tool-audit plugin. Thin adapter that maps OpenClaw's before_tool_call hook onto @atbash/sdk.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atbash/sdk": "^0.3.
|
|
35
|
+
"@atbash/sdk": "^0.3.25"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^25.7.0",
|