{"_id":"@atbash/eliza-plugin","_rev":"4-7248f53c8903deeab5a74c9adf75f832","name":"@atbash/eliza-plugin","dist-tags":{"dev":"0.2.0","latest":"0.2.1"},"versions":{"0.2.0":{"name":"@atbash/eliza-plugin","version":"0.2.0","keywords":["atbash","elizaos","agent-safety","ai-safety"],"license":"SEE LICENSE IN LICENSE","_id":"@atbash/eliza-plugin@0.2.0","maintainers":[{"name":"ketiyoh","email":"keti.yohannes@chromaway.com"},{"name":"bewuketu_lake","email":"bewuketu.lake@chromaway.com"},{"name":"celse13","email":"honore.rugira@chromaway.com"},{"name":"tsiontesfaye","email":"tsion.tesfaye.g@gmail.com"},{"name":"tewuhbo","email":"tewuhbomihret1992@gmail.com"},{"name":"amanuelmr","email":"amanuel.mandefrow@chromaway.com"}],"dist":{"shasum":"ac67384539166360e851f258d74e42cea60abfa3","tarball":"https://registry.npmjs.org/@atbash/eliza-plugin/-/eliza-plugin-0.2.0.tgz","fileCount":4,"integrity":"sha512-SKYZsJyDRoqn26OkJoIQfwSAITW+nm1oufKuDardaYZKi3MyDS5BLufrr2lP3heJSx47E+dVmRxBD98bOfzeRQ==","signatures":[{"sig":"MEYCIQDoxWfh2nO386MisYLa12BrFhQTE1RZW7xaHBoTBw5UJgIhAMtG+aRoqT6BpnoiVvfDoOQjUTdacD0ZJztz6lxRIaWS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16133},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1e1c366c0b9683074f833eb29b2cb18ee7f598fc","scripts":{"build":"tsup src/index.ts --format esm --dts --clean","example":"node example/run.mjs","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"ketiyoh","email":"keti.yohannes@chromaway.com"},"_npmVersion":"11.8.0","description":"Atbash safety plugin for ElizaOS agents","directories":{},"_nodeVersion":"25.5.0","dependencies":{"@atbash/sdk":"^0.3.14"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^22.15.21","@elizaos/core":"^1.7.2"},"peerDependencies":{"@elizaos/core":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eliza-plugin_0.2.0_1778656524593_0.9539347897080799","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been moved to @atbash/atbash-eliza"},"0.2.1":{"name":"@atbash/eliza-plugin","version":"0.2.1","keywords":["atbash","elizaos","agent-safety","ai-safety"],"license":"SEE LICENSE IN LICENSE","_id":"@atbash/eliza-plugin@0.2.1","maintainers":[{"name":"ketiyoh","email":"keti.yohannes@chromaway.com"},{"name":"bewuketu_lake","email":"bewuketu.lake@chromaway.com"},{"name":"celse13","email":"honore.rugira@chromaway.com"},{"name":"tsiontesfaye","email":"tsion.tesfaye.g@gmail.com"},{"name":"tewuhbo","email":"tewuhbomihret1992@gmail.com"},{"name":"amanuelmr","email":"amanuel.mandefrow@chromaway.com"}],"dist":{"shasum":"80c25fbd8cf010ccb279f48c2117913200f09d5c","tarball":"https://registry.npmjs.org/@atbash/eliza-plugin/-/eliza-plugin-0.2.1.tgz","fileCount":4,"integrity":"sha512-IVVt4ACOXqRLvvI3kZGInj4OiXTIoN4a3QFvllfayo5spRta/xg6+xBpYW2cXhLYCBn0wK60LEU0lz4umMsj/g==","signatures":[{"sig":"MEQCIFrQcbG2I3CxFSSYE2bHtdlxGKCIkP5I68Z18mRTrFdDAiACQu/aRXjmZmMnYkUcSH2IdZ109x2kxPAWWX+vZWBp5g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11663},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b3c52548cde7ce085bedbbd03293df5b2379dc0a","scripts":{"build":"tsup src/index.ts --format esm --dts --clean","example":"node example/run.mjs","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"amanuelmr","email":"amanuel.mandefrow@chromaway.com"},"_npmVersion":"10.8.2","description":"Atbash safety plugin for ElizaOS agents","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@atbash/sdk":"^0.3.20"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^22.15.21","@elizaos/core":"^1.7.2"},"peerDependencies":{"@elizaos/core":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eliza-plugin_0.2.1_1778850545848_0.010799030269736276","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been moved to @atbash/atbash-eliza"}},"time":{"created":"2026-05-13T07:15:24.476Z","modified":"2026-09-10T12:09:25.044Z","0.2.0":"2026-05-13T07:15:24.727Z","0.2.1":"2026-05-15T13:09:06.050Z"},"license":"SEE LICENSE IN LICENSE","keywords":["atbash","elizaos","agent-safety","ai-safety"],"description":"Atbash safety plugin for ElizaOS agents","maintainers":[{"name":"amanuelmr","email":"amanuel.mandefrow@chromaway.com"},{"name":"bewuketu_lake","email":"bewuketu.lake@chromaway.com"},{"name":"celse13","email":"honore.rugira@chromaway.com"},{"name":"ketiyoh","email":"keti.yohannes@chromaway.com"},{"name":"tewuhbo","email":"tewuhbomihret1992@gmail.com"},{"name":"tsiontesfaye","email":"tsion.tesfaye.g@gmail.com"}],"readme":"# `@atbash/eliza-plugin`\n\nAtbash safety plugin for ElizaOS agents.\n\nUse this when your agent already runs inside ElizaOS and you want Atbash checks around sensitive actions, current policy context in runtime, and best-effort audit logging after action completion.\n\n## What It Adds\n\n- `atbashPlugin`\n  Registers the Atbash service, policy provider, audit evaluator, and explicit judge action.\n- `AtbashService`\n  Loads the Atbash agent identity from Eliza runtime settings.\n- `ATBASH_JUDGE`\n  Explicit Eliza action that asks Atbash for a safety verdict.\n- `withAtbashGuard(handler)`\n  Wraps sensitive action handlers so Atbash decides before the real handler runs.\n- `policyProvider`\n  Exposes current policy and jail status to the runtime.\n- `auditEvaluator`\n  Logs completed action text to Atbash on a best-effort basis.\n\n## Runtime Inputs\n\n- `ATBASH_AGENT_PRIVKEY`\n  Required. Used to derive the Atbash agent identity and sign requests.\n- `ATBASH_ENDPOINT`\n  Optional. Overrides the default Atbash API endpoint.\n\n## Runtime Model\n\nAt startup:\n\n1. Eliza loads `atbashPlugin`.\n2. `AtbashService` reads `ATBASH_AGENT_PRIVKEY`.\n3. The service derives the public key and creates one reusable Atbash client.\n4. The service checks whether the agent is registered and warns if it is not.\n\nDuring runtime:\n\n1. `policyProvider` can expose current safety status.\n2. `ATBASH_JUDGE` can request an explicit verdict.\n3. `withAtbashGuard()` checks Atbash before sensitive action handlers run.\n4. `auditEvaluator` logs completed activity without crashing the agent if logging fails.\n\n## Guarded Actions\n\nWrap the action closest to the side effect:\n\n```ts\nimport { withAtbashGuard } from \"@atbash/eliza-plugin\";\n\nexport const sendFundsAction = {\n  name: \"SEND_FUNDS\",\n  description: \"Send funds to an external destination\",\n  validate: async () => true,\n  handler: withAtbashGuard(async (_runtime, message) => {\n    await submitTransfer(message);\n    return { success: true, text: \"Transfer submitted\" };\n  }),\n};\n```\n\nVerdict behavior:\n\n- `ALLOW`\n  Original action handler runs.\n- `HOLD`\n  Original action handler does not run. The action returns a held result with the Atbash `toolCallId`.\n- `BLOCK`\n  Original action handler does not run. The action returns a blocked result with the policy reason.\n- `ERROR`\n  Original action handler does not run. The action returns an error result.\n\n## Explicit Judge Action\n\n`ATBASH_JUDGE` asks Atbash for a verdict and returns the decision in `data`.\n\nUse it when the agent or app needs to inspect safety before choosing a next step. It does not execute your business action.\n\n## Example\n\nThe runtime example uses a real Eliza `AgentRuntime`, an in-memory adapter, and a simulated guarded transfer action.\n\n```bash\nnpm run build\nATBASH_AGENT_PRIVKEY=your_key_here npm run example\n```\n\nOptional endpoint:\n\n```bash\nATBASH_AGENT_PRIVKEY=your_key_here ATBASH_ENDPOINT=https://atbash.ai npm run example\n```\n","readmeFilename":"README.md"}