{"_id":"@allowkit/policy","name":"@allowkit/policy","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@allowkit/policy","version":"0.1.0","description":"Spending policy for autonomous agents: per-call caps, rolling budgets, allowlists, and human-approval escalation. The single choke point in front of every signer.","license":"FSL-1.1-ALv2","type":"module","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"typecheck":"tsc --build"},"repository":{"type":"git","url":"git+https://github.com/allowkit/react-native-x402.git","directory":"packages/policy"},"dependencies":{"@allowkit/x402-client":"0.1.0"},"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"homepage":"https://github.com/allowkit/react-native-x402#readme","bugs":{"url":"https://github.com/allowkit/react-native-x402/issues"},"_id":"@allowkit/policy@0.1.0","gitHead":"24b3cebd599179fb0faad884f84b45e825fe1ab1","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-5KGd9iw77vzSA4pnD9QW2fqO9np4dP4+5uyq61kQmc2Bp0ZRDzHMtaNi3GufE7RpiBal/GIzrpZshuEy1Ilx+g==","shasum":"4351dd797ce8b04bc4aaaafd8a89b754ff0c8b72","tarball":"https://registry.npmjs.org/@allowkit/policy/-/policy-0.1.0.tgz","fileCount":8,"unpackedSize":21812,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBE8vUOyiqXCcPjNo2GckhnaySZFy49Sj9K9czvlXZjzAiBPPUnmLqg0xYROcdAqJMiAwKrRQAvTZSOmsYnlaICTlA=="}]},"_npmUser":{"name":"hughchen","email":"seal09@gmail.com"},"directories":{},"maintainers":[{"name":"hughchen","email":"seal09@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/policy_0.1.0_1786143364487_0.21302811992726856"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-07T22:56:04.274Z","0.1.0":"2026-08-07T22:56:04.692Z","modified":"2026-08-07T22:56:04.960Z"},"maintainers":[{"name":"hughchen","email":"seal09@gmail.com"}],"description":"Spending policy for autonomous agents: per-call caps, rolling budgets, allowlists, and human-approval escalation. The single choke point in front of every signer.","homepage":"https://github.com/allowkit/react-native-x402#readme","repository":{"type":"git","url":"git+https://github.com/allowkit/react-native-x402.git","directory":"packages/policy"},"bugs":{"url":"https://github.com/allowkit/react-native-x402/issues"},"license":"FSL-1.1-ALv2","readme":"# @allowkit/policy\n\nDeterministic spending policy for autonomous agents — the single choke point in front of every signer in [react-native-x402](https://github.com/allowkit/react-native-x402).\n\n`LocalPolicyGuard` evaluates every `PaymentIntent` against a declarative schema — per-transaction cap, rolling 24h budget, payee/network allowlists, human-approval threshold — returning `allow | deny | escalate` and appending to an audit log. Policy is enforced *outside the model*: the agent never holds a raw signing function.\n\n```ts\nimport { LocalPolicyGuard, usdc } from '@allowkit/policy';\n\nconst guard = new LocalPolicyGuard({\n  perTxMax: usdc(0.25),\n  dailyBudget: usdc(5),\n  requireApprovalAbove: usdc(0.1),\n  payeeAllowlist: ['0xYourKnownSeller…'],\n});\n```\n\nThe TypeScript implementation is the reference; evaluation migrates into native cores (Secure Enclave / StrongBox-backed) so a compromised JS bundle cannot patch the guard — the interface here is frozen so that migration is invisible to consumers. On-chain caps (session-key limits on Base, Swig roles on Solana) are the hard backstop above this layer.\n\nLicense: FSL-1.1-ALv2 (converts to Apache-2.0 two years after each release — [fsl.software](https://fsl.software)).\n","readmeFilename":"README.md","_rev":"1-9ddfe300d2480449583cda557b584bef"}