{"_id":"@policystrata/agent-trust-gateway","_rev":"3-5514de005db318fc828eaeebfff88e39","name":"@policystrata/agent-trust-gateway","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.1":{"name":"@policystrata/agent-trust-gateway","version":"0.1.1","keywords":["llm","data-agents","runtime-security","agent-governance","policystrata"],"license":"MIT","_id":"@policystrata/agent-trust-gateway@0.1.1","maintainers":[{"name":"raintree-technology","email":"admin@raintree.technology"}],"homepage":"https://github.com/raintree-technology/policystrata#readme","bugs":{"url":"https://github.com/raintree-technology/policystrata/issues"},"bin":{"agent-trust-gateway":"dist/src/cli.js"},"dist":{"shasum":"8380e01fde9b535cb7bca83bd6d706c8f12a7319","tarball":"https://registry.npmjs.org/@policystrata/agent-trust-gateway/-/agent-trust-gateway-0.1.1.tgz","fileCount":9,"integrity":"sha512-GX19gCg6S9Xk/fFo5++NxLsjaILVR9ZLOeExP4GVkGiJqoFaNs33F11nyOsNGvkw0gz533SI3bFQWJg1N8Mu/w==","signatures":[{"sig":"MEUCIGVIm72xmeq8TA81e/ZOX0gGKbwWrUnDFXAARj62ZlqSAiEA7Bc21RFx0mzWFDkQmZPhBRmb/gi6xcSCePGFqUiFgTI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50364},"main":"./dist/src/index.js","type":"module","types":"./dist/src/index.d.ts","engines":{"node":"24.x"},"exports":{".":{"types":"./dist/src/index.d.ts","default":"./dist/src/index.js"}},"gitHead":"1ff9862325e4524258302501bd27cdd546c020ea","scripts":{"test":"bun run build && node --test dist/test/*.test.js","build":"bun run --cwd ../node build && tsc -p tsconfig.json","prepack":"bun run build"},"_npmUser":{"name":"raintree-technology","email":"admin@raintree.technology"},"repository":{"url":"git+https://github.com/raintree-technology/policystrata.git","type":"git","directory":"packages/gateway"},"_npmVersion":"11.13.0","description":"Customer-hosted runtime gateway for PolicyStrata governed-data agents","directories":{},"sideEffects":false,"_nodeVersion":"24.17.0","dependencies":{"policystrata":"^0.1.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/agent-trust-gateway_0.1.1_1783539087565_0.4095362306589918","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@policystrata/agent-trust-gateway","version":"0.1.2","keywords":["llm","data-agents","runtime-security","agent-governance","policystrata"],"license":"MIT","_id":"@policystrata/agent-trust-gateway@0.1.2","maintainers":[{"name":"raintree-technology","email":"admin@raintree.technology"}],"homepage":"https://github.com/raintree-technology/policystrata#readme","bugs":{"url":"https://github.com/raintree-technology/policystrata/issues"},"bin":{"agent-trust-gateway":"dist/src/cli.js"},"dist":{"shasum":"c686eab284c267495e8113ab84d5df84f9cb96bc","tarball":"https://registry.npmjs.org/@policystrata/agent-trust-gateway/-/agent-trust-gateway-0.1.2.tgz","fileCount":9,"integrity":"sha512-6XZM+iJqx7cQ58i/NVNpLbiTlo4nhIbnTe9qqatiC3VIHW+BbWAVOnVpTolP1oSj1hXQ7sR+S6YbuivfHkttIg==","signatures":[{"sig":"MEUCIAxCjleokEeOwPtc1FuOtP0SN2eWVBn9IBEml3K4qxQhAiEAhmHXSNBzvUuYqDw3OOQvv01AYJ9bKkwaz+xu4cTLcW0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@policystrata%2fagent-trust-gateway@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":50359},"main":"./dist/src/index.js","type":"module","types":"./dist/src/index.d.ts","engines":{"node":"24.x"},"exports":{".":{"types":"./dist/src/index.d.ts","default":"./dist/src/index.js"}},"gitHead":"0f0e8ab78539781b263074f51b9e655a15cefe6b","scripts":{"test":"bun run build && node --test dist/test/*.test.js","build":"bun run --cwd ../node build && tsc -p tsconfig.json","prepack":"bun run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d59751da-11bd-4963-986d-c621f0c9e456"}},"repository":{"url":"git+https://github.com/raintree-technology/policystrata.git","type":"git","directory":"packages/gateway"},"_npmVersion":"11.16.0","description":"Customer-hosted runtime gateway for PolicyStrata governed-data agents","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"policystrata":"^0.1.4"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/agent-trust-gateway_0.1.2_1784768378391_0.47361470620918134","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@policystrata/agent-trust-gateway","version":"0.1.3","description":"Customer-hosted runtime gateway for PolicyStrata governed-data agents","type":"module","main":"./dist/src/index.js","types":"./dist/src/index.d.ts","bin":{"agent-trust-gateway":"dist/src/cli.js"},"license":"MIT","sideEffects":false,"repository":{"type":"git","url":"git+https://github.com/raintree-technology/policystrata.git","directory":"packages/gateway"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"keywords":["llm","data-agents","runtime-security","agent-governance","policystrata"],"exports":{".":{"types":"./dist/src/index.d.ts","default":"./dist/src/index.js"}},"scripts":{"build":"bun run --cwd ../node build && tsc -p tsconfig.json","test":"bun run build && node --test dist/test/*.test.js","prepack":"bun run build"},"engines":{"node":"24.x"},"dependencies":{"policystrata":"^0.1.5"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.0.0"},"gitHead":"7d1de02c95de08d7a7e7309b5071bdb8657f89d2","_id":"@policystrata/agent-trust-gateway@0.1.3","bugs":{"url":"https://github.com/raintree-technology/policystrata/issues"},"homepage":"https://github.com/raintree-technology/policystrata#readme","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-VwnYTMpfUJH3vUCfQIY2TNfCc5Uu1ugSXPezBcnpQuFW3vRQAN2RucvcASN+cad5ElzpT/cn95vm5qcEC56aWA==","shasum":"af41d1afc4a6868770cf7cf2440258f4585e4160","tarball":"https://registry.npmjs.org/@policystrata/agent-trust-gateway/-/agent-trust-gateway-0.1.3.tgz","fileCount":9,"unpackedSize":51599,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@policystrata%2fagent-trust-gateway@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC/raJTgOcW1Ku7mf9rTFmpDXItOG0Z43t2yskHjsc/4AiA2mTlazPz57jXyxVfAQ+uf3gM8Ycdr39CZ6L6UuKKu0w=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d59751da-11bd-4963-986d-c621f0c9e456"}},"directories":{},"maintainers":[{"name":"raintree-technology","email":"admin@raintree.technology"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-trust-gateway_0.1.3_1785359989623_0.285806423685651"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T19:31:27.422Z","modified":"2026-07-29T21:19:50.206Z","0.1.1":"2026-07-08T19:31:27.723Z","0.1.2":"2026-07-23T00:59:38.522Z","0.1.3":"2026-07-29T21:19:49.826Z"},"bugs":{"url":"https://github.com/raintree-technology/policystrata/issues"},"license":"MIT","homepage":"https://github.com/raintree-technology/policystrata#readme","keywords":["llm","data-agents","runtime-security","agent-governance","policystrata"],"repository":{"type":"git","url":"git+https://github.com/raintree-technology/policystrata.git","directory":"packages/gateway"},"description":"Customer-hosted runtime gateway for PolicyStrata governed-data agents","maintainers":[{"name":"raintree-technology","email":"admin@raintree.technology"}],"readme":"# PolicyStrata Agent Trust Gateway\n\nCustomer-hosted runtime gateway for governed-data agents. The gateway evaluates redacted runtime\nevents locally with `policystrata/runtime`, blocks deny/quarantine/approval-required decisions in\nenforce mode, and uploads only decision envelopes to Clearance by PolicyStrata by default.\nIt is an application-side enforcement and telemetry helper, not a replacement for `policystrata\nscan`, `policystrata doctor`, application authorization, or database controls.\n\n```bash\nnpm install @policystrata/agent-trust-gateway\n```\n\n```bash\nagent-trust-gateway serve --manifest runtime-manifest.json --port 8787 \\\n  --api-url https://policystrata.example\n```\n\nLoopback bindings are intended for same-host sidecars. If you bind beyond\nloopback, set `POLICYSTRATA_GATEWAY_TOKEN` or pass `--gateway-token`; callers\nmust send `authorization: Bearer <token>` to `/v1/decide`.\n\nPOST one event or `{ \"events\": [...] }` to `/v1/decide`:\n\n```bash\ncurl -s http://127.0.0.1:8787/v1/decide \\\n  -H 'content-type: application/json' \\\n  --data @runtime-event.json\n```\n\nThe same evaluator is available in-process:\n\n```ts\nimport { decideRuntimeEvent } from \"@policystrata/agent-trust-gateway\";\n\nconst result = decideRuntimeEvent(runtimeManifest, runtimeEvent);\nif (!result.ok) {\n  throw new Error(result.decisions.map((decision) => decision.reason).join(\"; \"));\n}\n```\n\n## Runtime Modes\n\nUse `enforce` for production gates that should fail closed on deny, quarantine, or approval-required\ndecisions. Use `shadow` to observe decisions without blocking the caller. For tenant, PII, SQL,\negress, and tool controls, production examples should default to fail-closed behavior and rely on\nexplicit approvals or allowlists for exceptions.\n\nThe evaluator supports:\n\n- auth-context required fields\n- retrieval tenant and entitlement checks\n- SQL tenant predicate detection, query-risk classification, and row-limit checks\n- RLS drift events through the `database_rule` layer\n- runtime kill-switch deny behavior\n- memory tenant isolation\n- egress destination allowlists, approval requirements, and destination classes\n- data-class deny/redaction policies\n\nSee `docs/runtime-controls.md` for PII, MCP schema, browser action, code execution, human approval,\nand kill-switch event examples.\nSee `docs/gateway-deployment-examples.md` for generic Docker, Terraform, and Helm deployment\nsketches that avoid hosted-app assumptions.\n\n## Upload Boundary\n\n`payload` is stripped before upload unless `includePayload` or `--include-payload` is set.\nFixture-only `expectedDecision` metadata is always stripped before upload. Keep raw prompts, rows,\ndocuments, tool payloads, connector payloads, and test expectations local; send hashes, witness\nrefs, policy refs, redaction classes, query risk, and the runtime decision envelope to the control\nplane.\n\nUploads fail closed by default if the redacted envelope still contains sensitive field names or\ncommon secret/PII value patterns in summaries, refs, or other metadata. Use\n`allowBoundaryViolations` only for local negative tests.\n\nUploads send `x-clearance-organization-id` and the legacy\n`x-assurance-organization-id` header while hosted control planes migrate. Uploads also support an\nidempotency key and enforce a 1 MB default upload-body limit before opening the network request.\n\n## Deployment Guidance\n\nKeep the gateway close to the application or agent runtime. For production:\n\n- bind to loopback or require a gateway token for non-loopback bindings;\n- terminate TLS and rate-limit requests at the platform edge, service mesh, or reverse proxy;\n- keep request bodies small and metadata-only;\n- default tenant, PII, SQL, egress, and tool controls to fail closed;\n- use `shadow` mode only while validating policy coverage before an enforcement rollout.\n","readmeFilename":"README.md"}