Skip to content

Add TypeScript policy adapters - #23

Merged
imran-siddique merged 1 commit into
mainfrom
agent/typescript-policy-adapters
Aug 19, 2026
Merged

Add TypeScript policy adapters#23
imran-siddique merged 1 commit into
mainfrom
agent/typescript-policy-adapters

Conversation

@imran-siddique

Copy link
Copy Markdown
Member

What changed

  • add dependency-free TypeScript adapters for OPA decision logs, Cedar authorization responses, and generic AGT policy events
  • add an AGT-compatible batch sink that normalizes the complete batch before delivery and fails on rejected or partially projected events
  • preserve Python-compatible OPA UUIDv5 and nanosecond timestamp behavior
  • reject ambiguous decisions, prose diagnostic codes, malformed collections, invalid calendar dates, unsafe durations, and malformed correlation fields
  • document exactly which adapters have TypeScript parity and which remain pending

Why

Integrations need a small source-neutral normalization layer rather than knowledge of the full Python SDK or external governance runtime objects. Policy adapter failures must not leak raw input content or begin partial delivery because a later source record is malformed.

Impact

Node integrations can normalize OPA, Cedar, and AGT policy facts directly into validated AgentTrust events and feed them through the same evidence, log, span, and metric pipeline.

Validation

  • python -m pytest -q — 92 passed, 20 subtests passed
  • npm run check — build, 26 tests, package dry run passed
  • schema, version, OTel matrix, and conformance gates passed
  • exact installed-tarball Cedar adapter smoke test passed

@imran-siddique
imran-siddique marked this pull request as ready for review August 19, 2026 16:02
@imran-siddique
imran-siddique merged commit 9b2a1f4 into main Aug 19, 2026
8 checks passed
@imran-siddique
imran-siddique deleted the agent/typescript-policy-adapters branch August 19, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant