{"_id":"@absolutejs/policy","_rev":"6-837ddcfdc2d107645b1010c99ca5c869","name":"@absolutejs/policy","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.0":{"name":"@absolutejs/policy","version":"0.1.0","license":"MIT","_id":"@absolutejs/policy@0.1.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"dist":{"shasum":"d439ed00c400a8c2d215c28a8c853ea6ab1840b2","tarball":"https://registry.npmjs.org/@absolutejs/policy/-/policy-0.1.0.tgz","fileCount":8,"integrity":"sha512-HWUFsL5+T3GmxrJ71urI3ZWbgeLXSI6VJTL7AyCUMI0OIems909jHJ5YXJWRJJzBTDg6Zyy2s11WREm/GyaMFg==","signatures":[{"sig":"MEYCIQDU6dg+nGv896wxDH7CLfLF+BP3/+m3Tgh3G+QowuQe0AIhANsYfFq1dGgimNi32neZUIVT9yU3pW298cdEbxgizRuD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":250670},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","shasum":"d439ed00c400a8c2d215c28a8c853ea6ab1840b2","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --target=bun --external @sinclair/typebox && tsc -p tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-HWUFsL5+T3GmxrJ71urI3ZWbgeLXSI6VJTL7AyCUMI0OIems909jHJ5YXJWRJJzBTDg6Zyy2s11WREm/GyaMFg==","absolutejs":{"manifestContract":2},"repository":{"url":"https://github.com/absolutejs/policy.git","type":"git"},"_npmVersion":"10.8.3","description":"Versioned provider-neutral policy lifecycle, simulation, and AuthZEN adapter for AI agent actions.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","@types/bun":"^1.3.14","typescript":"5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/policy_0.1.0_1784165134402_0.9433856001088365","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@absolutejs/policy","version":"0.2.0","license":"MIT","_id":"@absolutejs/policy@0.2.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/policy#readme","bugs":{"url":"https://github.com/absolutejs/policy/issues"},"dist":{"shasum":"ae496d646b6d85e725b9c9d3460494fbf152bfab","tarball":"https://registry.npmjs.org/@absolutejs/policy/-/policy-0.2.0.tgz","fileCount":10,"integrity":"sha512-0VQ6x5SaP6PZV47CNgqQOkh0iIch/HPesXccLA0+RH/aYykj4fWrhX5SOaSdFWa9g39S5ZQ0LjOmLenEwmRRxw==","signatures":[{"sig":"MEUCICQSJrjSEbeyQQrK9FySRPsfxhSZyiZ2ucJqc/WQpu1YAiEAlxBHItHipQ5NlSyrQ0XOesnqM2dFKrwHGsL6hJA89N0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25994},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"737bf229d2f69350cf532d70830e3faad50c7ee3","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @sinclair/typebox && tsc -p tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/policy.git","type":"git"},"_npmVersion":"10.9.2","description":"Versioned provider-neutral policy lifecycle, simulation, and AuthZEN adapter for AI agent actions.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","@types/bun":"^1.3.14","typescript":"5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/policy_0.2.0_1784169612489_0.6968496613051112","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@absolutejs/policy","version":"0.3.0","license":"MIT","_id":"@absolutejs/policy@0.3.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/policy#readme","bugs":{"url":"https://github.com/absolutejs/policy/issues"},"dist":{"shasum":"92b7d12de8fc74e30b89f0b60c4f4df571afc85e","tarball":"https://registry.npmjs.org/@absolutejs/policy/-/policy-0.3.0.tgz","fileCount":12,"integrity":"sha512-brpkT6/SxQhRO8tL7h3uzASL2Lc5NCRzvqEO9oz9w2Vz0Q8AgMTMATryymcmu3B2jnjIMhPGy3YEdFuj6Uk8NA==","signatures":[{"sig":"MEUCICVZGIUQc/x9Qfs9qNsGwzCAyit3PaldPmy3e64789r1AiEAoaoa+PhwWzFZsXU0tyKVNoNs2LoSTyNLuYkXuV5dYk8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55611},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./drizzle":{"types":"./dist/drizzle.d.ts","import":"./dist/drizzle.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"ee7945d8f5a372dbf6de3e169166ffede89bba4e","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/drizzle.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @sinclair/typebox --external drizzle-orm --external 'drizzle-orm/*' --external drizzle-typebox && tsc -p tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/policy.git","type":"git"},"_npmVersion":"10.9.2","description":"Versioned provider-neutral policy lifecycle, simulation, and AuthZEN adapter for AI agent actions.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"drizzle-typebox":"1.0.0-beta.14-a36c63d","@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","@types/bun":"^1.3.14","typescript":"5.8.3","drizzle-orm":"1.0.0-rc.4","@electric-sql/pglite":"0.3.14"},"peerDependencies":{"drizzle-orm":">=1.0.0-rc.4 <2"},"peerDependenciesMeta":{"drizzle-orm":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/policy_0.3.0_1784806085984_0.5609114253478025","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@absolutejs/policy","version":"0.3.1","license":"MIT","_id":"@absolutejs/policy@0.3.1","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"dist":{"shasum":"a5d75f92f27d30dad0971a7fd20a7e9d9dc59f7e","tarball":"https://registry.npmjs.org/@absolutejs/policy/-/policy-0.3.1.tgz","fileCount":12,"integrity":"sha512-OKBobPl5vFpjo/bW5Px8HACTae0p0JMRJ6pr37xvdEKVMvtMb4JqRK4jL0mcNUGR6Z/A95exZMGA6zg4ztKi+w==","signatures":[{"sig":"MEYCIQC0Qut+wJHp0jb5xtHLku995w/txIncIzHA09y/nvWrSQIhAINnIapzPCmtF5qt37OmY9wMZsR1t62g5TSHlVZx90IS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57914},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","shasum":"a5d75f92f27d30dad0971a7fd20a7e9d9dc59f7e","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./drizzle":{"types":"./dist/drizzle.d.ts","import":"./dist/drizzle.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/drizzle.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @sinclair/typebox --external drizzle-orm --external 'drizzle-orm/*' --external drizzle-typebox && tsc -p tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-OKBobPl5vFpjo/bW5Px8HACTae0p0JMRJ6pr37xvdEKVMvtMb4JqRK4jL0mcNUGR6Z/A95exZMGA6zg4ztKi+w==","absolutejs":{"runtimePeers":{"drizzle-orm":{"range":">=1.0.0-rc.4 <2","tested":"1.0.0-rc.4","optional":true,"buildExternals":["drizzle-orm","drizzle-orm/*"],"artifactImports":["drizzle-orm","drizzle-orm/pg-core"],"artifactReferences":[]}},"manifestContract":2},"repository":{"url":"https://github.com/absolutejs/policy.git","type":"git"},"_npmVersion":"10.8.3","description":"Versioned provider-neutral policy lifecycle, simulation, and AuthZEN adapter for AI agent actions.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"drizzle-typebox":"1.0.0-beta.14-a36c63d","@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","@types/bun":"^1.3.14","typescript":"5.8.3","drizzle-orm":"1.0.0-rc.4","@electric-sql/pglite":"0.3.14"},"peerDependencies":{"drizzle-orm":">=1.0.0-rc.4 <2"},"peerDependenciesMeta":{"drizzle-orm":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/policy_0.3.1_1785116261935_0.25764721986431494","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@absolutejs/policy","version":"0.4.0","license":"MIT","_id":"@absolutejs/policy@0.4.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/policy#readme","bugs":{"url":"https://github.com/absolutejs/policy/issues"},"dist":{"shasum":"eef6a6cf8343e6e156f5a9ebdbcc1bb230f343bd","tarball":"https://registry.npmjs.org/@absolutejs/policy/-/policy-0.4.0.tgz","fileCount":12,"integrity":"sha512-pRoDpwCP6pKFyovzz1++tJ3+6WpazQpT9tpbDYHVenztNRWbqKpAvCaeDgvtEO2dWcmS2AkhDj9JbnNzRnXtYQ==","signatures":[{"sig":"MEUCIQC+ogu7nK8Wp0TfnHU7dvRMFyLZ7fhaJF8YIUxXYNnAoAIgAyHFK5jbexkKuqB3+V3D9+y65OsO4RG0mCiZQvoORLo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57690},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./drizzle":{"types":"./dist/drizzle.d.ts","import":"./dist/drizzle.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"2004ee2e01772131972753b10597936f7f1382c4","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/drizzle.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @sinclair/typebox --external drizzle-orm --external 'drizzle-orm/*' --external drizzle-typebox --external typebox --external 'typebox/*' && tsc -p tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","typecheck":"tsc --noEmit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/policy.git","type":"git"},"_npmVersion":"10.9.2","description":"Versioned provider-neutral policy lifecycle, simulation, and AuthZEN adapter for AI agent actions.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"typebox":"^1.3.16","drizzle-typebox":"1.0.0-beta.14-a36c63d","@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.10.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","@types/bun":"^1.3.14","typescript":"5.8.3","drizzle-orm":"1.0.0-rc.4","@electric-sql/pglite":"0.3.14"},"peerDependencies":{"drizzle-orm":">=1.0.0-rc.4 <2"},"peerDependenciesMeta":{"drizzle-orm":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/policy_0.4.0_1787448991292_0.12129398392403523","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@absolutejs/policy","version":"0.4.1","description":"Versioned provider-neutral policy lifecycle, simulation, and AuthZEN adapter for AI agent actions.","type":"module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/absolutejs/policy.git"},"publishConfig":{"access":"public"},"main":"./dist/index.js","types":"./dist/index.d.ts","absolutejs":{"manifestContract":2},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./drizzle":{"types":"./dist/drizzle.d.ts","import":"./dist/drizzle.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"format":"prettier --write \"./**/*.{ts,json,md}\"","typecheck":"tsc --noEmit","test":"bun test","build":"rm -rf dist && bun build src/index.ts src/drizzle.ts src/manifest.ts --outdir dist --target=bun --external @absolutejs/manifest --external @sinclair/typebox --external drizzle-orm --external 'drizzle-orm/*' --external drizzle-typebox --external typebox --external 'typebox/*' && tsc -p tsconfig.build.json && absolute-manifest emit","check:package":"bun run format && bun run typecheck && bun run test && bun run build"},"dependencies":{"@absolutejs/manifest":"^0.10.0","@sinclair/typebox":"^0.34.0","drizzle-typebox":"1.0.0-beta.14-a36c63d","typebox":"^1.3.16"},"devDependencies":{"@electric-sql/pglite":"0.3.14","@types/bun":"^1.3.14","drizzle-orm":"1.0.0-rc.4","prettier":"3.5.3","typescript":"5.8.3"},"peerDependencies":{"drizzle-orm":">=1.0.0-rc.4 <2"},"peerDependenciesMeta":{"drizzle-orm":{"optional":true}},"_id":"@absolutejs/policy@0.4.1","gitHead":"580c877cd2de83891646b7878c7fd229091340de","bugs":{"url":"https://github.com/absolutejs/policy/issues"},"homepage":"https://github.com/absolutejs/policy#readme","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Ywb0vlmKqLIwqp9GzLNTnSomEKJ9Ws/FtvJn0+/8LZeZk2V9KaDfXeuPBPABZpZUD3qYJ7Gy3zUgZw2vhM5RjA==","shasum":"cf86be33d7c8f2e6512ae3438072fb98a8ebf6de","tarball":"https://registry.npmjs.org/@absolutejs/policy/-/policy-0.4.1.tgz","fileCount":12,"unpackedSize":57689,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDLnn2ZE8rw/eE4yq7hc8y4kk48nzttUzPjkowwtxyu4AiACgurDrRnAYB38g2ODqL2N5Td3jUnUa3R20Y8yZhoXPg=="}]},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"directories":{},"maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/policy_0.4.1_1787449399015_0.9912748609846009"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-16T01:25:34.224Z","modified":"2026-08-23T01:43:19.341Z","0.1.0":"2026-07-16T01:25:34.602Z","0.2.0":"2026-07-16T02:40:12.624Z","0.3.0":"2026-07-23T11:28:06.127Z","0.3.1":"2026-07-27T01:37:42.081Z","0.4.0":"2026-08-23T01:36:31.448Z","0.4.1":"2026-08-23T01:43:19.174Z"},"bugs":{"url":"https://github.com/absolutejs/policy/issues"},"license":"MIT","homepage":"https://github.com/absolutejs/policy#readme","repository":{"type":"git","url":"git+https://github.com/absolutejs/policy.git"},"description":"Versioned provider-neutral policy lifecycle, simulation, and AuthZEN adapter for AI agent actions.","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"readme":"# @absolutejs/policy\n\nImmutable, provider-neutral policy lifecycle for agent actions. Drafts are\nvalidated and content-digested, versions only increase, activation atomically\nretires the previous version, evaluations record the exact version and digest,\nand simulation evaluates an unpersisted candidate without changing live policy.\n\n## Provider-neutral evaluation\n\n`createAuthzenAdapter()` speaks the OpenID AuthZEN evaluation API while custom\nadapters can target Cedar, OPA, cloud IAM, or an embedded rules engine. PostgreSQL\nenforces one active version per policy with a partial unique index.\n\n## AuthZEN, AARP, and COAZ\n\nVersion 0.2 adds direct support for the OpenID AuthZEN AARP and COAZ Working\nGroup Drafts. AARP helpers extract requestable denials, preserve their binding,\nsubmit idempotent access requests, persist portable task handles, and only\nproduce approval context for a fresh PDP evaluation. COAZ validates MCP\n`coaz` / `x-coaz-mapping` declarations and constructs single or aligned bulk\nSARC requests through an injected CEL evaluator. Any mapping, PDP, or decision\nfailure denies tool execution.\n\n## Drizzle persistence\n\nVersion 0.3 adds `@absolutejs/policy/drizzle`, a typed Postgres store for\nproduction deployments including Neon:\n\n```ts\nimport {\n\tcreateDrizzlePolicyStore,\n\tpolicyDrizzleSchema\n} from '@absolutejs/policy/drizzle';\n\nconst policyStore = createDrizzlePolicyStore({ db });\n```\n\nInclude `policyDrizzleSchema` in the host's normal Drizzle migrations; the\nstore never mutates schema at runtime. Activation locks a policy's versions,\nretires the prior active row, and moves the active pointer transactionally,\nbacked by the one-active partial unique index. `PolicyVersionInsertSchema` and\n`PolicyVersionSelectSchema` are generated from the table with Drizzle-TypeBox.\nThe structural SQL adapter remains available for compatibility, while new\nDrizzle applications can stay fully typed end to end.\n","readmeFilename":"README.md"}