@atlasent/sdk 2.5.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,7 +1,284 @@
1
- import { R as RateLimitState, c as AtlaSentClientOptions, E as EvaluateRequest, d as EvaluateResponse, e as EvaluatePreflightResponse, V as VerifyPermitRequest, f as VerifyPermitResponse, D as DeployGateRequest, g as DeployGateResponse, h as RevokePermitRequest, i as RevokePermitResponse, j as RevokePermitByIdInput, k as RevokePermitByIdResponse, l as VerifyPermitByIdResponse, G as GetPermitResponse, m as PermitValidResponse, L as ListPermitsRequest, n as ListPermitsResponse, o as ApiKeySelfResponse, p as AuditEventsQuery, q as AuditEventsResult, r as AuditExportRequest, s as AuditExportResult, S as StreamOptions, t as StreamEvent, b as ProtectRequest, P as Permit, a as AtlaSentError, u as protect, v as deployGate, w as configure, A as AtlaSentDeniedError } from './protect-DiRVfVLq.cjs';
2
- export { x as AtlaSentDecision, y as AtlaSentDeniedErrorInit, z as AtlaSentErrorCode, B as AtlaSentErrorInit, C as AtlaSentEscalateError, F as AtlaSentEscalateErrorInit, H as AuditDecision, I as AuditEvent, J as AuditEventsPage, K as AuditExport, M as AuditExportSignatureStatus, N as ConfigureOptions, O as ConstraintTrace, Q as ConstraintTracePolicy, T as ConstraintTraceStage, U as DEFAULT_RETRY_POLICY, W as DEPLOYMENT_PRODUCTION_ACTION, X as DEPLOY_GATE_CODES, Y as Decision, Z as DecisionCanonical, _ as DeployGateContext, $ as DeployGateDenyCode, a0 as DeployGateEvidence, a1 as DeployOverrideClaim, a2 as DeployPermitClaim, a3 as EvaluateResponsePermit, a4 as PRODUCTION_DEPLOY_ACTION, a5 as PermitOutcome, a6 as PermitRecord, a7 as PermitRevoked, a8 as PermitStatus, a9 as RetryPolicy, aa as StreamDecisionEvent, ab as StreamParseError, ac as StreamProgressEvent, ad as StreamTimeoutError, ae as computeBackoffMs, af as hasAttemptsLeft, ag as isRetryable, ah as mergePolicy, ai as normalizePermitOutcome } from './protect-DiRVfVLq.cjs';
1
+ import { D as DecisionCanonical, R as RateLimitState, c as AtlaSentClientOptions, E as EvaluateRequest, d as EvaluateResponse, B as BatchEvalItem, e as BatchEvalResponse, S as SubscribeDecisionsOptions, f as DecisionStreamEvent, g as EvaluatePreflightResponse, V as VerifyPermitRequest, h as VerifyPermitResponse, i as DeployGateRequest, j as DeployGateResponse, k as RevokePermitRequest, l as RevokePermitResponse, m as RevokePermitByIdInput, n as RevokePermitByIdResponse, o as VerifyPermitByIdResponse, G as GetPermitResponse, p as PermitValidResponse, L as ListPermitsRequest, q as ListPermitsResponse, r as ApiKeySelfResponse, s as AuditEventsQuery, t as AuditEventsResult, u as AuditExportRequest, v as AuditExportResult, w as StreamOptions, x as StreamEvent, b as ProtectRequest, P as Permit, a as AtlaSentError, A as AtlaSentDeniedError, y as DecisionReceipt, z as DecisionReceiptAlgorithm, C as protect, F as deployGate, H as configure } from './protect-C0t0fP1y.cjs';
2
+ export { I as AtlaSentDecision, J as AtlaSentDeniedErrorInit, K as AtlaSentErrorCode, M as AtlaSentErrorInit, N as AtlaSentEscalateError, O as AtlaSentEscalateErrorInit, Q as AuditDecision, T as AuditEvent, U as AuditEventsPage, W as AuditExport, X as AuditExportSignatureStatus, Y as BvsSnapshot, Z as ConfigureOptions, _ as ConsentClassProjection, $ as ConstraintTrace, a0 as ConstraintTracePolicy, a1 as ConstraintTraceStage, a2 as DEFAULT_RETRY_POLICY, a3 as DEPLOYMENT_PRODUCTION_ACTION, a4 as DEPLOY_GATE_CODES, a5 as Decision, a6 as DeployGateContext, a7 as DeployGateDenyCode, a8 as DeployGateEvidence, a9 as DeployOverrideClaim, aa as DeployPermitClaim, ab as EvaluateBatchResultItem, ac as EvaluateResponsePermit, ad as EvaluateRiskEnvelope, ae as EvaluateRiskEnvelopeFactor, af as PRODUCTION_DEPLOY_ACTION, ag as PermitOutcome, ah as PermitRecord, ai as PermitRevoked, aj as PermitStatus, ak as PermitWithEvidence, al as ProtectWithEvidenceOptions, am as RetryPolicy, an as StreamDecisionEvent, ao as StreamParseError, ap as StreamProgressEvent, aq as StreamTimeoutError, ar as computeBackoffMs, as as hasAttemptsLeft, at as isRetryable, au as mergePolicy, av as normalizePermitOutcome, aw as protectWithEvidence } from './protect-C0t0fP1y.cjs';
3
3
  import { webcrypto } from 'node:crypto';
4
4
 
5
+ /**
6
+ * Override types — wire shapes for `/v1/overrides`.
7
+ *
8
+ * Overrides allow an authorized actor to bypass a deny decision for a
9
+ * specific evaluation. They must be approved before they take effect
10
+ * and can be revoked at any time.
11
+ *
12
+ * Mirrors `api/src/schemas/overrides.ts` in atlasent-control-plane.
13
+ */
14
+ /**
15
+ * Lifecycle status of an override request.
16
+ *
17
+ * - `pending` — created, waiting for approval
18
+ * - `approved` — approved and active; the evaluation's deny is lifted
19
+ * - `revoked` — manually revoked
20
+ * - `expired` — TTL elapsed before revocation
21
+ */
22
+ type OverrideStatus = "pending" | "approved" | "revoked" | "expired";
23
+ /**
24
+ * The event types that can appear on an override's event log.
25
+ */
26
+ type OverrideEventType = "created" | "approved" | "revoked";
27
+ /**
28
+ * Canonical Override domain object returned by the API.
29
+ *
30
+ * All timestamps are ISO-8601 UTC strings. Nullable fields are `null`
31
+ * rather than omitted so wire shapes are stable.
32
+ */
33
+ interface OverrideV1 {
34
+ id: string;
35
+ orgId: string;
36
+ /** The evaluation ID this override applies to. */
37
+ evaluationId: string;
38
+ /** Human-readable justification provided at creation time. */
39
+ reason: string;
40
+ status: OverrideStatus;
41
+ /** Actor who requested the override. */
42
+ requestedBy: string;
43
+ /** Actor who approved the override, or `null` if not yet approved. */
44
+ approvedBy: string | null;
45
+ /** Actor who revoked the override, or `null` if not revoked. */
46
+ revokedBy: string | null;
47
+ /** ISO-8601 creation timestamp. */
48
+ createdAt: string;
49
+ /** ISO-8601 approval timestamp, or `null`. */
50
+ approvedAt: string | null;
51
+ /** ISO-8601 revocation timestamp, or `null`. */
52
+ revokedAt: string | null;
53
+ /** ISO-8601 expiry timestamp, or `null` if no TTL was set. */
54
+ expiresAt: string | null;
55
+ /** Arbitrary key/value metadata attached at creation. `null` when none. */
56
+ metadata: Record<string, unknown> | null;
57
+ }
58
+ /**
59
+ * Paginated list of overrides.
60
+ */
61
+ interface OverrideListResponse {
62
+ items: OverrideV1[];
63
+ /** Opaque cursor for the next page. `null` when there are no more results. */
64
+ nextCursor: string | null;
65
+ }
66
+ /**
67
+ * Input for `POST /v1/overrides` — request a new override.
68
+ */
69
+ interface CreateOverrideRequest {
70
+ /** Human-readable justification. Required; max 2000 characters. */
71
+ reason: string;
72
+ /** The evaluation ID to override. */
73
+ evaluationId: string;
74
+ /** Lifetime in seconds. Defaults to 3600. Max 604800 (7 days). */
75
+ ttlSeconds?: number;
76
+ /** Arbitrary metadata to attach to the override record. */
77
+ metadata?: Record<string, unknown>;
78
+ }
79
+ /**
80
+ * Audit event appended to an override's event log on every state mutation.
81
+ */
82
+ interface OverrideEvent {
83
+ id: string;
84
+ overrideId: string;
85
+ orgId: string;
86
+ /** Actor who caused this event. */
87
+ actorId: string;
88
+ type: OverrideEventType;
89
+ /** ISO-8601 timestamp. */
90
+ at: string;
91
+ /** Event-specific payload. `null` when none. */
92
+ payload: Record<string, unknown> | null;
93
+ }
94
+ /**
95
+ * Response for `GET /v1/overrides/:id/events`.
96
+ */
97
+ interface OverrideEventsResponse {
98
+ items: OverrideEvent[];
99
+ }
100
+
101
+ /**
102
+ * Compliance evidence types — wire shapes for `v1-compliance-evidence`.
103
+ *
104
+ * Supports on-demand SOC 2 Type II control evidence collection. The
105
+ * same run shape is used for ISO 27001, GDPR, and HIPAA; control IDs
106
+ * differ per framework.
107
+ */
108
+ type ComplianceFramework = "soc2" | "iso27001" | "gdpr" | "hipaa";
109
+ type EvidenceControlStatus = "pass" | "gap" | "finding";
110
+ type ComplianceRunStatus = "pending" | "running" | "completed" | "failed";
111
+ /**
112
+ * A single evaluated control within an evidence run.
113
+ * `evidence` is a free-form object whose keys are framework-specific
114
+ * metric names (e.g. `mfa_enforced_policies`, `audit_events_last_30d`).
115
+ */
116
+ interface EvidenceControl {
117
+ control_id: string;
118
+ title: string;
119
+ status: EvidenceControlStatus;
120
+ evidence: Record<string, unknown>;
121
+ }
122
+ interface ComplianceEvidenceSummary {
123
+ total: number;
124
+ pass: number;
125
+ gap: number;
126
+ finding: number;
127
+ }
128
+ interface ComplianceEvidenceRun {
129
+ id: string;
130
+ org_id: string;
131
+ framework: ComplianceFramework;
132
+ period_start: string;
133
+ period_end: string;
134
+ status: ComplianceRunStatus;
135
+ controls: EvidenceControl[];
136
+ summary: ComplianceEvidenceSummary | null;
137
+ applied_by: string | null;
138
+ created_at: string;
139
+ }
140
+ interface TriggerEvidenceRunRequest {
141
+ framework: ComplianceFramework;
142
+ /** ISO 8601 date string; defaults to 30 days ago on the server. */
143
+ period_start?: string;
144
+ /** ISO 8601 date string; defaults to now on the server. */
145
+ period_end?: string;
146
+ }
147
+ interface TriggerEvidenceRunResponse {
148
+ run: ComplianceEvidenceRun;
149
+ }
150
+ interface ListEvidenceRunsResponse {
151
+ runs: ComplianceEvidenceRun[];
152
+ }
153
+ /**
154
+ * SOC 2 control IDs evaluated by `v1-compliance-evidence`.
155
+ *
156
+ * | ID | Area |
157
+ * |--------|------|
158
+ * | CC6.1 | MFA enforcement |
159
+ * | CC6.3 | Periodic access reviews |
160
+ * | CC7.2 | Audit trail completeness |
161
+ * | CC8.1 | Change management / HITL |
162
+ * | CC3.2 | Policy violations |
163
+ */
164
+ type SOC2ControlId = "CC6.1" | "CC6.3" | "CC7.2" | "CC8.1" | "CC3.2";
165
+ /**
166
+ * Returns `true` when every control in the run has `pass` or `gap`
167
+ * status (no `finding`). A `gap` means a control is partially met;
168
+ * a `finding` is a blocking deficiency that requires remediation.
169
+ */
170
+ declare function evidenceRunPasses(run: ComplianceEvidenceRun): boolean;
171
+ /**
172
+ * Returns controls that do not have `pass` status, sorted so
173
+ * `finding` controls appear before `gap` controls.
174
+ */
175
+ declare function nonPassingControls(run: ComplianceEvidenceRun): EvidenceControl[];
176
+
177
+ /**
178
+ * Wire types for `POST /v1-decisions-replay/:id/replay`.
179
+ *
180
+ * Re-evaluates a recorded decision against its originally-pinned policy
181
+ * bundle and engine version, then reports whether the result agrees with
182
+ * what was recorded. Side-effect-free: no audit chain row is written and
183
+ * no permit is issued (see ADR-016).
184
+ *
185
+ * Mirrors `_handleReplayPost` in atlasent-api's
186
+ * `supabase/functions/v1-decisions-replay/handler.ts`. Variance kinds and
187
+ * envelope-verification states are pinned to the API contract — keep this
188
+ * file aligned with `_shared/decision-replay.ts` if the surface evolves.
189
+ *
190
+ * Per AtlaSent's versioning doctrine `/v1/decisions/:id/replay` is an
191
+ * **alpha** endpoint; shapes can change without a deprecation cycle until
192
+ * it graduates to stable v1 (see atlasent-api `docs/STABLE_V2_PROMOTION.md`).
193
+ */
194
+ /**
195
+ * Replay variance — superset covering both the raw wire values used by
196
+ * `replayDecision()` and the SDK-canonical values used by `replay()`.
197
+ *
198
+ * Raw wire values (replayDecision): NONE, DECISION_CHANGED, ENVELOPE_DRIFT
199
+ * SDK-canonical values (replay): NONE, POLICY_DRIFT, ENVELOPE_DRIFT,
200
+ * ENGINE_DRIFT, CHAIN_TAMPER, BUNDLE_MISSING
201
+ */
202
+ type ReplayVarianceKind = "NONE" | "DECISION_CHANGED" | "POLICY_DRIFT" | "ENVELOPE_DRIFT" | "ENGINE_DRIFT" | "CHAIN_TAMPER" | "BUNDLE_MISSING";
203
+ /** Engine-version registry classification (ADR-017). `unknown` covers
204
+ * NULL engine_version (pre-replay-era rows) and registry-misses. */
205
+ type EngineVersionKind = "active" | "retired" | "archival" | "unknown";
206
+ /** Envelope hash verification outcome for the recorded request envelope.
207
+ * `verified` = recomputed hash matched; `drift` = mismatch; `envelope_missing`
208
+ * = recorded hash points at a content_envelopes row that no longer exists;
209
+ * `absent` = the original evaluation predates envelope_hash capture. */
210
+ type EnvelopeVerification = "verified" | "drift" | "absent" | "envelope_missing";
211
+ /** Mirror of `decision` enum on the original evaluation. */
212
+ type ReplayDecisionValue = "allow" | "deny" | "hold" | "escalate";
213
+ /** Envelope-drift diagnostic. Present only when `variance === "ENVELOPE_DRIFT"`. */
214
+ interface EnvelopeDriftDetail {
215
+ recorded_hash: string;
216
+ recomputed_hash: string;
217
+ }
218
+ /**
219
+ * Successful POST /v1-decisions-replay/:id/replay response. The shape is
220
+ * additive — additional fields may appear in future API versions.
221
+ */
222
+ interface ReplayDecisionResponse {
223
+ decision_id: string;
224
+ /** What the original decision was at evaluate time. */
225
+ original_decision: ReplayDecisionValue;
226
+ /** Recorded deny code from the original decision, if any. */
227
+ original_deny_code?: string;
228
+ /** Re-evaluated decision. Absent when replay short-circuits on
229
+ * ENVELOPE_DRIFT — in that case the original decision is the only
230
+ * authoritative value and no replay was run. */
231
+ replay_decision?: ReplayDecisionValue;
232
+ replay_deny_code?: string;
233
+ /** Engine version string recorded with the original decision, or
234
+ * `undefined` for pre-replay-era rows. */
235
+ engine_version?: string;
236
+ engine_version_kind: EngineVersionKind;
237
+ /** Always `true` on a 200 — the handler refuses replay (409) when the
238
+ * engine version does not accept replay. */
239
+ accepts_replay: boolean;
240
+ variance: ReplayVarianceKind;
241
+ envelope_verification: EnvelopeVerification;
242
+ envelope_drift_detail?: EnvelopeDriftDetail;
243
+ replayed_at: string;
244
+ }
245
+ /** Input to {@link AtlaSentClient.replay}. */
246
+ interface ReplayRequest {
247
+ /** The evaluation/decision ID to replay. */
248
+ evaluationId: string;
249
+ }
250
+
251
+ /**
252
+ * Result of {@link AtlaSentClient.replay}.
253
+ *
254
+ * Uses SDK-canonical variance kinds (see {@link ReplayVarianceKind}).
255
+ * `DECISION_CHANGED` on the wire maps to `POLICY_DRIFT` here.
256
+ * 409 responses map to `ENGINE_DRIFT` or `BUNDLE_MISSING` and are never
257
+ * thrown — callers can always switch on `varianceKind`.
258
+ */
259
+ interface ReplayResponse {
260
+ /** The decision/evaluation ID that was replayed. */
261
+ decisionId: string;
262
+ /** SDK-canonical variance outcome. */
263
+ varianceKind: ReplayVarianceKind;
264
+ /** The original recorded decision. */
265
+ originalDecision: DecisionCanonical;
266
+ /** Original deny code, if any. */
267
+ originalDenyCode?: string;
268
+ /** Re-evaluated decision. Absent when `varianceKind === "ENVELOPE_DRIFT"`. */
269
+ replayedDecision?: DecisionCanonical;
270
+ replayedDenyCode?: string;
271
+ engineVersion?: string;
272
+ engineVersionKind?: string;
273
+ /** Whether the evaluation was eligible for replay. `false` for 409 responses. */
274
+ acceptsReplay: boolean;
275
+ envelopeVerification?: string;
276
+ /** ISO-8601 timestamp of the replay. */
277
+ replayedAt: string;
278
+ /** Rate-limit state from response headers. */
279
+ rateLimit: RateLimitState | null;
280
+ }
281
+
5
282
  /**
6
283
  * Dual-shape input bridge for the v2.0.0 wire format change.
7
284
  *
@@ -31,6 +308,8 @@ interface V2EvaluateRequest {
31
308
  action_type: string;
32
309
  actor_id: string;
33
310
  context?: Record<string, unknown>;
311
+ /** Populate `risk_envelope.factors` in the response (Phase C). */
312
+ explain?: boolean;
34
313
  }
35
314
  /**
36
315
  * Normalise an evaluate request from either the legacy v1.x shape
@@ -74,6 +353,140 @@ interface V2EvaluateResponse {
74
353
  */
75
354
  declare function normalizeEvaluateResponse(wire: LegacyEvaluateResponse | V2EvaluateResponse): V2EvaluateResponse;
76
355
 
356
+ /**
357
+ * Constrained governance agents — read-side SDK surface.
358
+ *
359
+ * Three endpoints, all GET, all org-scoped server-side:
360
+ *
361
+ * GET /v1/governance/agents — registry of advisory agents
362
+ * GET /v1/governance/findings?change_id=… — findings against one change
363
+ * GET /v1/governance/evaluations?change_id=… — agent run records
364
+ *
365
+ * **Doctrine — evaluation ≠ authorization ≠ execution.**
366
+ * Every type in this module is read-only signal. `can_authorize` is
367
+ * pinned `false` on the wire (DB-generated column on the registry,
368
+ * CHECK on findings). The SDK does not expose an invocation method:
369
+ * agent invocation is a CI concern (atlasent-action `governance-agents`
370
+ * mode), not an application concern. This module is for surfaces that
371
+ * want to render findings alongside the authority workflow.
372
+ *
373
+ * Wire schema source of truth lives in
374
+ * atlasent-api/packages/types/src/governance-agents.ts
375
+ * which is intentionally standalone (not re-exported from @atlasent/types).
376
+ * The shapes mirrored below are the read-side subset.
377
+ *
378
+ * @module
379
+ */
380
+ type AgentFindingSeverity = "info" | "low" | "medium" | "high" | "blocker";
381
+ type AgentEvaluationStatus = "running" | "completed" | "failed" | "timeout";
382
+ type AgentAuthorityDomain = "engineering" | "runtime_platform" | "security" | "compliance" | "release_management" | "operations" | "customer_impact" | "governance_office";
383
+ type AgentInvokerKind = "human" | "service_account" | "autonomous_agent" | "system";
384
+ type AgentSubjectKind = "pull_request" | "schema_migration" | "runtime_flag" | "deployment" | "operational_rollout" | "regulated_execution_change" | "policy_bundle";
385
+ /**
386
+ * A versioned advisory agent definition. `authority_class` is fixed to
387
+ * `advisory` and `can_authorize` to `false` at the schema level — these
388
+ * cannot be relaxed without a structural change to the runtime DB.
389
+ */
390
+ interface GovernanceAgent {
391
+ readonly slug: string;
392
+ readonly version: string;
393
+ readonly name: string;
394
+ readonly description: string;
395
+ readonly applicable_subject_kinds: readonly AgentSubjectKind[];
396
+ readonly authority_class: "advisory";
397
+ /** Structurally false. Generated column on the runtime DB. */
398
+ readonly can_authorize: false;
399
+ readonly capabilities: readonly string[];
400
+ readonly is_active: boolean;
401
+ readonly created_at: string;
402
+ readonly retired_at: string | null;
403
+ }
404
+ /** A typed evidence pointer attached to a finding. Free-form by design. */
405
+ interface AgentEvidenceRef {
406
+ readonly kind: string;
407
+ readonly ref: string;
408
+ readonly note?: string;
409
+ }
410
+ /**
411
+ * One advisory finding produced by an agent run. `can_authorize` is
412
+ * pinned `false` by a CHECK constraint on the underlying table — no
413
+ * finding row in any environment can ever satisfy a gate.
414
+ */
415
+ interface GovernanceAgentFinding {
416
+ readonly id: string;
417
+ readonly org_id: string;
418
+ readonly evaluation_id: string;
419
+ readonly change_id: string;
420
+ readonly agent_slug: string;
421
+ readonly agent_version: string;
422
+ readonly finding_type: string;
423
+ readonly severity: AgentFindingSeverity;
424
+ readonly confidence: number | null;
425
+ readonly summary: string;
426
+ readonly evidence_refs: readonly AgentEvidenceRef[];
427
+ readonly required_authority: AgentAuthorityDomain | null;
428
+ readonly recommended_action: string | null;
429
+ /** Structurally false. CHECK constraint on the runtime DB. */
430
+ readonly can_authorize: false;
431
+ readonly supersedes_finding_id: string | null;
432
+ readonly payload: Readonly<Record<string, unknown>>;
433
+ readonly created_at: string;
434
+ /**
435
+ * Populated by the finding→gate routing trigger (atlasent-api #842).
436
+ * Null when no matching gate exists at insertion time; can be
437
+ * back-resolved by `governance_resolve_findings_for_gate(gate_id)`.
438
+ */
439
+ readonly routed_gate_id?: string | null;
440
+ }
441
+ /**
442
+ * An append-only record of one agent run against one governed change.
443
+ * The same (agent_slug, agent_version, input_hash) combination may
444
+ * produce multiple rows across time — the runtime DB does not dedupe.
445
+ */
446
+ interface GovernanceAgentEvaluation {
447
+ readonly id: string;
448
+ readonly org_id: string;
449
+ readonly change_id: string;
450
+ readonly agent_slug: string;
451
+ readonly agent_version: string;
452
+ readonly input_hash: string;
453
+ readonly status: AgentEvaluationStatus;
454
+ readonly highest_severity: AgentFindingSeverity | null;
455
+ readonly findings_count: number;
456
+ readonly summary: string | null;
457
+ readonly runtime_ms: number | null;
458
+ readonly failure_reason: string | null;
459
+ readonly invoked_by_kind: AgentInvokerKind;
460
+ readonly invoked_by: string | null;
461
+ readonly started_at: string;
462
+ readonly completed_at: string | null;
463
+ }
464
+ interface ListGovernanceAgentsResponse {
465
+ readonly agents: readonly GovernanceAgent[];
466
+ }
467
+ interface ListGovernanceFindingsResponse {
468
+ readonly findings: readonly GovernanceAgentFinding[];
469
+ }
470
+ interface ListGovernanceEvaluationsResponse {
471
+ readonly evaluations: readonly GovernanceAgentEvaluation[];
472
+ }
473
+ interface ListGovernanceFindingsQuery {
474
+ readonly change_id: string;
475
+ /** Optional: filter to one agent's findings. */
476
+ readonly agent_slug?: string;
477
+ }
478
+ interface ListGovernanceEvaluationsQuery {
479
+ readonly change_id: string;
480
+ /** Optional: filter to one agent's runs. */
481
+ readonly agent_slug?: string;
482
+ }
483
+ /**
484
+ * Return the worst severity across a set of findings, or `null` when
485
+ * the input is empty. Pure function, exported because every consumer
486
+ * needs the same rollup logic (Console finds panel, CI summary, etc.).
487
+ */
488
+ declare function highestAgentFindingSeverity(findings: readonly Pick<GovernanceAgentFinding, "severity">[]): AgentFindingSeverity | null;
489
+
77
490
  /**
78
491
  * Human-in-the-loop (HITL) types — wire shape for `/v1/hitl/*`.
79
492
  *
@@ -1165,6 +1578,49 @@ declare class AtlaSentClient {
1165
1578
  * {@link AtlaSentError}.
1166
1579
  */
1167
1580
  evaluate(input: EvaluateRequest | LegacyEvaluateRequest): Promise<EvaluateResponse>;
1581
+ /**
1582
+ * Batch evaluate — send up to 100 decisions in a single round-trip.
1583
+ *
1584
+ * Wraps `POST /v1-evaluate-batch`. The server evaluates each item
1585
+ * against the active policy bundle and returns results in the same
1586
+ * order as the input. One rate-limit token is consumed for the
1587
+ * whole batch, and one audit-chain entry lists every included
1588
+ * decision id.
1589
+ *
1590
+ * A per-item policy `deny` is **not** thrown — it appears as
1591
+ * `item.decision === "deny"` in the returned items. A whole-batch
1592
+ * network error, 4xx, or 5xx throws {@link AtlaSentError}.
1593
+ *
1594
+ * Requires the `v2_batch` tenant feature flag to be enabled on the
1595
+ * org (returns 404 when off). Requires scope `evaluate:write`.
1596
+ *
1597
+ * @param requests - 1–100 evaluate items.
1598
+ * @param batchId - Optional caller-supplied UUID for idempotency.
1599
+ * A retried call with the same `batchId` and identical items
1600
+ * returns the cached response within 24 h (`replayed: true`).
1601
+ */
1602
+ evaluateBatch(requests: BatchEvalItem[], batchId?: string): Promise<BatchEvalResponse>;
1603
+ /**
1604
+ * Subscribe to a live stream of decisions for this org.
1605
+ *
1606
+ * Wraps `GET /v1-decisions-stream`. The server emits one SSE frame
1607
+ * per audit event and sends a heartbeat every 15 s. The session
1608
+ * auto-closes after `maxSeconds` (default 30 min); reconnect with
1609
+ * the last received `event.id` to resume without replaying history.
1610
+ *
1611
+ * ```ts
1612
+ * const controller = new AbortController();
1613
+ * for await (const event of client.subscribeDecisions({ signal: controller.signal })) {
1614
+ * if (event.type === "heartbeat") continue;
1615
+ * console.log(event.type, event.decision, event.actorId);
1616
+ * if (event.type === "session_end") break; // reconnect
1617
+ * }
1618
+ * ```
1619
+ *
1620
+ * Requires scope `audit:read`. Requires the `v2_decisions_stream`
1621
+ * tenant feature flag (returns 404 when off).
1622
+ */
1623
+ subscribeDecisions(opts?: SubscribeDecisionsOptions): AsyncGenerator<DecisionStreamEvent>;
1168
1624
  /**
1169
1625
  * Pre-flight evaluation that always returns the constraint trace.
1170
1626
  *
@@ -1348,6 +1804,80 @@ declare class AtlaSentClient {
1348
1804
  * taxonomy as {@link AtlaSentClient.evaluate}.
1349
1805
  */
1350
1806
  createAuditExport(filter?: AuditExportRequest): Promise<AuditExportResult>;
1807
+ /**
1808
+ * Re-evaluate a recorded decision against its originally-pinned policy
1809
+ * bundle and engine version, and report whether the result agrees with
1810
+ * what was recorded.
1811
+ *
1812
+ * Wraps `POST /v1-decisions-replay/:id/replay`. **Side-effect-free** — no
1813
+ * audit chain row is written and no permit is issued (per ADR-016).
1814
+ * Useful for compliance review, regression testing of bundle changes,
1815
+ * and post-incident investigation.
1816
+ *
1817
+ * Outcomes encoded in the response:
1818
+ * - `variance: "NONE"` — replay agrees with the original decision.
1819
+ * - `variance: "DECISION_CHANGED"` — same envelope, same bundle, different
1820
+ * decision. Almost always indicates non-determinism in a rule
1821
+ * (e.g. wall-clock comparison) and warrants investigation.
1822
+ * - `variance: "ENVELOPE_DRIFT"` — the recorded request envelope no longer
1823
+ * hashes to the recorded value. The replay short-circuits without
1824
+ * running the engine; `replay_decision` is absent. Treat as evidence
1825
+ * of substrate tamper or a recorder bug.
1826
+ *
1827
+ * Server-side 409 responses (replay refused because the engine version
1828
+ * does not accept replay, or because no bundle was pinned) surface as
1829
+ * `AtlaSentError` with `code: "replay_not_eligible"` — callers should
1830
+ * treat them as expected for old / un-pinned decisions, not as bugs.
1831
+ *
1832
+ * Requires the `evaluate:write` API key scope.
1833
+ *
1834
+ * @param decisionId The UUID of the recorded decision to replay.
1835
+ * Matches `execution_evaluations.request_id`.
1836
+ *
1837
+ * @example
1838
+ * ```ts
1839
+ * const result = await client.replayDecision("dec_abc123");
1840
+ * if (result.variance === "DECISION_CHANGED") {
1841
+ * console.warn(
1842
+ * `Decision ${result.decision_id} changed on replay: ` +
1843
+ * `${result.original_decision} → ${result.replay_decision}`,
1844
+ * );
1845
+ * }
1846
+ * ```
1847
+ */
1848
+ replayDecision(decisionId: string): Promise<ReplayDecisionResponse & {
1849
+ rateLimit: RateLimitState | null;
1850
+ }>;
1851
+ /**
1852
+ * ADR-015 Phase C — SDK-canonical replay runtime.
1853
+ *
1854
+ * Re-evaluates a recorded decision against its originally-pinned policy
1855
+ * bundle and engine version via `POST /v1/decisions/:id/replay`.
1856
+ * Side-effect-free server-side: no audit chain row is written and no
1857
+ * permit is issued (ADR-016 `mode: "replay"` sentinel).
1858
+ *
1859
+ * Differences from {@link replayDecision} (the 2.7.0 raw-wire surface):
1860
+ *
1861
+ * | | `replayDecision()` | `replay()` |
1862
+ * | --- | --- | --- |
1863
+ * | Path | `/v1-decisions-replay/:id/replay` | `/v1/decisions/:id/replay` |
1864
+ * | Variance | raw wire (`DECISION_CHANGED`) | SDK-canonical (`POLICY_DRIFT`) |
1865
+ * | 409 handling | throws `AtlaSentError` | returns `ENGINE_DRIFT` / `BUNDLE_MISSING` |
1866
+ * | Input shape | `decisionId: string` | `{ evaluationId }` |
1867
+ *
1868
+ * **Never throws on `409 replay_not_eligible`** — instead returns a
1869
+ * `ReplayResponse` with `varianceKind: "ENGINE_DRIFT"` (engine retired
1870
+ * beyond archival window) or `"BUNDLE_MISSING"` (no bundle pinned on
1871
+ * the original evaluation). Callers can always `switch` on
1872
+ * `result.varianceKind` without a try/catch.
1873
+ *
1874
+ * Fix-forward note: this method was originally landed in PR #275 but
1875
+ * dropped from the squash merge. The TS types (`ReplayResponse`,
1876
+ * `ReplayRequest`) and CHANGELOG made it through; the method itself
1877
+ * did not. Restored here to match the Python {@link
1878
+ * AtlaSentClient}.replay() that landed in atlasent-sdk@2.6.0 (Python).
1879
+ */
1880
+ replay(input: ReplayRequest): Promise<ReplayResponse>;
1351
1881
  /**
1352
1882
  * Open a streaming evaluation session against `POST /v1-evaluate-stream`.
1353
1883
  *
@@ -1614,11 +2144,40 @@ declare class AtlaSentClient {
1614
2144
  revokeImpersonationGrant(id: string): Promise<void>;
1615
2145
  issueImpersonationToken(grant_id: string, requested_duration_seconds?: number): Promise<ImpersonationToken>;
1616
2146
  validateImpersonationToken(token: string): Promise<ImpersonationValidationResult>;
1617
- }
1618
-
1619
- /** Node's webcrypto CryptoKey — kept local so the module doesn't depend on DOM types. */
1620
- type WebCryptoKey = webcrypto.CryptoKey;
1621
- /** Public key candidate the verifier will try, tagged with its registry id. */
2147
+ /**
2148
+ * List the advisory governance-agent registry for the calling org.
2149
+ *
2150
+ * Calls `GET /v1/governance/agents`. The registry is reference data
2151
+ * seeded at runtime-DB migration time; every row has
2152
+ * `authority_class = "advisory"` and `can_authorize = false` —
2153
+ * structural invariants enforced by the schema, not policy.
2154
+ */
2155
+ listGovernanceAgents(): Promise<GovernanceAgent[]>;
2156
+ /**
2157
+ * List advisory findings emitted against one governed change.
2158
+ *
2159
+ * Calls `GET /v1/governance/findings?change_id=…[&agent_slug=…]`.
2160
+ * Returns the typed-finding rows in `created_at DESC` order, including
2161
+ * `routed_gate_id` when the finding→gate trigger linked them. Findings
2162
+ * with `can_authorize === false` (always) are advisory; rendering them
2163
+ * never satisfies a gate.
2164
+ */
2165
+ listGovernanceFindings(query: ListGovernanceFindingsQuery): Promise<GovernanceAgentFinding[]>;
2166
+ /**
2167
+ * List agent run records against one governed change.
2168
+ *
2169
+ * Calls `GET /v1/governance/evaluations?change_id=…[&agent_slug=…]`.
2170
+ * Returns every persisted evaluation, including `failed` / `timeout`
2171
+ * runs and `completed` runs with zero findings — the latter is the
2172
+ * positive signal "the agent ran and found nothing", which the UI
2173
+ * surfaces as `clear`.
2174
+ */
2175
+ listGovernanceEvaluations(query: ListGovernanceEvaluationsQuery): Promise<GovernanceAgentEvaluation[]>;
2176
+ }
2177
+
2178
+ /** Node's webcrypto CryptoKey — kept local so the module doesn't depend on DOM types. */
2179
+ type WebCryptoKey = webcrypto.CryptoKey;
2180
+ /** Public key candidate the verifier will try, tagged with its registry id. */
1622
2181
  interface VerifyKey {
1623
2182
  keyId: string;
1624
2183
  publicKey: WebCryptoKey;
@@ -2210,102 +2769,6 @@ interface GovernanceEvent {
2210
2769
  payload?: Record<string, unknown>;
2211
2770
  }
2212
2771
 
2213
- /**
2214
- * Override types — wire shapes for `/v1/overrides`.
2215
- *
2216
- * Overrides allow an authorized actor to bypass a deny decision for a
2217
- * specific evaluation. They must be approved before they take effect
2218
- * and can be revoked at any time.
2219
- *
2220
- * Mirrors `api/src/schemas/overrides.ts` in atlasent-control-plane.
2221
- */
2222
- /**
2223
- * Lifecycle status of an override request.
2224
- *
2225
- * - `pending` — created, waiting for approval
2226
- * - `approved` — approved and active; the evaluation's deny is lifted
2227
- * - `revoked` — manually revoked
2228
- * - `expired` — TTL elapsed before revocation
2229
- */
2230
- type OverrideStatus = "pending" | "approved" | "revoked" | "expired";
2231
- /**
2232
- * The event types that can appear on an override's event log.
2233
- */
2234
- type OverrideEventType = "created" | "approved" | "revoked";
2235
- /**
2236
- * Canonical Override domain object returned by the API.
2237
- *
2238
- * All timestamps are ISO-8601 UTC strings. Nullable fields are `null`
2239
- * rather than omitted so wire shapes are stable.
2240
- */
2241
- interface OverrideV1 {
2242
- id: string;
2243
- orgId: string;
2244
- /** The evaluation ID this override applies to. */
2245
- evaluationId: string;
2246
- /** Human-readable justification provided at creation time. */
2247
- reason: string;
2248
- status: OverrideStatus;
2249
- /** Actor who requested the override. */
2250
- requestedBy: string;
2251
- /** Actor who approved the override, or `null` if not yet approved. */
2252
- approvedBy: string | null;
2253
- /** Actor who revoked the override, or `null` if not revoked. */
2254
- revokedBy: string | null;
2255
- /** ISO-8601 creation timestamp. */
2256
- createdAt: string;
2257
- /** ISO-8601 approval timestamp, or `null`. */
2258
- approvedAt: string | null;
2259
- /** ISO-8601 revocation timestamp, or `null`. */
2260
- revokedAt: string | null;
2261
- /** ISO-8601 expiry timestamp, or `null` if no TTL was set. */
2262
- expiresAt: string | null;
2263
- /** Arbitrary key/value metadata attached at creation. `null` when none. */
2264
- metadata: Record<string, unknown> | null;
2265
- }
2266
- /**
2267
- * Paginated list of overrides.
2268
- */
2269
- interface OverrideListResponse {
2270
- items: OverrideV1[];
2271
- /** Opaque cursor for the next page. `null` when there are no more results. */
2272
- nextCursor: string | null;
2273
- }
2274
- /**
2275
- * Input for `POST /v1/overrides` — request a new override.
2276
- */
2277
- interface CreateOverrideRequest {
2278
- /** Human-readable justification. Required; max 2000 characters. */
2279
- reason: string;
2280
- /** The evaluation ID to override. */
2281
- evaluationId: string;
2282
- /** Lifetime in seconds. Defaults to 3600. Max 604800 (7 days). */
2283
- ttlSeconds?: number;
2284
- /** Arbitrary metadata to attach to the override record. */
2285
- metadata?: Record<string, unknown>;
2286
- }
2287
- /**
2288
- * Audit event appended to an override's event log on every state mutation.
2289
- */
2290
- interface OverrideEvent {
2291
- id: string;
2292
- overrideId: string;
2293
- orgId: string;
2294
- /** Actor who caused this event. */
2295
- actorId: string;
2296
- type: OverrideEventType;
2297
- /** ISO-8601 timestamp. */
2298
- at: string;
2299
- /** Event-specific payload. `null` when none. */
2300
- payload: Record<string, unknown> | null;
2301
- }
2302
- /**
2303
- * Response for `GET /v1/overrides/:id/events`.
2304
- */
2305
- interface OverrideEventsResponse {
2306
- items: OverrideEvent[];
2307
- }
2308
-
2309
2772
  /**
2310
2773
  * Proof bundle types — wire shape for `GET /v1/proof/:evaluationId`.
2311
2774
  *
@@ -3584,82 +4047,6 @@ interface WebhookPayload<T = Record<string, unknown>> {
3584
4047
  */
3585
4048
  declare function verifyWebhookSignature(payload: string, signature: string, secret: string): Promise<boolean>;
3586
4049
 
3587
- /**
3588
- * Compliance evidence types — wire shapes for `v1-compliance-evidence`.
3589
- *
3590
- * Supports on-demand SOC 2 Type II control evidence collection. The
3591
- * same run shape is used for ISO 27001, GDPR, and HIPAA; control IDs
3592
- * differ per framework.
3593
- */
3594
- type ComplianceFramework = "soc2" | "iso27001" | "gdpr" | "hipaa";
3595
- type EvidenceControlStatus = "pass" | "gap" | "finding";
3596
- type ComplianceRunStatus = "pending" | "running" | "completed" | "failed";
3597
- /**
3598
- * A single evaluated control within an evidence run.
3599
- * `evidence` is a free-form object whose keys are framework-specific
3600
- * metric names (e.g. `mfa_enforced_policies`, `audit_events_last_30d`).
3601
- */
3602
- interface EvidenceControl {
3603
- control_id: string;
3604
- title: string;
3605
- status: EvidenceControlStatus;
3606
- evidence: Record<string, unknown>;
3607
- }
3608
- interface ComplianceEvidenceSummary {
3609
- total: number;
3610
- pass: number;
3611
- gap: number;
3612
- finding: number;
3613
- }
3614
- interface ComplianceEvidenceRun {
3615
- id: string;
3616
- org_id: string;
3617
- framework: ComplianceFramework;
3618
- period_start: string;
3619
- period_end: string;
3620
- status: ComplianceRunStatus;
3621
- controls: EvidenceControl[];
3622
- summary: ComplianceEvidenceSummary | null;
3623
- applied_by: string | null;
3624
- created_at: string;
3625
- }
3626
- interface TriggerEvidenceRunRequest {
3627
- framework: ComplianceFramework;
3628
- /** ISO 8601 date string; defaults to 30 days ago on the server. */
3629
- period_start?: string;
3630
- /** ISO 8601 date string; defaults to now on the server. */
3631
- period_end?: string;
3632
- }
3633
- interface TriggerEvidenceRunResponse {
3634
- run: ComplianceEvidenceRun;
3635
- }
3636
- interface ListEvidenceRunsResponse {
3637
- runs: ComplianceEvidenceRun[];
3638
- }
3639
- /**
3640
- * SOC 2 control IDs evaluated by `v1-compliance-evidence`.
3641
- *
3642
- * | ID | Area |
3643
- * |--------|------|
3644
- * | CC6.1 | MFA enforcement |
3645
- * | CC6.3 | Periodic access reviews |
3646
- * | CC7.2 | Audit trail completeness |
3647
- * | CC8.1 | Change management / HITL |
3648
- * | CC3.2 | Policy violations |
3649
- */
3650
- type SOC2ControlId = "CC6.1" | "CC6.3" | "CC7.2" | "CC8.1" | "CC3.2";
3651
- /**
3652
- * Returns `true` when every control in the run has `pass` or `gap`
3653
- * status (no `finding`). A `gap` means a control is partially met;
3654
- * a `finding` is a blocking deficiency that requires remediation.
3655
- */
3656
- declare function evidenceRunPasses(run: ComplianceEvidenceRun): boolean;
3657
- /**
3658
- * Returns controls that do not have `pass` status, sorted so
3659
- * `finding` controls appear before `gap` controls.
3660
- */
3661
- declare function nonPassingControls(run: ComplianceEvidenceRun): EvidenceControl[];
3662
-
3663
4050
  /**
3664
4051
  * Policy-as-code GitOps sync types — wire shapes for `v1-policy-sync`.
3665
4052
  *
@@ -3985,6 +4372,1138 @@ declare function authorizeStream(transport: V2Transport, req: EvaluateManyReques
3985
4372
  */
3986
4373
  declare function graphql<T = unknown>(transport: V2Transport, req: GraphQLRequest): Promise<GraphQLResponse<T>>;
3987
4374
 
4375
+ /**
4376
+ * Approval/Override Runtime — fail-closed bridge between policy `hold`/`escalate`
4377
+ * outcomes and human approval.
4378
+ *
4379
+ * `protectOrEscalate()` — like `protect()` but handles hold/escalate by:
4380
+ * 1. Creating an HITL escalation via POST /v1/hitl
4381
+ * 2. Polling until approved, rejected, or timed out
4382
+ * 3. Returning an `ApprovalPermit` on approval; throwing on rejection/timeout
4383
+ *
4384
+ * `createEscalation()` — create an HITL escalation request (lower-level)
4385
+ * `waitForEscalationApproval()` — poll until the escalation resolves
4386
+ * `requestOverride()` — request a post-hoc override for a denied evaluation
4387
+ * `configureApprovalRuntime()` — set API key / base URL once
4388
+ */
4389
+
4390
+ interface ApprovalRuntimeConfig {
4391
+ apiKey?: string;
4392
+ baseUrl?: string;
4393
+ /** Per-request HTTP timeout in ms. Default 30_000. */
4394
+ timeoutMs?: number;
4395
+ }
4396
+ /**
4397
+ * Configure the Approval Runtime singleton. Optional — if `ATLASENT_API_KEY` is
4398
+ * set in the environment, the runtime works without configuration. Calling this
4399
+ * again merges into the existing config.
4400
+ */
4401
+ declare function configureApprovalRuntime(config: ApprovalRuntimeConfig): void;
4402
+ /** Opaque handle returned when an escalation is created. */
4403
+ interface EscalationHandle {
4404
+ readonly escalationId: string;
4405
+ readonly createdAt: string;
4406
+ readonly timeoutAt: string | null;
4407
+ readonly assignedToRole: string | null;
4408
+ }
4409
+ /** Terminal resolution status of an escalation. */
4410
+ type ApprovalStatus = "approved" | "rejected" | "timed_out";
4411
+ /** Full outcome returned when an escalation resolves. */
4412
+ interface EscalationOutcome {
4413
+ readonly status: ApprovalStatus;
4414
+ readonly escalation: HitlEscalation;
4415
+ readonly resolvedBy: string | null;
4416
+ readonly resolutionNote: string | null;
4417
+ readonly resolvedAt: string | null;
4418
+ }
4419
+ /**
4420
+ * Thrown by `protectOrEscalate` / `waitForEscalationApproval` when the
4421
+ * human reviewer rejects the escalation.
4422
+ */
4423
+ declare class EscalationDeniedError extends Error {
4424
+ readonly name: "EscalationDeniedError";
4425
+ readonly escalationId: string;
4426
+ readonly outcome: EscalationOutcome;
4427
+ constructor(outcome: EscalationOutcome);
4428
+ }
4429
+ /**
4430
+ * Thrown by `protectOrEscalate` / `waitForEscalationApproval` when the
4431
+ * client-side wait window expires before the escalation resolves.
4432
+ */
4433
+ declare class EscalationTimeoutError extends Error {
4434
+ readonly name: "EscalationTimeoutError";
4435
+ readonly escalationId: string;
4436
+ readonly outcome: EscalationOutcome;
4437
+ constructor(outcome: EscalationOutcome);
4438
+ }
4439
+ /**
4440
+ * Options for creating an HITL escalation. Extends `HitlCreateRequest` with
4441
+ * API-key and base-URL overrides for per-call credential injection.
4442
+ */
4443
+ interface CreateEscalationOptions extends Partial<HitlCreateRequest> {
4444
+ apiKey?: string;
4445
+ baseUrl?: string;
4446
+ }
4447
+ /**
4448
+ * Create an HITL escalation via POST /v1/hitl.
4449
+ *
4450
+ * The escalation is placed in `pending` status; a reviewer must approve or
4451
+ * reject it before the original action can proceed. Use
4452
+ * `waitForEscalationApproval()` to poll until the escalation resolves.
4453
+ */
4454
+ declare function createEscalation(opts: CreateEscalationOptions): Promise<EscalationHandle>;
4455
+ interface WaitForApprovalOptions {
4456
+ escalationId: string;
4457
+ /** Max milliseconds to wait for a human to respond. Default 600_000 (10 min). */
4458
+ waitMs?: number;
4459
+ /** How often to poll the API. Default 5000ms. Minimum 1000ms. */
4460
+ pollIntervalMs?: number;
4461
+ apiKey?: string;
4462
+ baseUrl?: string;
4463
+ }
4464
+ /**
4465
+ * Poll GET /v1/escalations/:id until the escalation reaches a terminal status
4466
+ * (`approved`, `auto_approved`, `rejected`, or `timed_out`).
4467
+ *
4468
+ * Returns the resolved outcome regardless of approval/rejection — the caller
4469
+ * decides whether to throw. Use `protectOrEscalate()` for the opinionated flow.
4470
+ */
4471
+ declare function waitForEscalationApproval(opts: WaitForApprovalOptions): Promise<EscalationOutcome>;
4472
+ /**
4473
+ * A verified Permit granted via human approval of an HITL escalation.
4474
+ * Extends {@link Permit} with escalation provenance fields.
4475
+ *
4476
+ * `approvalBasis: "direct_policy"` — action was allowed directly by policy;
4477
+ * no escalation was created.
4478
+ *
4479
+ * `approvalBasis: "human_approval"` — the policy returned `hold`/`escalate`;
4480
+ * a human reviewer approved the escalation.
4481
+ *
4482
+ * Guards and enforcement adapters should treat both as equivalent authorization
4483
+ * proof; auditors can distinguish them via `escalationId`.
4484
+ */
4485
+ interface ApprovalPermit extends Permit {
4486
+ /**
4487
+ * The HITL escalation ID that authorized this action. Empty string when
4488
+ * the action was directly allowed by policy (no escalation needed).
4489
+ */
4490
+ readonly escalationId: string;
4491
+ /** Identity of the reviewer who approved, or `null` for `auto_approved`. */
4492
+ readonly resolvedBy: string | null;
4493
+ readonly resolutionNote: string | null;
4494
+ readonly resolvedAt: string;
4495
+ readonly approvalBasis: "direct_policy" | "human_approval";
4496
+ }
4497
+ interface ProtectOrEscalateOptions {
4498
+ /** Agent ID recorded on the escalation. Defaults to `request.agent`. */
4499
+ agentId?: string;
4500
+ /** Human-readable reason surfaced in the reviewer's queue. */
4501
+ escalationReason?: string;
4502
+ /** The proposed action payload shown to reviewers. Defaults to `request.context`. */
4503
+ proposedAction?: Record<string, unknown>;
4504
+ riskScore?: number;
4505
+ assignedToRole?: string;
4506
+ quorumRequired?: HitlQuorumTier;
4507
+ fallbackDecision?: HitlFallbackDecision;
4508
+ /** ISO-8601 — when the escalation should auto-resolve per server policy. */
4509
+ timeoutAt?: string;
4510
+ metadata?: Record<string, unknown>;
4511
+ /** Max ms to wait for a human decision. Default 600_000 (10 min). */
4512
+ waitMs?: number;
4513
+ /** How often to poll. Default 5000ms. */
4514
+ pollIntervalMs?: number;
4515
+ apiKey?: string;
4516
+ baseUrl?: string;
4517
+ /** Called with the EscalationHandle immediately after it is created. */
4518
+ onEscalationCreated?: (handle: EscalationHandle) => void;
4519
+ }
4520
+ /**
4521
+ * Authorize an action end-to-end, automatically escalating to human review
4522
+ * when the policy returns `hold` or `escalate`.
4523
+ *
4524
+ * **Directly allowed** → returns `ApprovalPermit` with
4525
+ * `approvalBasis: "direct_policy"` (same semantics as `protect()`).
4526
+ *
4527
+ * **Hold / escalate** → creates an HITL escalation, polls for a human
4528
+ * decision, and returns `ApprovalPermit` with
4529
+ * `approvalBasis: "human_approval"` on approval.
4530
+ *
4531
+ * **Throws**:
4532
+ * - {@link EscalationDeniedError} — reviewer rejected the escalation
4533
+ * - {@link EscalationTimeoutError} — wait window elapsed without a decision
4534
+ * - {@link AtlaSentDeniedError} — hard deny (not hold/escalate); fail-closed
4535
+ * - {@link AtlaSentError} — transport / auth / server failure; fail-closed
4536
+ */
4537
+ declare function protectOrEscalate(request: ProtectRequest, opts?: ProtectOrEscalateOptions): Promise<ApprovalPermit>;
4538
+ interface RequestOverrideOptions {
4539
+ /** Human-readable justification. Required; max 2000 characters. */
4540
+ reason: string;
4541
+ /** The evaluation ID that was denied and should be overridden. */
4542
+ evaluationId: string;
4543
+ /** How long this override is valid, in seconds. Max 604800 (7 days). */
4544
+ ttlSeconds?: number;
4545
+ /** Arbitrary metadata to attach (e.g. liability attribution context). */
4546
+ metadata?: Record<string, unknown>;
4547
+ apiKey?: string;
4548
+ baseUrl?: string;
4549
+ }
4550
+ /**
4551
+ * Request a post-hoc override for a denied evaluation via POST /v1/overrides.
4552
+ *
4553
+ * The override starts in `pending` status and takes effect only after an
4554
+ * authorized actor approves it. Subsequent evaluations for the same action
4555
+ * will return `allow` while the override is `approved` and within its TTL.
4556
+ *
4557
+ * Attach `metadata.requested_by` for liability attribution.
4558
+ */
4559
+ declare function requestOverride(opts: RequestOverrideOptions): Promise<OverrideV1>;
4560
+
4561
+ /**
4562
+ * Context Layer — typed, validated, redaction-aware context for AtlaSent
4563
+ * evaluations.
4564
+ *
4565
+ * The current `protect()` / `evaluate()` API accepts
4566
+ * `context?: Record<string, unknown>` — a black box the policy engine
4567
+ * treats as an opaque blob. This module provides:
4568
+ *
4569
+ * 1. **Typed sub-schemas** — `ActorContext`, `ResourceContext`,
4570
+ * `EnvironmentContext`, `ActionMetaContext`, `HistoricalContext`, and
4571
+ * `ActionContext` (the union of all five).
4572
+ *
4573
+ * 2. **`buildActionContext()`** — a structured constructor that normalises
4574
+ * flat shorthands and validates at build time.
4575
+ *
4576
+ * 3. **`validateActionContext()`** — non-throwing validation that returns
4577
+ * typed `ContextValidationError[]` and `ContextValidationWarning[]`.
4578
+ *
4579
+ * 4. **`redactContext()`** — strips / masks sensitive fields before
4580
+ * logging or storing in receipts / evidence bundles.
4581
+ *
4582
+ * 5. **`flattenActionContext()`** — converts a typed `ActionContext` to the
4583
+ * flat `Record<string, unknown>` that `protect()` / `evaluate()` accept.
4584
+ *
4585
+ * ### Usage
4586
+ *
4587
+ * ```ts
4588
+ * import atlasent, { buildActionContext, redactContext } from "@atlasent/sdk";
4589
+ *
4590
+ * const ctx = buildActionContext({
4591
+ * actor: { id: "user:alice", type: "human", roles: ["deploy_engineer"] },
4592
+ * environment: { name: "production", region: "us-east-1" },
4593
+ * resource: { type: "service", id: "api-gateway", sensitivity: "restricted" },
4594
+ * });
4595
+ *
4596
+ * const permit = await atlasent.protect({
4597
+ * agent: "deploy-bot",
4598
+ * action: "production.deploy",
4599
+ * context: flattenActionContext(ctx),
4600
+ * });
4601
+ *
4602
+ * // Store the redacted context alongside the permit — no PII in evidence.
4603
+ * const safe = redactContext(ctx);
4604
+ * await db.permits.create({ permitId: permit.permitId, context: safe });
4605
+ * ```
4606
+ */
4607
+ /**
4608
+ * Identity of the actor requesting the action.
4609
+ *
4610
+ * `id` is the only required field; all others are policy-engine hints.
4611
+ * Omitting optional fields may cause deny on policies that gate on role
4612
+ * membership, trust level, or session binding.
4613
+ */
4614
+ interface ActorContext {
4615
+ /** Stable, opaque actor identifier (e.g. `"user:alice"`, `"agent:deploy-bot"`). */
4616
+ id: string;
4617
+ /** Human-readable label for audit trails and reviewer UIs. */
4618
+ label?: string;
4619
+ /** Discriminates human vs. AI agent vs. service account. */
4620
+ type?: "human" | "agent" | "service_account" | "system";
4621
+ /** Roles the actor holds at evaluation time. */
4622
+ roles?: string[];
4623
+ /** Trust tier. Policy rules can gate on this value. */
4624
+ trust_level?: "high" | "medium" | "low" | "untrusted" | string;
4625
+ /** Actor email — required for human-approval escalation UIs. */
4626
+ email?: string;
4627
+ /** Observed client IP — used in geo-restriction and rate-limit rules. */
4628
+ ip?: string;
4629
+ /** Session or OAuth token ID for replay-detection rules. */
4630
+ session_id?: string;
4631
+ }
4632
+ /**
4633
+ * The resource the action targets.
4634
+ *
4635
+ * `type` is a stable string like `"database.table"`, `"repository"`,
4636
+ * or `"payment"`. `sensitivity` drives redaction rules in evidence
4637
+ * bundles — `"restricted"` fields are masked even in signed receipts.
4638
+ */
4639
+ interface ResourceContext {
4640
+ /** Stable resource type slug (e.g. `"database.table"`, `"service"`, `"payment"`). */
4641
+ type?: string;
4642
+ /** Opaque resource identifier (e.g. table name, repo name, payment ID). */
4643
+ id?: string;
4644
+ /** Human-readable name for reviewer UIs. */
4645
+ name?: string;
4646
+ /** Data-sensitivity classification — drives receipt redaction. */
4647
+ sensitivity?: "public" | "internal" | "confidential" | "restricted";
4648
+ /** Owner org or tenant of the resource. */
4649
+ owner?: string;
4650
+ /** Cloud or datacenter region where the resource lives. */
4651
+ region?: string;
4652
+ }
4653
+ /**
4654
+ * Deployment environment and infrastructure context.
4655
+ *
4656
+ * `name` is the field protect() reads to set the `environment` field
4657
+ * on the verify-permit request. Omitting it logs a console warning
4658
+ * and defaults to `"production"`.
4659
+ */
4660
+ interface EnvironmentContext {
4661
+ /** Deployment tier. Defaults to `"production"` in protect() when absent. */
4662
+ name?: "production" | "staging" | "development" | "test" | string;
4663
+ /** Cloud or datacenter region (e.g. `"us-east-1"`, `"eu-west-1"`). */
4664
+ region?: string;
4665
+ /** CI/CD pipeline name (e.g. `"github_actions"`, `"jenkins"`). */
4666
+ pipeline?: string;
4667
+ /** Git SHA, image tag, or artifact version being deployed. */
4668
+ version?: string;
4669
+ }
4670
+ /**
4671
+ * Action-specific metadata that shapes policy decisions.
4672
+ *
4673
+ * `risk_level` and `reversibility` are the two fields most commonly
4674
+ * referenced by policy rules. Financial policies additionally gate on
4675
+ * `estimated_amount` and `currency`.
4676
+ */
4677
+ interface ActionMetaContext {
4678
+ /** Caller-assessed risk level of this specific invocation. */
4679
+ risk_level?: "critical" | "high" | "medium" | "low";
4680
+ /** Whether the action can be undone after execution. */
4681
+ reversibility?: "reversible" | "irreversible" | "partial";
4682
+ /** Free-text description shown to human reviewers in the HITL UI. */
4683
+ description?: string;
4684
+ /** Estimated monetary amount for financial actions. */
4685
+ estimated_amount?: number;
4686
+ /** ISO 4217 currency code (e.g. `"USD"`, `"EUR"`). */
4687
+ currency?: string;
4688
+ }
4689
+ /**
4690
+ * Historical and behavioral signals about the actor.
4691
+ *
4692
+ * These are caller-computed signals from the caller's own systems —
4693
+ * AtlaSent does not maintain the source-of-truth; it only evaluates
4694
+ * policy against the values provided here.
4695
+ */
4696
+ interface HistoricalContext {
4697
+ /** Number of times this actor performed this action in the past 24h. */
4698
+ recent_action_count?: number;
4699
+ /** ISO-8601 timestamp of the actor's most recent action of this type. */
4700
+ last_action_at?: string;
4701
+ /** True when the actor has unresolved policy violations on record. */
4702
+ has_violations?: boolean;
4703
+ /** Arbitrary caller-defined risk signals from upstream systems. */
4704
+ risk_signals?: Record<string, unknown>;
4705
+ }
4706
+ /**
4707
+ * The canonical typed context for AtlaSent evaluations.
4708
+ *
4709
+ * All sub-schemas are optional at the TypeScript level; policy rules
4710
+ * determine which fields are effectively required. Missing fields that
4711
+ * a policy expects will typically result in a `deny` decision.
4712
+ *
4713
+ * Flat shorthands (`resource_type`, `resource_id`, `environment_name`)
4714
+ * are supported for backward compatibility with existing
4715
+ * `Record<string, unknown>` call sites. `buildActionContext()` merges
4716
+ * them into the nested sub-schemas automatically.
4717
+ *
4718
+ * The `[key: string]: unknown` index signature allows arbitrary
4719
+ * custom fields to pass through to the policy engine unchanged.
4720
+ */
4721
+ interface ActionContext {
4722
+ actor?: ActorContext;
4723
+ resource?: ResourceContext;
4724
+ environment?: EnvironmentContext;
4725
+ action_meta?: ActionMetaContext;
4726
+ history?: HistoricalContext;
4727
+ /** Alias for `environment.name`. Merged into `environment` by buildActionContext. */
4728
+ environment_name?: string;
4729
+ /** Alias for `resource.type`. Merged into `resource` by buildActionContext. */
4730
+ resource_type?: string;
4731
+ /** Alias for `resource.id`. Merged into `resource` by buildActionContext. */
4732
+ resource_id?: string;
4733
+ [key: string]: unknown;
4734
+ }
4735
+ /** Input for `buildActionContext()`. Mirrors `ActionContext` with `actor` required. */
4736
+ interface BuildActionContextInput {
4737
+ actor: ActorContext;
4738
+ resource?: ResourceContext;
4739
+ environment?: EnvironmentContext | string;
4740
+ action_meta?: ActionMetaContext;
4741
+ history?: HistoricalContext;
4742
+ /** Arbitrary additional fields to pass through to the policy engine. */
4743
+ extra?: Record<string, unknown>;
4744
+ }
4745
+ /**
4746
+ * Construct a normalized `ActionContext`.
4747
+ *
4748
+ * - Accepts `environment` as a string shorthand for `{ name: environment }`.
4749
+ * - Populates flat shorthands (`resource_type`, `resource_id`,
4750
+ * `environment_name`) from the nested sub-schemas so both the nested and
4751
+ * flat forms are present in the output.
4752
+ * - Never throws — validation is a separate step via `validateActionContext()`.
4753
+ *
4754
+ * ```ts
4755
+ * const ctx = buildActionContext({
4756
+ * actor: { id: "agent:deploy-bot", type: "agent" },
4757
+ * environment: "production",
4758
+ * resource: { type: "service", id: "checkout-api" },
4759
+ * });
4760
+ * ```
4761
+ */
4762
+ declare function buildActionContext(input: BuildActionContextInput): ActionContext;
4763
+ /** A field-level error from `validateActionContext()`. */
4764
+ interface ContextValidationError {
4765
+ /** Dot-delimited field path (e.g. `"actor.id"`, `"action_meta.currency"`). */
4766
+ field: string;
4767
+ /** Machine-readable error code. */
4768
+ code: "required" | "invalid_type" | "invalid_value" | "cross_field" | "sensitive_field";
4769
+ /** Human-readable explanation. */
4770
+ message: string;
4771
+ }
4772
+ /** A non-blocking advisory from `validateActionContext()`. */
4773
+ interface ContextValidationWarning {
4774
+ field: string;
4775
+ code: "recommended" | "deprecated" | "performance";
4776
+ message: string;
4777
+ }
4778
+ /** Result of `validateActionContext()`. */
4779
+ interface ContextValidationResult {
4780
+ valid: boolean;
4781
+ errors: ContextValidationError[];
4782
+ warnings: ContextValidationWarning[];
4783
+ }
4784
+ /** Options for `validateActionContext()`. */
4785
+ interface ValidateContextOptions {
4786
+ /**
4787
+ * Extra fields to treat as required. Dot-delimited paths are supported
4788
+ * (e.g. `["actor.roles", "resource.id"]`).
4789
+ */
4790
+ requiredFields?: string[];
4791
+ /**
4792
+ * When true, skip the built-in cross-field checks (e.g.
4793
+ * estimated_amount → currency). Useful for partial contexts.
4794
+ */
4795
+ skipCrossFieldChecks?: boolean;
4796
+ }
4797
+ /**
4798
+ * Validate an `ActionContext` without throwing.
4799
+ *
4800
+ * Returns a `ContextValidationResult` with `valid: false` and a list of
4801
+ * typed `errors` / `warnings` when the context is malformed or missing
4802
+ * fields. Does not throw — the caller decides what to do with errors.
4803
+ *
4804
+ * Built-in checks:
4805
+ * - `actor.id` is required when `actor` is present
4806
+ * - `environment.name` is recommended (warns if absent)
4807
+ * - `action_meta.currency` is required when `action_meta.estimated_amount > 0`
4808
+ * - ISO 4217 format check for `action_meta.currency`
4809
+ * - `history.last_action_at` must be a valid ISO-8601 string
4810
+ * - `resource.sensitivity` must be a known value when present
4811
+ *
4812
+ * ```ts
4813
+ * const { valid, errors, warnings } = validateActionContext(ctx, {
4814
+ * requiredFields: ["resource.id", "actor.roles"],
4815
+ * });
4816
+ * if (!valid) logger.warn("Context validation failed", { errors });
4817
+ * ```
4818
+ */
4819
+ declare function validateActionContext(ctx: ActionContext, opts?: ValidateContextOptions): ContextValidationResult;
4820
+ /** Redaction mode applied to a matched field. */
4821
+ type RedactionMode = "remove" | "mask" | "hash";
4822
+ /**
4823
+ * A single redaction rule. `field` is matched against every key at
4824
+ * every nesting level in the context object.
4825
+ *
4826
+ * `path` narrows the match to a specific dot-delimited location
4827
+ * (e.g. `"actor.email"` to only mask email inside the actor sub-object,
4828
+ * not top-level email fields).
4829
+ */
4830
+ interface RedactionRule {
4831
+ /** Key name or regex applied to every key in the context tree. */
4832
+ field: string | RegExp;
4833
+ /** What to do with the matched value. */
4834
+ mode: RedactionMode;
4835
+ /**
4836
+ * Optional dot-delimited path constraint. When set, the rule only
4837
+ * applies to a key at this exact path (e.g. `"actor.session_id"`).
4838
+ */
4839
+ path?: string;
4840
+ }
4841
+ /**
4842
+ * Built-in redaction rules covering OWASP Top 10 sensitive field
4843
+ * name patterns. Matched case-insensitively against every key name
4844
+ * at every nesting level.
4845
+ *
4846
+ * Callers can extend this list or pass a custom rule set to
4847
+ * `redactContext()`.
4848
+ */
4849
+ declare const DEFAULT_REDACTION_RULES: readonly RedactionRule[];
4850
+ /**
4851
+ * Return a redacted copy of `ctx` with sensitive fields removed or masked.
4852
+ *
4853
+ * Uses `DEFAULT_REDACTION_RULES` when `rules` is omitted. Callers can
4854
+ * extend or replace the default rules:
4855
+ *
4856
+ * ```ts
4857
+ * import { DEFAULT_REDACTION_RULES, redactContext } from "@atlasent/sdk";
4858
+ *
4859
+ * const safe = redactContext(ctx, [
4860
+ * ...DEFAULT_REDACTION_RULES,
4861
+ * { field: /internal_id/, mode: "hash" },
4862
+ * ]);
4863
+ * ```
4864
+ *
4865
+ * Never mutates the input; returns a shallow-to-deep copy.
4866
+ */
4867
+ declare function redactContext(ctx: ActionContext, rules?: readonly RedactionRule[]): ActionContext;
4868
+ /**
4869
+ * Convert a typed `ActionContext` to the flat `Record<string, unknown>`
4870
+ * that `protect()` / `evaluate()` / `verifyPermit()` accept.
4871
+ *
4872
+ * The output merges:
4873
+ * 1. All top-level scalar fields from `ActionContext` (including flat
4874
+ * shorthands like `environment_name`).
4875
+ * 2. Nested sub-schemas (`actor`, `resource`, `environment`, etc.) preserved
4876
+ * as nested objects so policy rules written against either the nested or
4877
+ * flat form work correctly.
4878
+ *
4879
+ * The nested form is always present in the output; the flat shorthands
4880
+ * (`resource_type`, `resource_id`, `environment_name`, `environment`) are
4881
+ * duplicated at the top level for policy rules that use the flat path.
4882
+ *
4883
+ * ```ts
4884
+ * const permit = await protect({
4885
+ * agent: "deploy-bot",
4886
+ * action: "production.deploy",
4887
+ * context: flattenActionContext(ctx),
4888
+ * });
4889
+ * ```
4890
+ */
4891
+ declare function flattenActionContext(ctx: ActionContext): Record<string, unknown>;
4892
+
4893
+ type ShadowMode = "observe" | "warn" | "enforce";
4894
+ interface ShadowOutcome {
4895
+ readonly decision: "permit" | "deny" | "hold" | "escalate";
4896
+ readonly permit: Permit | null;
4897
+ readonly error: AtlaSentDeniedError | null;
4898
+ readonly would_have_blocked: boolean;
4899
+ readonly latencyMs: number;
4900
+ readonly evaluationId: string | null;
4901
+ readonly request: ProtectRequest;
4902
+ readonly mode: ShadowMode;
4903
+ }
4904
+ interface ShadowConfig {
4905
+ mode?: ShadowMode;
4906
+ onOutcome?: (outcome: ShadowOutcome) => void | Promise<void>;
4907
+ reportToApi?: boolean;
4908
+ apiKey?: string;
4909
+ baseUrl?: string;
4910
+ }
4911
+ declare function configureShadow(config: ShadowConfig): void;
4912
+ interface ShadowOptions extends ShadowConfig {
4913
+ }
4914
+ declare function protectShadow(request: ProtectRequest, opts?: ShadowOptions): Promise<ShadowOutcome>;
4915
+ interface ShadowEventPayload {
4916
+ action: string;
4917
+ agentId: string | null;
4918
+ decision: ShadowOutcome["decision"];
4919
+ would_have_blocked: boolean;
4920
+ latencyMs: number;
4921
+ evaluationId: string | null;
4922
+ mode: ShadowMode;
4923
+ deniedReason?: string;
4924
+ timestamp: string;
4925
+ }
4926
+ declare function reportShadowEvent(outcome: ShadowOutcome, opts?: Pick<ShadowConfig, "apiKey" | "baseUrl">): Promise<void>;
4927
+
4928
+ type EnforcementMode = "observe" | "warn" | "enforce";
4929
+ interface HealthReport {
4930
+ readonly healthy: boolean;
4931
+ readonly apiReachable: boolean;
4932
+ readonly authenticated: boolean;
4933
+ readonly latencyMs: number | null;
4934
+ readonly apiVersion: string | null;
4935
+ readonly checkedAt: string;
4936
+ readonly errors: string[];
4937
+ }
4938
+ interface EnforcementStatus {
4939
+ readonly actionClass: string;
4940
+ readonly mode: EnforcementMode;
4941
+ readonly blockRate: number | null;
4942
+ readonly totalEvaluations: number | null;
4943
+ readonly lastSeenAt: string | null;
4944
+ readonly schemaRegistered: boolean;
4945
+ }
4946
+ interface ProtectedActionEntry {
4947
+ readonly actionClass: string;
4948
+ readonly firstRegisteredAt: string;
4949
+ readonly lastUpdatedAt: string;
4950
+ readonly enforcementMode: EnforcementMode;
4951
+ readonly schemaId: string | null;
4952
+ readonly tags: string[];
4953
+ }
4954
+ interface OrgSummary {
4955
+ readonly orgId: string;
4956
+ readonly activePolicies: number;
4957
+ readonly totalPolicies: number;
4958
+ readonly activeOverrides: number;
4959
+ readonly pendingEscalations: number;
4960
+ readonly evidenceSigningEnabled: boolean;
4961
+ readonly shadowModeActions: number;
4962
+ readonly enforcedActions: number;
4963
+ readonly lastEvaluationAt: string | null;
4964
+ }
4965
+ interface ControlSurfaceConfig {
4966
+ apiKey?: string;
4967
+ baseUrl?: string;
4968
+ timeoutMs?: number;
4969
+ }
4970
+ declare function configureControlSurface(config: ControlSurfaceConfig): void;
4971
+ declare function checkIntegrationHealth(opts?: ControlSurfaceConfig): Promise<HealthReport>;
4972
+ interface ReportProtectedActionOptions extends ControlSurfaceConfig {
4973
+ actionClass: string;
4974
+ enforcementMode?: EnforcementMode;
4975
+ schemaId?: string;
4976
+ tags?: string[];
4977
+ }
4978
+ declare function reportProtectedAction(opts: ReportProtectedActionOptions): Promise<ProtectedActionEntry>;
4979
+ interface GetEnforcementStatusOptions extends ControlSurfaceConfig {
4980
+ actionClass: string;
4981
+ }
4982
+ declare function getEnforcementStatus(opts: GetEnforcementStatusOptions): Promise<EnforcementStatus>;
4983
+ declare function getOrgSummary(opts?: ControlSurfaceConfig): Promise<OrgSummary>;
4984
+
4985
+ type DeployEnvironment = "production" | "staging" | "development" | string;
4986
+ interface DeployGateOptions {
4987
+ service: string;
4988
+ resourceType?: string;
4989
+ sha?: string;
4990
+ workflow?: string;
4991
+ actorId?: string;
4992
+ actorLabel?: string;
4993
+ environment?: DeployEnvironment;
4994
+ description?: string;
4995
+ requireApproval?: boolean;
4996
+ assignedToRole?: string;
4997
+ waitMs?: number;
4998
+ onEscalationCreated?: (handle: EscalationHandle) => void;
4999
+ apiKey?: string;
5000
+ baseUrl?: string;
5001
+ }
5002
+ declare function protectDeploy(opts: DeployGateOptions): Promise<ApprovalPermit | Permit>;
5003
+
5004
+ type CloseActionType = "period.close" | "period.reopen" | "data.export" | "reconciliation.lock";
5005
+ interface CloseGovernanceOptions {
5006
+ action: CloseActionType;
5007
+ periodLabel: string;
5008
+ closedBy: string;
5009
+ entityId: string;
5010
+ entityName?: string;
5011
+ dataClassification?: "internal" | "confidential" | "restricted";
5012
+ assignedToRole?: string;
5013
+ requireDualApproval?: boolean;
5014
+ waitMs?: number;
5015
+ description?: string;
5016
+ onEscalationCreated?: (handle: EscalationHandle) => void;
5017
+ apiKey?: string;
5018
+ baseUrl?: string;
5019
+ }
5020
+ declare function protectCloseAction(opts: CloseGovernanceOptions): Promise<ApprovalPermit>;
5021
+
5022
+ interface PaymentReleaseOptions {
5023
+ amount: number;
5024
+ currency: string;
5025
+ vendorId: string;
5026
+ vendorName?: string;
5027
+ authorizedBy: string;
5028
+ reference?: string;
5029
+ description?: string;
5030
+ autoEscalateAbove?: number;
5031
+ requireDualApprovalAbove?: number;
5032
+ assignedToRole?: string;
5033
+ waitMs?: number;
5034
+ onEscalationCreated?: (handle: EscalationHandle) => void;
5035
+ apiKey?: string;
5036
+ baseUrl?: string;
5037
+ }
5038
+ declare function protectPaymentRelease(opts: PaymentReleaseOptions): Promise<ApprovalPermit | Permit>;
5039
+
5040
+ type AgentToolMode = "observe" | "enforce" | "escalate";
5041
+ interface AgentToolOptions {
5042
+ toolName: string;
5043
+ toolArgs: Record<string, unknown>;
5044
+ agentId: string;
5045
+ sessionId?: string;
5046
+ riskLevel?: "critical" | "high" | "medium" | "low";
5047
+ mode?: AgentToolMode;
5048
+ assignedToRole?: string;
5049
+ waitMs?: number;
5050
+ description?: string;
5051
+ onEscalationCreated?: (handle: EscalationHandle) => void;
5052
+ apiKey?: string;
5053
+ baseUrl?: string;
5054
+ }
5055
+ declare function classifyToolRisk(toolName: string): "critical" | "high" | "medium" | "low";
5056
+ declare function protectToolCall(opts: AgentToolOptions): Promise<ApprovalPermit | Permit | ShadowOutcome>;
5057
+
5058
+ /**
5059
+ * Claims → Evidence Lineage
5060
+ *
5061
+ * Builds and verifies {@link ClaimEvidenceLink} objects — signed, wire-stable
5062
+ * artifacts that tie a canonical claim row to its full evidence chain:
5063
+ *
5064
+ * 1. **`runtime_evidence`** — {@link DecisionReceipt} from `protectWithEvidence()`
5065
+ * 2. **`deploy_evidence`** — `protectDeploy()` gate record
5066
+ * 3. **`integration_evidence`** — `ComplianceEvidenceRun` summary
5067
+ * 4. **`approval_artifact`** — HITL chain or ApprovalArtifact summary
5068
+ * 5. **`delta`** — policy + schema drift since the claim was asserted
5069
+ * 6. **`verification_checklist`** — machine-auditable `all_pass` + per-slot status
5070
+ *
5071
+ * Wire schema: `contract/schemas/claim-evidence-link.schema.json`
5072
+ * Proposal: `contract/PROPOSALS/004-claims-evidence-links.md`
5073
+ *
5074
+ * @module
5075
+ */
5076
+
5077
+ interface RuntimeEvidenceSlot {
5078
+ readonly permit_token: string;
5079
+ readonly audit_hash: string;
5080
+ readonly decision: "allow" | "deny" | "escalate";
5081
+ readonly decision_id: string;
5082
+ readonly evaluated_at: string;
5083
+ readonly algorithm: DecisionReceiptAlgorithm;
5084
+ readonly signature: string | null;
5085
+ readonly permit_revoked_at: string | null;
5086
+ readonly verified_at_claim_time: boolean;
5087
+ readonly verified_at_link_creation: boolean;
5088
+ }
5089
+ interface DeployEvidenceSlot {
5090
+ readonly deploy_id: string;
5091
+ readonly environment: string;
5092
+ readonly sha: string;
5093
+ readonly actor_id: string;
5094
+ readonly deployed_at: string;
5095
+ readonly gate_permit_token: string;
5096
+ }
5097
+ interface IntegrationEvidenceSlot {
5098
+ readonly run_id: string;
5099
+ readonly framework: "soc2" | "iso27001" | "hipaa" | "pci_dss" | "gdpr" | "fedramp";
5100
+ readonly period_start: string;
5101
+ readonly period_end: string;
5102
+ readonly status: "pending" | "running" | "completed" | "failed";
5103
+ readonly passing_control_count: number;
5104
+ readonly failing_control_count: number;
5105
+ readonly run_completed_at: string;
5106
+ }
5107
+ interface ApprovalArtifactSlot {
5108
+ readonly approval_id: string;
5109
+ readonly approval_kind: "hitl_chain" | "approval_artifact";
5110
+ readonly quorum_type: "single_approver" | "simple_majority" | "two_thirds" | "unanimous";
5111
+ readonly approver_count: number;
5112
+ readonly approver_ids: readonly string[];
5113
+ readonly approved_at: string;
5114
+ readonly artifact_hash: string;
5115
+ }
5116
+ type DriftChangeType = "rule_added" | "rule_removed" | "rule_modified" | "threshold_changed" | "policy_updated" | "schema_field_added" | "schema_field_removed" | "schema_field_type_changed";
5117
+ type DriftSeverity = "info" | "warning" | "critical";
5118
+ interface DriftDetail {
5119
+ readonly change_type: DriftChangeType;
5120
+ readonly severity: DriftSeverity;
5121
+ readonly rule_id: string | null;
5122
+ readonly changed_at: string | null;
5123
+ readonly description: string;
5124
+ }
5125
+ type DeltaStatus = "pending" | "computing" | "computed" | "failed";
5126
+ interface DeltaSlot {
5127
+ readonly status: DeltaStatus;
5128
+ readonly computed_at: string | null;
5129
+ readonly policy_version_at_claim: string | null;
5130
+ readonly policy_version_current: string | null;
5131
+ readonly policy_drift_detected: boolean | null;
5132
+ readonly schema_version_at_claim: string;
5133
+ readonly schema_version_current: string;
5134
+ readonly schema_drift_detected: boolean;
5135
+ readonly drift_details: readonly DriftDetail[];
5136
+ }
5137
+ type EvidenceSlotStatus = "present" | "not_applicable" | "missing";
5138
+ interface VerificationChecklist {
5139
+ readonly runtime_evidence_present: boolean;
5140
+ readonly verified_at_claim_time: boolean;
5141
+ readonly verified_at_link_creation: boolean;
5142
+ readonly deploy_evidence_status: EvidenceSlotStatus;
5143
+ readonly integration_evidence_status: EvidenceSlotStatus;
5144
+ readonly approval_artifact_status: EvidenceSlotStatus;
5145
+ readonly delta_computed: boolean;
5146
+ readonly policy_drift_clean: boolean | null;
5147
+ readonly schema_drift_clean: boolean;
5148
+ readonly all_pass: boolean;
5149
+ readonly last_verified_at: string | null;
5150
+ readonly computed_at: string;
5151
+ }
5152
+ interface ClaimEvidenceLink {
5153
+ readonly version: "claim_evidence_link.v1";
5154
+ readonly link_id: string;
5155
+ readonly claim_id: string;
5156
+ readonly org_id: string;
5157
+ readonly linked_at: string;
5158
+ readonly updated_at: string;
5159
+ readonly revision: number;
5160
+ readonly link_algorithm: "hmac-sha256" | "none";
5161
+ readonly link_hash: string;
5162
+ readonly link_signature: string | null;
5163
+ readonly runtime_evidence: RuntimeEvidenceSlot;
5164
+ readonly deploy_evidence: DeployEvidenceSlot | null;
5165
+ readonly integration_evidence: IntegrationEvidenceSlot | null;
5166
+ readonly approval_artifact: ApprovalArtifactSlot | null;
5167
+ readonly delta: DeltaSlot;
5168
+ readonly verification_checklist: VerificationChecklist;
5169
+ }
5170
+ /** Caller signals evidence does not apply to this claim. */
5171
+ interface NotApplicable {
5172
+ readonly notApplicable: true;
5173
+ }
5174
+ declare const NOT_APPLICABLE: NotApplicable;
5175
+ /** Raw deploy gate inputs — caller supplies at minimum environment + service. */
5176
+ interface DeployEvidenceInput {
5177
+ readonly deploy_id: string;
5178
+ readonly environment: string;
5179
+ readonly sha: string;
5180
+ readonly actor_id: string;
5181
+ readonly deployed_at: string;
5182
+ readonly gate_permit_token: string;
5183
+ }
5184
+ /** Summary from a HITL chain (derived from HitlEscalation + approval records). */
5185
+ interface HitlChainSummary {
5186
+ readonly escalation: HitlEscalation;
5187
+ readonly approvals: readonly HitlApprovalRecord[];
5188
+ /** SHA-256 hex of the canonical JSON of the full chain object. */
5189
+ readonly artifact_hash: string;
5190
+ }
5191
+ /** Out-of-band approval artifact (pre-signed). */
5192
+ interface SignedApprovalArtifact {
5193
+ readonly approval_id: string;
5194
+ readonly approval_kind: "approval_artifact";
5195
+ readonly quorum_type: "single_approver" | "simple_majority" | "two_thirds" | "unanimous";
5196
+ readonly approver_ids: readonly string[];
5197
+ readonly approved_at: string;
5198
+ /** SHA-256 hex of the canonical encoding of the full artifact. */
5199
+ readonly artifact_hash: string;
5200
+ }
5201
+ interface BuildClaimEvidenceLinkOpts {
5202
+ /** The canonical claim ID this link annotates. */
5203
+ readonly claimId: string;
5204
+ /**
5205
+ * The org that owns the claim. Defaults to `receipt.org_id` from
5206
+ * `runtimeEvidence` when omitted.
5207
+ */
5208
+ readonly orgId?: string;
5209
+ /** DecisionReceipt from `protectWithEvidence()`. Required. */
5210
+ readonly runtimeEvidence: DecisionReceipt;
5211
+ /**
5212
+ * Deploy gate record. Pass `NOT_APPLICABLE` for non-deployment actions.
5213
+ * Omit (or pass `undefined`) when the deploy record was expected but
5214
+ * unavailable — the slot status will be `"missing"` and `all_pass`
5215
+ * will be `false`.
5216
+ */
5217
+ readonly deployEvidence?: DeployEvidenceInput | NotApplicable;
5218
+ /**
5219
+ * Most recent compliance run covering the claim period. Pass
5220
+ * `NOT_APPLICABLE` when no compliance run applies.
5221
+ */
5222
+ readonly integrationEvidence?: ComplianceEvidenceRun | NotApplicable;
5223
+ /**
5224
+ * HITL chain summary or out-of-band approval artifact. Pass
5225
+ * `NOT_APPLICABLE` when no human approval was required.
5226
+ */
5227
+ readonly approvalArtifact?: HitlChainSummary | SignedApprovalArtifact | NotApplicable;
5228
+ /**
5229
+ * HMAC-SHA256 signing secret. When provided the link is signed and
5230
+ * `link_algorithm` is `"hmac-sha256"`. Omit for unsigned links
5231
+ * (`link_algorithm: "none"`).
5232
+ */
5233
+ readonly signingSecret?: string;
5234
+ /**
5235
+ * Override the schema version recorded in `delta.schema_version_at_claim`.
5236
+ * Defaults to the SDK package version embedded at build time.
5237
+ */
5238
+ readonly schemaVersion?: string;
5239
+ }
5240
+ interface VerifyClaimEvidenceLinkOpts {
5241
+ /**
5242
+ * Signing secret used to re-verify `link_signature`. Required when
5243
+ * `link.link_algorithm` is `"hmac-sha256"`.
5244
+ */
5245
+ readonly signingSecret?: string;
5246
+ /**
5247
+ * When true, skips re-calling `/v1-verify-permit` even if a client is
5248
+ * provided. Useful when the permit is known to be expired and you only
5249
+ * want to check structural integrity.
5250
+ */
5251
+ readonly skipPermitRecheck?: boolean;
5252
+ }
5253
+ interface VerifyClaimEvidenceLinkResult {
5254
+ /** Updated link with refreshed checklist, incremented revision, and recomputed hash. */
5255
+ readonly link: ClaimEvidenceLink;
5256
+ readonly valid: boolean;
5257
+ /** Names of verification_checklist fields that are false or "missing". */
5258
+ readonly failedSlots: readonly string[];
5259
+ }
5260
+ /**
5261
+ * Subset of an `ActionEvidenceBundle.receipt` produced by the AtlaSent
5262
+ * GitHub Action (atlasent-action `evidenceBundle.ts`).
5263
+ *
5264
+ * Only the fields consumed by {@link buildClaimEvidenceLinkFromActionBundle}
5265
+ * are required here; the full receipt shape lives in the action repo.
5266
+ */
5267
+ interface ActionBundleReceipt {
5268
+ readonly receipt_id: string;
5269
+ readonly evaluation_id: string;
5270
+ readonly permit_id: string | null;
5271
+ readonly audit_hash: string | null;
5272
+ readonly issued_at: string;
5273
+ readonly algorithm: "hmac-sha256" | "none";
5274
+ readonly signature: string | null;
5275
+ readonly decision: "allow";
5276
+ }
5277
+ /**
5278
+ * Minimal shape of an `ActionEvidenceBundle` emitted by the AtlaSent
5279
+ * GitHub Action as its `evidence-bundle` output. Pass the parsed JSON
5280
+ * directly; no re-shaping needed.
5281
+ */
5282
+ interface ActionBundleInput {
5283
+ readonly bundle_id: string;
5284
+ readonly action: string;
5285
+ readonly actor: string;
5286
+ readonly environment: string;
5287
+ readonly repository: string;
5288
+ readonly sha: string;
5289
+ readonly run_id: string;
5290
+ readonly generated_at: string;
5291
+ readonly receipt: ActionBundleReceipt;
5292
+ }
5293
+ interface BuildFromActionBundleOpts {
5294
+ /** The canonical claim ID this link annotates. */
5295
+ readonly claimId: string;
5296
+ /** Owning org. Defaults to `""` for v1 (no org context on the action). */
5297
+ readonly orgId?: string;
5298
+ /**
5299
+ * Set to `true` when the bundle does NOT represent a deploy action.
5300
+ * The deploy slot will be `NOT_APPLICABLE` instead of auto-populated
5301
+ * from `bundle.sha` / `bundle.environment`.
5302
+ */
5303
+ readonly deployNotApplicable?: boolean;
5304
+ readonly signingSecret?: string;
5305
+ readonly schemaVersion?: string;
5306
+ }
5307
+ /**
5308
+ * Assemble a {@link ClaimEvidenceLink} from already-fetched SDK artifacts.
5309
+ *
5310
+ * - Generates a client-side `link_id` (`cel_` + UUID v4).
5311
+ * - Computes schema drift from the SDK version; policy drift is set to
5312
+ * `delta.status: "pending"` (server-side, async).
5313
+ * - Signs the link with HMAC-SHA256 when `signingSecret` is provided.
5314
+ * - `verified_at_link_creation` is set to `true` when the receipt carries a
5315
+ * `decision === "allow"` (the permit was valid at the moment we're building
5316
+ * the link, since it was just produced by `protectWithEvidence()`).
5317
+ *
5318
+ * The returned link has `revision: 1`. Subsequent calls to
5319
+ * {@link verifyClaimEvidenceLink} increment `revision` and recompute
5320
+ * `link_hash` / `link_signature`.
5321
+ */
5322
+ declare function buildClaimEvidenceLink(opts: BuildClaimEvidenceLinkOpts): ClaimEvidenceLink;
5323
+ /**
5324
+ * Verify the structural integrity and checklist freshness of a
5325
+ * {@link ClaimEvidenceLink}.
5326
+ *
5327
+ * Checks:
5328
+ * 1. `link_hash` matches a canonical re-serialisation of the link content.
5329
+ * 2. `link_signature` verifies under `link_algorithm` (when not `"none"`).
5330
+ * 3. Recomputes the `verification_checklist` from the current slot state.
5331
+ *
5332
+ * Returns a new `ClaimEvidenceLink` with:
5333
+ * - Updated `verified_at_link_creation` / `last_verified_at` (permit may have
5334
+ * expired since the link was built — reflected in the updated checklist).
5335
+ * - Incremented `revision`.
5336
+ * - Recomputed `link_hash` / `link_signature` over the mutated content.
5337
+ *
5338
+ * Does **not** mutate the input. Does **not** make network calls (permit
5339
+ * re-verification via `/v1-verify-permit` is scoped for v2 once the server
5340
+ * endpoint ships).
5341
+ *
5342
+ * @throws {@link AtlaSentError} with `code: "claim_evidence_incomplete"` when
5343
+ * `all_pass` is false on the refreshed checklist.
5344
+ */
5345
+ declare function verifyClaimEvidenceLink(link: ClaimEvidenceLink, opts?: VerifyClaimEvidenceLinkOpts): VerifyClaimEvidenceLinkResult;
5346
+ /**
5347
+ * Build a {@link ClaimEvidenceLink} directly from the `evidence-bundle`
5348
+ * JSON emitted by the AtlaSent GitHub Action.
5349
+ *
5350
+ * ```ts
5351
+ * import { buildClaimEvidenceLinkFromActionBundle } from "@atlasent/sdk";
5352
+ *
5353
+ * const bundle = JSON.parse(process.env.ATLASENT_EVIDENCE_BUNDLE!);
5354
+ * const link = buildClaimEvidenceLinkFromActionBundle(bundle, {
5355
+ * claimId: myClaimId,
5356
+ * signingSecret: process.env.ATLASENT_SIGNING_SECRET,
5357
+ * });
5358
+ * ```
5359
+ *
5360
+ * The `receipt` fields map directly to the `runtime_evidence` slot. The
5361
+ * `bundle.sha` / `bundle.environment` / `bundle.actor` are used to
5362
+ * auto-populate the `deploy_evidence` slot — pass `deployNotApplicable: true`
5363
+ * to suppress this for non-deploy actions.
5364
+ */
5365
+ declare function buildClaimEvidenceLinkFromActionBundle(bundle: ActionBundleInput, opts: BuildFromActionBundleOpts): ClaimEvidenceLink;
5366
+
5367
+ /**
5368
+ * BCCAE V1 — TypeScript client.
5369
+ *
5370
+ * BCCAEClient wraps the four BCCAE Phase 3 endpoints:
5371
+ * evaluate → POST /v1/bccae/evaluations (bccae:evaluate scope)
5372
+ * execute → POST /v1/bccae/execute (bccae:execute scope)
5373
+ * revoke → POST /v1/bccae/revocations (bccae:revoke scope)
5374
+ * getEvidence → GET /v1/bccae/evidence/:id (bccae:audit scope)
5375
+ *
5376
+ * Spec: atlasent-internal/architecture/BCCAE-architecture.md
5377
+ * Phase 3 — Execution Assurance. Not a Deploy Gate V1 customer API.
5378
+ */
5379
+ type BccaeActorType = "HUMAN" | "AGENT" | "SERVICE" | "EXTERNAL";
5380
+ type BccaeTrustLevel = "L0" | "L1" | "L2" | "L3";
5381
+ type BccaeResourceClassification = "PUBLIC" | "INTERNAL" | "CONFIDENTIAL" | "RESTRICTED";
5382
+ type BccaeDeploymentEnv = "PROD" | "STAGING" | "DEV" | "TEST";
5383
+ type BccaeSecurityPosture = "STANDARD" | "ELEVATED" | "LOCKED";
5384
+ type BccaeRequestSource = "AGENT" | "API" | "INTERNAL" | "SCHEDULED" | "TRIGGERED";
5385
+ type BccaeRevocationTargetType = "PERMIT" | "EVALUATION" | "ACTOR" | "RESOURCE";
5386
+ interface BccaeEvaluateInput {
5387
+ actor_id: string;
5388
+ actor_type: BccaeActorType;
5389
+ actor_trust_level: BccaeTrustLevel;
5390
+ actor_claims?: Record<string, unknown>;
5391
+ action_id: string;
5392
+ execution_intent: string;
5393
+ /** 64 lowercase hex characters (32 random bytes). */
5394
+ caller_nonce: string;
5395
+ resource_ref: string;
5396
+ resource_type: string;
5397
+ resource_classification: BccaeResourceClassification;
5398
+ organization_version?: number;
5399
+ deployment_env: BccaeDeploymentEnv;
5400
+ deployment_region: string;
5401
+ security_posture: BccaeSecurityPosture;
5402
+ external_signals?: unknown[];
5403
+ dependencies?: unknown[];
5404
+ policy_version_set?: unknown[];
5405
+ request_source?: BccaeRequestSource;
5406
+ request_chain_id?: string;
5407
+ parent_eval_id?: string;
5408
+ }
5409
+ interface BccaeEvaluateResponse {
5410
+ evaluation_id: string;
5411
+ envelope_hash: string;
5412
+ permit_token: string;
5413
+ permit_id: string;
5414
+ expires_at: string;
5415
+ outcome: "PERMIT" | "PERMIT_WITH_CONDITIONS";
5416
+ }
5417
+ interface BccaeExecuteInput {
5418
+ permit_token: string;
5419
+ action_id: string;
5420
+ resource_ref: string;
5421
+ }
5422
+ interface BccaeExecuteResponse {
5423
+ authorized: boolean;
5424
+ outcome: "EXECUTION_AUTHORIZED" | "EXECUTION_DENIED";
5425
+ permit_id?: string;
5426
+ evaluation_id?: string;
5427
+ envelope_hash?: string;
5428
+ evidence_id?: string | null;
5429
+ /** Populated on denial — identifies which gate check failed. */
5430
+ check?: string;
5431
+ reason?: string;
5432
+ }
5433
+ interface BccaeRevokeInput {
5434
+ target_type: BccaeRevocationTargetType;
5435
+ target_id: string;
5436
+ reason: string;
5437
+ }
5438
+ interface BccaeRevokeResponse {
5439
+ revocation_id: string;
5440
+ target_type: BccaeRevocationTargetType;
5441
+ target_id: string;
5442
+ effective_at: string;
5443
+ }
5444
+ interface BccaeEvidenceResponse {
5445
+ evidence_id: string;
5446
+ org_id: string;
5447
+ event_type: string;
5448
+ evaluation_id: string | null;
5449
+ permit_id: string | null;
5450
+ envelope_hash: string | null;
5451
+ actor_id: string;
5452
+ action_id: string | null;
5453
+ resource_ref: string | null;
5454
+ outcome: string;
5455
+ detail: Record<string, unknown>;
5456
+ previous_evidence_id: string | null;
5457
+ previous_hash: string | null;
5458
+ record_hash: string;
5459
+ sequence: number;
5460
+ recorded_at: string;
5461
+ chain_integrity: {
5462
+ hash_intact: boolean;
5463
+ expected_hash?: string;
5464
+ };
5465
+ }
5466
+ interface BccaeClientOptions {
5467
+ /** API key with appropriate bccae:* scopes. */
5468
+ apiKey: string;
5469
+ /** Override base URL. Defaults to https://api.atlasent.io */
5470
+ baseUrl?: string;
5471
+ /** Request timeout in ms. Defaults to 10000. */
5472
+ timeoutMs?: number;
5473
+ /** Inject a custom fetch implementation (testing / edge runtimes). */
5474
+ fetch?: typeof globalThis.fetch;
5475
+ }
5476
+ /** Generate a cryptographically random 64-char hex nonce (32 bytes). */
5477
+ declare function generateBccaeNonce(): string;
5478
+ /**
5479
+ * Thin HTTP client for the BCCAE V1 Phase 3 endpoints.
5480
+ *
5481
+ * Each method maps 1:1 to an edge function:
5482
+ * - {@link BCCAEClient.evaluate} → v1-bccae-evaluate
5483
+ * - {@link BCCAEClient.execute} → v1-bccae-execute
5484
+ * - {@link BCCAEClient.revoke} → v1-bccae-revoke
5485
+ * - {@link BCCAEClient.getEvidence} → v1-bccae-evidence
5486
+ *
5487
+ * Authorization denials are returned (not thrown). Network errors,
5488
+ * invalid API keys, and 5xx responses throw {@link AtlaSentError}.
5489
+ *
5490
+ * Use {@link generateBccaeNonce} to produce a valid `caller_nonce`.
5491
+ */
5492
+ declare class BCCAEClient {
5493
+ private readonly apiKey;
5494
+ private readonly baseUrl;
5495
+ private readonly timeoutMs;
5496
+ private readonly fetchImpl;
5497
+ constructor(options: BccaeClientOptions);
5498
+ evaluate(input: BccaeEvaluateInput): Promise<BccaeEvaluateResponse>;
5499
+ execute(input: BccaeExecuteInput): Promise<BccaeExecuteResponse>;
5500
+ revoke(input: BccaeRevokeInput): Promise<BccaeRevokeResponse>;
5501
+ getEvidence(evidenceId: string): Promise<BccaeEvidenceResponse>;
5502
+ private post;
5503
+ private get;
5504
+ private request;
5505
+ }
5506
+
3988
5507
  /**
3989
5508
  * @atlasent/sdk — execution-time authorization for AI agents.
3990
5509
  *
@@ -4061,4 +5580,4 @@ declare const atlasent: {
4061
5580
  readonly AtlaSentDeniedError: typeof AtlaSentDeniedError;
4062
5581
  };
4063
5582
 
4064
- export { type ActionFreeze, type ActionTypeOverrideStat, type ActorOverrideStat, type AmountThreshold, type AnomalyActionType, type AnomalyResponseEvent, type AnomalyResponseRule, type AnomalyType, ApiKeySelfResponse, type ApplyPolicySyncResponse, type ApprovalArtifactV1, type ApprovalConcentrationAnalysis, type ApprovalIssuer, type ApprovalProvenance, type ApprovalQuorumV1, type ApprovalReference, type ApprovalReviewer, type ApproveBudgetExceptionRequest, type ApproverBreakdown, AtlaSentClient, AtlaSentClientOptions, AtlaSentDeniedError, AtlaSentError, type AuditBundle, AuditEventsQuery, AuditEventsResult, AuditExportRequest, AuditExportResult, type AuthenticateConnectorInput, type AuthenticateConnectorResponse, type AuthorizeStreamHandlers, type AutonomousBoundsDenyCode, type AutonomousExecutionBounds, type AutonomousExecutionCheckResult, type AutonomousExecutionRecord, type BudgetConstraintCheckResult, type BudgetDenyCode, type BudgetExceptionRequest, type BudgetExceptionStatus, type BudgetLimit, type BudgetPolicy, type BudgetScope, type BudgetSpendingState, type BudgetViolation, type BudgetaryDriftAnalysis, type BundleVerificationResult, type ComplianceEvidenceRun, type ComplianceEvidenceSummary, type ComplianceFramework, type ComplianceRunStatus, type ComputeOrgRiskOptions, type ComputeOrgRiskResponse, type ConcentrationAlert, type ConnectedSystemRow, type ConnectorAuditLogEntry, type ConnectorCredentialRow, type ConnectorCredentialType, type ConnectorEnforcementEventInput, type ConnectorEnforcementPolicy, type ConnectorEnforcementResult, type ConnectorRow, type ConnectorStatus, type ConnectorSyncState, type ConnectorType, type CreateAnomalyResponseRuleRequest, type CreateBudgetExceptionRequest, type CreateGraphEdgeInput, type CreateGraphNodeInput, type CreateImpersonationGrantRequest, type CreateOverrideRequest, type CreateRegulatoryEscalationRequest, type CreateWebhookSubscriptionRequest, type CrossOrgImpersonationGrant, type CrossOrgPermissionCheckListParams, type CrossOrgPermissionCheckRequest, type CrossOrgPermissionCheckResult, type CrossOrgTrustHop, type CurrencyCode, DEFAULT_INCENTIVE_CONFIG, DEFAULT_RISK_TIER_THRESHOLDS, type DelegationPropagationSummary, DeployGateRequest, DeployGateResponse, type DisputeOrigin, type DisputeRecord, type DisputeReversalSummary, type DisputeStatus, type EconomicEvidenceBundle, type EmergencyFreeze, type EmergencyOverrideActionRow, type EnforcementAction, type EnforcementQuorumConfig, type EnforcementWebhookEvent, type EvaluateBatchItem, type EvaluateBatchResponse, type EvaluateManyRequest, EvaluatePreflightResponse, EvaluateRequest, EvaluateResponse, type EvidenceBundleSignableContent, type EvidenceBundleVerificationResult, type EvidenceControl, type EvidenceControlStatus, type EvidencePurpose, type ExecutionAnomaly, type ExecutionApproverRow, type ExecutionCeiling, FeatureNotEnabledError, type FeatureNotEnabledErrorInit, type FinancialActionClass, type FinancialActionType, type FinancialExecutionRecord, type FinancialExecutionStatus, type FinancialGovernanceSummary, type FinancialQuorumDenyCode, type FinancialQuorumInput, type FinancialQuorumPolicy, type FinancialQuorumResult, type FinancialRiskScore, type FinancialRiskTier, type FinancialRoleRequirement, type GetLatestOrgRiskResponse, GetPermitResponse, type GovernanceBehaviorPattern, GovernanceEnforcementError, type GovernanceEnforcementErrorInit, type GovernanceEvent, type GovernanceGate, type GovernanceGraphQueryParams, type GovernanceGraphQueryResponse, type GovernanceGraphQueryType, type GovernanceGraphResultRow, type GovernanceSignalAction, type GovernanceWebhookEvent, type GraphEdge, type GraphEdgeType, type GraphNode, type GraphNodeType, type GraphQLRequest, type GraphQLResponse, type HitlAiUnavailableFallback, type HitlApprovalRecord, type HitlApproveRequest, type HitlApproverPoolEntry, type HitlApproverType, type HitlChainHop, type HitlCreateRequest, type HitlDetailResponse, type HitlEscalateRequest, type HitlEscalation, type HitlFallbackDecision, type HitlHeterogeneousQuorumExtension, type HitlHeterogeneousQuorumTally, type HitlListResponse, type HitlQuorumProgress, type HitlQuorumTier, type HitlRejectRequest, type HitlRespondRequest, type HitlStatus, type IdentityAssertionBinding, type IdentityAssertionV1, type IdentityIssuer, type IdentityIssuerKey, type IdentitySubject, type IdentityTrustedIssuersConfig, type ImpersonationToken, type ImpersonationValidationResult, type IncentiveAlignmentConfig, type IncentiveSignal, type IncentiveSignalType, type IncidentChainActorEntry, type IncidentChainEvidenceRow, type IncidentChainExecutionRow, type IncidentTimelineResponse, type InstallConnectorInput, type InstallConnectorResponse, type LegacyEvaluateRequest, type LegacyEvaluateResponse, type LiabilityAttributionInput, type LiabilityAttributionRecord, type LiabilityChainValidation, type LiabilityClassification, type LiabilityEdge, type LiabilityNode, type LiabilityParty, type LiabilityPartyRole, type LiabilityVisualization, type ListConnectorsResponse, type ListEnforcementPoliciesResponse, type ListEvidenceRunsResponse, type ListGraphEdgesResponse, type ListGraphNodesResponse, type ListHitlEscalationsRequest, type ListHitlEscalationsResponse, type ListOrgRiskHistoryResponse, ListPermitsRequest, ListPermitsResponse, type ListPolicySyncRunsResponse, type ListWebhookDeliveriesResponse, type ListWebhookSubscriptionsResponse, type MisalignmentAlert, type OrgRiskLevel, type OrgRiskScore, type OverrideAnalytics, type OverrideEvent, type OverrideEventType, type OverrideEventsResponse, type OverrideListResponse, type OverrideStatus, type OverrideV1, Permit, type PermitV1, PermitValidResponse, type PolicyBundleEntry, type PolicyRef, type PolicySyncDiff, type PolicySyncRun, type PolicySyncStatus, type PrincipalKind, type ProductionDeployerRow, type ProofEvaluationSummary, type ProofPayload, type ProofResponse, ProtectRequest, type ProtectedAction, type QuorumBypassConnectorRow, type QuorumIndependence, type QuorumPolicy, type QuorumProof, type QuorumRoleRequirement, RateLimitState, type RecordSignalActionRequest, type RecordSignalOutcomeRequest, type RegulatoryAuthorityLevel, type RegulatoryEscalation, type RegulatoryEscalationStatus, type ReversalStage, type ReversalWorkflow, type RevokeConnectorResponse, RevokePermitByIdInput, RevokePermitByIdResponse, RevokePermitRequest, RevokePermitResponse, type RiskFactor, type RiskTierThreshold, type RiskTimelinePoint, type RotateCredentialsResponse, type SOC2ControlId, type SandboxDiff, type SandboxDiffEmpty, type SandboxDiffPerTable, type SandboxDiffResponse, type SandboxRunMode, type SandboxRunStatus, type SandboxRunWrite, type SandboxWriteOp, type SignalActionSummary, type SignalActionType, type SpendingConstraint, type StreamComplete, type StreamDecisionFrame, type StreamErrorFrame, StreamEvent, StreamOptions, type SubmitPolicySyncRequest, type SubmitPolicySyncResponse, type SyncConnectorResponse, type TriggerAnomalyResponseRequest, type TriggerEvidenceRunRequest, type TriggerEvidenceRunResponse, type UpsertEnforcementPolicyInput, type UpsertEnforcementPolicyResponse, type UserApprovalRow, type V2EvaluateRequest, type V2EvaluateResponse, type V2Feature, type V2Transport, V2_BATCH_PATH, V2_GRAPHQL_MAX_DEPTH, V2_GRAPHQL_PATH, V2_MAX_BATCH_ITEMS, V2_MAX_BODY_BYTES, V2_STREAM_PATH, type VerifyBundleOptions, type VerifyKey, VerifyPermitByIdResponse, VerifyPermitRequest, VerifyPermitResponse, type WebhookDelivery, type WebhookDeliveryStatus, type WebhookPayload, type WebhookSubscription, WebhookVerificationError, type WeightDistribution, assertWebhook, authorizeStream, budgetUtilizationSeverity, buildLiabilityChain, buildLiabilityVisualization, buildRiskTimeline, buildSignableContent, canonicalJSON, canonicalizeForEvidence, checkAutonomousBounds, checkBudgetConstraints, clampTokenDuration, classifyCommand, classifyRiskTier, computeApprovalRiskScore, computeEscalatedApprovalCount, computeExposureScore, computeGovernanceHealthScore, computeHHI, computeLiabilityWeights, computeOverallRiskScore, computeOverrideScore, computeRemediationUrgency, computeSignalEngagementRate, configure, atlasent as default, delegationPropagationHadEffect, deployGate, detectAutonomousAnomaly, detectMisalignedIncentives, detectSelfApproval, enforceAutonomousBounds, enforceBudgetConstraint, enforceEconomicGovernance, enforceFinancialQuorum, evaluateFinancialQuorum, evaluateMany, evidenceRunPasses, findPrimaryLiabilityParties, formatPolicySyncDiff, graphql, hhiToConcentrationScore, highestSeverityAction, hitlRequiredApproverCount, isBudgetExceptionActive, isBudgetExceptionTerminal, isEscalationSlaBreached, isFreezeActive, isImpersonationGrantUsable, isPolicySyncTerminal, isRegulatoryEscalationTerminal, isSandboxDiffPopulated, isSubstantiveSignalResponse, matchAnomalyRules, nonPassingControls, normalizeEvaluateRequest, normalizeEvaluateResponse, protect, requirePermit, scoreToRiskTier, serializeSignableContent, signedBytesFor, summarizeCrossOrgPermission, transitionDispute, transitionReversal, validateLiabilityChain, verifyAuditBundle, verifyBundle, verifyEvidenceBundleStructure, verifyWebhook, verifyWebhookSignature, withPermit, withinAutonomousCeiling };
5583
+ export { type ActionBundleInput, type ActionBundleReceipt, type ActionContext, type ActionFreeze, type ActionMetaContext, type ActionTypeOverrideStat, type ActorContext, type ActorOverrideStat, type AgentAuthorityDomain, type AgentEvaluationStatus, type AgentEvidenceRef, type AgentFindingSeverity, type AgentInvokerKind, type AgentSubjectKind, type AgentToolMode, type AgentToolOptions, type AmountThreshold, type AnomalyActionType, type AnomalyResponseEvent, type AnomalyResponseRule, type AnomalyType, ApiKeySelfResponse, type ApplyPolicySyncResponse, type ApprovalArtifactSlot, type ApprovalArtifactV1, type ApprovalConcentrationAnalysis, type ApprovalIssuer, type ApprovalPermit, type ApprovalProvenance, type ApprovalQuorumV1, type ApprovalReference, type ApprovalReviewer, type ApprovalRuntimeConfig, type ApprovalStatus, type ApproveBudgetExceptionRequest, type ApproverBreakdown, AtlaSentClient, AtlaSentClientOptions, AtlaSentDeniedError, AtlaSentError, type AuditBundle, AuditEventsQuery, AuditEventsResult, AuditExportRequest, AuditExportResult, type AuthenticateConnectorInput, type AuthenticateConnectorResponse, type AuthorizeStreamHandlers, type AutonomousBoundsDenyCode, type AutonomousExecutionBounds, type AutonomousExecutionCheckResult, type AutonomousExecutionRecord, BCCAEClient, BatchEvalItem, BatchEvalResponse, type BccaeActorType, type BccaeClientOptions, type BccaeDeploymentEnv, type BccaeEvaluateInput, type BccaeEvaluateResponse, type BccaeEvidenceResponse, type BccaeExecuteInput, type BccaeExecuteResponse, type BccaeRequestSource, type BccaeResourceClassification, type BccaeRevocationTargetType, type BccaeRevokeInput, type BccaeRevokeResponse, type BccaeSecurityPosture, type BccaeTrustLevel, type BudgetConstraintCheckResult, type BudgetDenyCode, type BudgetExceptionRequest, type BudgetExceptionStatus, type BudgetLimit, type BudgetPolicy, type BudgetScope, type BudgetSpendingState, type BudgetViolation, type BudgetaryDriftAnalysis, type BuildActionContextInput, type BuildClaimEvidenceLinkOpts, type BuildFromActionBundleOpts, type BundleVerificationResult, type ClaimEvidenceLink, type CloseActionType, type CloseGovernanceOptions, type ComplianceEvidenceRun, type ComplianceEvidenceSummary, type ComplianceFramework, type ComplianceRunStatus, type ComputeOrgRiskOptions, type ComputeOrgRiskResponse, type ConcentrationAlert, type ConnectedSystemRow, type ConnectorAuditLogEntry, type ConnectorCredentialRow, type ConnectorCredentialType, type ConnectorEnforcementEventInput, type ConnectorEnforcementPolicy, type ConnectorEnforcementResult, type ConnectorRow, type ConnectorStatus, type ConnectorSyncState, type ConnectorType, type ContextValidationError, type ContextValidationResult, type ContextValidationWarning, type ControlSurfaceConfig, type CreateAnomalyResponseRuleRequest, type CreateBudgetExceptionRequest, type CreateEscalationOptions, type CreateGraphEdgeInput, type CreateGraphNodeInput, type CreateImpersonationGrantRequest, type CreateOverrideRequest, type CreateRegulatoryEscalationRequest, type CreateWebhookSubscriptionRequest, type CrossOrgImpersonationGrant, type CrossOrgPermissionCheckListParams, type CrossOrgPermissionCheckRequest, type CrossOrgPermissionCheckResult, type CrossOrgTrustHop, type CurrencyCode, DEFAULT_INCENTIVE_CONFIG, DEFAULT_REDACTION_RULES, DEFAULT_RISK_TIER_THRESHOLDS, DecisionCanonical, DecisionStreamEvent, type DelegationPropagationSummary, type DeltaSlot, type DeltaStatus, type DeployEnvironment, type DeployEvidenceInput, type DeployEvidenceSlot, type DeployGateOptions, DeployGateRequest, DeployGateResponse, type DisputeOrigin, type DisputeRecord, type DisputeReversalSummary, type DisputeStatus, type DriftChangeType, type DriftDetail, type DriftSeverity, type EconomicEvidenceBundle, type EmergencyFreeze, type EmergencyOverrideActionRow, type EnforcementAction, type EnforcementMode, type EnforcementQuorumConfig, type EnforcementStatus, type EnforcementWebhookEvent, type EngineVersionKind, type EnvelopeDriftDetail, type EnvelopeVerification, type EnvironmentContext, EscalationDeniedError, type EscalationHandle, type EscalationOutcome, EscalationTimeoutError, type EvaluateBatchItem, type EvaluateBatchResponse, type EvaluateManyRequest, EvaluatePreflightResponse, EvaluateRequest, EvaluateResponse, type EvidenceBundleSignableContent, type EvidenceBundleVerificationResult, type EvidenceControl, type EvidenceControlStatus, type EvidencePurpose, type EvidenceSlotStatus, type ExecutionAnomaly, type ExecutionApproverRow, type ExecutionCeiling, FeatureNotEnabledError, type FeatureNotEnabledErrorInit, type FinancialActionClass, type FinancialActionType, type FinancialExecutionRecord, type FinancialExecutionStatus, type FinancialGovernanceSummary, type FinancialQuorumDenyCode, type FinancialQuorumInput, type FinancialQuorumPolicy, type FinancialQuorumResult, type FinancialRiskScore, type FinancialRiskTier, type FinancialRoleRequirement, type GetEnforcementStatusOptions, type GetLatestOrgRiskResponse, GetPermitResponse, type GovernanceAgent, type GovernanceAgentEvaluation, type GovernanceAgentFinding, type GovernanceBehaviorPattern, GovernanceEnforcementError, type GovernanceEnforcementErrorInit, type GovernanceEvent, type GovernanceGate, type GovernanceGraphQueryParams, type GovernanceGraphQueryResponse, type GovernanceGraphQueryType, type GovernanceGraphResultRow, type GovernanceSignalAction, type GovernanceWebhookEvent, type GraphEdge, type GraphEdgeType, type GraphNode, type GraphNodeType, type GraphQLRequest, type GraphQLResponse, type HealthReport, type HistoricalContext, type HitlAiUnavailableFallback, type HitlApprovalRecord, type HitlApproveRequest, type HitlApproverPoolEntry, type HitlApproverType, type HitlChainHop, type HitlChainSummary, type HitlCreateRequest, type HitlDetailResponse, type HitlEscalation, type HitlFallbackDecision, type HitlHeterogeneousQuorumExtension, type HitlHeterogeneousQuorumTally, type HitlListResponse, type HitlQuorumProgress, type HitlQuorumTier, type HitlRejectRequest, type HitlRespondRequest, type HitlStatus, type IdentityAssertionBinding, type IdentityAssertionV1, type IdentityIssuer, type IdentityIssuerKey, type IdentitySubject, type IdentityTrustedIssuersConfig, type ImpersonationToken, type ImpersonationValidationResult, type IncentiveAlignmentConfig, type IncentiveSignal, type IncentiveSignalType, type IncidentChainActorEntry, type IncidentChainEvidenceRow, type IncidentChainExecutionRow, type IncidentTimelineResponse, type InstallConnectorInput, type InstallConnectorResponse, type IntegrationEvidenceSlot, type LegacyEvaluateRequest, type LegacyEvaluateResponse, type LiabilityAttributionInput, type LiabilityAttributionRecord, type LiabilityChainValidation, type LiabilityClassification, type LiabilityEdge, type LiabilityNode, type LiabilityParty, type LiabilityPartyRole, type LiabilityVisualization, type ListConnectorsResponse, type ListEnforcementPoliciesResponse, type ListEvidenceRunsResponse, type ListGovernanceAgentsResponse, type ListGovernanceEvaluationsQuery, type ListGovernanceEvaluationsResponse, type ListGovernanceFindingsQuery, type ListGovernanceFindingsResponse, type ListGraphEdgesResponse, type ListGraphNodesResponse, type ListHitlEscalationsRequest, type ListHitlEscalationsResponse, type ListOrgRiskHistoryResponse, ListPermitsRequest, ListPermitsResponse, type ListPolicySyncRunsResponse, type ListWebhookDeliveriesResponse, type ListWebhookSubscriptionsResponse, type MisalignmentAlert, NOT_APPLICABLE, type NotApplicable, type OrgRiskLevel, type OrgRiskScore, type OrgSummary, type OverrideAnalytics, type OverrideEvent, type OverrideEventType, type OverrideEventsResponse, type OverrideListResponse, type OverrideStatus, type OverrideV1, type PaymentReleaseOptions, Permit, type PermitV1, PermitValidResponse, type PolicyBundleEntry, type PolicyRef, type PolicySyncDiff, type PolicySyncRun, type PolicySyncStatus, type PrincipalKind, type ProductionDeployerRow, type ProofEvaluationSummary, type ProofPayload, type ProofResponse, type ProtectOrEscalateOptions, ProtectRequest, type ProtectedAction, type ProtectedActionEntry, type QuorumBypassConnectorRow, type QuorumIndependence, type QuorumPolicy, type QuorumProof, type QuorumRoleRequirement, RateLimitState, type RecordSignalActionRequest, type RecordSignalOutcomeRequest, type RedactionMode, type RedactionRule, type RegulatoryAuthorityLevel, type RegulatoryEscalation, type RegulatoryEscalationStatus, type ReplayDecisionResponse, type ReplayDecisionValue, type ReplayRequest, type ReplayResponse, type ReplayVarianceKind, type ReportProtectedActionOptions, type RequestOverrideOptions, type ResourceContext, type ReversalStage, type ReversalWorkflow, type RevokeConnectorResponse, RevokePermitByIdInput, RevokePermitByIdResponse, RevokePermitRequest, RevokePermitResponse, type RiskFactor, type RiskTierThreshold, type RiskTimelinePoint, type RotateCredentialsResponse, type RuntimeEvidenceSlot, type SOC2ControlId, type SandboxDiff, type SandboxDiffEmpty, type SandboxDiffPerTable, type SandboxDiffResponse, type SandboxRunMode, type SandboxRunStatus, type SandboxRunWrite, type SandboxWriteOp, type ShadowConfig, type ShadowEventPayload, type ShadowMode, type ShadowOptions, type ShadowOutcome, type SignalActionSummary, type SignalActionType, type SignedApprovalArtifact, type SpendingConstraint, type StreamComplete, type StreamDecisionFrame, type StreamErrorFrame, StreamEvent, StreamOptions, type SubmitPolicySyncRequest, type SubmitPolicySyncResponse, SubscribeDecisionsOptions, type SyncConnectorResponse, type TriggerAnomalyResponseRequest, type TriggerEvidenceRunRequest, type TriggerEvidenceRunResponse, type UpsertEnforcementPolicyInput, type UpsertEnforcementPolicyResponse, type UserApprovalRow, type V2EvaluateRequest, type V2EvaluateResponse, type V2Feature, type V2Transport, V2_BATCH_PATH, V2_GRAPHQL_MAX_DEPTH, V2_GRAPHQL_PATH, V2_MAX_BATCH_ITEMS, V2_MAX_BODY_BYTES, V2_STREAM_PATH, type ValidateContextOptions, type VerificationChecklist, type VerifyBundleOptions, type VerifyClaimEvidenceLinkOpts, type VerifyClaimEvidenceLinkResult, type VerifyKey, VerifyPermitByIdResponse, VerifyPermitRequest, VerifyPermitResponse, type WaitForApprovalOptions, type WebhookDelivery, type WebhookDeliveryStatus, type WebhookPayload, type WebhookSubscription, WebhookVerificationError, type WeightDistribution, assertWebhook, authorizeStream, budgetUtilizationSeverity, buildActionContext, buildClaimEvidenceLink, buildClaimEvidenceLinkFromActionBundle, buildLiabilityChain, buildLiabilityVisualization, buildRiskTimeline, buildSignableContent, canonicalJSON, canonicalizeForEvidence, checkAutonomousBounds, checkBudgetConstraints, checkIntegrationHealth, clampTokenDuration, classifyCommand, classifyRiskTier, classifyToolRisk, computeApprovalRiskScore, computeEscalatedApprovalCount, computeExposureScore, computeGovernanceHealthScore, computeHHI, computeLiabilityWeights, computeOverallRiskScore, computeOverrideScore, computeRemediationUrgency, computeSignalEngagementRate, configure, configureApprovalRuntime, configureControlSurface, configureShadow, createEscalation, atlasent as default, delegationPropagationHadEffect, deployGate, detectAutonomousAnomaly, detectMisalignedIncentives, detectSelfApproval, enforceAutonomousBounds, enforceBudgetConstraint, enforceEconomicGovernance, enforceFinancialQuorum, evaluateFinancialQuorum, evaluateMany, evidenceRunPasses, findPrimaryLiabilityParties, flattenActionContext, formatPolicySyncDiff, generateBccaeNonce, getEnforcementStatus, getOrgSummary, graphql, hhiToConcentrationScore, highestAgentFindingSeverity, highestSeverityAction, hitlRequiredApproverCount, isBudgetExceptionActive, isBudgetExceptionTerminal, isEscalationSlaBreached, isFreezeActive, isImpersonationGrantUsable, isPolicySyncTerminal, isRegulatoryEscalationTerminal, isSandboxDiffPopulated, isSubstantiveSignalResponse, matchAnomalyRules, nonPassingControls, normalizeEvaluateRequest, normalizeEvaluateResponse, protect, protectCloseAction, protectDeploy, protectOrEscalate, protectPaymentRelease, protectShadow, protectToolCall, redactContext, reportProtectedAction, reportShadowEvent, requestOverride, requirePermit, scoreToRiskTier, serializeSignableContent, signedBytesFor, summarizeCrossOrgPermission, transitionDispute, transitionReversal, validateActionContext, validateLiabilityChain, verifyAuditBundle, verifyBundle, verifyClaimEvidenceLink, verifyEvidenceBundleStructure, verifyWebhook, verifyWebhookSignature, waitForEscalationApproval, withPermit, withinAutonomousCeiling };