{"_id":"@agentlaw/audit","name":"@agentlaw/audit","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@agentlaw/audit","version":"0.1.0","description":"Tamper-evident audit log for AI agent actions: hash-chained JSONL writer and verifier.","type":"module","license":"Apache-2.0","engines":{"node":">=22"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -b","typecheck":"tsc -b","pretest":"tsc -b","test":"node --import tsx --test \"test/**/*.test.ts\""},"dependencies":{"@agentlaw/core":"0.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"repository":{"type":"git","url":"git+https://github.com/Mounaji-Webs/agentlaw.git","directory":"packages/audit"},"homepage":"https://agentlaw.dev","bugs":{"url":"https://github.com/Mounaji-Webs/agentlaw/issues"},"keywords":["ai-agents","security","policy","mcp","governance","agentlaw","audit-log","hash-chain","tamper-evident"],"gitHead":"a0e1b6f4b67936c9600daa13f63c1e45f8b9406b","_id":"@agentlaw/audit@0.1.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-/D2CIiQAu3cCGCiEPxbVF7C6xEQPXsQYLzYmKDDnjQeMIdnTEqrjqrRo9tF3YRk34rZeIxiRMifZvH+9AiY0qw==","shasum":"7611a0446bc5b5781770084127ed0afbf102b815","tarball":"https://registry.npmjs.org/@agentlaw/audit/-/audit-0.1.0.tgz","fileCount":27,"unpackedSize":33300,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDsfZBkpBDp7iM541aD4kQqaqiiK8aXF1osNHaNzua53AiEA1DzfjPhct0sgzaU3G0jBekDAepKraoEgXlG+9RsE7RU="}]},"_npmUser":{"name":"lucilo","email":"lucilo@gmail.com"},"directories":{},"maintainers":[{"name":"lucilo","email":"lucilo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/audit_0.1.0_1785645890919_0.6641130796800434"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-02T04:44:50.696Z","0.1.0":"2026-08-02T04:44:51.057Z","modified":"2026-08-02T04:44:51.260Z"},"maintainers":[{"name":"lucilo","email":"lucilo@gmail.com"}],"description":"Tamper-evident audit log for AI agent actions: hash-chained JSONL writer and verifier.","homepage":"https://agentlaw.dev","keywords":["ai-agents","security","policy","mcp","governance","agentlaw","audit-log","hash-chain","tamper-evident"],"repository":{"type":"git","url":"git+https://github.com/Mounaji-Webs/agentlaw.git","directory":"packages/audit"},"bugs":{"url":"https://github.com/Mounaji-Webs/agentlaw/issues"},"license":"Apache-2.0","readme":"# @agentlaw/audit\n\nTamper-evident audit log for AI agent actions, part of [AgentLaw](https://github.com/Mounaji-Webs/agentlaw). Hash-chained JSONL: every decision the policy engine takes lands as an entry whose hash covers its content plus the previous entry — an edit or deletion anywhere breaks the chain.\n\n```ts\nimport { AuditWriter, verifyAuditDir } from \"@agentlaw/audit\";\n\nconst audit = await AuditWriter.open({ dir: \".agentlaw/audit\", policyHash });\naudit.append(\"decision\", { tool: \"shell\", decision: \"deny\", ruleId: \"no-rm\" });\n\nconst report = await verifyAuditDir(\".agentlaw/audit\");\n// the report flags the exact entry the moment anything was altered\n```\n\n- **Writer** — append-only JSONL, one chain per environment, secret redaction before anything is persisted.\n- **Verifier** — recomputes the whole chain from canonical content; used by `agentlaw audit verify`.\n\nSpec: [RFC-0002 — audit log](https://github.com/Mounaji-Webs/agentlaw/blob/main/spec/rfc-0002-audit-log.md).\n\nApache-2.0.\n","readmeFilename":"README.md","_rev":"1-86ac5c4232f9e042831e8e8ac6989789"}