Skip to content

PolicyEvalContext

Defined in: src/core/protocol.ts:267

Runtime-facing evaluation context provided to policy evaluators.

This is the base context without typed config - runtimes construct this from their native request representation. The policy SDK (definePolicy) extends this with a typed config field via PolicyEvalHandlerContext.

optional adapter: GatewayAdapter

Defined in: src/core/protocol.ts:277

Runtime adapter (stores, waitUntil, etc.).


debug: DebugLogger

Defined in: src/core/protocol.ts:269

Debug logger pre-namespaced to stoma:policy:{name}. Always callable.


requestId: string

Defined in: src/core/protocol.ts:273

Unique request ID for correlation.


trace: TraceReporter

Defined in: src/core/protocol.ts:271

Trace reporter - always callable, no-op when tracing is not active.


traceId: string

Defined in: src/core/protocol.ts:275

W3C trace ID (32-hex).