{"_id":"@agent-seal/sdk","_rev":"4-1eb020ad7486b81315ddc8fbc476c143","name":"@agent-seal/sdk","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@agent-seal/sdk","version":"0.1.0","keywords":["ai-agent","agent-identity","a2a","agent-registry","eu-ai-act","agent-accountability","ed25519","dar-al-adl","agent-seal"],"license":"MIT","_id":"@agent-seal/sdk@0.1.0","maintainers":[{"name":"agent-seal1","email":"iqbalpatan083@gmail.com"}],"homepage":"https://agent-seal.xyz","bugs":{"url":"https://github.com/aqbalpatan12-sys/agent-seal.xyz/issues"},"bin":{"agent-seal":"dist/cli.js"},"dist":{"shasum":"6639eae3d5c2e9f258be54431d7342b40eff58b8","tarball":"https://registry.npmjs.org/@agent-seal/sdk/-/sdk-0.1.0.tgz","fileCount":18,"integrity":"sha512-BIXjJyFF50VF0cHooMNkRQnn1rZKVyz+S/fPrnjdh2KZh68GNlMVuVEfKV6CKve1924cTgp7UmxL34c277OqXg==","signatures":[{"sig":"MEUCIQD7UbNerbPCjD34RlKZxv9FZyD9gSRkw1T7kMLHcJBBggIgKnouIM+TCb0pqio0T+lOWusvYUd/zhy7n0b9Wt7F7gE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41255},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"58fb74346088e4fd2fea6e95b9a0c4c61d7c403c","scripts":{"test":"node --import tsx/esm --test test/integration.test.ts","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"agent-seal1","email":"iqbalpatan083@gmail.com"},"repository":{"url":"git+https://github.com/aqbalpatan12-sys/agent-seal.xyz.git","type":"git"},"_npmVersion":"10.9.3","description":"Give your AI agent a signed, verifiable identity in one line.","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@noble/hashes":"^1.4.0","@noble/ed25519":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.5.0","@types/node":"^20.14.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1781907394975_0.4888862482467671","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agent-seal/sdk","version":"0.1.1","keywords":["ai-agent","agent-identity","a2a","agent-registry","eu-ai-act","agent-accountability","ed25519","dar-al-adl","agent-seal"],"license":"MIT","_id":"@agent-seal/sdk@0.1.1","maintainers":[{"name":"agent-seal1","email":"iqbalpatan083@gmail.com"}],"homepage":"https://agent-seal.xyz","bugs":{"url":"https://github.com/aqbalpatan12-sys/agent-seal.xyz/issues"},"bin":{"agent-seal":"dist/cli.js"},"dist":{"shasum":"6e1d6959272f5098d30f680ab1d88fda7fc60714","tarball":"https://registry.npmjs.org/@agent-seal/sdk/-/sdk-0.1.1.tgz","fileCount":18,"integrity":"sha512-/q4Zcc209hfvK/L6TUHpsBUMoox5AleS7adcMFw1jwbfRI+P+TTqHuh/+ZktHio6vY+7xT0Qa5A7atz+6qlPlg==","signatures":[{"sig":"MEUCIQCkRiG9e68nzaiw2+O+6ADN5ocBGA+da0IhA8h3oQ16pQIgdQ2JhzOy7vH92zFv12RP51GDkmJMzzVTgX+/02HabJU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47900},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"d70c83b3470da0f452ab6e02e4ebddc422beefc8","scripts":{"test":"node --import tsx/esm --test test/integration.test.ts","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"agent-seal1","email":"iqbalpatan083@gmail.com"},"repository":{"url":"git+https://github.com/aqbalpatan12-sys/agent-seal.xyz.git","type":"git"},"_npmVersion":"10.9.3","description":"Give your AI agent a signed, verifiable identity in one line.","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@noble/hashes":"^1.4.0","@noble/ed25519":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.5.0","@types/node":"^20.14.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.1_1783095985949_0.9293489627224907","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@agent-seal/sdk","version":"0.2.0","keywords":["ai-agent","agent-identity","a2a","agent-registry","eu-ai-act","agent-accountability","ed25519","dar-al-adl","agent-seal"],"license":"MIT","_id":"@agent-seal/sdk@0.2.0","maintainers":[{"name":"agent-seal1","email":"iqbalpatan083@gmail.com"}],"homepage":"https://agent-seal.xyz","bugs":{"url":"https://github.com/aqbalpatan12-sys/agent-seal.xyz/issues"},"bin":{"agent-seal":"dist/cli.js"},"dist":{"shasum":"ce47e059844573a776024859c7d0aa06522f0812","tarball":"https://registry.npmjs.org/@agent-seal/sdk/-/sdk-0.2.0.tgz","fileCount":26,"integrity":"sha512-K/qAEEHAM51UCLRalTwp4H17xcOhT6Eh4NgmIjqc1uc1iBhhdBEd3Fs6FlgUkbg9VMOHJzYl5rFc+rpSrcDbOQ==","signatures":[{"sig":"MEQCIGl+IEXon1L6m4ytyDZceGM0SFXe7zYCNAgdWHz/xaLrAiAA8zzgh4IugUv7AwwvneRCpVIb6uyIVwSlf3q1wHZ2wA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70014},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"2814aada7b3e7f22dc7f60c6b3c2664f7bceadce","scripts":{"test":"node --import tsx/esm --test test/integration.test.ts","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"agent-seal1","email":"iqbalpatan083@gmail.com"},"repository":{"url":"git+https://github.com/aqbalpatan12-sys/agent-seal.xyz.git","type":"git"},"_npmVersion":"10.9.3","description":"Give your AI agent a signed, verifiable identity in one line.","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@noble/hashes":"^1.4.0","@noble/ed25519":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.5.0","@types/node":"^20.14.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.0_1783160929359_0.36980653585813594","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@agent-seal/sdk","version":"0.3.0","description":"Give your AI agent a signed, verifiable identity in one line.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"agent-seal":"dist/cli.js"},"exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"engines":{"node":">=20.0.0"},"scripts":{"build":"tsc","prepublishOnly":"npm run build","test":"node --import tsx/esm --test test/integration.test.ts"},"keywords":["ai-agent","agent-identity","a2a","agent-registry","eu-ai-act","agent-accountability","ed25519","dar-al-adl","agent-seal"],"license":"MIT","homepage":"https://agent-seal.xyz","repository":{"type":"git","url":"git+https://github.com/aqbalpatan12-sys/agent-seal.xyz.git"},"dependencies":{"@noble/ed25519":"^2.1.0","@noble/hashes":"^1.4.0"},"devDependencies":{"@types/node":"^20.14.0","tsx":"^4.19.0","typescript":"^5.5.0"},"_id":"@agent-seal/sdk@0.3.0","gitHead":"bd6725e690b9dd72d6c204cd427fabc98c33faa5","bugs":{"url":"https://github.com/aqbalpatan12-sys/agent-seal.xyz/issues"},"_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-tNj4DHc6kV1ZkZyfw290Y2Td1Ovx64FPcWLrIc8XdcRxOZEt+u7pIUod6wCoC00yaWB78mj/LvkVB7DVFZ9O9A==","shasum":"b0ada12de79764fd2b0e0df1bbcd3936b0d279a6","tarball":"https://registry.npmjs.org/@agent-seal/sdk/-/sdk-0.3.0.tgz","fileCount":38,"unpackedSize":201917,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGotPnde176af6NLXJETONfNsg581ghyuhh6+rlIDN+MAiATCsPVt5lbmrGv5gekRzzlcPnWJgdWerwZW8RYZ6AmXA=="}]},"_npmUser":{"name":"agent-seal1","email":"iqbalpatan083@gmail.com"},"directories":{},"maintainers":[{"name":"agent-seal1","email":"iqbalpatan083@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.3.0_1783397564591_0.635196210775006"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-19T22:16:34.784Z","modified":"2026-07-07T04:12:44.876Z","0.1.0":"2026-06-19T22:16:35.108Z","0.1.1":"2026-07-03T16:26:26.078Z","0.2.0":"2026-07-04T10:28:49.500Z","0.3.0":"2026-07-07T04:12:44.730Z"},"bugs":{"url":"https://github.com/aqbalpatan12-sys/agent-seal.xyz/issues"},"license":"MIT","homepage":"https://agent-seal.xyz","keywords":["ai-agent","agent-identity","a2a","agent-registry","eu-ai-act","agent-accountability","ed25519","dar-al-adl","agent-seal"],"repository":{"type":"git","url":"git+https://github.com/aqbalpatan12-sys/agent-seal.xyz.git"},"description":"Give your AI agent a signed, verifiable identity in one line.","maintainers":[{"name":"agent-seal1","email":"iqbalpatan083@gmail.com"}],"readme":"# agent-seal-xyz\n\n[![Agent Seal Registry](https://img.shields.io/badge/Agent%20Seal-Registry-blue?style=flat-square)](https://agent-seal.xyz)\n[![Verify agents](https://img.shields.io/badge/Verify-agent--seal.xyz%2Fverifier-green?style=flat-square)](https://agent-seal.xyz/verifier)\n[![npm](https://img.shields.io/npm/v/@agent-seal/sdk?style=flat-square)](https://www.npmjs.com/package/@agent-seal/sdk)\n\n**Give your AI agent a signed, verifiable identity in one line.**\n\n`agent-seal-xyz` registers your AI agent with the [Agent Seal Registry](https://agent-seal.xyz) — a court-grade, cryptographic identity system for autonomous agents. Keys are generated locally and never leave your machine.\n\n## Quick start\n\n```ts\nimport { seal } from '@agent-seal/sdk'\n\nconst agent = await seal({\n  name: 'my-agent',\n  architect: 'you@email.com',\n  capabilities: ['code-review'],\n})\nconsole.log(agent.sijil, agent.sealUrl)\n```\n\nThat's it. Your agent now has a public, cryptographically verifiable identity.\n\n## Install\n\n```bash\nnpm install @agent-seal/sdk\n```\n\n## CLI\n\n```bash\n# Register\nnpx @agent-seal/sdk register --name my-agent --architect you@email.com --capabilities code-review,pr-analysis\n\n# Check status\nnpx @agent-seal/sdk status <agent-id>\n\n# Verify seal and card\nnpx @agent-seal/sdk verify <agent-id>\n\n# Attestation heartbeat — prove the agent is still the sealed agent\nnpx @agent-seal/sdk attest --name my-agent --every 3600\n\n# Verify a warrant chain offline (no network)\nnpx @agent-seal/sdk warrant verify chain.json\n\n# Check an action against a warrant *before* it runs (the gatekeeper)\nnpx @agent-seal/sdk enforce --warrant chain.json --action \"send payment from acct:acme/checking\"\n\n# Verify a signed decision receipt offline\nnpx @agent-seal/sdk receipt verify receipt.json --trusted-key <hex>\n```\n\n## API\n\n### `seal(options)`\n\nRegisters an agent and returns an `AgentRegistration` object.\n\n```ts\nimport { seal } from '@agent-seal/sdk'\n\nconst agent = await seal({\n  name: 'my-agent',\n  architect: 'you@email.com',\n  capabilities: ['code-review', 'pr-analysis'],\n  model: 'claude-sonnet-4-6',      // optional\n  privateKey: process.env.AGENT_KEY, // optional — re-use an existing identity\n})\n```\n\n| Property | Type | Description |\n|---|---|---|\n| `agent.sijil` | `number \\| null` | Sijil number in the registry |\n| `agent.sealUrl` | `string` | URL to the agent's SVG seal |\n| `agent.badgeUrl` | `string` | URL to the embeddable badge |\n| `agent.verifyUrl` | `string` | URL to verify the seal |\n| `agent.agentId` | `string` | UUID in the registry |\n| `agent.publicKey` | `string` | Hex-encoded Ed25519 public key |\n| `agent.manifestHash` | `string` | SHA-256 hash of the covenant |\n\n### `register(options)` / `status(agentId)` / `verify(agentId)`\n\nLower-level named exports for direct control.\n\n### `attest(options)` — Drift Monitoring\n\nSends a signed `agent:attest` heartbeat carrying the DNA sequence recomputed\nfrom the covenant stored at registration (`~/.agent-seal/covenants/`). The\nregistry compares it to the sealed baseline and reports drift.\n\n```ts\nimport { attest } from '@agent-seal/sdk'\n\nconst result = await attest({ name: 'my-agent' })\nconsole.log(result.driftStatus) // \"healthy\" | \"authorized-evolution\" | \"unauthorized-drift\"\nconsole.log(result.health)      // \"fresh\" | \"drifted\" | ...\n```\n\nOptions: `{ agentId?, name?, covenantPath?, privateKey?, registryUrl? }` —\none of `agentId`, `name`, or `covenantPath` is required. Health is public at\n`GET /v1/public/agents/{id}/status` → `attestation.health`.\n\n## Warrant Chains, Runtime Enforcement & Decision Receipts\n\nBeyond identity, the SDK ships an offline authority layer — power-of-attorney as\ncode. A **keeper** issues a signed **warrant** delegating a scoped set of\ncapabilities to an agent; the agent can **attenuate** (never widen) that scope\ndown the chain. Every check is pure and offline — no network, no shared secret.\n\n```ts\nimport {\n  issueWarrant, assembleChain, verifyChain,\n  enforceAction, enforceAndReceipt, verifyReceipt,\n} from '@agent-seal/sdk'\n\n// 1. A keeper delegates a scoped, time-boxed warrant to an agent\nconst { warrant } = issueWarrant({\n  issuer:  { id: 'keeper:acme', type: 'keeper', publicKey: keeperPub },\n  subject: { id: 'agent:seal-1', type: 'agent', publicKey: agentPub },\n  scope:   { capabilities: ['payments.send'], resources: ['acct:acme/*'] },\n  notAfter: new Date(Date.now() + 3600_000).toISOString(),\n}, keeperPrivateKey)\n\nconst chain = assembleChain([warrant])\nverifyChain(chain).valid // → true\n\n// 2. Gate an action *before* it runs\nconst action = { capability: 'payments.send', resource: 'acct:acme/checking' }\nconst decision = enforceAction(chain, action)\ndecision.allowed // → true   (false + code 'resource-out-of-scope' if outside the grant)\n\n// 3. Mint a non-repudiable, signed proof of the decision\nconst { receipt } = enforceAndReceipt(chain, action, {\n  receipt: { signingKey: enforcerPrivateKey, publicKey: enforcerPub, enforcerId: 'gw:1' },\n})\nverifyReceipt(receipt, { trustedKeys: [enforcerPub] }).valid // → true\n```\n\n`enforceAction` returns a structured `EnforceDecision` (`allowed`, `code`,\n`reason`, `checks`, `effectiveScope`, `remainingBudget`). Warrants support\ncapability + resource scoping, spend budgets, caveats, expiry, and revocation\ncascades. Decision receipts are Ed25519-signed and verify offline against a\ntrusted-key set.\n\n## Error handling\n\n```ts\nimport { seal, AgentSealError, RateLimitError } from '@agent-seal/sdk'\n\ntry {\n  const agent = await seal({ name: 'my-agent', architect: 'you@email.com' })\n} catch (err) {\n  if (err instanceof RateLimitError) {\n    console.error(`Rate limited. Retry in ${err.retryAfter}s.`)\n  } else if (err instanceof AgentSealError) {\n    console.error(`Registration failed: ${err.message}`)\n  }\n}\n```\n\n## Key management\n\nOn first use, `agent-seal-xyz` generates an Ed25519 keypair and stores it at:\n\n```\n~/.agent-seal/keys/private.hex   (mode 0600)\n~/.agent-seal/keys/public.hex    (mode 0600)\n```\n\nThe private key never leaves your machine. To re-use an identity across environments (e.g., CI), pass `privateKey` as a hex string.\n\n## What is Agent Seal?\n\n[Agent Seal](https://agent-seal.xyz) is a public registry that gives AI agents cryptographic, human-accountable identities. Every registered agent receives a Sijil number, a signed covenant, and a public seal — verifiable by anyone at [agent-seal.xyz/verifier](https://agent-seal.xyz/verifier).\n\n---\n\n[agent-seal.xyz](https://agent-seal.xyz) · [Verify an agent](https://agent-seal.xyz/verifier) · [Registry API](https://agent-seal.xyz/api)\n","readmeFilename":"README.md"}