@odingard/guardian-sdk 0.0.0-stage → 0.1.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.
@@ -0,0 +1,1030 @@
1
+ import { z } from "zod";
2
+ export declare const Sha256DigestSchema: z.ZodString;
3
+ export declare const EvidenceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4
+ eventType: z.ZodLiteral<"AUTHENTICATION_RECORDED">;
5
+ payload: z.ZodObject<{
6
+ interface: z.ZodEnum<{
7
+ internal: "internal";
8
+ mcp: "mcp";
9
+ rest: "rest";
10
+ }>;
11
+ outcome: z.ZodEnum<{
12
+ authenticated: "authenticated";
13
+ rejected: "rejected";
14
+ }>;
15
+ credentialReference: z.ZodString;
16
+ }, z.core.$strict>;
17
+ }, z.core.$strict>, z.ZodObject<{
18
+ eventType: z.ZodLiteral<"ADAPTER_AUTHENTICATION_RECORDED">;
19
+ payload: z.ZodObject<{
20
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
21
+ outcome: z.ZodLiteral<"authenticated">;
22
+ credentialReference: z.ZodString;
23
+ }, z.core.$strict>;
24
+ }, z.core.$strict>, z.ZodObject<{
25
+ eventType: z.ZodLiteral<"REQUEST_RECEIVED">;
26
+ payload: z.ZodObject<{
27
+ actionDigest: z.ZodString;
28
+ }, z.core.$strict>;
29
+ }, z.core.$strict>, z.ZodObject<{
30
+ eventType: z.ZodLiteral<"ACTION_NORMALIZED">;
31
+ payload: z.ZodObject<{
32
+ actionDigest: z.ZodString;
33
+ }, z.core.$strict>;
34
+ }, z.core.$strict>, z.ZodObject<{
35
+ eventType: z.ZodLiteral<"DECISION_RECORDED">;
36
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
37
+ actionDigest: z.ZodString;
38
+ actionDecisionDigest: z.ZodString;
39
+ decision: z.ZodLiteral<"ALLOW">;
40
+ reasonCode: z.ZodLiteral<"AUTHORIZED">;
41
+ }, z.core.$strict>, z.ZodObject<{
42
+ actionDigest: z.ZodString;
43
+ actionDecisionDigest: z.ZodString;
44
+ decision: z.ZodLiteral<"ASK">;
45
+ reasonCode: z.ZodLiteral<"APPROVAL_REQUIRED">;
46
+ }, z.core.$strict>, z.ZodObject<{
47
+ actionDigest: z.ZodString;
48
+ actionDecisionDigest: z.ZodString;
49
+ decision: z.ZodLiteral<"DENY">;
50
+ reasonCode: z.ZodEnum<{
51
+ MALFORMED_INPUT: "MALFORMED_INPUT";
52
+ TENANT_MISMATCH: "TENANT_MISMATCH";
53
+ PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
54
+ PRINCIPAL_NOT_ACTIVE: "PRINCIPAL_NOT_ACTIVE";
55
+ AGENT_TENANT_MISMATCH: "AGENT_TENANT_MISMATCH";
56
+ AGENT_OWNER_MISMATCH: "AGENT_OWNER_MISMATCH";
57
+ AGENT_MISMATCH: "AGENT_MISMATCH";
58
+ AGENT_NOT_ACTIVE: "AGENT_NOT_ACTIVE";
59
+ INTERFACE_NOT_ALLOWED: "INTERFACE_NOT_ALLOWED";
60
+ AUTHORITY_CHAIN_MISSING: "AUTHORITY_CHAIN_MISSING";
61
+ DUPLICATE_GRANT_ID: "DUPLICATE_GRANT_ID";
62
+ GRANT_TENANT_MISMATCH: "GRANT_TENANT_MISMATCH";
63
+ GRANT_PRINCIPAL_MISMATCH: "GRANT_PRINCIPAL_MISMATCH";
64
+ GRANT_AGENT_MISMATCH: "GRANT_AGENT_MISMATCH";
65
+ GRANT_NOT_ACTIVE: "GRANT_NOT_ACTIVE";
66
+ GRANT_REVOKED: "GRANT_REVOKED";
67
+ GRANT_NOT_YET_VALID: "GRANT_NOT_YET_VALID";
68
+ GRANT_EXPIRED: "GRANT_EXPIRED";
69
+ INVALID_PARENT_LINK: "INVALID_PARENT_LINK";
70
+ DELEGATION_NOT_ALLOWED: "DELEGATION_NOT_ALLOWED";
71
+ AUTHORITY_AMPLIFICATION: "AUTHORITY_AMPLIFICATION";
72
+ ACTION_NOT_ALLOWED: "ACTION_NOT_ALLOWED";
73
+ RESOURCE_NOT_ALLOWED: "RESOURCE_NOT_ALLOWED";
74
+ ADAPTER_NOT_ALLOWED: "ADAPTER_NOT_ALLOWED";
75
+ VALUE_LIMIT_EXCEEDED: "VALUE_LIMIT_EXCEEDED";
76
+ USE_LIMIT_EXCEEDED: "USE_LIMIT_EXCEEDED";
77
+ MERCHANT_NOT_ALLOWED: "MERCHANT_NOT_ALLOWED";
78
+ CATEGORY_NOT_ALLOWED: "CATEGORY_NOT_ALLOWED";
79
+ RECURRENCE_NOT_ALLOWED: "RECURRENCE_NOT_ALLOWED";
80
+ BUDGET_NOT_FOUND: "BUDGET_NOT_FOUND";
81
+ BUDGET_SCOPE_MISMATCH: "BUDGET_SCOPE_MISMATCH";
82
+ BUDGET_NOT_ACTIVE: "BUDGET_NOT_ACTIVE";
83
+ BUDGET_EXPIRED: "BUDGET_EXPIRED";
84
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
85
+ TRANSACTION_LIMIT_EXCEEDED: "TRANSACTION_LIMIT_EXCEEDED";
86
+ }>;
87
+ }, z.core.$strict>], "decision">;
88
+ }, z.core.$strict>, z.ZodObject<{
89
+ eventType: z.ZodLiteral<"APPROVAL_STATE_REFERENCED">;
90
+ payload: z.ZodObject<{
91
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
92
+ version: z.ZodNumber;
93
+ state: z.ZodEnum<{
94
+ revoked: "revoked";
95
+ pending: "pending";
96
+ approved: "approved";
97
+ denied: "denied";
98
+ expired: "expired";
99
+ superseded: "superseded";
100
+ consumed: "consumed";
101
+ }>;
102
+ approvalDigest: z.ZodString;
103
+ }, z.core.$strict>;
104
+ }, z.core.$strict>, z.ZodObject<{
105
+ eventType: z.ZodLiteral<"APPROVAL_PRESENTED">;
106
+ payload: z.ZodObject<{
107
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
108
+ presentationDigest: z.ZodString;
109
+ viewerReference: z.ZodString;
110
+ }, z.core.$strict>;
111
+ }, z.core.$strict>, z.ZodObject<{
112
+ eventType: z.ZodLiteral<"APPROVAL_DECISION_RECORDED">;
113
+ payload: z.ZodObject<{
114
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
115
+ version: z.ZodNumber;
116
+ decision: z.ZodEnum<{
117
+ deny: "deny";
118
+ approve: "approve";
119
+ revoke: "revoke";
120
+ }>;
121
+ actorPrincipalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
122
+ actorReference: z.ZodString;
123
+ presentationDigest: z.ZodString;
124
+ }, z.core.$strict>;
125
+ }, z.core.$strict>, z.ZodObject<{
126
+ eventType: z.ZodLiteral<"APPROVAL_REJECTED">;
127
+ payload: z.ZodObject<{
128
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
129
+ reasonCode: z.ZodString;
130
+ }, z.core.$strict>;
131
+ }, z.core.$strict>, z.ZodObject<{
132
+ eventType: z.ZodLiteral<"CAPABILITY_STATE_REFERENCED">;
133
+ payload: z.ZodObject<{
134
+ actionDigest: z.ZodString;
135
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
136
+ state: z.ZodEnum<{
137
+ revoked: "revoked";
138
+ expired: "expired";
139
+ issued: "issued";
140
+ used: "used";
141
+ }>;
142
+ capabilityDigest: z.ZodString;
143
+ }, z.core.$strict>;
144
+ }, z.core.$strict>, z.ZodObject<{
145
+ eventType: z.ZodLiteral<"CAPABILITY_REJECTED">;
146
+ payload: z.ZodObject<{
147
+ actionDigest: z.ZodString;
148
+ reasonCode: z.ZodString;
149
+ }, z.core.$strict>;
150
+ }, z.core.$strict>, z.ZodObject<{
151
+ eventType: z.ZodLiteral<"EXECUTION_ATTEMPTED">;
152
+ payload: z.ZodObject<{
153
+ actionDigest: z.ZodString;
154
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
155
+ attemptReference: z.ZodString;
156
+ idempotencyDigest: z.ZodString;
157
+ }, z.core.$strict>;
158
+ }, z.core.$strict>, z.ZodObject<{
159
+ eventType: z.ZodLiteral<"EXECUTION_ABORTED">;
160
+ payload: z.ZodObject<{
161
+ actionDigest: z.ZodString;
162
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
163
+ attemptReference: z.ZodString;
164
+ reasonCode: z.ZodString;
165
+ }, z.core.$strict>;
166
+ }, z.core.$strict>, z.ZodObject<{
167
+ eventType: z.ZodLiteral<"EFFECT_PREPARED">;
168
+ payload: z.ZodObject<{
169
+ actionDigest: z.ZodString;
170
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
171
+ attemptReference: z.ZodString;
172
+ preparedDigest: z.ZodString;
173
+ }, z.core.$strict>;
174
+ }, z.core.$strict>, z.ZodObject<{
175
+ eventType: z.ZodLiteral<"EFFECT_COMMIT_AUTHORIZED">;
176
+ payload: z.ZodObject<{
177
+ actionDigest: z.ZodString;
178
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
179
+ attemptReference: z.ZodString;
180
+ actionDecisionDigest: z.ZodString;
181
+ }, z.core.$strict>;
182
+ }, z.core.$strict>, z.ZodObject<{
183
+ eventType: z.ZodLiteral<"EFFECT_OUTCOME_UNKNOWN">;
184
+ payload: z.ZodObject<{
185
+ actionDigest: z.ZodString;
186
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
187
+ attemptReference: z.ZodString;
188
+ reasonCode: z.ZodString;
189
+ }, z.core.$strict>;
190
+ }, z.core.$strict>, z.ZodObject<{
191
+ eventType: z.ZodLiteral<"EFFECT_UNRESOLVED">;
192
+ payload: z.ZodObject<{
193
+ actionDigest: z.ZodString;
194
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
195
+ attemptReference: z.ZodString;
196
+ }, z.core.$strict>;
197
+ }, z.core.$strict>, z.ZodObject<{
198
+ eventType: z.ZodLiteral<"EFFECT_VERIFIED">;
199
+ payload: z.ZodObject<{
200
+ actionDigest: z.ZodString;
201
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
202
+ attemptReference: z.ZodString;
203
+ effectDigest: z.ZodString;
204
+ }, z.core.$strict>;
205
+ }, z.core.$strict>, z.ZodObject<{
206
+ eventType: z.ZodLiteral<"EXECUTION_FAILED">;
207
+ payload: z.ZodObject<{
208
+ actionDigest: z.ZodString;
209
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
210
+ attemptReference: z.ZodString;
211
+ failureCode: z.ZodString;
212
+ failureDigest: z.ZodOptional<z.ZodString>;
213
+ }, z.core.$strict>;
214
+ }, z.core.$strict>, z.ZodObject<{
215
+ eventType: z.ZodLiteral<"AUTHORITY_REVOKED">;
216
+ payload: z.ZodObject<{
217
+ grantId: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
218
+ grantVersion: z.ZodNumber;
219
+ revocationDigest: z.ZodString;
220
+ }, z.core.$strict>;
221
+ }, z.core.$strict>], "eventType">;
222
+ export declare const EvidenceChainContextSchema: z.ZodObject<{
223
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
224
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
225
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
226
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
227
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
228
+ }, z.core.$strict>;
229
+ export declare const EvidenceEventDraftSchema: z.ZodObject<{
230
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
231
+ eventType: z.ZodLiteral<"AUTHENTICATION_RECORDED">;
232
+ payload: z.ZodObject<{
233
+ interface: z.ZodEnum<{
234
+ internal: "internal";
235
+ mcp: "mcp";
236
+ rest: "rest";
237
+ }>;
238
+ outcome: z.ZodEnum<{
239
+ authenticated: "authenticated";
240
+ rejected: "rejected";
241
+ }>;
242
+ credentialReference: z.ZodString;
243
+ }, z.core.$strict>;
244
+ }, z.core.$strict>, z.ZodObject<{
245
+ eventType: z.ZodLiteral<"ADAPTER_AUTHENTICATION_RECORDED">;
246
+ payload: z.ZodObject<{
247
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
248
+ outcome: z.ZodLiteral<"authenticated">;
249
+ credentialReference: z.ZodString;
250
+ }, z.core.$strict>;
251
+ }, z.core.$strict>, z.ZodObject<{
252
+ eventType: z.ZodLiteral<"REQUEST_RECEIVED">;
253
+ payload: z.ZodObject<{
254
+ actionDigest: z.ZodString;
255
+ }, z.core.$strict>;
256
+ }, z.core.$strict>, z.ZodObject<{
257
+ eventType: z.ZodLiteral<"ACTION_NORMALIZED">;
258
+ payload: z.ZodObject<{
259
+ actionDigest: z.ZodString;
260
+ }, z.core.$strict>;
261
+ }, z.core.$strict>, z.ZodObject<{
262
+ eventType: z.ZodLiteral<"DECISION_RECORDED">;
263
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
264
+ actionDigest: z.ZodString;
265
+ actionDecisionDigest: z.ZodString;
266
+ decision: z.ZodLiteral<"ALLOW">;
267
+ reasonCode: z.ZodLiteral<"AUTHORIZED">;
268
+ }, z.core.$strict>, z.ZodObject<{
269
+ actionDigest: z.ZodString;
270
+ actionDecisionDigest: z.ZodString;
271
+ decision: z.ZodLiteral<"ASK">;
272
+ reasonCode: z.ZodLiteral<"APPROVAL_REQUIRED">;
273
+ }, z.core.$strict>, z.ZodObject<{
274
+ actionDigest: z.ZodString;
275
+ actionDecisionDigest: z.ZodString;
276
+ decision: z.ZodLiteral<"DENY">;
277
+ reasonCode: z.ZodEnum<{
278
+ MALFORMED_INPUT: "MALFORMED_INPUT";
279
+ TENANT_MISMATCH: "TENANT_MISMATCH";
280
+ PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
281
+ PRINCIPAL_NOT_ACTIVE: "PRINCIPAL_NOT_ACTIVE";
282
+ AGENT_TENANT_MISMATCH: "AGENT_TENANT_MISMATCH";
283
+ AGENT_OWNER_MISMATCH: "AGENT_OWNER_MISMATCH";
284
+ AGENT_MISMATCH: "AGENT_MISMATCH";
285
+ AGENT_NOT_ACTIVE: "AGENT_NOT_ACTIVE";
286
+ INTERFACE_NOT_ALLOWED: "INTERFACE_NOT_ALLOWED";
287
+ AUTHORITY_CHAIN_MISSING: "AUTHORITY_CHAIN_MISSING";
288
+ DUPLICATE_GRANT_ID: "DUPLICATE_GRANT_ID";
289
+ GRANT_TENANT_MISMATCH: "GRANT_TENANT_MISMATCH";
290
+ GRANT_PRINCIPAL_MISMATCH: "GRANT_PRINCIPAL_MISMATCH";
291
+ GRANT_AGENT_MISMATCH: "GRANT_AGENT_MISMATCH";
292
+ GRANT_NOT_ACTIVE: "GRANT_NOT_ACTIVE";
293
+ GRANT_REVOKED: "GRANT_REVOKED";
294
+ GRANT_NOT_YET_VALID: "GRANT_NOT_YET_VALID";
295
+ GRANT_EXPIRED: "GRANT_EXPIRED";
296
+ INVALID_PARENT_LINK: "INVALID_PARENT_LINK";
297
+ DELEGATION_NOT_ALLOWED: "DELEGATION_NOT_ALLOWED";
298
+ AUTHORITY_AMPLIFICATION: "AUTHORITY_AMPLIFICATION";
299
+ ACTION_NOT_ALLOWED: "ACTION_NOT_ALLOWED";
300
+ RESOURCE_NOT_ALLOWED: "RESOURCE_NOT_ALLOWED";
301
+ ADAPTER_NOT_ALLOWED: "ADAPTER_NOT_ALLOWED";
302
+ VALUE_LIMIT_EXCEEDED: "VALUE_LIMIT_EXCEEDED";
303
+ USE_LIMIT_EXCEEDED: "USE_LIMIT_EXCEEDED";
304
+ MERCHANT_NOT_ALLOWED: "MERCHANT_NOT_ALLOWED";
305
+ CATEGORY_NOT_ALLOWED: "CATEGORY_NOT_ALLOWED";
306
+ RECURRENCE_NOT_ALLOWED: "RECURRENCE_NOT_ALLOWED";
307
+ BUDGET_NOT_FOUND: "BUDGET_NOT_FOUND";
308
+ BUDGET_SCOPE_MISMATCH: "BUDGET_SCOPE_MISMATCH";
309
+ BUDGET_NOT_ACTIVE: "BUDGET_NOT_ACTIVE";
310
+ BUDGET_EXPIRED: "BUDGET_EXPIRED";
311
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
312
+ TRANSACTION_LIMIT_EXCEEDED: "TRANSACTION_LIMIT_EXCEEDED";
313
+ }>;
314
+ }, z.core.$strict>], "decision">;
315
+ }, z.core.$strict>, z.ZodObject<{
316
+ eventType: z.ZodLiteral<"APPROVAL_STATE_REFERENCED">;
317
+ payload: z.ZodObject<{
318
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
319
+ version: z.ZodNumber;
320
+ state: z.ZodEnum<{
321
+ revoked: "revoked";
322
+ pending: "pending";
323
+ approved: "approved";
324
+ denied: "denied";
325
+ expired: "expired";
326
+ superseded: "superseded";
327
+ consumed: "consumed";
328
+ }>;
329
+ approvalDigest: z.ZodString;
330
+ }, z.core.$strict>;
331
+ }, z.core.$strict>, z.ZodObject<{
332
+ eventType: z.ZodLiteral<"APPROVAL_PRESENTED">;
333
+ payload: z.ZodObject<{
334
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
335
+ presentationDigest: z.ZodString;
336
+ viewerReference: z.ZodString;
337
+ }, z.core.$strict>;
338
+ }, z.core.$strict>, z.ZodObject<{
339
+ eventType: z.ZodLiteral<"APPROVAL_DECISION_RECORDED">;
340
+ payload: z.ZodObject<{
341
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
342
+ version: z.ZodNumber;
343
+ decision: z.ZodEnum<{
344
+ deny: "deny";
345
+ approve: "approve";
346
+ revoke: "revoke";
347
+ }>;
348
+ actorPrincipalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
349
+ actorReference: z.ZodString;
350
+ presentationDigest: z.ZodString;
351
+ }, z.core.$strict>;
352
+ }, z.core.$strict>, z.ZodObject<{
353
+ eventType: z.ZodLiteral<"APPROVAL_REJECTED">;
354
+ payload: z.ZodObject<{
355
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
356
+ reasonCode: z.ZodString;
357
+ }, z.core.$strict>;
358
+ }, z.core.$strict>, z.ZodObject<{
359
+ eventType: z.ZodLiteral<"CAPABILITY_STATE_REFERENCED">;
360
+ payload: z.ZodObject<{
361
+ actionDigest: z.ZodString;
362
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
363
+ state: z.ZodEnum<{
364
+ revoked: "revoked";
365
+ expired: "expired";
366
+ issued: "issued";
367
+ used: "used";
368
+ }>;
369
+ capabilityDigest: z.ZodString;
370
+ }, z.core.$strict>;
371
+ }, z.core.$strict>, z.ZodObject<{
372
+ eventType: z.ZodLiteral<"CAPABILITY_REJECTED">;
373
+ payload: z.ZodObject<{
374
+ actionDigest: z.ZodString;
375
+ reasonCode: z.ZodString;
376
+ }, z.core.$strict>;
377
+ }, z.core.$strict>, z.ZodObject<{
378
+ eventType: z.ZodLiteral<"EXECUTION_ATTEMPTED">;
379
+ payload: z.ZodObject<{
380
+ actionDigest: z.ZodString;
381
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
382
+ attemptReference: z.ZodString;
383
+ idempotencyDigest: z.ZodString;
384
+ }, z.core.$strict>;
385
+ }, z.core.$strict>, z.ZodObject<{
386
+ eventType: z.ZodLiteral<"EXECUTION_ABORTED">;
387
+ payload: z.ZodObject<{
388
+ actionDigest: z.ZodString;
389
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
390
+ attemptReference: z.ZodString;
391
+ reasonCode: z.ZodString;
392
+ }, z.core.$strict>;
393
+ }, z.core.$strict>, z.ZodObject<{
394
+ eventType: z.ZodLiteral<"EFFECT_PREPARED">;
395
+ payload: z.ZodObject<{
396
+ actionDigest: z.ZodString;
397
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
398
+ attemptReference: z.ZodString;
399
+ preparedDigest: z.ZodString;
400
+ }, z.core.$strict>;
401
+ }, z.core.$strict>, z.ZodObject<{
402
+ eventType: z.ZodLiteral<"EFFECT_COMMIT_AUTHORIZED">;
403
+ payload: z.ZodObject<{
404
+ actionDigest: z.ZodString;
405
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
406
+ attemptReference: z.ZodString;
407
+ actionDecisionDigest: z.ZodString;
408
+ }, z.core.$strict>;
409
+ }, z.core.$strict>, z.ZodObject<{
410
+ eventType: z.ZodLiteral<"EFFECT_OUTCOME_UNKNOWN">;
411
+ payload: z.ZodObject<{
412
+ actionDigest: z.ZodString;
413
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
414
+ attemptReference: z.ZodString;
415
+ reasonCode: z.ZodString;
416
+ }, z.core.$strict>;
417
+ }, z.core.$strict>, z.ZodObject<{
418
+ eventType: z.ZodLiteral<"EFFECT_UNRESOLVED">;
419
+ payload: z.ZodObject<{
420
+ actionDigest: z.ZodString;
421
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
422
+ attemptReference: z.ZodString;
423
+ }, z.core.$strict>;
424
+ }, z.core.$strict>, z.ZodObject<{
425
+ eventType: z.ZodLiteral<"EFFECT_VERIFIED">;
426
+ payload: z.ZodObject<{
427
+ actionDigest: z.ZodString;
428
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
429
+ attemptReference: z.ZodString;
430
+ effectDigest: z.ZodString;
431
+ }, z.core.$strict>;
432
+ }, z.core.$strict>, z.ZodObject<{
433
+ eventType: z.ZodLiteral<"EXECUTION_FAILED">;
434
+ payload: z.ZodObject<{
435
+ actionDigest: z.ZodString;
436
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
437
+ attemptReference: z.ZodString;
438
+ failureCode: z.ZodString;
439
+ failureDigest: z.ZodOptional<z.ZodString>;
440
+ }, z.core.$strict>;
441
+ }, z.core.$strict>, z.ZodObject<{
442
+ eventType: z.ZodLiteral<"AUTHORITY_REVOKED">;
443
+ payload: z.ZodObject<{
444
+ grantId: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
445
+ grantVersion: z.ZodNumber;
446
+ revocationDigest: z.ZodString;
447
+ }, z.core.$strict>;
448
+ }, z.core.$strict>], "eventType">;
449
+ schemaVersion: z.ZodLiteral<1>;
450
+ id: z.core.$ZodBranded<z.ZodString, "EvidenceId", "out">;
451
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
452
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
453
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
454
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
455
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
456
+ eventTimeEpochMs: z.ZodNumber;
457
+ }, z.core.$strict>;
458
+ export declare const EvidenceRecordCoreSchema: z.ZodObject<{
459
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
460
+ eventType: z.ZodLiteral<"AUTHENTICATION_RECORDED">;
461
+ payload: z.ZodObject<{
462
+ interface: z.ZodEnum<{
463
+ internal: "internal";
464
+ mcp: "mcp";
465
+ rest: "rest";
466
+ }>;
467
+ outcome: z.ZodEnum<{
468
+ authenticated: "authenticated";
469
+ rejected: "rejected";
470
+ }>;
471
+ credentialReference: z.ZodString;
472
+ }, z.core.$strict>;
473
+ }, z.core.$strict>, z.ZodObject<{
474
+ eventType: z.ZodLiteral<"ADAPTER_AUTHENTICATION_RECORDED">;
475
+ payload: z.ZodObject<{
476
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
477
+ outcome: z.ZodLiteral<"authenticated">;
478
+ credentialReference: z.ZodString;
479
+ }, z.core.$strict>;
480
+ }, z.core.$strict>, z.ZodObject<{
481
+ eventType: z.ZodLiteral<"REQUEST_RECEIVED">;
482
+ payload: z.ZodObject<{
483
+ actionDigest: z.ZodString;
484
+ }, z.core.$strict>;
485
+ }, z.core.$strict>, z.ZodObject<{
486
+ eventType: z.ZodLiteral<"ACTION_NORMALIZED">;
487
+ payload: z.ZodObject<{
488
+ actionDigest: z.ZodString;
489
+ }, z.core.$strict>;
490
+ }, z.core.$strict>, z.ZodObject<{
491
+ eventType: z.ZodLiteral<"DECISION_RECORDED">;
492
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
493
+ actionDigest: z.ZodString;
494
+ actionDecisionDigest: z.ZodString;
495
+ decision: z.ZodLiteral<"ALLOW">;
496
+ reasonCode: z.ZodLiteral<"AUTHORIZED">;
497
+ }, z.core.$strict>, z.ZodObject<{
498
+ actionDigest: z.ZodString;
499
+ actionDecisionDigest: z.ZodString;
500
+ decision: z.ZodLiteral<"ASK">;
501
+ reasonCode: z.ZodLiteral<"APPROVAL_REQUIRED">;
502
+ }, z.core.$strict>, z.ZodObject<{
503
+ actionDigest: z.ZodString;
504
+ actionDecisionDigest: z.ZodString;
505
+ decision: z.ZodLiteral<"DENY">;
506
+ reasonCode: z.ZodEnum<{
507
+ MALFORMED_INPUT: "MALFORMED_INPUT";
508
+ TENANT_MISMATCH: "TENANT_MISMATCH";
509
+ PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
510
+ PRINCIPAL_NOT_ACTIVE: "PRINCIPAL_NOT_ACTIVE";
511
+ AGENT_TENANT_MISMATCH: "AGENT_TENANT_MISMATCH";
512
+ AGENT_OWNER_MISMATCH: "AGENT_OWNER_MISMATCH";
513
+ AGENT_MISMATCH: "AGENT_MISMATCH";
514
+ AGENT_NOT_ACTIVE: "AGENT_NOT_ACTIVE";
515
+ INTERFACE_NOT_ALLOWED: "INTERFACE_NOT_ALLOWED";
516
+ AUTHORITY_CHAIN_MISSING: "AUTHORITY_CHAIN_MISSING";
517
+ DUPLICATE_GRANT_ID: "DUPLICATE_GRANT_ID";
518
+ GRANT_TENANT_MISMATCH: "GRANT_TENANT_MISMATCH";
519
+ GRANT_PRINCIPAL_MISMATCH: "GRANT_PRINCIPAL_MISMATCH";
520
+ GRANT_AGENT_MISMATCH: "GRANT_AGENT_MISMATCH";
521
+ GRANT_NOT_ACTIVE: "GRANT_NOT_ACTIVE";
522
+ GRANT_REVOKED: "GRANT_REVOKED";
523
+ GRANT_NOT_YET_VALID: "GRANT_NOT_YET_VALID";
524
+ GRANT_EXPIRED: "GRANT_EXPIRED";
525
+ INVALID_PARENT_LINK: "INVALID_PARENT_LINK";
526
+ DELEGATION_NOT_ALLOWED: "DELEGATION_NOT_ALLOWED";
527
+ AUTHORITY_AMPLIFICATION: "AUTHORITY_AMPLIFICATION";
528
+ ACTION_NOT_ALLOWED: "ACTION_NOT_ALLOWED";
529
+ RESOURCE_NOT_ALLOWED: "RESOURCE_NOT_ALLOWED";
530
+ ADAPTER_NOT_ALLOWED: "ADAPTER_NOT_ALLOWED";
531
+ VALUE_LIMIT_EXCEEDED: "VALUE_LIMIT_EXCEEDED";
532
+ USE_LIMIT_EXCEEDED: "USE_LIMIT_EXCEEDED";
533
+ MERCHANT_NOT_ALLOWED: "MERCHANT_NOT_ALLOWED";
534
+ CATEGORY_NOT_ALLOWED: "CATEGORY_NOT_ALLOWED";
535
+ RECURRENCE_NOT_ALLOWED: "RECURRENCE_NOT_ALLOWED";
536
+ BUDGET_NOT_FOUND: "BUDGET_NOT_FOUND";
537
+ BUDGET_SCOPE_MISMATCH: "BUDGET_SCOPE_MISMATCH";
538
+ BUDGET_NOT_ACTIVE: "BUDGET_NOT_ACTIVE";
539
+ BUDGET_EXPIRED: "BUDGET_EXPIRED";
540
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
541
+ TRANSACTION_LIMIT_EXCEEDED: "TRANSACTION_LIMIT_EXCEEDED";
542
+ }>;
543
+ }, z.core.$strict>], "decision">;
544
+ }, z.core.$strict>, z.ZodObject<{
545
+ eventType: z.ZodLiteral<"APPROVAL_STATE_REFERENCED">;
546
+ payload: z.ZodObject<{
547
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
548
+ version: z.ZodNumber;
549
+ state: z.ZodEnum<{
550
+ revoked: "revoked";
551
+ pending: "pending";
552
+ approved: "approved";
553
+ denied: "denied";
554
+ expired: "expired";
555
+ superseded: "superseded";
556
+ consumed: "consumed";
557
+ }>;
558
+ approvalDigest: z.ZodString;
559
+ }, z.core.$strict>;
560
+ }, z.core.$strict>, z.ZodObject<{
561
+ eventType: z.ZodLiteral<"APPROVAL_PRESENTED">;
562
+ payload: z.ZodObject<{
563
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
564
+ presentationDigest: z.ZodString;
565
+ viewerReference: z.ZodString;
566
+ }, z.core.$strict>;
567
+ }, z.core.$strict>, z.ZodObject<{
568
+ eventType: z.ZodLiteral<"APPROVAL_DECISION_RECORDED">;
569
+ payload: z.ZodObject<{
570
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
571
+ version: z.ZodNumber;
572
+ decision: z.ZodEnum<{
573
+ deny: "deny";
574
+ approve: "approve";
575
+ revoke: "revoke";
576
+ }>;
577
+ actorPrincipalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
578
+ actorReference: z.ZodString;
579
+ presentationDigest: z.ZodString;
580
+ }, z.core.$strict>;
581
+ }, z.core.$strict>, z.ZodObject<{
582
+ eventType: z.ZodLiteral<"APPROVAL_REJECTED">;
583
+ payload: z.ZodObject<{
584
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
585
+ reasonCode: z.ZodString;
586
+ }, z.core.$strict>;
587
+ }, z.core.$strict>, z.ZodObject<{
588
+ eventType: z.ZodLiteral<"CAPABILITY_STATE_REFERENCED">;
589
+ payload: z.ZodObject<{
590
+ actionDigest: z.ZodString;
591
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
592
+ state: z.ZodEnum<{
593
+ revoked: "revoked";
594
+ expired: "expired";
595
+ issued: "issued";
596
+ used: "used";
597
+ }>;
598
+ capabilityDigest: z.ZodString;
599
+ }, z.core.$strict>;
600
+ }, z.core.$strict>, z.ZodObject<{
601
+ eventType: z.ZodLiteral<"CAPABILITY_REJECTED">;
602
+ payload: z.ZodObject<{
603
+ actionDigest: z.ZodString;
604
+ reasonCode: z.ZodString;
605
+ }, z.core.$strict>;
606
+ }, z.core.$strict>, z.ZodObject<{
607
+ eventType: z.ZodLiteral<"EXECUTION_ATTEMPTED">;
608
+ payload: z.ZodObject<{
609
+ actionDigest: z.ZodString;
610
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
611
+ attemptReference: z.ZodString;
612
+ idempotencyDigest: z.ZodString;
613
+ }, z.core.$strict>;
614
+ }, z.core.$strict>, z.ZodObject<{
615
+ eventType: z.ZodLiteral<"EXECUTION_ABORTED">;
616
+ payload: z.ZodObject<{
617
+ actionDigest: z.ZodString;
618
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
619
+ attemptReference: z.ZodString;
620
+ reasonCode: z.ZodString;
621
+ }, z.core.$strict>;
622
+ }, z.core.$strict>, z.ZodObject<{
623
+ eventType: z.ZodLiteral<"EFFECT_PREPARED">;
624
+ payload: z.ZodObject<{
625
+ actionDigest: z.ZodString;
626
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
627
+ attemptReference: z.ZodString;
628
+ preparedDigest: z.ZodString;
629
+ }, z.core.$strict>;
630
+ }, z.core.$strict>, z.ZodObject<{
631
+ eventType: z.ZodLiteral<"EFFECT_COMMIT_AUTHORIZED">;
632
+ payload: z.ZodObject<{
633
+ actionDigest: z.ZodString;
634
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
635
+ attemptReference: z.ZodString;
636
+ actionDecisionDigest: z.ZodString;
637
+ }, z.core.$strict>;
638
+ }, z.core.$strict>, z.ZodObject<{
639
+ eventType: z.ZodLiteral<"EFFECT_OUTCOME_UNKNOWN">;
640
+ payload: z.ZodObject<{
641
+ actionDigest: z.ZodString;
642
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
643
+ attemptReference: z.ZodString;
644
+ reasonCode: z.ZodString;
645
+ }, z.core.$strict>;
646
+ }, z.core.$strict>, z.ZodObject<{
647
+ eventType: z.ZodLiteral<"EFFECT_UNRESOLVED">;
648
+ payload: z.ZodObject<{
649
+ actionDigest: z.ZodString;
650
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
651
+ attemptReference: z.ZodString;
652
+ }, z.core.$strict>;
653
+ }, z.core.$strict>, z.ZodObject<{
654
+ eventType: z.ZodLiteral<"EFFECT_VERIFIED">;
655
+ payload: z.ZodObject<{
656
+ actionDigest: z.ZodString;
657
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
658
+ attemptReference: z.ZodString;
659
+ effectDigest: z.ZodString;
660
+ }, z.core.$strict>;
661
+ }, z.core.$strict>, z.ZodObject<{
662
+ eventType: z.ZodLiteral<"EXECUTION_FAILED">;
663
+ payload: z.ZodObject<{
664
+ actionDigest: z.ZodString;
665
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
666
+ attemptReference: z.ZodString;
667
+ failureCode: z.ZodString;
668
+ failureDigest: z.ZodOptional<z.ZodString>;
669
+ }, z.core.$strict>;
670
+ }, z.core.$strict>, z.ZodObject<{
671
+ eventType: z.ZodLiteral<"AUTHORITY_REVOKED">;
672
+ payload: z.ZodObject<{
673
+ grantId: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
674
+ grantVersion: z.ZodNumber;
675
+ revocationDigest: z.ZodString;
676
+ }, z.core.$strict>;
677
+ }, z.core.$strict>], "eventType">;
678
+ sequence: z.ZodNumber;
679
+ previousRecordHash: z.ZodNullable<z.ZodString>;
680
+ payloadDigest: z.ZodString;
681
+ schemaVersion: z.ZodLiteral<1>;
682
+ id: z.core.$ZodBranded<z.ZodString, "EvidenceId", "out">;
683
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
684
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
685
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
686
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
687
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
688
+ eventTimeEpochMs: z.ZodNumber;
689
+ }, z.core.$strict>;
690
+ export declare const EvidenceRecordSchema: z.ZodObject<{
691
+ recordHash: z.ZodString;
692
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
693
+ eventType: z.ZodLiteral<"AUTHENTICATION_RECORDED">;
694
+ payload: z.ZodObject<{
695
+ interface: z.ZodEnum<{
696
+ internal: "internal";
697
+ mcp: "mcp";
698
+ rest: "rest";
699
+ }>;
700
+ outcome: z.ZodEnum<{
701
+ authenticated: "authenticated";
702
+ rejected: "rejected";
703
+ }>;
704
+ credentialReference: z.ZodString;
705
+ }, z.core.$strict>;
706
+ }, z.core.$strict>, z.ZodObject<{
707
+ eventType: z.ZodLiteral<"ADAPTER_AUTHENTICATION_RECORDED">;
708
+ payload: z.ZodObject<{
709
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
710
+ outcome: z.ZodLiteral<"authenticated">;
711
+ credentialReference: z.ZodString;
712
+ }, z.core.$strict>;
713
+ }, z.core.$strict>, z.ZodObject<{
714
+ eventType: z.ZodLiteral<"REQUEST_RECEIVED">;
715
+ payload: z.ZodObject<{
716
+ actionDigest: z.ZodString;
717
+ }, z.core.$strict>;
718
+ }, z.core.$strict>, z.ZodObject<{
719
+ eventType: z.ZodLiteral<"ACTION_NORMALIZED">;
720
+ payload: z.ZodObject<{
721
+ actionDigest: z.ZodString;
722
+ }, z.core.$strict>;
723
+ }, z.core.$strict>, z.ZodObject<{
724
+ eventType: z.ZodLiteral<"DECISION_RECORDED">;
725
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
726
+ actionDigest: z.ZodString;
727
+ actionDecisionDigest: z.ZodString;
728
+ decision: z.ZodLiteral<"ALLOW">;
729
+ reasonCode: z.ZodLiteral<"AUTHORIZED">;
730
+ }, z.core.$strict>, z.ZodObject<{
731
+ actionDigest: z.ZodString;
732
+ actionDecisionDigest: z.ZodString;
733
+ decision: z.ZodLiteral<"ASK">;
734
+ reasonCode: z.ZodLiteral<"APPROVAL_REQUIRED">;
735
+ }, z.core.$strict>, z.ZodObject<{
736
+ actionDigest: z.ZodString;
737
+ actionDecisionDigest: z.ZodString;
738
+ decision: z.ZodLiteral<"DENY">;
739
+ reasonCode: z.ZodEnum<{
740
+ MALFORMED_INPUT: "MALFORMED_INPUT";
741
+ TENANT_MISMATCH: "TENANT_MISMATCH";
742
+ PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
743
+ PRINCIPAL_NOT_ACTIVE: "PRINCIPAL_NOT_ACTIVE";
744
+ AGENT_TENANT_MISMATCH: "AGENT_TENANT_MISMATCH";
745
+ AGENT_OWNER_MISMATCH: "AGENT_OWNER_MISMATCH";
746
+ AGENT_MISMATCH: "AGENT_MISMATCH";
747
+ AGENT_NOT_ACTIVE: "AGENT_NOT_ACTIVE";
748
+ INTERFACE_NOT_ALLOWED: "INTERFACE_NOT_ALLOWED";
749
+ AUTHORITY_CHAIN_MISSING: "AUTHORITY_CHAIN_MISSING";
750
+ DUPLICATE_GRANT_ID: "DUPLICATE_GRANT_ID";
751
+ GRANT_TENANT_MISMATCH: "GRANT_TENANT_MISMATCH";
752
+ GRANT_PRINCIPAL_MISMATCH: "GRANT_PRINCIPAL_MISMATCH";
753
+ GRANT_AGENT_MISMATCH: "GRANT_AGENT_MISMATCH";
754
+ GRANT_NOT_ACTIVE: "GRANT_NOT_ACTIVE";
755
+ GRANT_REVOKED: "GRANT_REVOKED";
756
+ GRANT_NOT_YET_VALID: "GRANT_NOT_YET_VALID";
757
+ GRANT_EXPIRED: "GRANT_EXPIRED";
758
+ INVALID_PARENT_LINK: "INVALID_PARENT_LINK";
759
+ DELEGATION_NOT_ALLOWED: "DELEGATION_NOT_ALLOWED";
760
+ AUTHORITY_AMPLIFICATION: "AUTHORITY_AMPLIFICATION";
761
+ ACTION_NOT_ALLOWED: "ACTION_NOT_ALLOWED";
762
+ RESOURCE_NOT_ALLOWED: "RESOURCE_NOT_ALLOWED";
763
+ ADAPTER_NOT_ALLOWED: "ADAPTER_NOT_ALLOWED";
764
+ VALUE_LIMIT_EXCEEDED: "VALUE_LIMIT_EXCEEDED";
765
+ USE_LIMIT_EXCEEDED: "USE_LIMIT_EXCEEDED";
766
+ MERCHANT_NOT_ALLOWED: "MERCHANT_NOT_ALLOWED";
767
+ CATEGORY_NOT_ALLOWED: "CATEGORY_NOT_ALLOWED";
768
+ RECURRENCE_NOT_ALLOWED: "RECURRENCE_NOT_ALLOWED";
769
+ BUDGET_NOT_FOUND: "BUDGET_NOT_FOUND";
770
+ BUDGET_SCOPE_MISMATCH: "BUDGET_SCOPE_MISMATCH";
771
+ BUDGET_NOT_ACTIVE: "BUDGET_NOT_ACTIVE";
772
+ BUDGET_EXPIRED: "BUDGET_EXPIRED";
773
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
774
+ TRANSACTION_LIMIT_EXCEEDED: "TRANSACTION_LIMIT_EXCEEDED";
775
+ }>;
776
+ }, z.core.$strict>], "decision">;
777
+ }, z.core.$strict>, z.ZodObject<{
778
+ eventType: z.ZodLiteral<"APPROVAL_STATE_REFERENCED">;
779
+ payload: z.ZodObject<{
780
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
781
+ version: z.ZodNumber;
782
+ state: z.ZodEnum<{
783
+ revoked: "revoked";
784
+ pending: "pending";
785
+ approved: "approved";
786
+ denied: "denied";
787
+ expired: "expired";
788
+ superseded: "superseded";
789
+ consumed: "consumed";
790
+ }>;
791
+ approvalDigest: z.ZodString;
792
+ }, z.core.$strict>;
793
+ }, z.core.$strict>, z.ZodObject<{
794
+ eventType: z.ZodLiteral<"APPROVAL_PRESENTED">;
795
+ payload: z.ZodObject<{
796
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
797
+ presentationDigest: z.ZodString;
798
+ viewerReference: z.ZodString;
799
+ }, z.core.$strict>;
800
+ }, z.core.$strict>, z.ZodObject<{
801
+ eventType: z.ZodLiteral<"APPROVAL_DECISION_RECORDED">;
802
+ payload: z.ZodObject<{
803
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
804
+ version: z.ZodNumber;
805
+ decision: z.ZodEnum<{
806
+ deny: "deny";
807
+ approve: "approve";
808
+ revoke: "revoke";
809
+ }>;
810
+ actorPrincipalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
811
+ actorReference: z.ZodString;
812
+ presentationDigest: z.ZodString;
813
+ }, z.core.$strict>;
814
+ }, z.core.$strict>, z.ZodObject<{
815
+ eventType: z.ZodLiteral<"APPROVAL_REJECTED">;
816
+ payload: z.ZodObject<{
817
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
818
+ reasonCode: z.ZodString;
819
+ }, z.core.$strict>;
820
+ }, z.core.$strict>, z.ZodObject<{
821
+ eventType: z.ZodLiteral<"CAPABILITY_STATE_REFERENCED">;
822
+ payload: z.ZodObject<{
823
+ actionDigest: z.ZodString;
824
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
825
+ state: z.ZodEnum<{
826
+ revoked: "revoked";
827
+ expired: "expired";
828
+ issued: "issued";
829
+ used: "used";
830
+ }>;
831
+ capabilityDigest: z.ZodString;
832
+ }, z.core.$strict>;
833
+ }, z.core.$strict>, z.ZodObject<{
834
+ eventType: z.ZodLiteral<"CAPABILITY_REJECTED">;
835
+ payload: z.ZodObject<{
836
+ actionDigest: z.ZodString;
837
+ reasonCode: z.ZodString;
838
+ }, z.core.$strict>;
839
+ }, z.core.$strict>, z.ZodObject<{
840
+ eventType: z.ZodLiteral<"EXECUTION_ATTEMPTED">;
841
+ payload: z.ZodObject<{
842
+ actionDigest: z.ZodString;
843
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
844
+ attemptReference: z.ZodString;
845
+ idempotencyDigest: z.ZodString;
846
+ }, z.core.$strict>;
847
+ }, z.core.$strict>, z.ZodObject<{
848
+ eventType: z.ZodLiteral<"EXECUTION_ABORTED">;
849
+ payload: z.ZodObject<{
850
+ actionDigest: z.ZodString;
851
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
852
+ attemptReference: z.ZodString;
853
+ reasonCode: z.ZodString;
854
+ }, z.core.$strict>;
855
+ }, z.core.$strict>, z.ZodObject<{
856
+ eventType: z.ZodLiteral<"EFFECT_PREPARED">;
857
+ payload: z.ZodObject<{
858
+ actionDigest: z.ZodString;
859
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
860
+ attemptReference: z.ZodString;
861
+ preparedDigest: z.ZodString;
862
+ }, z.core.$strict>;
863
+ }, z.core.$strict>, z.ZodObject<{
864
+ eventType: z.ZodLiteral<"EFFECT_COMMIT_AUTHORIZED">;
865
+ payload: z.ZodObject<{
866
+ actionDigest: z.ZodString;
867
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
868
+ attemptReference: z.ZodString;
869
+ actionDecisionDigest: z.ZodString;
870
+ }, z.core.$strict>;
871
+ }, z.core.$strict>, z.ZodObject<{
872
+ eventType: z.ZodLiteral<"EFFECT_OUTCOME_UNKNOWN">;
873
+ payload: z.ZodObject<{
874
+ actionDigest: z.ZodString;
875
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
876
+ attemptReference: z.ZodString;
877
+ reasonCode: z.ZodString;
878
+ }, z.core.$strict>;
879
+ }, z.core.$strict>, z.ZodObject<{
880
+ eventType: z.ZodLiteral<"EFFECT_UNRESOLVED">;
881
+ payload: z.ZodObject<{
882
+ actionDigest: z.ZodString;
883
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
884
+ attemptReference: z.ZodString;
885
+ }, z.core.$strict>;
886
+ }, z.core.$strict>, z.ZodObject<{
887
+ eventType: z.ZodLiteral<"EFFECT_VERIFIED">;
888
+ payload: z.ZodObject<{
889
+ actionDigest: z.ZodString;
890
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
891
+ attemptReference: z.ZodString;
892
+ effectDigest: z.ZodString;
893
+ }, z.core.$strict>;
894
+ }, z.core.$strict>, z.ZodObject<{
895
+ eventType: z.ZodLiteral<"EXECUTION_FAILED">;
896
+ payload: z.ZodObject<{
897
+ actionDigest: z.ZodString;
898
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
899
+ attemptReference: z.ZodString;
900
+ failureCode: z.ZodString;
901
+ failureDigest: z.ZodOptional<z.ZodString>;
902
+ }, z.core.$strict>;
903
+ }, z.core.$strict>, z.ZodObject<{
904
+ eventType: z.ZodLiteral<"AUTHORITY_REVOKED">;
905
+ payload: z.ZodObject<{
906
+ grantId: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
907
+ grantVersion: z.ZodNumber;
908
+ revocationDigest: z.ZodString;
909
+ }, z.core.$strict>;
910
+ }, z.core.$strict>], "eventType">;
911
+ sequence: z.ZodNumber;
912
+ previousRecordHash: z.ZodNullable<z.ZodString>;
913
+ payloadDigest: z.ZodString;
914
+ schemaVersion: z.ZodLiteral<1>;
915
+ id: z.core.$ZodBranded<z.ZodString, "EvidenceId", "out">;
916
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
917
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
918
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
919
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
920
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
921
+ eventTimeEpochMs: z.ZodNumber;
922
+ }, z.core.$strict>;
923
+ /** Why a presented human approval session was refused before any approval operation. */
924
+ export declare const HumanSessionRejectionSchema: z.ZodEnum<{
925
+ UNAUTHENTICATED: "UNAUTHENTICATED";
926
+ NOT_HUMAN: "NOT_HUMAN";
927
+ UNSAFE_SESSION_REFERENCE: "UNSAFE_SESSION_REFERENCE";
928
+ }>;
929
+ /**
930
+ * Security events recorded before any identity is trusted. They never carry a
931
+ * tenant, principal, agent, credential, or session reference.
932
+ */
933
+ export declare const PreIdentitySecurityEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
934
+ eventType: z.ZodLiteral<"AUTHENTICATION_REJECTED">;
935
+ payload: z.ZodObject<{
936
+ interface: z.ZodEnum<{
937
+ mcp: "mcp";
938
+ rest: "rest";
939
+ }>;
940
+ reasonCode: z.ZodLiteral<"UNAUTHENTICATED">;
941
+ }, z.core.$strict>;
942
+ }, z.core.$strict>, z.ZodObject<{
943
+ eventType: z.ZodLiteral<"HUMAN_AUTHENTICATION_REJECTED">;
944
+ payload: z.ZodObject<{
945
+ surface: z.ZodLiteral<"approval-service">;
946
+ reasonCode: z.ZodEnum<{
947
+ UNAUTHENTICATED: "UNAUTHENTICATED";
948
+ NOT_HUMAN: "NOT_HUMAN";
949
+ UNSAFE_SESSION_REFERENCE: "UNSAFE_SESSION_REFERENCE";
950
+ }>;
951
+ }, z.core.$strict>;
952
+ }, z.core.$strict>, z.ZodObject<{
953
+ eventType: z.ZodLiteral<"ADAPTER_AUTHENTICATION_REJECTED">;
954
+ payload: z.ZodObject<{
955
+ surface: z.ZodLiteral<"redemption">;
956
+ reasonCode: z.ZodLiteral<"UNAUTHENTICATED">;
957
+ }, z.core.$strict>;
958
+ }, z.core.$strict>], "eventType">;
959
+ export declare const PreIdentitySecurityRecordCoreSchema: z.ZodObject<{
960
+ schemaVersion: z.ZodLiteral<1>;
961
+ id: z.core.$ZodBranded<z.ZodString, "EvidenceId", "out">;
962
+ eventTimeEpochMs: z.ZodNumber;
963
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
964
+ eventType: z.ZodLiteral<"AUTHENTICATION_REJECTED">;
965
+ payload: z.ZodObject<{
966
+ interface: z.ZodEnum<{
967
+ mcp: "mcp";
968
+ rest: "rest";
969
+ }>;
970
+ reasonCode: z.ZodLiteral<"UNAUTHENTICATED">;
971
+ }, z.core.$strict>;
972
+ }, z.core.$strict>, z.ZodObject<{
973
+ eventType: z.ZodLiteral<"HUMAN_AUTHENTICATION_REJECTED">;
974
+ payload: z.ZodObject<{
975
+ surface: z.ZodLiteral<"approval-service">;
976
+ reasonCode: z.ZodEnum<{
977
+ UNAUTHENTICATED: "UNAUTHENTICATED";
978
+ NOT_HUMAN: "NOT_HUMAN";
979
+ UNSAFE_SESSION_REFERENCE: "UNSAFE_SESSION_REFERENCE";
980
+ }>;
981
+ }, z.core.$strict>;
982
+ }, z.core.$strict>, z.ZodObject<{
983
+ eventType: z.ZodLiteral<"ADAPTER_AUTHENTICATION_REJECTED">;
984
+ payload: z.ZodObject<{
985
+ surface: z.ZodLiteral<"redemption">;
986
+ reasonCode: z.ZodLiteral<"UNAUTHENTICATED">;
987
+ }, z.core.$strict>;
988
+ }, z.core.$strict>], "eventType">;
989
+ }, z.core.$strict>;
990
+ export declare const PreIdentitySecurityRecordSchema: z.ZodObject<{
991
+ schemaVersion: z.ZodLiteral<1>;
992
+ id: z.core.$ZodBranded<z.ZodString, "EvidenceId", "out">;
993
+ eventTimeEpochMs: z.ZodNumber;
994
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
995
+ eventType: z.ZodLiteral<"AUTHENTICATION_REJECTED">;
996
+ payload: z.ZodObject<{
997
+ interface: z.ZodEnum<{
998
+ mcp: "mcp";
999
+ rest: "rest";
1000
+ }>;
1001
+ reasonCode: z.ZodLiteral<"UNAUTHENTICATED">;
1002
+ }, z.core.$strict>;
1003
+ }, z.core.$strict>, z.ZodObject<{
1004
+ eventType: z.ZodLiteral<"HUMAN_AUTHENTICATION_REJECTED">;
1005
+ payload: z.ZodObject<{
1006
+ surface: z.ZodLiteral<"approval-service">;
1007
+ reasonCode: z.ZodEnum<{
1008
+ UNAUTHENTICATED: "UNAUTHENTICATED";
1009
+ NOT_HUMAN: "NOT_HUMAN";
1010
+ UNSAFE_SESSION_REFERENCE: "UNSAFE_SESSION_REFERENCE";
1011
+ }>;
1012
+ }, z.core.$strict>;
1013
+ }, z.core.$strict>, z.ZodObject<{
1014
+ eventType: z.ZodLiteral<"ADAPTER_AUTHENTICATION_REJECTED">;
1015
+ payload: z.ZodObject<{
1016
+ surface: z.ZodLiteral<"redemption">;
1017
+ reasonCode: z.ZodLiteral<"UNAUTHENTICATED">;
1018
+ }, z.core.$strict>;
1019
+ }, z.core.$strict>], "eventType">;
1020
+ recordHash: z.ZodString;
1021
+ }, z.core.$strict>;
1022
+ export type EvidenceEvent = z.infer<typeof EvidenceEventSchema>;
1023
+ export type EvidenceEventType = EvidenceEvent["eventType"];
1024
+ export type EvidenceEventDraft = z.infer<typeof EvidenceEventDraftSchema>;
1025
+ export type EvidenceChainContext = z.infer<typeof EvidenceChainContextSchema>;
1026
+ export type EvidenceRecordCore = z.infer<typeof EvidenceRecordCoreSchema>;
1027
+ export type EvidenceRecord = z.infer<typeof EvidenceRecordSchema>;
1028
+ export type HumanSessionRejection = z.infer<typeof HumanSessionRejectionSchema>;
1029
+ export type PreIdentitySecurityEvent = z.infer<typeof PreIdentitySecurityEventSchema>;
1030
+ export type PreIdentitySecurityRecord = z.infer<typeof PreIdentitySecurityRecordSchema>;