{"_id":"@aegisys/record","name":"@aegisys/record","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aegisys/record","version":"1.0.0","description":"Sealed, verifiable receipts for AI agent actions — Apache 2.0","license":"Apache-2.0","homepage":"https://aegisys.ai","repository":{"type":"git","url":"git+https://github.com/Omitheone/aegisys-record-sdk.git"},"author":{"name":"Aegisys","email":"engineering@aegisys.ai"},"keywords":["ai-agent","audit","receipt","verifiable","ed25519","merkle","attestation"],"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"bin":{"aegisys-record":"dist/cli.js"},"engines":{"node":">=18.17"},"dependencies":{"@noble/ed25519":"^2.1.0","@noble/hashes":"^1.4.0"},"devDependencies":{"@types/node":"^20.14.0","tsup":"^8.1.0","typescript":"^5.4.0","vitest":"^1.6.0"},"scripts":{"build":"tsup src/index.ts src/cli.ts --format cjs,esm --dts --clean","test":"vitest run","test:watch":"vitest","prepublishOnly":"npm run build && npm test"},"_id":"@aegisys/record@1.0.0","gitHead":"fc7820af19bdd38c9b201acc9f2871f1a2acc8b8","bugs":{"url":"https://github.com/Omitheone/aegisys-record-sdk/issues"},"_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-2KQzs0sG7kgJ7x90ROELcnYFdKTbDCJtpAmooF+Grg7J/6Hh2Pqee4A6qWahUV2s64CGj7BID3taqyq2ATRVqA==","shasum":"869e046c5e78fca17384e7014364c1e7c757c1d3","tarball":"https://registry.npmjs.org/@aegisys/record/-/record-1.0.0.tgz","fileCount":11,"unpackedSize":55604,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC7R2+ZMFLW2osTr5mNcwaazeXoC4laizTA9Qa7Pi+0KwIhAKvsgVTO/YS6qpkE/0UbFjupkKPYE0tLEDbE2MMNk1Fj"}]},"_npmUser":{"name":"aegisys","email":"omar@aegisys.ai"},"directories":{},"maintainers":[{"name":"aegisys","email":"omar@aegisys.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/record_1.0.0_1785721343485_0.34882173216961965"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-03T01:42:23.325Z","1.0.0":"2026-08-03T01:42:23.636Z","modified":"2026-08-03T01:42:23.818Z"},"maintainers":[{"name":"aegisys","email":"omar@aegisys.ai"}],"description":"Sealed, verifiable receipts for AI agent actions — Apache 2.0","homepage":"https://aegisys.ai","keywords":["ai-agent","audit","receipt","verifiable","ed25519","merkle","attestation"],"repository":{"type":"git","url":"git+https://github.com/Omitheone/aegisys-record-sdk.git"},"author":{"name":"Aegisys","email":"engineering@aegisys.ai"},"bugs":{"url":"https://github.com/Omitheone/aegisys-record-sdk/issues"},"license":"Apache-2.0","readme":"# @aegisys/record\n\nSealed, verifiable receipts for AI agent actions.\n\n```bash\nnpm install @aegisys/record\n```\n\n## What it does\n\nYour AI doesn't just write code — it **does things**. It sends the email, charges the card, deletes the row. When one of those goes wrong, you need to prove what happened.\n\n`@aegisys/record` wraps your agent's actions and produces **sealed receipts** — cryptographically signed, tamper-evident records that anyone can verify without taking your word for it.\n\n## Quick start\n\n```ts\nimport { createWitness } from \"@aegisys/record\";\n\nconst w = await createWitness({\n  tenantId: \"acme-corp\",\n  seedHex: \"5d2e...\".padEnd(64, \"0\"), // 32-byte Ed25519 seed\n});\n\n// Wrap any async function\nconst charge = w.wrap(\"billing.charge\", stripe.charge);\nawait charge({ amount: 2000 });\n// → sealed receipt saved automatically\n\n// Get all receipts\nconst receipts = w.getReceipts();\nconsole.log(receipts[0].signature.value); // Ed25519 signature\n```\n\n## Verify a receipt\n\n```ts\nimport { verify } from \"@aegisys/record\";\n\nconst result = await verify(receipt);\nif (result.valid) {\n  console.log(\"✓ receipt is genuine\");\n} else {\n  console.error(\"✗ tampered:\", result.error);\n}\n```\n\n## CLI\n\n```bash\n# Verify a single receipt\nnpx aegisys-record verify receipt.json\n\n# Verify a batch (JSONL)\nnpx aegisys-record verify-batch receipts.jsonl\n\n# Generate Merkle proof for receipt at index 0\nnpx aegisys-record prove receipts.jsonl 0 > proof.json\n\n# Verify inclusion in Merkle root\nnpx aegisys-record verify-inclusion receipt.json <root-hash> proof.json\n```\n\n## How it works\n\n1. **Wrap** — `w.wrap(action, fn)` intercepts every call\n2. **Seal** — Receipt is canonicalized (sorted keys, deterministic) and hashed\n3. **Sign** — Ed25519 signature proves the receipt came from you\n4. **Chain** — Each receipt links to the previous via `previous_hash`\n5. **Anchor** — Merkle root commits to a batch of receipts\n\nChange one character and the seal breaks. Even you can't fake it.\n\n## License\n\nApache 2.0 — free forever, including commercial use.\n","readmeFilename":"README.md","_rev":"1-f95cbe9128cc67b1514cad67b70e37d8"}