@atbash/atbash-openclaw

中文文档
0.11.0发布于 2026/10/29Apache-2.0TypeScriptCommonJS近 30 天下载 2063

OpenClaw ATBASH tool-audit plugin. Thin adapter that maps OpenClaw's before_tool_call hook onto @atbash/sdk.

原始使用文档
文档目录12 节
  1. Install
  2. Get an agent key
  3. Configure it in OpenClaw
  4. Advanced configuration
  5. Config fields
  6. Updating
  7. Uninstalling
  8. Secret redaction
  9. Environment variables
  10. Troubleshooting
  11. Maintainer release contract
  12. License

@atbash/atbash-openclaw

OpenClaw plugin that gates every tool call against the ATBASH policy service. A thin adapter on top of @atbash/sdk — the SDK does the audit pipeline, this package wires it into OpenClaw's before_tool_call hook.

If you're not using OpenClaw and want to use ATBASH from your own code, install the SDK directly.

Install

openclaw plugins install @atbash/[email protected]

The judge endpoint and chain ids are compiled into the build, so the version selects the environment. A -dev.N version targets the development environment. openclaw plugins list shows which you have. No configuration repoints a build afterwards — the wrong one loads cleanly, fires its hook, and then fails every judge call because the agent does not exist on the chain that build targets. Organization names are not unique across environments, so a resolving org name is not proof the build is right.

The plugin signs audit transactions locally with your agent's secp256k1 private key. The key never leaves your machine; only signed bytes plus the corresponding public key are transmitted.

Get an agent key

The plugin reads from ~/.config/atbash/guard-client-key by default. The file is JSON:

{
  "privKey": "your-hex-private-key-64-chars",
  "pubKey":  "your-hex-public-key-66-chars"
}

…or key=value:

privkey=your-hex-private-key-64-chars
pubkey=your-hex-public-key-66-chars

Contact the ATBASH team to register an agent and obtain a key pair.

Configure it in OpenClaw

openclaw plugins install already recorded where the plugin lives, enabled it, and — if you keep a plugins.allow list — added atbash-openclaw to it. Never hand-write the install directory: OpenClaw has moved it between releases and records whichever it used, which is what it loads from. openclaw plugins list shows the current state.

All that is left is your configuration. Open ~/.openclaw/openclaw.json and add, keeping the plugins already there:

{
  "plugins": {
    "entries": {
      "atbash-openclaw": {
        "enabled": true,
        "config": {
          "enabled": true,
          "enforceDecision": true,
          "chromiaSecretPath": "~/.config/atbash/guard-client-key",
          "orgName": "<your org name>"
        },
        "hooks": {
          "allowConversationAccess": true,
          "allowPromptInjection": true
        }
      }
    }
  }
}

Advanced configuration

The snippet below shows every supported config field with inline comments. Remove fields you don't need — all are optional except orgName (required when your org is on a private chain).

{
  "plugins": {
    "entries": {
      "atbash-openclaw": {
        "enabled": true,
        "config": {
          "enabled": true,
          "enforceDecision": true,
          "chromiaSecretPath": "~/.config/atbash/guard-client-key",
          "orgName": "<your-org-name>",
          "debug": false,

          // --- Memory guard (optional) ---
          // Root directory used to locate the memory pointer file and MEMORY.md.
          "memoryWorkspaceDir": "~/.openclaw/workspace",
          // Or set an explicit path to MEMORY.md (overrides memoryWorkspaceDir):
          // "memoryFilePath": "~/.openclaw/workspace/MEMORY.md",
          // How long (ms) to trust the local memory-chain cache before re-fetching.
          "memorySyncTTLMs": 30000,
          // Block memory reads when a rolled-back version scores below this (1–10).
          // Default 1 = warn only. Raise to e.g. 3 to refuse poisoned rollbacks.
          "memoryRollbackMinScore": 1,
          // Additional path substrings to classify as memory (extends SDK built-ins).
          // "memoryPathPatterns": ["/my-agent/memory/"],

          // --- Self-hosted judge (optional, advanced) ---
          // "judgeEndpoint": "https://your-judge.example.com/api/v1/judge",
          // "judgeEndpointPolicy": "self-hosted",
          // "judgeVerifyPubKey": "<66-hex-char-secp256k1-pubkey>"
        },
        "hooks": {
          "allowConversationAccess": true,
          "allowPromptInjection": true
        }
      }
    }
  }
}

The plugin id is atbash-openclaw — it comes from the id field in this package's openclaw.plugin.json, not from the npm package name. A plugins.entries key that does not match the id is not an error: the plugin loads unconfigured and audits nothing.

Config fields

FieldTypeDefaultWhat it does
enabledbooltrueMaster switch. false = plugin returns immediately.
enforceDecisionbooltrueFail-closed switch. When true (default), verdicts of BLOCK, HOLD, ERROR, and any unrecognized verdict block the tool call. When false, the plugin runs fail-open: all verdicts allow the tool call through and the outcome is only logged — useful for monitoring without enforcement.
chromiaSecretPathstring~/.config/atbash/guard-client-keyPath to the agent key file. Supports ~/.
orgNamestring—Organization the agent was onboarded under, spelled as the dashboard shows it. The plugin resolves which chain to query from this, so it is required when the org is on a private chain.
debugboolfalseWhen true, logs a one-line probe for every before_tool_call showing toolName, top-level event/ctx/args keys, and whether the call was classified as a memory write. Useful for verifying memory-write classifier coverage against real traffic. Logs shape only — argument values are never printed.
judgeEndpointstring—Override the judge URL. Leave unset to use the compiled-in default for the installed environment (prod or dev).
judgeEndpointPolicy"default" | "self-hosted""default"Set to "self-hosted" when pointing at your own judge; requires judgeVerifyPubKey.
judgeVerifyPubKeystring—66-char secp256k1 compressed pubkey used to verify the self-hosted judge response signature. Required when judgeEndpointPolicy is "self-hosted".
memoryPathPatternsstring[]SDK defaultsExtra path substrings the memory classifier uses to identify memory-shaped files (e.g. "/my-agent/memory/"). Extends, does not replace, the SDK's built-in list.
memoryWorkspaceDirstringprocess.cwd()Workspace root used to locate the memory pointer file and MEMORY.md. Supports ~/.
memoryFilePathstring<memoryWorkspaceDir>/MEMORY.mdExplicit path to the agent's MEMORY.md. Overrides the memoryWorkspaceDir-relative default. Supports ~/.
memorySyncTTLMsinteger30000How long (ms) to trust the locally cached memory chain pointer before re-fetching from the chain. Lower values increase freshness at the cost of more chain queries.
memoryRollbackMinScoreinteger (1–10)1Block memory reads when a rolled-back version's safety score is below this threshold. Default 1 means warn only, never block. Raise to e.g. 3 to refuse reading poisoned rollbacks.
judgeTimeoutMsinteger—Max milliseconds to wait for a judge or memory-guard response before treating it as a timeout. When triggered, the plugin applies the same fail-closed/open logic as any other error (enforceDecision controls the outcome). Unset means the plugin waits as long as the host allows. Set to e.g. 12000 when the host has a hard hook deadline and you want the plugin to fail gracefully instead of being killed mid-await.

Updating

openclaw plugins update atbash-openclaw

Uninstalling

openclaw plugins uninstall atbash-openclaw

The agent key file at ~/.config/atbash/guard-client-key is not removed — delete it manually if you want to retire the agent identity.

Secret redaction

Before each tool call is sent to the judge, the underlying @atbash/sdk scans the args and context for secret-shaped values and replaces matches with [REDACTED:<kind>]. Redaction is client-side and happens before signing, so secrets never reach the signed bytes, the request body, the on-chain log, or the AI provider.

When the redactor fires, OpenClaw will surface a warning like:

[atbash] redacted secrets before judge call { tool: "exec", count: 2, kinds: ["anthropic", "generic_token"] }

The kinds field shows which patterns matched. anthropic / openai / aws_access_key / jwt / etc. indicate real vendor secrets. generic_token is a catch-all for long random-looking strings — it can also match UUIDs and content hashes; the judge still gets enough context to evaluate the action, but worth knowing if you see it unexpectedly.

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.

Environment variables

VariableDefaultWhat it does
ATBASH_TELEMETRY"true"Set to "false" to disable usage telemetry. Telemetry is opt-out — it's on unless you explicitly turn it off.

Troubleshooting

Tool calls aren't being audited. Check enabled: true is set both on the entry (plugins.entries["atbash-openclaw"].enabled) and inside config (config.enabled).

Every tool call is blocked, even safe ones. The plugin is fail-closed: any pipeline error blocks. Look for [atbash] … warnings in the OpenClaw log. Most often: missing key, expired key, or restricted egress.

Plugin loads but config is not applied (audit runs on defaults). The plugins.entries key must be exactly "atbash-openclaw" — the plugin's id from its openclaw.plugin.json. Former names ("openclaw", "atbash-plugin") are silently ignored; the plugin logs a warning at startup but otherwise runs unconfigured. Check the OpenClaw startup log for [atbash] found config under former plugin id and move the settings block to plugins.entries["atbash-openclaw"].

Maintainer release contract

Development packages are released only through the protected Publish development package GitHub workflow. The workflow requires the npm environment, the exact PUBLISH confirmation, and npm trusted-publisher configuration for this repository and workflow. It never accepts a registry token from package source.

The release guard refuses a dirty checkout, reads the live package and SDK tags, chooses a collision-free prerelease, copies only Git-tracked files into a temporary staging tree, pins the exact SDK version there, installs and tests from the staged lockfile, cleans and rebuilds dist, validates the tarball, rechecks registry state, publishes, and verifies the resulting dev tag. The tracked source manifest is never rewritten by a release.

Because this repository is private, npm provenance statements are not supported. Trusted publishing still removes long-lived npm tokens; configure the protected npm environment and trusted publisher before enabling the workflow.

License

Licensed under the Apache License, Version 2.0. See NOTICE for attribution. Versions published before this change remain available under the license they shipped with.

版本与发布记录

@atbash/atbash-openclaw 共发布 62 个版本,首次发布于 2026/05/15;过去 12 个月发布了 62 个版本。

版本发布日期距今
0.11.0latest2026/10/299 天前
0.21.0-dev.2dev2026/10/2612 天前
0.20.0-dev.22026/10/2216 天前
0.19.3-dev.22026/10/2019 天前
0.19.2-dev.22026/10/1919 天前
0.10.02026/10/1523 天前

关于 @atbash/atbash-openclaw 的常见问题

@atbash/atbash-openclaw 是什么?

OpenClaw ATBASH tool-audit plugin. Thin adapter that maps OpenClaw's before_tool_call hook onto @atbash/sdk.

如何安装 @atbash/atbash-openclaw?

在项目目录运行 npm install @atbash/atbash-openclaw,或使用 pnpm add / yarn add / bun add。

@atbash/atbash-openclaw 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@atbash/atbash-openclaw 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@atbash/atbash-openclaw 可以商用吗?

@atbash/atbash-openclaw 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@atbash/atbash-openclaw 的下载量有多少?

根据 npm 官方下载统计,@atbash/atbash-openclaw 在 2026/10/07 – 2026/11/05 这 30 天内被下载 2,063 次,日均约 69 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@atbash/atbash-openclaw 还在维护吗?

最新版本 0.11.0 发布于 2026/10/29(9 天前);至今共发布 62 个版本,其中过去 12 个月发布了 62 个;首次发布于 2026/05/15。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。