@voyant-travel/action-ledger 0.104.10

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.
Files changed (62) hide show
  1. package/LICENSE +201 -0
  2. package/dist/canary.d.ts +17 -0
  3. package/dist/canary.d.ts.map +1 -0
  4. package/dist/canary.js +77 -0
  5. package/dist/capability.d.ts +73 -0
  6. package/dist/capability.d.ts.map +1 -0
  7. package/dist/capability.js +206 -0
  8. package/dist/fingerprint.d.ts +26 -0
  9. package/dist/fingerprint.d.ts.map +1 -0
  10. package/dist/fingerprint.js +55 -0
  11. package/dist/index.d.ts +9 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +8 -0
  14. package/dist/request-context.d.ts +136 -0
  15. package/dist/request-context.d.ts.map +1 -0
  16. package/dist/request-context.js +237 -0
  17. package/dist/route-schemas.d.ts +745 -0
  18. package/dist/route-schemas.d.ts.map +1 -0
  19. package/dist/route-schemas.js +428 -0
  20. package/dist/routes.d.ts +1602 -0
  21. package/dist/routes.d.ts.map +1 -0
  22. package/dist/routes.js +271 -0
  23. package/dist/schema.d.ts +1759 -0
  24. package/dist/schema.d.ts.map +1 -0
  25. package/dist/schema.js +237 -0
  26. package/dist/service/approval-status.d.ts +3 -0
  27. package/dist/service/approval-status.d.ts.map +1 -0
  28. package/dist/service/approval-status.js +14 -0
  29. package/dist/service/cursors.d.ts +22 -0
  30. package/dist/service/cursors.d.ts.map +1 -0
  31. package/dist/service/cursors.js +48 -0
  32. package/dist/service/entries.d.ts +9 -0
  33. package/dist/service/entries.d.ts.map +1 -0
  34. package/dist/service/entries.js +75 -0
  35. package/dist/service/errors.d.ts +20 -0
  36. package/dist/service/errors.d.ts.map +1 -0
  37. package/dist/service/errors.js +36 -0
  38. package/dist/service/listing.d.ts +7 -0
  39. package/dist/service/listing.d.ts.map +1 -0
  40. package/dist/service/listing.js +77 -0
  41. package/dist/service/predicates.d.ts +8 -0
  42. package/dist/service/predicates.d.ts.map +1 -0
  43. package/dist/service/predicates.js +368 -0
  44. package/dist/service/records.d.ts +6 -0
  45. package/dist/service/records.d.ts.map +1 -0
  46. package/dist/service/records.js +51 -0
  47. package/dist/service/relay-lifecycle.d.ts +7 -0
  48. package/dist/service/relay-lifecycle.d.ts.map +1 -0
  49. package/dist/service/relay-lifecycle.js +78 -0
  50. package/dist/service/relay-outbox.d.ts +15 -0
  51. package/dist/service/relay-outbox.d.ts.map +1 -0
  52. package/dist/service/relay-outbox.js +15 -0
  53. package/dist/service/types.d.ts +249 -0
  54. package/dist/service/types.d.ts.map +1 -0
  55. package/dist/service/types.js +1 -0
  56. package/dist/service.d.ts +40 -0
  57. package/dist/service.d.ts.map +1 -0
  58. package/dist/service.js +283 -0
  59. package/dist/timeline.d.ts +67 -0
  60. package/dist/timeline.d.ts.map +1 -0
  61. package/dist/timeline.js +79 -0
  62. package/package.json +93 -0
@@ -0,0 +1,1602 @@
1
+ import type { Module } from "@voyant-travel/core";
2
+ import type { AnyDrizzleDb } from "@voyant-travel/db";
3
+ import type { HonoModule } from "@voyant-travel/hono/module";
4
+ import type { ActionApproval, ActionDelegation, ActionLedgerEntry, ActionLedgerPayload, ActionLedgerRelayOutbox, ActionMutationDetail, ActionSensitiveReadDetail } from "./schema.js";
5
+ import { type GetActionApprovalResult, type GetActionLedgerEntryResult } from "./service.js";
6
+ type Env = {
7
+ Variables: {
8
+ db: AnyDrizzleDb;
9
+ };
10
+ };
11
+ export type ActionLedgerEntryResponse = Omit<ActionLedgerEntry, "occurredAt" | "createdAt"> & {
12
+ occurredAt: string;
13
+ createdAt: string;
14
+ };
15
+ export interface ActionLedgerListResponse {
16
+ data: ActionLedgerEntryResponse[];
17
+ pageInfo: {
18
+ nextCursor: {
19
+ occurredAt: string;
20
+ id: string;
21
+ } | null;
22
+ };
23
+ }
24
+ export type ActionLedgerEntryDetailResponse = ActionLedgerEntryResponse & {
25
+ mutationDetail: ActionMutationDetail | null;
26
+ sensitiveReadDetail: ActionSensitiveReadDetail | null;
27
+ payloads: ActionLedgerPayloadResponse[];
28
+ relayOutbox: ActionLedgerRelayOutboxResponse[];
29
+ };
30
+ export interface ActionLedgerGetResponse {
31
+ data: ActionLedgerEntryDetailResponse;
32
+ }
33
+ export interface ActionLedgerRelayOutboxListResponse {
34
+ data: ActionLedgerRelayOutboxResponse[];
35
+ pageInfo: {
36
+ nextCursor: {
37
+ createdAt: string;
38
+ id: string;
39
+ } | null;
40
+ };
41
+ }
42
+ export interface ActionApprovalListResponse {
43
+ data: ActionApprovalResponse[];
44
+ pageInfo: {
45
+ nextCursor: {
46
+ createdAt: string;
47
+ id: string;
48
+ } | null;
49
+ };
50
+ }
51
+ export interface ActionApprovalGetResponse {
52
+ data: ActionApprovalDetailResponse;
53
+ }
54
+ export interface ActionApprovalRequestResponse {
55
+ data: {
56
+ requestedAction: ActionLedgerEntryResponse;
57
+ approval: ActionApprovalResponse;
58
+ replayed: boolean;
59
+ };
60
+ }
61
+ export interface ActionApprovalDecisionResponse {
62
+ data: {
63
+ approval: ActionApprovalResponse;
64
+ decisionAction: ActionLedgerEntryResponse;
65
+ };
66
+ }
67
+ export interface ActionLedgerReversalResponse {
68
+ data: {
69
+ originalAction: ActionLedgerEntryResponse;
70
+ reversalAction: ActionLedgerEntryResponse;
71
+ replayed: boolean;
72
+ };
73
+ }
74
+ export interface ActionDelegationListResponse {
75
+ data: ActionDelegationResponse[];
76
+ pageInfo: {
77
+ nextCursor: {
78
+ createdAt: string;
79
+ id: string;
80
+ } | null;
81
+ };
82
+ }
83
+ export interface ActionDelegationGetResponse {
84
+ data: ActionDelegationResponse;
85
+ }
86
+ export type ActionLedgerPayloadResponse = Omit<ActionLedgerPayload, "createdAt" | "expiresAt"> & {
87
+ createdAt: string;
88
+ expiresAt: string | null;
89
+ };
90
+ export type ActionLedgerRelayOutboxResponse = Omit<ActionLedgerRelayOutbox, "createdAt" | "nextRetryAt" | "processedAt"> & {
91
+ createdAt: string;
92
+ nextRetryAt: string | null;
93
+ processedAt: string | null;
94
+ };
95
+ export type ActionApprovalResponse = Omit<ActionApproval, "createdAt" | "decidedAt" | "expiresAt"> & {
96
+ createdAt: string;
97
+ decidedAt: string | null;
98
+ expiresAt: string | null;
99
+ };
100
+ export type ActionApprovalDetailResponse = ActionApprovalResponse & {
101
+ requestedAction: ActionLedgerEntryDetailResponse | null;
102
+ };
103
+ export type ActionDelegationResponse = Omit<ActionDelegation, "createdAt" | "expiresAt"> & {
104
+ createdAt: string;
105
+ expiresAt: string | null;
106
+ };
107
+ declare function serializeActionLedgerEntry(entry: ActionLedgerEntry): ActionLedgerEntryResponse;
108
+ declare function serializeActionApproval(row: ActionApproval): ActionApprovalResponse;
109
+ declare function serializeActionApprovalDetail(result: GetActionApprovalResult): ActionApprovalDetailResponse;
110
+ declare function serializeActionDelegation(row: ActionDelegation): ActionDelegationResponse;
111
+ declare function serializeActionLedgerEntryDetail(result: GetActionLedgerEntryResult): ActionLedgerEntryDetailResponse;
112
+ export declare const actionLedgerAdminRoutes: import("hono/hono-base").HonoBase<Env, {
113
+ "/": {
114
+ $get: {
115
+ input: {};
116
+ output: {
117
+ data: {
118
+ id: string;
119
+ actionName: string;
120
+ actionVersion: string;
121
+ actionKind: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate";
122
+ status: "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded";
123
+ evaluatedRisk: "low" | "medium" | "high" | "critical";
124
+ actorType: string | null;
125
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
126
+ principalId: string;
127
+ principalSubtype: string | null;
128
+ sessionId: string | null;
129
+ apiTokenId: string | null;
130
+ internalRequest: boolean;
131
+ delegatedByPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system" | null;
132
+ delegatedByPrincipalId: string | null;
133
+ delegationId: string | null;
134
+ callerType: string | null;
135
+ organizationId: string | null;
136
+ routeOrToolName: string | null;
137
+ workflowRunId: string | null;
138
+ workflowStepId: string | null;
139
+ correlationId: string | null;
140
+ causationActionId: string | null;
141
+ idempotencyScope: string | null;
142
+ idempotencyKey: string | null;
143
+ idempotencyFingerprint: string | null;
144
+ targetType: string;
145
+ targetId: string;
146
+ capabilityId: string | null;
147
+ capabilityVersion: string | null;
148
+ authorizationSource: string | null;
149
+ approvalId: string | null;
150
+ amendsActionId: string | null;
151
+ occurredAt: string;
152
+ createdAt: string;
153
+ }[];
154
+ pageInfo: {
155
+ nextCursor: {
156
+ occurredAt: string;
157
+ id: string;
158
+ } | null;
159
+ };
160
+ };
161
+ outputFormat: "json";
162
+ status: import("hono/utils/http-status").ContentfulStatusCode;
163
+ };
164
+ };
165
+ } & {
166
+ "/entries": {
167
+ $get: {
168
+ input: {};
169
+ output: {
170
+ data: {
171
+ id: string;
172
+ actionName: string;
173
+ actionVersion: string;
174
+ actionKind: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate";
175
+ status: "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded";
176
+ evaluatedRisk: "low" | "medium" | "high" | "critical";
177
+ actorType: string | null;
178
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
179
+ principalId: string;
180
+ principalSubtype: string | null;
181
+ sessionId: string | null;
182
+ apiTokenId: string | null;
183
+ internalRequest: boolean;
184
+ delegatedByPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system" | null;
185
+ delegatedByPrincipalId: string | null;
186
+ delegationId: string | null;
187
+ callerType: string | null;
188
+ organizationId: string | null;
189
+ routeOrToolName: string | null;
190
+ workflowRunId: string | null;
191
+ workflowStepId: string | null;
192
+ correlationId: string | null;
193
+ causationActionId: string | null;
194
+ idempotencyScope: string | null;
195
+ idempotencyKey: string | null;
196
+ idempotencyFingerprint: string | null;
197
+ targetType: string;
198
+ targetId: string;
199
+ capabilityId: string | null;
200
+ capabilityVersion: string | null;
201
+ authorizationSource: string | null;
202
+ approvalId: string | null;
203
+ amendsActionId: string | null;
204
+ occurredAt: string;
205
+ createdAt: string;
206
+ }[];
207
+ pageInfo: {
208
+ nextCursor: {
209
+ occurredAt: string;
210
+ id: string;
211
+ } | null;
212
+ };
213
+ };
214
+ outputFormat: "json";
215
+ status: import("hono/utils/http-status").ContentfulStatusCode;
216
+ };
217
+ };
218
+ } & {
219
+ "/approvals": {
220
+ $get: {
221
+ input: {};
222
+ output: {
223
+ data: {
224
+ id: string;
225
+ status: "approved" | "denied" | "expired" | "cancelled" | "superseded" | "pending";
226
+ reasonCode: string | null;
227
+ requestedActionId: string;
228
+ requestedByPrincipalId: string;
229
+ assignedToPrincipalId: string | null;
230
+ decidedByPrincipalId: string | null;
231
+ delegatedFromPrincipalId: string | null;
232
+ policyName: string;
233
+ policyVersion: string;
234
+ targetSnapshotRef: string | null;
235
+ riskSnapshot: "low" | "medium" | "high" | "critical";
236
+ createdAt: string;
237
+ decidedAt: string | null;
238
+ expiresAt: string | null;
239
+ }[];
240
+ pageInfo: {
241
+ nextCursor: {
242
+ createdAt: string;
243
+ id: string;
244
+ } | null;
245
+ };
246
+ };
247
+ outputFormat: "json";
248
+ status: import("hono/utils/http-status").ContentfulStatusCode;
249
+ };
250
+ };
251
+ } & {
252
+ "/approvals/request": {
253
+ $post: {
254
+ input: {};
255
+ output: {
256
+ data: {
257
+ requestedAction: {
258
+ id: string;
259
+ actionName: string;
260
+ actionVersion: string;
261
+ actionKind: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate";
262
+ status: "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded";
263
+ evaluatedRisk: "low" | "medium" | "high" | "critical";
264
+ actorType: string | null;
265
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
266
+ principalId: string;
267
+ principalSubtype: string | null;
268
+ sessionId: string | null;
269
+ apiTokenId: string | null;
270
+ internalRequest: boolean;
271
+ delegatedByPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system" | null;
272
+ delegatedByPrincipalId: string | null;
273
+ delegationId: string | null;
274
+ callerType: string | null;
275
+ organizationId: string | null;
276
+ routeOrToolName: string | null;
277
+ workflowRunId: string | null;
278
+ workflowStepId: string | null;
279
+ correlationId: string | null;
280
+ causationActionId: string | null;
281
+ idempotencyScope: string | null;
282
+ idempotencyKey: string | null;
283
+ idempotencyFingerprint: string | null;
284
+ targetType: string;
285
+ targetId: string;
286
+ capabilityId: string | null;
287
+ capabilityVersion: string | null;
288
+ authorizationSource: string | null;
289
+ approvalId: string | null;
290
+ amendsActionId: string | null;
291
+ occurredAt: string;
292
+ createdAt: string;
293
+ };
294
+ approval: {
295
+ id: string;
296
+ status: "approved" | "denied" | "expired" | "cancelled" | "superseded" | "pending";
297
+ reasonCode: string | null;
298
+ requestedActionId: string;
299
+ requestedByPrincipalId: string;
300
+ assignedToPrincipalId: string | null;
301
+ decidedByPrincipalId: string | null;
302
+ delegatedFromPrincipalId: string | null;
303
+ policyName: string;
304
+ policyVersion: string;
305
+ targetSnapshotRef: string | null;
306
+ riskSnapshot: "low" | "medium" | "high" | "critical";
307
+ createdAt: string;
308
+ decidedAt: string | null;
309
+ expiresAt: string | null;
310
+ };
311
+ replayed: boolean;
312
+ };
313
+ };
314
+ outputFormat: "json";
315
+ status: 201;
316
+ };
317
+ };
318
+ } & {
319
+ "/approvals/:id": {
320
+ $get: {
321
+ input: {
322
+ param: {
323
+ id: string;
324
+ };
325
+ };
326
+ output: {
327
+ error: string;
328
+ };
329
+ outputFormat: "json";
330
+ status: 404;
331
+ } | {
332
+ input: {
333
+ param: {
334
+ id: string;
335
+ };
336
+ };
337
+ output: {
338
+ data: {
339
+ id: string;
340
+ status: "approved" | "denied" | "expired" | "cancelled" | "superseded" | "pending";
341
+ reasonCode: string | null;
342
+ requestedActionId: string;
343
+ requestedByPrincipalId: string;
344
+ assignedToPrincipalId: string | null;
345
+ decidedByPrincipalId: string | null;
346
+ delegatedFromPrincipalId: string | null;
347
+ policyName: string;
348
+ policyVersion: string;
349
+ targetSnapshotRef: string | null;
350
+ riskSnapshot: "low" | "medium" | "high" | "critical";
351
+ createdAt: string;
352
+ decidedAt: string | null;
353
+ expiresAt: string | null;
354
+ requestedAction: {
355
+ id: string;
356
+ actionName: string;
357
+ actionVersion: string;
358
+ actionKind: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate";
359
+ status: "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded";
360
+ evaluatedRisk: "low" | "medium" | "high" | "critical";
361
+ actorType: string | null;
362
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
363
+ principalId: string;
364
+ principalSubtype: string | null;
365
+ sessionId: string | null;
366
+ apiTokenId: string | null;
367
+ internalRequest: boolean;
368
+ delegatedByPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system" | null;
369
+ delegatedByPrincipalId: string | null;
370
+ delegationId: string | null;
371
+ callerType: string | null;
372
+ organizationId: string | null;
373
+ routeOrToolName: string | null;
374
+ workflowRunId: string | null;
375
+ workflowStepId: string | null;
376
+ correlationId: string | null;
377
+ causationActionId: string | null;
378
+ idempotencyScope: string | null;
379
+ idempotencyKey: string | null;
380
+ idempotencyFingerprint: string | null;
381
+ targetType: string;
382
+ targetId: string;
383
+ capabilityId: string | null;
384
+ capabilityVersion: string | null;
385
+ authorizationSource: string | null;
386
+ approvalId: string | null;
387
+ amendsActionId: string | null;
388
+ occurredAt: string;
389
+ createdAt: string;
390
+ mutationDetail: {
391
+ actionId: string;
392
+ commandInputRef: string | null;
393
+ commandResultRef: string | null;
394
+ summary: string | null;
395
+ reversalKind: "compensate" | "none" | "revert" | "domain_command";
396
+ reversalCommandId: string | null;
397
+ reversalCommandVersion: string | null;
398
+ reversalArgsRef: string | null;
399
+ reversalStateProjection: "requested" | "failed" | "expired" | "not_reversible" | "available" | "running" | "completed" | null;
400
+ reversalOutcomeProjection: "failed" | "full" | "partial" | null;
401
+ reversesActionId: string | null;
402
+ reversedByActionIdProjection: string | null;
403
+ } | null;
404
+ sensitiveReadDetail: {
405
+ actionId: string;
406
+ reasonCode: string | null;
407
+ disclosedFieldSet: string[] | null;
408
+ disclosureSummary: string | null;
409
+ decisionPolicy: string | null;
410
+ } | null;
411
+ payloads: {
412
+ id: string;
413
+ actionId: string;
414
+ payloadKind: string;
415
+ schemaTag: string;
416
+ redactionStatus: "none" | "redacted" | "tombstoned" | "crypto_shredded";
417
+ retentionPolicy: string;
418
+ storageRef: string;
419
+ hash: string | null;
420
+ createdAt: string;
421
+ expiresAt: string | null;
422
+ }[];
423
+ relayOutbox: {
424
+ id: string;
425
+ organizationId: string | null;
426
+ actionId: string;
427
+ relayStatus: "succeeded" | "failed" | "pending" | "processing" | "dead_letter";
428
+ payloadRef: string | null;
429
+ attemptCount: number;
430
+ lastError: string | null;
431
+ createdAt: string;
432
+ nextRetryAt: string | null;
433
+ processedAt: string | null;
434
+ }[];
435
+ } | null;
436
+ };
437
+ };
438
+ outputFormat: "json";
439
+ status: import("hono/utils/http-status").ContentfulStatusCode;
440
+ };
441
+ };
442
+ } & {
443
+ "/approvals/:id/decide": {
444
+ $post: {
445
+ input: {
446
+ param: {
447
+ id: string;
448
+ };
449
+ };
450
+ output: {
451
+ error: string;
452
+ };
453
+ outputFormat: "json";
454
+ status: 404;
455
+ } | {
456
+ input: {
457
+ param: {
458
+ id: string;
459
+ };
460
+ };
461
+ output: {
462
+ data: {
463
+ approval: {
464
+ id: string;
465
+ status: "approved" | "denied" | "expired" | "cancelled" | "superseded" | "pending";
466
+ reasonCode: string | null;
467
+ requestedActionId: string;
468
+ requestedByPrincipalId: string;
469
+ assignedToPrincipalId: string | null;
470
+ decidedByPrincipalId: string | null;
471
+ delegatedFromPrincipalId: string | null;
472
+ policyName: string;
473
+ policyVersion: string;
474
+ targetSnapshotRef: string | null;
475
+ riskSnapshot: "low" | "medium" | "high" | "critical";
476
+ createdAt: string;
477
+ decidedAt: string | null;
478
+ expiresAt: string | null;
479
+ };
480
+ decisionAction: {
481
+ id: string;
482
+ actionName: string;
483
+ actionVersion: string;
484
+ actionKind: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate";
485
+ status: "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded";
486
+ evaluatedRisk: "low" | "medium" | "high" | "critical";
487
+ actorType: string | null;
488
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
489
+ principalId: string;
490
+ principalSubtype: string | null;
491
+ sessionId: string | null;
492
+ apiTokenId: string | null;
493
+ internalRequest: boolean;
494
+ delegatedByPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system" | null;
495
+ delegatedByPrincipalId: string | null;
496
+ delegationId: string | null;
497
+ callerType: string | null;
498
+ organizationId: string | null;
499
+ routeOrToolName: string | null;
500
+ workflowRunId: string | null;
501
+ workflowStepId: string | null;
502
+ correlationId: string | null;
503
+ causationActionId: string | null;
504
+ idempotencyScope: string | null;
505
+ idempotencyKey: string | null;
506
+ idempotencyFingerprint: string | null;
507
+ targetType: string;
508
+ targetId: string;
509
+ capabilityId: string | null;
510
+ capabilityVersion: string | null;
511
+ authorizationSource: string | null;
512
+ approvalId: string | null;
513
+ amendsActionId: string | null;
514
+ occurredAt: string;
515
+ createdAt: string;
516
+ };
517
+ };
518
+ };
519
+ outputFormat: "json";
520
+ status: import("hono/utils/http-status").ContentfulStatusCode;
521
+ } | {
522
+ input: {
523
+ param: {
524
+ id: string;
525
+ };
526
+ };
527
+ output: {
528
+ error: string;
529
+ approvalId: string;
530
+ currentStatus: "approved" | "denied" | "expired" | "cancelled" | "superseded" | "pending";
531
+ };
532
+ outputFormat: "json";
533
+ status: 409;
534
+ };
535
+ };
536
+ } & {
537
+ "/delegations": {
538
+ $get: {
539
+ input: {};
540
+ output: {
541
+ data: {
542
+ id: string;
543
+ rootPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system";
544
+ rootPrincipalId: string;
545
+ parentPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system";
546
+ parentPrincipalId: string;
547
+ childPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system";
548
+ childPrincipalId: string;
549
+ grantSource: string;
550
+ capabilityScopeRef: string | null;
551
+ budgetScopeRef: string | null;
552
+ createdAt: string;
553
+ expiresAt: string | null;
554
+ }[];
555
+ pageInfo: {
556
+ nextCursor: {
557
+ createdAt: string;
558
+ id: string;
559
+ } | null;
560
+ };
561
+ };
562
+ outputFormat: "json";
563
+ status: import("hono/utils/http-status").ContentfulStatusCode;
564
+ };
565
+ };
566
+ } & {
567
+ "/delegations/:id": {
568
+ $get: {
569
+ input: {
570
+ param: {
571
+ id: string;
572
+ };
573
+ };
574
+ output: {
575
+ error: string;
576
+ };
577
+ outputFormat: "json";
578
+ status: 404;
579
+ } | {
580
+ input: {
581
+ param: {
582
+ id: string;
583
+ };
584
+ };
585
+ output: {
586
+ data: {
587
+ id: string;
588
+ rootPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system";
589
+ rootPrincipalId: string;
590
+ parentPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system";
591
+ parentPrincipalId: string;
592
+ childPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system";
593
+ childPrincipalId: string;
594
+ grantSource: string;
595
+ capabilityScopeRef: string | null;
596
+ budgetScopeRef: string | null;
597
+ createdAt: string;
598
+ expiresAt: string | null;
599
+ };
600
+ };
601
+ outputFormat: "json";
602
+ status: import("hono/utils/http-status").ContentfulStatusCode;
603
+ };
604
+ };
605
+ } & {
606
+ "/relay-outbox": {
607
+ $get: {
608
+ input: {};
609
+ output: {
610
+ data: {
611
+ id: string;
612
+ organizationId: string | null;
613
+ actionId: string;
614
+ relayStatus: "succeeded" | "failed" | "pending" | "processing" | "dead_letter";
615
+ payloadRef: string | null;
616
+ attemptCount: number;
617
+ lastError: string | null;
618
+ createdAt: string;
619
+ nextRetryAt: string | null;
620
+ processedAt: string | null;
621
+ }[];
622
+ pageInfo: {
623
+ nextCursor: {
624
+ createdAt: string;
625
+ id: string;
626
+ } | null;
627
+ };
628
+ };
629
+ outputFormat: "json";
630
+ status: import("hono/utils/http-status").ContentfulStatusCode;
631
+ };
632
+ };
633
+ } & {
634
+ "/entries/:id/reversals": {
635
+ $post: {
636
+ input: {
637
+ param: {
638
+ id: string;
639
+ };
640
+ };
641
+ output: {
642
+ error: string;
643
+ };
644
+ outputFormat: "json";
645
+ status: 404;
646
+ } | {
647
+ input: {
648
+ param: {
649
+ id: string;
650
+ };
651
+ };
652
+ output: {
653
+ data: {
654
+ originalAction: {
655
+ id: string;
656
+ actionName: string;
657
+ actionVersion: string;
658
+ actionKind: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate";
659
+ status: "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded";
660
+ evaluatedRisk: "low" | "medium" | "high" | "critical";
661
+ actorType: string | null;
662
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
663
+ principalId: string;
664
+ principalSubtype: string | null;
665
+ sessionId: string | null;
666
+ apiTokenId: string | null;
667
+ internalRequest: boolean;
668
+ delegatedByPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system" | null;
669
+ delegatedByPrincipalId: string | null;
670
+ delegationId: string | null;
671
+ callerType: string | null;
672
+ organizationId: string | null;
673
+ routeOrToolName: string | null;
674
+ workflowRunId: string | null;
675
+ workflowStepId: string | null;
676
+ correlationId: string | null;
677
+ causationActionId: string | null;
678
+ idempotencyScope: string | null;
679
+ idempotencyKey: string | null;
680
+ idempotencyFingerprint: string | null;
681
+ targetType: string;
682
+ targetId: string;
683
+ capabilityId: string | null;
684
+ capabilityVersion: string | null;
685
+ authorizationSource: string | null;
686
+ approvalId: string | null;
687
+ amendsActionId: string | null;
688
+ occurredAt: string;
689
+ createdAt: string;
690
+ };
691
+ reversalAction: {
692
+ id: string;
693
+ actionName: string;
694
+ actionVersion: string;
695
+ actionKind: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate";
696
+ status: "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded";
697
+ evaluatedRisk: "low" | "medium" | "high" | "critical";
698
+ actorType: string | null;
699
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
700
+ principalId: string;
701
+ principalSubtype: string | null;
702
+ sessionId: string | null;
703
+ apiTokenId: string | null;
704
+ internalRequest: boolean;
705
+ delegatedByPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system" | null;
706
+ delegatedByPrincipalId: string | null;
707
+ delegationId: string | null;
708
+ callerType: string | null;
709
+ organizationId: string | null;
710
+ routeOrToolName: string | null;
711
+ workflowRunId: string | null;
712
+ workflowStepId: string | null;
713
+ correlationId: string | null;
714
+ causationActionId: string | null;
715
+ idempotencyScope: string | null;
716
+ idempotencyKey: string | null;
717
+ idempotencyFingerprint: string | null;
718
+ targetType: string;
719
+ targetId: string;
720
+ capabilityId: string | null;
721
+ capabilityVersion: string | null;
722
+ authorizationSource: string | null;
723
+ approvalId: string | null;
724
+ amendsActionId: string | null;
725
+ occurredAt: string;
726
+ createdAt: string;
727
+ };
728
+ replayed: boolean;
729
+ };
730
+ };
731
+ outputFormat: "json";
732
+ status: import("hono/utils/http-status").ContentfulStatusCode;
733
+ } | {
734
+ input: {
735
+ param: {
736
+ id: string;
737
+ };
738
+ };
739
+ output: {
740
+ error: string;
741
+ reason: "not_reversible" | "missing_mutation_detail";
742
+ };
743
+ outputFormat: "json";
744
+ status: 409;
745
+ };
746
+ };
747
+ } & {
748
+ "/entries/:id": {
749
+ $get: {
750
+ input: {
751
+ param: {
752
+ id: string;
753
+ };
754
+ };
755
+ output: {
756
+ error: string;
757
+ };
758
+ outputFormat: "json";
759
+ status: 404;
760
+ } | {
761
+ input: {
762
+ param: {
763
+ id: string;
764
+ };
765
+ };
766
+ output: {
767
+ data: {
768
+ id: string;
769
+ actionName: string;
770
+ actionVersion: string;
771
+ actionKind: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate";
772
+ status: "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded";
773
+ evaluatedRisk: "low" | "medium" | "high" | "critical";
774
+ actorType: string | null;
775
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
776
+ principalId: string;
777
+ principalSubtype: string | null;
778
+ sessionId: string | null;
779
+ apiTokenId: string | null;
780
+ internalRequest: boolean;
781
+ delegatedByPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system" | null;
782
+ delegatedByPrincipalId: string | null;
783
+ delegationId: string | null;
784
+ callerType: string | null;
785
+ organizationId: string | null;
786
+ routeOrToolName: string | null;
787
+ workflowRunId: string | null;
788
+ workflowStepId: string | null;
789
+ correlationId: string | null;
790
+ causationActionId: string | null;
791
+ idempotencyScope: string | null;
792
+ idempotencyKey: string | null;
793
+ idempotencyFingerprint: string | null;
794
+ targetType: string;
795
+ targetId: string;
796
+ capabilityId: string | null;
797
+ capabilityVersion: string | null;
798
+ authorizationSource: string | null;
799
+ approvalId: string | null;
800
+ amendsActionId: string | null;
801
+ occurredAt: string;
802
+ createdAt: string;
803
+ mutationDetail: {
804
+ actionId: string;
805
+ commandInputRef: string | null;
806
+ commandResultRef: string | null;
807
+ summary: string | null;
808
+ reversalKind: "compensate" | "none" | "revert" | "domain_command";
809
+ reversalCommandId: string | null;
810
+ reversalCommandVersion: string | null;
811
+ reversalArgsRef: string | null;
812
+ reversalStateProjection: "requested" | "failed" | "expired" | "not_reversible" | "available" | "running" | "completed" | null;
813
+ reversalOutcomeProjection: "failed" | "full" | "partial" | null;
814
+ reversesActionId: string | null;
815
+ reversedByActionIdProjection: string | null;
816
+ } | null;
817
+ sensitiveReadDetail: {
818
+ actionId: string;
819
+ reasonCode: string | null;
820
+ disclosedFieldSet: string[] | null;
821
+ disclosureSummary: string | null;
822
+ decisionPolicy: string | null;
823
+ } | null;
824
+ payloads: {
825
+ id: string;
826
+ actionId: string;
827
+ payloadKind: string;
828
+ schemaTag: string;
829
+ redactionStatus: "none" | "redacted" | "tombstoned" | "crypto_shredded";
830
+ retentionPolicy: string;
831
+ storageRef: string;
832
+ hash: string | null;
833
+ createdAt: string;
834
+ expiresAt: string | null;
835
+ }[];
836
+ relayOutbox: {
837
+ id: string;
838
+ organizationId: string | null;
839
+ actionId: string;
840
+ relayStatus: "succeeded" | "failed" | "pending" | "processing" | "dead_letter";
841
+ payloadRef: string | null;
842
+ attemptCount: number;
843
+ lastError: string | null;
844
+ createdAt: string;
845
+ nextRetryAt: string | null;
846
+ processedAt: string | null;
847
+ }[];
848
+ };
849
+ };
850
+ outputFormat: "json";
851
+ status: import("hono/utils/http-status").ContentfulStatusCode;
852
+ };
853
+ };
854
+ }, "/", "/entries/:id">;
855
+ export type ActionLedgerAdminRoutes = typeof actionLedgerAdminRoutes;
856
+ export declare const actionLedgerModule: Module;
857
+ export declare const actionLedgerHonoModule: HonoModule;
858
+ export declare const __test__: {
859
+ actionLedgerEntryListQuerySchema: import("zod").ZodPipe<import("zod").ZodObject<{
860
+ actionName: import("zod").ZodOptional<import("zod").ZodString>;
861
+ actionKind: import("zod").ZodOptional<import("zod").ZodEnum<{
862
+ read: "read";
863
+ create: "create";
864
+ update: "update";
865
+ delete: "delete";
866
+ execute: "execute";
867
+ approve: "approve";
868
+ reject: "reject";
869
+ reverse: "reverse";
870
+ compensate: "compensate";
871
+ duplicate: "duplicate";
872
+ }>>;
873
+ actorType: import("zod").ZodOptional<import("zod").ZodString>;
874
+ principalType: import("zod").ZodOptional<import("zod").ZodEnum<{
875
+ user: "user";
876
+ api_key: "api_key";
877
+ agent: "agent";
878
+ workflow: "workflow";
879
+ system: "system";
880
+ }>>;
881
+ principalId: import("zod").ZodOptional<import("zod").ZodString>;
882
+ apiTokenId: import("zod").ZodOptional<import("zod").ZodString>;
883
+ sessionId: import("zod").ZodOptional<import("zod").ZodString>;
884
+ callerType: import("zod").ZodOptional<import("zod").ZodString>;
885
+ organizationId: import("zod").ZodOptional<import("zod").ZodString>;
886
+ targetType: import("zod").ZodOptional<import("zod").ZodString>;
887
+ targetId: import("zod").ZodOptional<import("zod").ZodString>;
888
+ targetIds: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>>;
889
+ routeOrToolName: import("zod").ZodOptional<import("zod").ZodString>;
890
+ workflowRunId: import("zod").ZodOptional<import("zod").ZodString>;
891
+ workflowStepId: import("zod").ZodOptional<import("zod").ZodString>;
892
+ correlationId: import("zod").ZodOptional<import("zod").ZodString>;
893
+ causationActionId: import("zod").ZodOptional<import("zod").ZodString>;
894
+ capabilityId: import("zod").ZodOptional<import("zod").ZodString>;
895
+ capabilityVersion: import("zod").ZodOptional<import("zod").ZodString>;
896
+ authorizationSource: import("zod").ZodOptional<import("zod").ZodString>;
897
+ approvalId: import("zod").ZodOptional<import("zod").ZodString>;
898
+ amendsActionId: import("zod").ZodOptional<import("zod").ZodString>;
899
+ idempotencyScope: import("zod").ZodOptional<import("zod").ZodString>;
900
+ idempotencyKey: import("zod").ZodOptional<import("zod").ZodString>;
901
+ evaluatedRisk: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
902
+ low: "low";
903
+ medium: "medium";
904
+ high: "high";
905
+ critical: "critical";
906
+ }>>>>;
907
+ status: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
908
+ requested: "requested";
909
+ awaiting_approval: "awaiting_approval";
910
+ approved: "approved";
911
+ denied: "denied";
912
+ succeeded: "succeeded";
913
+ failed: "failed";
914
+ reversed: "reversed";
915
+ compensated: "compensated";
916
+ expired: "expired";
917
+ cancelled: "cancelled";
918
+ superseded: "superseded";
919
+ }>>>>;
920
+ reversalKind: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
921
+ compensate: "compensate";
922
+ none: "none";
923
+ revert: "revert";
924
+ domain_command: "domain_command";
925
+ }>>>>;
926
+ reversalState: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
927
+ requested: "requested";
928
+ failed: "failed";
929
+ expired: "expired";
930
+ not_reversible: "not_reversible";
931
+ available: "available";
932
+ running: "running";
933
+ completed: "completed";
934
+ }>>>>;
935
+ reversalOutcome: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
936
+ failed: "failed";
937
+ full: "full";
938
+ partial: "partial";
939
+ }>>>>;
940
+ reversesActionId: import("zod").ZodOptional<import("zod").ZodString>;
941
+ reversedByActionId: import("zod").ZodOptional<import("zod").ZodString>;
942
+ sensitiveReasonCode: import("zod").ZodOptional<import("zod").ZodString>;
943
+ decisionPolicy: import("zod").ZodOptional<import("zod").ZodString>;
944
+ occurredAtFrom: import("zod").ZodOptional<import("zod").ZodString>;
945
+ occurredAtTo: import("zod").ZodOptional<import("zod").ZodString>;
946
+ cursorOccurredAt: import("zod").ZodOptional<import("zod").ZodString>;
947
+ cursorId: import("zod").ZodOptional<import("zod").ZodString>;
948
+ sortDir: import("zod").ZodOptional<import("zod").ZodEnum<{
949
+ asc: "asc";
950
+ desc: "desc";
951
+ }>>;
952
+ limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
953
+ }, import("zod/v4/core").$strip>, import("zod").ZodTransform<{
954
+ occurredAtFrom: Date | undefined;
955
+ occurredAtTo: Date | undefined;
956
+ cursor: {
957
+ occurredAt: string;
958
+ id: string;
959
+ } | undefined;
960
+ actionName?: string | undefined;
961
+ actionKind?: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate" | undefined;
962
+ actorType?: string | undefined;
963
+ principalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
964
+ principalId?: string | undefined;
965
+ apiTokenId?: string | undefined;
966
+ sessionId?: string | undefined;
967
+ callerType?: string | undefined;
968
+ organizationId?: string | undefined;
969
+ targetType?: string | undefined;
970
+ targetId?: string | undefined;
971
+ targetIds?: string[] | undefined;
972
+ routeOrToolName?: string | undefined;
973
+ workflowRunId?: string | undefined;
974
+ workflowStepId?: string | undefined;
975
+ correlationId?: string | undefined;
976
+ causationActionId?: string | undefined;
977
+ capabilityId?: string | undefined;
978
+ capabilityVersion?: string | undefined;
979
+ authorizationSource?: string | undefined;
980
+ approvalId?: string | undefined;
981
+ amendsActionId?: string | undefined;
982
+ idempotencyScope?: string | undefined;
983
+ idempotencyKey?: string | undefined;
984
+ evaluatedRisk?: ("low" | "medium" | "high" | "critical")[] | undefined;
985
+ status?: ("requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded")[] | undefined;
986
+ reversalKind?: ("compensate" | "none" | "revert" | "domain_command")[] | undefined;
987
+ reversalState?: ("requested" | "failed" | "expired" | "not_reversible" | "available" | "running" | "completed")[] | undefined;
988
+ reversalOutcome?: ("failed" | "full" | "partial")[] | undefined;
989
+ reversesActionId?: string | undefined;
990
+ reversedByActionId?: string | undefined;
991
+ sensitiveReasonCode?: string | undefined;
992
+ decisionPolicy?: string | undefined;
993
+ sortDir?: "asc" | "desc" | undefined;
994
+ limit?: number | undefined;
995
+ }, {
996
+ actionName?: string | undefined;
997
+ actionKind?: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate" | undefined;
998
+ actorType?: string | undefined;
999
+ principalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
1000
+ principalId?: string | undefined;
1001
+ apiTokenId?: string | undefined;
1002
+ sessionId?: string | undefined;
1003
+ callerType?: string | undefined;
1004
+ organizationId?: string | undefined;
1005
+ targetType?: string | undefined;
1006
+ targetId?: string | undefined;
1007
+ targetIds?: string[] | undefined;
1008
+ routeOrToolName?: string | undefined;
1009
+ workflowRunId?: string | undefined;
1010
+ workflowStepId?: string | undefined;
1011
+ correlationId?: string | undefined;
1012
+ causationActionId?: string | undefined;
1013
+ capabilityId?: string | undefined;
1014
+ capabilityVersion?: string | undefined;
1015
+ authorizationSource?: string | undefined;
1016
+ approvalId?: string | undefined;
1017
+ amendsActionId?: string | undefined;
1018
+ idempotencyScope?: string | undefined;
1019
+ idempotencyKey?: string | undefined;
1020
+ evaluatedRisk?: ("low" | "medium" | "high" | "critical")[] | undefined;
1021
+ status?: ("requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded")[] | undefined;
1022
+ reversalKind?: ("compensate" | "none" | "revert" | "domain_command")[] | undefined;
1023
+ reversalState?: ("requested" | "failed" | "expired" | "not_reversible" | "available" | "running" | "completed")[] | undefined;
1024
+ reversalOutcome?: ("failed" | "full" | "partial")[] | undefined;
1025
+ reversesActionId?: string | undefined;
1026
+ reversedByActionId?: string | undefined;
1027
+ sensitiveReasonCode?: string | undefined;
1028
+ decisionPolicy?: string | undefined;
1029
+ occurredAtFrom?: string | undefined;
1030
+ occurredAtTo?: string | undefined;
1031
+ cursorOccurredAt?: string | undefined;
1032
+ cursorId?: string | undefined;
1033
+ sortDir?: "asc" | "desc" | undefined;
1034
+ limit?: number | undefined;
1035
+ }>>;
1036
+ actionApprovalListQuerySchema: import("zod").ZodPipe<import("zod").ZodObject<{
1037
+ requestedActionId: import("zod").ZodOptional<import("zod").ZodString>;
1038
+ status: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
1039
+ approved: "approved";
1040
+ denied: "denied";
1041
+ expired: "expired";
1042
+ cancelled: "cancelled";
1043
+ superseded: "superseded";
1044
+ pending: "pending";
1045
+ }>>>>;
1046
+ requestedByPrincipalId: import("zod").ZodOptional<import("zod").ZodString>;
1047
+ assignedToPrincipalId: import("zod").ZodOptional<import("zod").ZodString>;
1048
+ decidedByPrincipalId: import("zod").ZodOptional<import("zod").ZodString>;
1049
+ delegatedFromPrincipalId: import("zod").ZodOptional<import("zod").ZodString>;
1050
+ policyName: import("zod").ZodOptional<import("zod").ZodString>;
1051
+ policyVersion: import("zod").ZodOptional<import("zod").ZodString>;
1052
+ riskSnapshot: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
1053
+ low: "low";
1054
+ medium: "medium";
1055
+ high: "high";
1056
+ critical: "critical";
1057
+ }>>>>;
1058
+ reasonCode: import("zod").ZodOptional<import("zod").ZodString>;
1059
+ expiresAtFrom: import("zod").ZodOptional<import("zod").ZodString>;
1060
+ expiresAtTo: import("zod").ZodOptional<import("zod").ZodString>;
1061
+ decidedAtFrom: import("zod").ZodOptional<import("zod").ZodString>;
1062
+ decidedAtTo: import("zod").ZodOptional<import("zod").ZodString>;
1063
+ createdAtFrom: import("zod").ZodOptional<import("zod").ZodString>;
1064
+ createdAtTo: import("zod").ZodOptional<import("zod").ZodString>;
1065
+ cursorCreatedAt: import("zod").ZodOptional<import("zod").ZodString>;
1066
+ cursorId: import("zod").ZodOptional<import("zod").ZodString>;
1067
+ limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
1068
+ }, import("zod/v4/core").$strip>, import("zod").ZodTransform<{
1069
+ expiresAtFrom: Date | undefined;
1070
+ expiresAtTo: Date | undefined;
1071
+ decidedAtFrom: Date | undefined;
1072
+ decidedAtTo: Date | undefined;
1073
+ createdAtFrom: Date | undefined;
1074
+ createdAtTo: Date | undefined;
1075
+ cursor: {
1076
+ createdAt: string;
1077
+ id: string;
1078
+ } | undefined;
1079
+ requestedActionId?: string | undefined;
1080
+ status?: ("approved" | "denied" | "expired" | "cancelled" | "superseded" | "pending")[] | undefined;
1081
+ requestedByPrincipalId?: string | undefined;
1082
+ assignedToPrincipalId?: string | undefined;
1083
+ decidedByPrincipalId?: string | undefined;
1084
+ delegatedFromPrincipalId?: string | undefined;
1085
+ policyName?: string | undefined;
1086
+ policyVersion?: string | undefined;
1087
+ riskSnapshot?: ("low" | "medium" | "high" | "critical")[] | undefined;
1088
+ reasonCode?: string | undefined;
1089
+ limit?: number | undefined;
1090
+ }, {
1091
+ requestedActionId?: string | undefined;
1092
+ status?: ("approved" | "denied" | "expired" | "cancelled" | "superseded" | "pending")[] | undefined;
1093
+ requestedByPrincipalId?: string | undefined;
1094
+ assignedToPrincipalId?: string | undefined;
1095
+ decidedByPrincipalId?: string | undefined;
1096
+ delegatedFromPrincipalId?: string | undefined;
1097
+ policyName?: string | undefined;
1098
+ policyVersion?: string | undefined;
1099
+ riskSnapshot?: ("low" | "medium" | "high" | "critical")[] | undefined;
1100
+ reasonCode?: string | undefined;
1101
+ expiresAtFrom?: string | undefined;
1102
+ expiresAtTo?: string | undefined;
1103
+ decidedAtFrom?: string | undefined;
1104
+ decidedAtTo?: string | undefined;
1105
+ createdAtFrom?: string | undefined;
1106
+ createdAtTo?: string | undefined;
1107
+ cursorCreatedAt?: string | undefined;
1108
+ cursorId?: string | undefined;
1109
+ limit?: number | undefined;
1110
+ }>>;
1111
+ decideActionApprovalBodySchema: import("zod").ZodPipe<import("zod").ZodObject<{
1112
+ status: import("zod").ZodEnum<{
1113
+ approved: "approved";
1114
+ denied: "denied";
1115
+ expired: "expired";
1116
+ cancelled: "cancelled";
1117
+ superseded: "superseded";
1118
+ }>;
1119
+ decidedByPrincipalId: import("zod").ZodString;
1120
+ decidedAt: import("zod").ZodOptional<import("zod").ZodString>;
1121
+ decisionAction: import("zod").ZodObject<{
1122
+ actionName: import("zod").ZodString;
1123
+ actionVersion: import("zod").ZodDefault<import("zod").ZodString>;
1124
+ actorType: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1125
+ principalType: import("zod").ZodEnum<{
1126
+ user: "user";
1127
+ api_key: "api_key";
1128
+ agent: "agent";
1129
+ workflow: "workflow";
1130
+ system: "system";
1131
+ }>;
1132
+ principalId: import("zod").ZodString;
1133
+ principalSubtype: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1134
+ sessionId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1135
+ apiTokenId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1136
+ internalRequest: import("zod").ZodDefault<import("zod").ZodBoolean>;
1137
+ delegatedByPrincipalType: import("zod").ZodOptional<import("zod").ZodEnum<{
1138
+ user: "user";
1139
+ api_key: "api_key";
1140
+ agent: "agent";
1141
+ workflow: "workflow";
1142
+ system: "system";
1143
+ }>>;
1144
+ delegatedByPrincipalId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1145
+ delegationId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1146
+ callerType: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1147
+ organizationId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1148
+ routeOrToolName: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1149
+ workflowRunId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1150
+ workflowStepId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1151
+ correlationId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1152
+ idempotencyScope: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1153
+ idempotencyKey: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1154
+ idempotencyFingerprint: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1155
+ capabilityId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1156
+ capabilityVersion: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1157
+ authorizationSource: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1158
+ amendsActionId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1159
+ }, import("zod/v4/core").$strip>;
1160
+ }, import("zod/v4/core").$strip>, import("zod").ZodTransform<{
1161
+ decidedAt: Date | undefined;
1162
+ status: "approved" | "denied" | "expired" | "cancelled" | "superseded";
1163
+ decidedByPrincipalId: string;
1164
+ decisionAction: {
1165
+ actionName: string;
1166
+ actionVersion: string;
1167
+ actorType: string | null;
1168
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
1169
+ principalId: string;
1170
+ principalSubtype: string | null;
1171
+ sessionId: string | null;
1172
+ apiTokenId: string | null;
1173
+ internalRequest: boolean;
1174
+ delegatedByPrincipalId: string | null;
1175
+ delegationId: string | null;
1176
+ callerType: string | null;
1177
+ organizationId: string | null;
1178
+ routeOrToolName: string | null;
1179
+ workflowRunId: string | null;
1180
+ workflowStepId: string | null;
1181
+ correlationId: string | null;
1182
+ idempotencyScope: string | null;
1183
+ idempotencyKey: string | null;
1184
+ idempotencyFingerprint: string | null;
1185
+ capabilityId: string | null;
1186
+ capabilityVersion: string | null;
1187
+ authorizationSource: string | null;
1188
+ amendsActionId: string | null;
1189
+ delegatedByPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
1190
+ };
1191
+ }, {
1192
+ status: "approved" | "denied" | "expired" | "cancelled" | "superseded";
1193
+ decidedByPrincipalId: string;
1194
+ decisionAction: {
1195
+ actionName: string;
1196
+ actionVersion: string;
1197
+ actorType: string | null;
1198
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
1199
+ principalId: string;
1200
+ principalSubtype: string | null;
1201
+ sessionId: string | null;
1202
+ apiTokenId: string | null;
1203
+ internalRequest: boolean;
1204
+ delegatedByPrincipalId: string | null;
1205
+ delegationId: string | null;
1206
+ callerType: string | null;
1207
+ organizationId: string | null;
1208
+ routeOrToolName: string | null;
1209
+ workflowRunId: string | null;
1210
+ workflowStepId: string | null;
1211
+ correlationId: string | null;
1212
+ idempotencyScope: string | null;
1213
+ idempotencyKey: string | null;
1214
+ idempotencyFingerprint: string | null;
1215
+ capabilityId: string | null;
1216
+ capabilityVersion: string | null;
1217
+ authorizationSource: string | null;
1218
+ amendsActionId: string | null;
1219
+ delegatedByPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
1220
+ };
1221
+ decidedAt?: string | undefined;
1222
+ }>>;
1223
+ recordActionLedgerReversalBodySchema: import("zod").ZodObject<{
1224
+ reversalAction: import("zod").ZodObject<{
1225
+ actionName: import("zod").ZodString;
1226
+ actionVersion: import("zod").ZodDefault<import("zod").ZodString>;
1227
+ actionKind: import("zod").ZodEnum<{
1228
+ reverse: "reverse";
1229
+ compensate: "compensate";
1230
+ }>;
1231
+ status: import("zod").ZodEnum<{
1232
+ failed: "failed";
1233
+ reversed: "reversed";
1234
+ compensated: "compensated";
1235
+ }>;
1236
+ evaluatedRisk: import("zod").ZodDefault<import("zod").ZodEnum<{
1237
+ low: "low";
1238
+ medium: "medium";
1239
+ high: "high";
1240
+ critical: "critical";
1241
+ }>>;
1242
+ actorType: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1243
+ principalType: import("zod").ZodEnum<{
1244
+ user: "user";
1245
+ api_key: "api_key";
1246
+ agent: "agent";
1247
+ workflow: "workflow";
1248
+ system: "system";
1249
+ }>;
1250
+ principalId: import("zod").ZodString;
1251
+ principalSubtype: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1252
+ sessionId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1253
+ apiTokenId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1254
+ internalRequest: import("zod").ZodDefault<import("zod").ZodBoolean>;
1255
+ delegatedByPrincipalType: import("zod").ZodOptional<import("zod").ZodEnum<{
1256
+ user: "user";
1257
+ api_key: "api_key";
1258
+ agent: "agent";
1259
+ workflow: "workflow";
1260
+ system: "system";
1261
+ }>>;
1262
+ delegatedByPrincipalId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1263
+ delegationId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1264
+ callerType: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1265
+ organizationId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1266
+ routeOrToolName: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1267
+ workflowRunId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1268
+ workflowStepId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1269
+ correlationId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1270
+ idempotencyScope: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1271
+ idempotencyKey: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1272
+ idempotencyFingerprint: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1273
+ targetType: import("zod").ZodString;
1274
+ targetId: import("zod").ZodString;
1275
+ capabilityId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1276
+ capabilityVersion: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1277
+ authorizationSource: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1278
+ approvalId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1279
+ amendsActionId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1280
+ mutationDetail: import("zod").ZodOptional<import("zod").ZodObject<{
1281
+ commandInputRef: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1282
+ commandResultRef: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1283
+ summary: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1284
+ reversalKind: import("zod").ZodDefault<import("zod").ZodEnum<{
1285
+ compensate: "compensate";
1286
+ none: "none";
1287
+ revert: "revert";
1288
+ domain_command: "domain_command";
1289
+ }>>;
1290
+ reversalCommandId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1291
+ reversalCommandVersion: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1292
+ reversalArgsRef: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1293
+ }, import("zod/v4/core").$strip>>;
1294
+ }, import("zod/v4/core").$strip>;
1295
+ projection: import("zod").ZodOptional<import("zod").ZodObject<{
1296
+ reversalState: import("zod").ZodOptional<import("zod").ZodEnum<{
1297
+ requested: "requested";
1298
+ failed: "failed";
1299
+ expired: "expired";
1300
+ not_reversible: "not_reversible";
1301
+ available: "available";
1302
+ running: "running";
1303
+ completed: "completed";
1304
+ }>>;
1305
+ reversalOutcome: import("zod").ZodOptional<import("zod").ZodEnum<{
1306
+ failed: "failed";
1307
+ full: "full";
1308
+ partial: "partial";
1309
+ }>>;
1310
+ }, import("zod/v4/core").$strip>>;
1311
+ }, import("zod/v4/core").$strip>;
1312
+ requestActionApprovalBodySchema: import("zod").ZodPipe<import("zod").ZodObject<{
1313
+ requestedAction: import("zod").ZodObject<{
1314
+ actionName: import("zod").ZodString;
1315
+ actionVersion: import("zod").ZodDefault<import("zod").ZodString>;
1316
+ actionKind: import("zod").ZodEnum<{
1317
+ read: "read";
1318
+ create: "create";
1319
+ update: "update";
1320
+ delete: "delete";
1321
+ execute: "execute";
1322
+ approve: "approve";
1323
+ reject: "reject";
1324
+ reverse: "reverse";
1325
+ compensate: "compensate";
1326
+ duplicate: "duplicate";
1327
+ }>;
1328
+ evaluatedRisk: import("zod").ZodEnum<{
1329
+ low: "low";
1330
+ medium: "medium";
1331
+ high: "high";
1332
+ critical: "critical";
1333
+ }>;
1334
+ actorType: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1335
+ principalType: import("zod").ZodEnum<{
1336
+ user: "user";
1337
+ api_key: "api_key";
1338
+ agent: "agent";
1339
+ workflow: "workflow";
1340
+ system: "system";
1341
+ }>;
1342
+ principalId: import("zod").ZodString;
1343
+ principalSubtype: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1344
+ sessionId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1345
+ apiTokenId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1346
+ internalRequest: import("zod").ZodDefault<import("zod").ZodBoolean>;
1347
+ delegatedByPrincipalType: import("zod").ZodOptional<import("zod").ZodEnum<{
1348
+ user: "user";
1349
+ api_key: "api_key";
1350
+ agent: "agent";
1351
+ workflow: "workflow";
1352
+ system: "system";
1353
+ }>>;
1354
+ delegatedByPrincipalId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1355
+ delegationId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1356
+ callerType: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1357
+ organizationId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1358
+ routeOrToolName: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1359
+ workflowRunId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1360
+ workflowStepId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1361
+ correlationId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1362
+ causationActionId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1363
+ idempotencyScope: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1364
+ idempotencyKey: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1365
+ idempotencyFingerprint: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1366
+ targetType: import("zod").ZodString;
1367
+ targetId: import("zod").ZodString;
1368
+ capabilityId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1369
+ capabilityVersion: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1370
+ authorizationSource: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1371
+ amendsActionId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1372
+ }, import("zod/v4/core").$strip>;
1373
+ approval: import("zod").ZodObject<{
1374
+ requestedByPrincipalId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1375
+ assignedToPrincipalId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1376
+ delegatedFromPrincipalId: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1377
+ policyName: import("zod").ZodString;
1378
+ policyVersion: import("zod").ZodString;
1379
+ targetSnapshotRef: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1380
+ riskSnapshot: import("zod").ZodOptional<import("zod").ZodEnum<{
1381
+ low: "low";
1382
+ medium: "medium";
1383
+ high: "high";
1384
+ critical: "critical";
1385
+ }>>;
1386
+ reasonCode: import("zod").ZodPipe<import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodTransform<string | null, string | undefined>>;
1387
+ expiresAt: import("zod").ZodOptional<import("zod").ZodString>;
1388
+ }, import("zod/v4/core").$strip>;
1389
+ }, import("zod/v4/core").$strip>, import("zod").ZodTransform<{
1390
+ approval: {
1391
+ riskSnapshot: "low" | "medium" | "high" | "critical" | null;
1392
+ expiresAt: Date | null;
1393
+ requestedByPrincipalId: string | null;
1394
+ assignedToPrincipalId: string | null;
1395
+ delegatedFromPrincipalId: string | null;
1396
+ policyName: string;
1397
+ policyVersion: string;
1398
+ targetSnapshotRef: string | null;
1399
+ reasonCode: string | null;
1400
+ };
1401
+ requestedAction: {
1402
+ actionName: string;
1403
+ actionVersion: string;
1404
+ actionKind: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate";
1405
+ evaluatedRisk: "low" | "medium" | "high" | "critical";
1406
+ actorType: string | null;
1407
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
1408
+ principalId: string;
1409
+ principalSubtype: string | null;
1410
+ sessionId: string | null;
1411
+ apiTokenId: string | null;
1412
+ internalRequest: boolean;
1413
+ delegatedByPrincipalId: string | null;
1414
+ delegationId: string | null;
1415
+ callerType: string | null;
1416
+ organizationId: string | null;
1417
+ routeOrToolName: string | null;
1418
+ workflowRunId: string | null;
1419
+ workflowStepId: string | null;
1420
+ correlationId: string | null;
1421
+ causationActionId: string | null;
1422
+ idempotencyScope: string | null;
1423
+ idempotencyKey: string | null;
1424
+ idempotencyFingerprint: string | null;
1425
+ targetType: string;
1426
+ targetId: string;
1427
+ capabilityId: string | null;
1428
+ capabilityVersion: string | null;
1429
+ authorizationSource: string | null;
1430
+ amendsActionId: string | null;
1431
+ delegatedByPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
1432
+ };
1433
+ }, {
1434
+ requestedAction: {
1435
+ actionName: string;
1436
+ actionVersion: string;
1437
+ actionKind: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate";
1438
+ evaluatedRisk: "low" | "medium" | "high" | "critical";
1439
+ actorType: string | null;
1440
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
1441
+ principalId: string;
1442
+ principalSubtype: string | null;
1443
+ sessionId: string | null;
1444
+ apiTokenId: string | null;
1445
+ internalRequest: boolean;
1446
+ delegatedByPrincipalId: string | null;
1447
+ delegationId: string | null;
1448
+ callerType: string | null;
1449
+ organizationId: string | null;
1450
+ routeOrToolName: string | null;
1451
+ workflowRunId: string | null;
1452
+ workflowStepId: string | null;
1453
+ correlationId: string | null;
1454
+ causationActionId: string | null;
1455
+ idempotencyScope: string | null;
1456
+ idempotencyKey: string | null;
1457
+ idempotencyFingerprint: string | null;
1458
+ targetType: string;
1459
+ targetId: string;
1460
+ capabilityId: string | null;
1461
+ capabilityVersion: string | null;
1462
+ authorizationSource: string | null;
1463
+ amendsActionId: string | null;
1464
+ delegatedByPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
1465
+ };
1466
+ approval: {
1467
+ requestedByPrincipalId: string | null;
1468
+ assignedToPrincipalId: string | null;
1469
+ delegatedFromPrincipalId: string | null;
1470
+ policyName: string;
1471
+ policyVersion: string;
1472
+ targetSnapshotRef: string | null;
1473
+ reasonCode: string | null;
1474
+ riskSnapshot?: "low" | "medium" | "high" | "critical" | undefined;
1475
+ expiresAt?: string | undefined;
1476
+ };
1477
+ }>>;
1478
+ actionDelegationListQuerySchema: import("zod").ZodPipe<import("zod").ZodObject<{
1479
+ rootPrincipalType: import("zod").ZodOptional<import("zod").ZodEnum<{
1480
+ user: "user";
1481
+ api_key: "api_key";
1482
+ agent: "agent";
1483
+ workflow: "workflow";
1484
+ system: "system";
1485
+ }>>;
1486
+ rootPrincipalId: import("zod").ZodOptional<import("zod").ZodString>;
1487
+ parentPrincipalType: import("zod").ZodOptional<import("zod").ZodEnum<{
1488
+ user: "user";
1489
+ api_key: "api_key";
1490
+ agent: "agent";
1491
+ workflow: "workflow";
1492
+ system: "system";
1493
+ }>>;
1494
+ parentPrincipalId: import("zod").ZodOptional<import("zod").ZodString>;
1495
+ childPrincipalType: import("zod").ZodOptional<import("zod").ZodEnum<{
1496
+ user: "user";
1497
+ api_key: "api_key";
1498
+ agent: "agent";
1499
+ workflow: "workflow";
1500
+ system: "system";
1501
+ }>>;
1502
+ childPrincipalId: import("zod").ZodOptional<import("zod").ZodString>;
1503
+ grantSource: import("zod").ZodOptional<import("zod").ZodString>;
1504
+ capabilityScopeRef: import("zod").ZodOptional<import("zod").ZodString>;
1505
+ budgetScopeRef: import("zod").ZodOptional<import("zod").ZodString>;
1506
+ expiresAtFrom: import("zod").ZodOptional<import("zod").ZodString>;
1507
+ expiresAtTo: import("zod").ZodOptional<import("zod").ZodString>;
1508
+ createdAtFrom: import("zod").ZodOptional<import("zod").ZodString>;
1509
+ createdAtTo: import("zod").ZodOptional<import("zod").ZodString>;
1510
+ cursorCreatedAt: import("zod").ZodOptional<import("zod").ZodString>;
1511
+ cursorId: import("zod").ZodOptional<import("zod").ZodString>;
1512
+ limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
1513
+ }, import("zod/v4/core").$strip>, import("zod").ZodTransform<{
1514
+ expiresAtFrom: Date | undefined;
1515
+ expiresAtTo: Date | undefined;
1516
+ createdAtFrom: Date | undefined;
1517
+ createdAtTo: Date | undefined;
1518
+ cursor: {
1519
+ createdAt: string;
1520
+ id: string;
1521
+ } | undefined;
1522
+ rootPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
1523
+ rootPrincipalId?: string | undefined;
1524
+ parentPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
1525
+ parentPrincipalId?: string | undefined;
1526
+ childPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
1527
+ childPrincipalId?: string | undefined;
1528
+ grantSource?: string | undefined;
1529
+ capabilityScopeRef?: string | undefined;
1530
+ budgetScopeRef?: string | undefined;
1531
+ limit?: number | undefined;
1532
+ }, {
1533
+ rootPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
1534
+ rootPrincipalId?: string | undefined;
1535
+ parentPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
1536
+ parentPrincipalId?: string | undefined;
1537
+ childPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
1538
+ childPrincipalId?: string | undefined;
1539
+ grantSource?: string | undefined;
1540
+ capabilityScopeRef?: string | undefined;
1541
+ budgetScopeRef?: string | undefined;
1542
+ expiresAtFrom?: string | undefined;
1543
+ expiresAtTo?: string | undefined;
1544
+ createdAtFrom?: string | undefined;
1545
+ createdAtTo?: string | undefined;
1546
+ cursorCreatedAt?: string | undefined;
1547
+ cursorId?: string | undefined;
1548
+ limit?: number | undefined;
1549
+ }>>;
1550
+ actionLedgerRelayOutboxListQuerySchema: import("zod").ZodPipe<import("zod").ZodObject<{
1551
+ actionId: import("zod").ZodOptional<import("zod").ZodString>;
1552
+ organizationId: import("zod").ZodOptional<import("zod").ZodString>;
1553
+ relayStatus: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
1554
+ succeeded: "succeeded";
1555
+ failed: "failed";
1556
+ pending: "pending";
1557
+ processing: "processing";
1558
+ dead_letter: "dead_letter";
1559
+ }>>>>;
1560
+ dueBefore: import("zod").ZodOptional<import("zod").ZodString>;
1561
+ createdAtFrom: import("zod").ZodOptional<import("zod").ZodString>;
1562
+ createdAtTo: import("zod").ZodOptional<import("zod").ZodString>;
1563
+ processedAtFrom: import("zod").ZodOptional<import("zod").ZodString>;
1564
+ processedAtTo: import("zod").ZodOptional<import("zod").ZodString>;
1565
+ cursorCreatedAt: import("zod").ZodOptional<import("zod").ZodString>;
1566
+ cursorId: import("zod").ZodOptional<import("zod").ZodString>;
1567
+ limit: import("zod").ZodOptional<import("zod").ZodCoercedNumber<unknown>>;
1568
+ }, import("zod/v4/core").$strip>, import("zod").ZodTransform<{
1569
+ dueBefore: Date | undefined;
1570
+ createdAtFrom: Date | undefined;
1571
+ createdAtTo: Date | undefined;
1572
+ processedAtFrom: Date | undefined;
1573
+ processedAtTo: Date | undefined;
1574
+ cursor: {
1575
+ createdAt: string;
1576
+ id: string;
1577
+ } | undefined;
1578
+ actionId?: string | undefined;
1579
+ organizationId?: string | undefined;
1580
+ relayStatus?: ("succeeded" | "failed" | "pending" | "processing" | "dead_letter")[] | undefined;
1581
+ limit?: number | undefined;
1582
+ }, {
1583
+ actionId?: string | undefined;
1584
+ organizationId?: string | undefined;
1585
+ relayStatus?: ("succeeded" | "failed" | "pending" | "processing" | "dead_letter")[] | undefined;
1586
+ dueBefore?: string | undefined;
1587
+ createdAtFrom?: string | undefined;
1588
+ createdAtTo?: string | undefined;
1589
+ processedAtFrom?: string | undefined;
1590
+ processedAtTo?: string | undefined;
1591
+ cursorCreatedAt?: string | undefined;
1592
+ cursorId?: string | undefined;
1593
+ limit?: number | undefined;
1594
+ }>>;
1595
+ serializeActionApproval: typeof serializeActionApproval;
1596
+ serializeActionApprovalDetail: typeof serializeActionApprovalDetail;
1597
+ serializeActionDelegation: typeof serializeActionDelegation;
1598
+ serializeActionLedgerEntry: typeof serializeActionLedgerEntry;
1599
+ serializeActionLedgerEntryDetail: typeof serializeActionLedgerEntryDetail;
1600
+ };
1601
+ export {};
1602
+ //# sourceMappingURL=routes.d.ts.map