@odingard/guardian-sdk 0.1.0 → 0.2.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.
Files changed (50) hide show
  1. package/README.md +252 -17
  2. package/dist/contracts.js +9865 -0
  3. package/dist/index.js +12976 -1787
  4. package/dist/public-catalog.v1.json +6915 -0
  5. package/dist-dts/catalog.d.ts +14 -0
  6. package/dist-dts/client.d.ts +51 -1
  7. package/dist-dts/contracts/action-pack.d.ts +464 -0
  8. package/dist-dts/contracts/action-registry.d.ts +91 -1
  9. package/dist-dts/contracts/action.d.ts +1408 -17
  10. package/dist-dts/contracts/agent-state.d.ts +386 -0
  11. package/dist-dts/contracts/approval.d.ts +224 -5
  12. package/dist-dts/contracts/assurance.d.ts +60 -0
  13. package/dist-dts/contracts/authority-graph.d.ts +294 -0
  14. package/dist-dts/contracts/authority-state.d.ts +17 -2
  15. package/dist-dts/contracts/authority.d.ts +31 -5
  16. package/dist-dts/contracts/billing.d.ts +32 -0
  17. package/dist-dts/contracts/calendar.d.ts +6 -6
  18. package/dist-dts/contracts/denial.d.ts +648 -0
  19. package/dist-dts/contracts/evidence.d.ts +73 -16
  20. package/dist-dts/contracts/execution.d.ts +449 -55
  21. package/dist-dts/contracts/identifiers.d.ts +16 -0
  22. package/dist-dts/contracts/index.d.ts +22 -0
  23. package/dist-dts/contracts/intent.d.ts +335 -0
  24. package/dist-dts/contracts/lineage.d.ts +218 -0
  25. package/dist-dts/contracts/local.d.ts +101 -0
  26. package/dist-dts/contracts/multi-principal.d.ts +292 -0
  27. package/dist-dts/contracts/multiparty.d.ts +169 -0
  28. package/dist-dts/contracts/obligation.d.ts +196 -0
  29. package/dist-dts/contracts/plan.d.ts +67 -0
  30. package/dist-dts/contracts/policy-simulation.d.ts +681 -0
  31. package/dist-dts/contracts/prerequisite.d.ts +147 -0
  32. package/dist-dts/contracts/protected-data.d.ts +67 -0
  33. package/dist-dts/contracts/receipt.d.ts +3126 -0
  34. package/dist-dts/contracts/resource-claims.d.ts +146 -0
  35. package/dist-dts/contracts/runtime.d.ts +111 -0
  36. package/dist-dts/contracts/safety-envelope.d.ts +287 -0
  37. package/dist-dts/contracts/sequence.d.ts +132 -0
  38. package/dist-dts/contracts/sources.d.ts +191 -0
  39. package/dist-dts/contracts/tools.d.ts +50 -5
  40. package/dist-dts/contracts/transaction.d.ts +360 -0
  41. package/dist-dts/contracts-entry.d.ts +1 -0
  42. package/dist-dts/embedded.d.ts +58 -0
  43. package/dist-dts/evidence/evidence.d.ts +25 -0
  44. package/dist-dts/evidence/receipt.d.ts +61 -0
  45. package/dist-dts/index.d.ts +5 -1
  46. package/dist-dts/lifecycle.d.ts +25 -0
  47. package/dist-dts/proposal.d.ts +16 -0
  48. package/dist-dts/receipts.d.ts +37 -0
  49. package/package.json +12 -6
  50. package/dist-dts/__tests__/client.test.d.ts +0 -1
@@ -0,0 +1,3126 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * WO-020 portable authority receipt.
4
+ *
5
+ * A receipt is a self-contained, signed projection of one governed request:
6
+ * the canonical action the kernel evaluated, the decision, the human approval
7
+ * (when required), the issued capability, the execution record and its
8
+ * verified effect, and the complete evidence chain — all bound by one Ed25519
9
+ * signature from Guardian's receipt-signing key. An independent verifier needs
10
+ * only this document and the published verification keys; no Guardian
11
+ * credential, database, or service access is required.
12
+ */
13
+ export declare const PORTABLE_RECEIPT_FORMAT = "greceipt.v1";
14
+ export declare const PORTABLE_RECEIPT_DOMAIN = "odingard.guardian.receipt.v1";
15
+ export declare const ReceiptIdSchema: z.core.$ZodBranded<z.ZodString, "ReceiptId", "out">;
16
+ export declare const ReceiptKeyIdSchema: z.ZodString;
17
+ /** RFC 8037 Ed25519 JWK (public parts only) — the published verifier key. */
18
+ export declare const ReceiptVerificationJwkSchema: z.ZodObject<{
19
+ kty: z.ZodLiteral<"OKP">;
20
+ crv: z.ZodLiteral<"Ed25519">;
21
+ kid: z.ZodString;
22
+ use: z.ZodLiteral<"sig">;
23
+ alg: z.ZodLiteral<"EdDSA">;
24
+ x: z.ZodString;
25
+ }, z.core.$strict>;
26
+ export declare const ReceiptVerificationKeySetSchema: z.ZodObject<{
27
+ keys: z.ZodArray<z.ZodObject<{
28
+ kty: z.ZodLiteral<"OKP">;
29
+ crv: z.ZodLiteral<"Ed25519">;
30
+ kid: z.ZodString;
31
+ use: z.ZodLiteral<"sig">;
32
+ alg: z.ZodLiteral<"EdDSA">;
33
+ x: z.ZodString;
34
+ }, z.core.$strict>>;
35
+ }, z.core.$strict>;
36
+ export declare const ReceiptSubjectSchema: z.ZodObject<{
37
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
38
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
39
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
40
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
41
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
42
+ }, z.core.$strict>;
43
+ /**
44
+ * The runtime the governed request executed on. Today's authority model binds
45
+ * the agent's declared transport interface and the requested adapter; the
46
+ * adapter that actually executed is recorded once execution begins.
47
+ */
48
+ export declare const ReceiptRuntimeSchema: z.ZodObject<{
49
+ interface: z.ZodEnum<{
50
+ mcp: "mcp";
51
+ rest: "rest";
52
+ internal: "internal";
53
+ }>;
54
+ requestedAdapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
55
+ adapterId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "AdapterId", "out">>;
56
+ }, z.core.$strict>;
57
+ /**
58
+ * Projection of the chain's decision event: DECISION_RECORDED for kernel
59
+ * decisions, REQUEST_DENIED for requests denied before the kernel ran
60
+ * (its requestDeniedDigest fills actionDecisionDigest). Denies outside
61
+ * the kernel carry gate/failure codes, so DENY admits the full failure
62
+ * code space, not only the kernel's closed deny enum.
63
+ */
64
+ export declare const ReceiptDecisionSchema: z.ZodObject<{
65
+ decision: z.ZodEnum<{
66
+ ALLOW: "ALLOW";
67
+ ASK: "ASK";
68
+ DENY: "DENY";
69
+ }>;
70
+ reasonCode: z.ZodUnion<readonly [z.ZodLiteral<"AUTHORIZED">, z.ZodLiteral<"APPROVAL_REQUIRED">, z.ZodEnum<{
71
+ MALFORMED_INPUT: "MALFORMED_INPUT";
72
+ TENANT_MISMATCH: "TENANT_MISMATCH";
73
+ PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
74
+ PRINCIPAL_NOT_ACTIVE: "PRINCIPAL_NOT_ACTIVE";
75
+ AGENT_TENANT_MISMATCH: "AGENT_TENANT_MISMATCH";
76
+ AGENT_OWNER_MISMATCH: "AGENT_OWNER_MISMATCH";
77
+ AGENT_MISMATCH: "AGENT_MISMATCH";
78
+ AGENT_NOT_ACTIVE: "AGENT_NOT_ACTIVE";
79
+ INTERFACE_NOT_ALLOWED: "INTERFACE_NOT_ALLOWED";
80
+ AUTHORITY_PAUSED: "AUTHORITY_PAUSED";
81
+ AUTHORITY_CHAIN_MISSING: "AUTHORITY_CHAIN_MISSING";
82
+ DUPLICATE_GRANT_ID: "DUPLICATE_GRANT_ID";
83
+ GRANT_TENANT_MISMATCH: "GRANT_TENANT_MISMATCH";
84
+ GRANT_PRINCIPAL_MISMATCH: "GRANT_PRINCIPAL_MISMATCH";
85
+ GRANT_AGENT_MISMATCH: "GRANT_AGENT_MISMATCH";
86
+ GRANT_NOT_ACTIVE: "GRANT_NOT_ACTIVE";
87
+ GRANT_REVOKED: "GRANT_REVOKED";
88
+ GRANT_NOT_YET_VALID: "GRANT_NOT_YET_VALID";
89
+ GRANT_EXPIRED: "GRANT_EXPIRED";
90
+ INVALID_PARENT_LINK: "INVALID_PARENT_LINK";
91
+ DELEGATION_NOT_ALLOWED: "DELEGATION_NOT_ALLOWED";
92
+ AUTHORITY_AMPLIFICATION: "AUTHORITY_AMPLIFICATION";
93
+ ACTION_NOT_ALLOWED: "ACTION_NOT_ALLOWED";
94
+ RESOURCE_NOT_ALLOWED: "RESOURCE_NOT_ALLOWED";
95
+ ADAPTER_NOT_ALLOWED: "ADAPTER_NOT_ALLOWED";
96
+ VALUE_LIMIT_EXCEEDED: "VALUE_LIMIT_EXCEEDED";
97
+ USE_LIMIT_EXCEEDED: "USE_LIMIT_EXCEEDED";
98
+ MERCHANT_NOT_ALLOWED: "MERCHANT_NOT_ALLOWED";
99
+ CATEGORY_NOT_ALLOWED: "CATEGORY_NOT_ALLOWED";
100
+ RECURRENCE_NOT_ALLOWED: "RECURRENCE_NOT_ALLOWED";
101
+ BUDGET_NOT_FOUND: "BUDGET_NOT_FOUND";
102
+ BUDGET_SCOPE_MISMATCH: "BUDGET_SCOPE_MISMATCH";
103
+ BUDGET_NOT_ACTIVE: "BUDGET_NOT_ACTIVE";
104
+ BUDGET_EXPIRED: "BUDGET_EXPIRED";
105
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
106
+ TRANSACTION_LIMIT_EXCEEDED: "TRANSACTION_LIMIT_EXCEEDED";
107
+ }>, z.ZodString]>;
108
+ actionDecisionDigest: z.ZodString;
109
+ decidedAtEpochMs: z.ZodNumber;
110
+ }, z.core.$strict>;
111
+ export declare const ReceiptApprovalSchema: z.ZodObject<{
112
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
113
+ state: z.ZodEnum<{
114
+ revoked: "revoked";
115
+ pending: "pending";
116
+ expired: "expired";
117
+ approved: "approved";
118
+ denied: "denied";
119
+ superseded: "superseded";
120
+ consumed: "consumed";
121
+ }>;
122
+ version: z.ZodNumber;
123
+ approvalDigest: z.ZodString;
124
+ record: z.ZodObject<{
125
+ schemaVersion: z.ZodLiteral<1>;
126
+ binding: z.ZodObject<{
127
+ schemaVersion: z.ZodLiteral<1>;
128
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
129
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
130
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
131
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
132
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
133
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
134
+ actionDigest: z.ZodString;
135
+ actionDecisionRecordDigest: z.ZodString;
136
+ askDecisionDigest: z.ZodString;
137
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
138
+ policy: z.ZodObject<{
139
+ id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
140
+ version: z.ZodNumber;
141
+ }, z.core.$strict>;
142
+ evaluatedGrants: z.ZodArray<z.ZodObject<{
143
+ id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
144
+ version: z.ZodNumber;
145
+ }, z.core.$strict>>;
146
+ presentationDigest: z.ZodString;
147
+ requestedAtEpochMs: z.ZodNumber;
148
+ expiresAtEpochMs: z.ZodNumber;
149
+ eligiblePrincipalIds: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
150
+ requiredFactor: z.ZodOptional<z.ZodEnum<{
151
+ tap: "tap";
152
+ passkey: "passkey";
153
+ biometric: "biometric";
154
+ "second-device": "second-device";
155
+ "multi-approver": "multi-approver";
156
+ }>>;
157
+ requiredApprovals: z.ZodOptional<z.ZodNumber>;
158
+ scopeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
159
+ structures: z.ZodOptional<z.ZodArray<z.ZodObject<{
160
+ schema: z.ZodLiteral<"guardian.multiparty.v1">;
161
+ structureId: z.ZodString;
162
+ members: z.ZodArray<z.ZodObject<{
163
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
164
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
165
+ }, z.core.$strict>>;
166
+ requirement: z.ZodDiscriminatedUnion<[z.ZodObject<{
167
+ kind: z.ZodLiteral<"single">;
168
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
169
+ }, z.core.$strict>, z.ZodObject<{
170
+ kind: z.ZodLiteral<"nOfM">;
171
+ n: z.ZodNumber;
172
+ members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
173
+ }, z.core.$strict>, z.ZodObject<{
174
+ kind: z.ZodLiteral<"unanimous">;
175
+ members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
176
+ }, z.core.$strict>, z.ZodObject<{
177
+ kind: z.ZodLiteral<"roleQuorum">;
178
+ role: z.ZodString;
179
+ n: z.ZodNumber;
180
+ m: z.ZodNumber;
181
+ }, z.core.$strict>], "kind">;
182
+ specificRequired: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
183
+ veto: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
184
+ separationOfDuties: z.ZodOptional<z.ZodObject<{
185
+ mutuallyExclusive: z.ZodArray<z.ZodArray<z.ZodString>>;
186
+ }, z.core.$strict>>;
187
+ temporaryApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
188
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
189
+ expiresAtEpochMs: z.ZodNumber;
190
+ }, z.core.$strict>>>;
191
+ delegatedApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
192
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
193
+ delegatedBy: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
194
+ }, z.core.$strict>>>;
195
+ emergencyApprovers: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
196
+ coolingPeriod: z.ZodOptional<z.ZodObject<{
197
+ seconds: z.ZodNumber;
198
+ }, z.core.$strict>>;
199
+ }, z.core.$strict>>>;
200
+ }, z.core.$strict>;
201
+ state: z.ZodEnum<{
202
+ revoked: "revoked";
203
+ pending: "pending";
204
+ expired: "expired";
205
+ approved: "approved";
206
+ denied: "denied";
207
+ superseded: "superseded";
208
+ consumed: "consumed";
209
+ }>;
210
+ version: z.ZodNumber;
211
+ updatedAtEpochMs: z.ZodNumber;
212
+ decidedByPrincipalId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
213
+ endorsements: z.ZodOptional<z.ZodArray<z.ZodObject<{
214
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
215
+ factor: z.ZodEnum<{
216
+ tap: "tap";
217
+ passkey: "passkey";
218
+ biometric: "biometric";
219
+ "second-device": "second-device";
220
+ }>;
221
+ atEpochMs: z.ZodNumber;
222
+ }, z.core.$strict>>>;
223
+ structureApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
224
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
225
+ decision: z.ZodEnum<{
226
+ veto: "veto";
227
+ approve: "approve";
228
+ deny: "deny";
229
+ }>;
230
+ atEpochMs: z.ZodNumber;
231
+ via: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
232
+ emergency: z.ZodOptional<z.ZodLiteral<true>>;
233
+ }, z.core.$strict>>>;
234
+ cooling: z.ZodOptional<z.ZodObject<{
235
+ startedAtEpochMs: z.ZodNumber;
236
+ endsAtEpochMs: z.ZodNumber;
237
+ }, z.core.$strict>>;
238
+ }, z.core.$strict>;
239
+ }, z.core.$strict>;
240
+ export declare const ReceiptCapabilitySchema: z.ZodObject<{
241
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
242
+ claims: z.ZodObject<{
243
+ schemaVersion: z.ZodLiteral<1>;
244
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
245
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
246
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
247
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
248
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
249
+ actionDigest: z.ZodString;
250
+ actionNonce: z.core.$ZodBranded<z.ZodString, "Nonce", "out">;
251
+ audience: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
252
+ policy: z.ZodObject<{
253
+ id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
254
+ version: z.ZodNumber;
255
+ }, z.core.$strict>;
256
+ evaluatedGrants: z.ZodArray<z.ZodObject<{
257
+ id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
258
+ version: z.ZodNumber;
259
+ }, z.core.$strict>>;
260
+ issuedAtEpochMs: z.ZodNumber;
261
+ expiresAtEpochMs: z.ZodNumber;
262
+ maxUses: z.ZodLiteral<1>;
263
+ keyId: z.core.$ZodBranded<z.ZodString, "CapabilityKeyId", "out">;
264
+ algorithm: z.ZodLiteral<"HS256">;
265
+ }, z.core.$strict>;
266
+ claimsDigest: z.ZodString;
267
+ state: z.ZodEnum<{
268
+ revoked: "revoked";
269
+ expired: "expired";
270
+ issued: "issued";
271
+ used: "used";
272
+ }>;
273
+ }, z.core.$strict>;
274
+ export declare const ReceiptEffectSchema: z.ZodObject<{
275
+ kind: z.ZodEnum<{
276
+ none: "none";
277
+ failed: "failed";
278
+ verified: "verified";
279
+ "outcome-pending": "outcome-pending";
280
+ }>;
281
+ terminalEvent: z.ZodNullable<z.ZodEnum<{
282
+ EXECUTION_ABORTED: "EXECUTION_ABORTED";
283
+ EFFECT_VERIFIED: "EFFECT_VERIFIED";
284
+ EXECUTION_FAILED: "EXECUTION_FAILED";
285
+ }>>;
286
+ failureCode: z.ZodNullable<z.ZodString>;
287
+ effectDigest: z.ZodNullable<z.ZodString>;
288
+ failureDigest: z.ZodNullable<z.ZodString>;
289
+ }, z.core.$strict>;
290
+ export declare const ReceiptEvidenceSchema: z.ZodObject<{
291
+ chain: z.ZodArray<z.ZodObject<{
292
+ recordHash: z.ZodString;
293
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
294
+ eventType: z.ZodLiteral<"AUTHENTICATION_RECORDED">;
295
+ payload: z.ZodObject<{
296
+ interface: z.ZodEnum<{
297
+ mcp: "mcp";
298
+ rest: "rest";
299
+ internal: "internal";
300
+ }>;
301
+ outcome: z.ZodEnum<{
302
+ rejected: "rejected";
303
+ authenticated: "authenticated";
304
+ }>;
305
+ credentialReference: z.ZodString;
306
+ }, z.core.$strict>;
307
+ }, z.core.$strict>, z.ZodObject<{
308
+ eventType: z.ZodLiteral<"ADAPTER_AUTHENTICATION_RECORDED">;
309
+ payload: z.ZodObject<{
310
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
311
+ outcome: z.ZodLiteral<"authenticated">;
312
+ credentialReference: z.ZodString;
313
+ }, z.core.$strict>;
314
+ }, z.core.$strict>, z.ZodObject<{
315
+ eventType: z.ZodLiteral<"REQUEST_RECEIVED">;
316
+ payload: z.ZodObject<{
317
+ actionDigest: z.ZodString;
318
+ }, z.core.$strict>;
319
+ }, z.core.$strict>, z.ZodObject<{
320
+ eventType: z.ZodLiteral<"ACTION_NORMALIZED">;
321
+ payload: z.ZodObject<{
322
+ actionDigest: z.ZodString;
323
+ }, z.core.$strict>;
324
+ }, z.core.$strict>, z.ZodObject<{
325
+ eventType: z.ZodLiteral<"DECISION_RECORDED">;
326
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
327
+ actionDigest: z.ZodString;
328
+ actionDecisionDigest: z.ZodString;
329
+ decision: z.ZodLiteral<"ALLOW">;
330
+ reasonCode: z.ZodLiteral<"AUTHORIZED">;
331
+ }, z.core.$strict>, z.ZodObject<{
332
+ actionDigest: z.ZodString;
333
+ actionDecisionDigest: z.ZodString;
334
+ decision: z.ZodLiteral<"ASK">;
335
+ reasonCode: z.ZodLiteral<"APPROVAL_REQUIRED">;
336
+ }, z.core.$strict>, z.ZodObject<{
337
+ actionDigest: z.ZodString;
338
+ actionDecisionDigest: z.ZodString;
339
+ decision: z.ZodLiteral<"DENY">;
340
+ reasonCode: z.ZodEnum<{
341
+ MALFORMED_INPUT: "MALFORMED_INPUT";
342
+ TENANT_MISMATCH: "TENANT_MISMATCH";
343
+ PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
344
+ PRINCIPAL_NOT_ACTIVE: "PRINCIPAL_NOT_ACTIVE";
345
+ AGENT_TENANT_MISMATCH: "AGENT_TENANT_MISMATCH";
346
+ AGENT_OWNER_MISMATCH: "AGENT_OWNER_MISMATCH";
347
+ AGENT_MISMATCH: "AGENT_MISMATCH";
348
+ AGENT_NOT_ACTIVE: "AGENT_NOT_ACTIVE";
349
+ INTERFACE_NOT_ALLOWED: "INTERFACE_NOT_ALLOWED";
350
+ AUTHORITY_PAUSED: "AUTHORITY_PAUSED";
351
+ AUTHORITY_CHAIN_MISSING: "AUTHORITY_CHAIN_MISSING";
352
+ DUPLICATE_GRANT_ID: "DUPLICATE_GRANT_ID";
353
+ GRANT_TENANT_MISMATCH: "GRANT_TENANT_MISMATCH";
354
+ GRANT_PRINCIPAL_MISMATCH: "GRANT_PRINCIPAL_MISMATCH";
355
+ GRANT_AGENT_MISMATCH: "GRANT_AGENT_MISMATCH";
356
+ GRANT_NOT_ACTIVE: "GRANT_NOT_ACTIVE";
357
+ GRANT_REVOKED: "GRANT_REVOKED";
358
+ GRANT_NOT_YET_VALID: "GRANT_NOT_YET_VALID";
359
+ GRANT_EXPIRED: "GRANT_EXPIRED";
360
+ INVALID_PARENT_LINK: "INVALID_PARENT_LINK";
361
+ DELEGATION_NOT_ALLOWED: "DELEGATION_NOT_ALLOWED";
362
+ AUTHORITY_AMPLIFICATION: "AUTHORITY_AMPLIFICATION";
363
+ ACTION_NOT_ALLOWED: "ACTION_NOT_ALLOWED";
364
+ RESOURCE_NOT_ALLOWED: "RESOURCE_NOT_ALLOWED";
365
+ ADAPTER_NOT_ALLOWED: "ADAPTER_NOT_ALLOWED";
366
+ VALUE_LIMIT_EXCEEDED: "VALUE_LIMIT_EXCEEDED";
367
+ USE_LIMIT_EXCEEDED: "USE_LIMIT_EXCEEDED";
368
+ MERCHANT_NOT_ALLOWED: "MERCHANT_NOT_ALLOWED";
369
+ CATEGORY_NOT_ALLOWED: "CATEGORY_NOT_ALLOWED";
370
+ RECURRENCE_NOT_ALLOWED: "RECURRENCE_NOT_ALLOWED";
371
+ BUDGET_NOT_FOUND: "BUDGET_NOT_FOUND";
372
+ BUDGET_SCOPE_MISMATCH: "BUDGET_SCOPE_MISMATCH";
373
+ BUDGET_NOT_ACTIVE: "BUDGET_NOT_ACTIVE";
374
+ BUDGET_EXPIRED: "BUDGET_EXPIRED";
375
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
376
+ TRANSACTION_LIMIT_EXCEEDED: "TRANSACTION_LIMIT_EXCEEDED";
377
+ }>;
378
+ }, z.core.$strict>], "decision">;
379
+ }, z.core.$strict>, z.ZodObject<{
380
+ eventType: z.ZodLiteral<"REQUEST_DENIED">;
381
+ payload: z.ZodObject<{
382
+ decision: z.ZodLiteral<"DENY">;
383
+ actionDigest: z.ZodNullable<z.ZodString>;
384
+ requestDeniedDigest: z.ZodString;
385
+ reasonCode: z.ZodString;
386
+ decidedAtEpochMs: z.ZodNumber;
387
+ }, z.core.$strict>;
388
+ }, z.core.$strict>, z.ZodObject<{
389
+ eventType: z.ZodLiteral<"APPROVAL_STATE_REFERENCED">;
390
+ payload: z.ZodObject<{
391
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
392
+ version: z.ZodNumber;
393
+ state: z.ZodEnum<{
394
+ revoked: "revoked";
395
+ pending: "pending";
396
+ expired: "expired";
397
+ approved: "approved";
398
+ denied: "denied";
399
+ superseded: "superseded";
400
+ consumed: "consumed";
401
+ }>;
402
+ approvalDigest: z.ZodString;
403
+ }, z.core.$strict>;
404
+ }, z.core.$strict>, z.ZodObject<{
405
+ eventType: z.ZodLiteral<"APPROVAL_PRESENTED">;
406
+ payload: z.ZodObject<{
407
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
408
+ presentationDigest: z.ZodString;
409
+ viewerReference: z.ZodString;
410
+ }, z.core.$strict>;
411
+ }, z.core.$strict>, z.ZodObject<{
412
+ eventType: z.ZodLiteral<"APPROVAL_DECISION_RECORDED">;
413
+ payload: z.ZodObject<{
414
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
415
+ version: z.ZodNumber;
416
+ decision: z.ZodEnum<{
417
+ veto: "veto";
418
+ approve: "approve";
419
+ deny: "deny";
420
+ revoke: "revoke";
421
+ endorse: "endorse";
422
+ dissent: "dissent";
423
+ mature: "mature";
424
+ }>;
425
+ actorPrincipalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
426
+ actorReference: z.ZodString;
427
+ presentationDigest: z.ZodString;
428
+ }, z.core.$strict>;
429
+ }, z.core.$strict>, z.ZodObject<{
430
+ eventType: z.ZodLiteral<"APPROVAL_REJECTED">;
431
+ payload: z.ZodObject<{
432
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
433
+ reasonCode: z.ZodString;
434
+ }, z.core.$strict>;
435
+ }, z.core.$strict>, z.ZodObject<{
436
+ eventType: z.ZodLiteral<"CAPABILITY_STATE_REFERENCED">;
437
+ payload: z.ZodObject<{
438
+ actionDigest: z.ZodString;
439
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
440
+ state: z.ZodEnum<{
441
+ revoked: "revoked";
442
+ expired: "expired";
443
+ issued: "issued";
444
+ used: "used";
445
+ }>;
446
+ capabilityDigest: z.ZodString;
447
+ }, z.core.$strict>;
448
+ }, z.core.$strict>, z.ZodObject<{
449
+ eventType: z.ZodLiteral<"CAPABILITY_REJECTED">;
450
+ payload: z.ZodObject<{
451
+ actionDigest: z.ZodString;
452
+ reasonCode: z.ZodString;
453
+ }, z.core.$strict>;
454
+ }, z.core.$strict>, z.ZodObject<{
455
+ eventType: z.ZodLiteral<"EXECUTION_ATTEMPTED">;
456
+ payload: z.ZodObject<{
457
+ actionDigest: z.ZodString;
458
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
459
+ attemptReference: z.ZodString;
460
+ idempotencyDigest: z.ZodString;
461
+ }, z.core.$strict>;
462
+ }, z.core.$strict>, z.ZodObject<{
463
+ eventType: z.ZodLiteral<"EXECUTION_ABORTED">;
464
+ payload: z.ZodObject<{
465
+ actionDigest: z.ZodString;
466
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
467
+ attemptReference: z.ZodString;
468
+ reasonCode: z.ZodString;
469
+ }, z.core.$strict>;
470
+ }, z.core.$strict>, z.ZodObject<{
471
+ eventType: z.ZodLiteral<"EFFECT_PREPARED">;
472
+ payload: z.ZodObject<{
473
+ actionDigest: z.ZodString;
474
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
475
+ attemptReference: z.ZodString;
476
+ preparedDigest: z.ZodString;
477
+ }, z.core.$strict>;
478
+ }, z.core.$strict>, z.ZodObject<{
479
+ eventType: z.ZodLiteral<"EFFECT_COMMIT_AUTHORIZED">;
480
+ payload: z.ZodObject<{
481
+ actionDigest: z.ZodString;
482
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
483
+ attemptReference: z.ZodString;
484
+ actionDecisionDigest: z.ZodString;
485
+ }, z.core.$strict>;
486
+ }, z.core.$strict>, z.ZodObject<{
487
+ eventType: z.ZodLiteral<"EFFECT_OUTCOME_UNKNOWN">;
488
+ payload: z.ZodObject<{
489
+ actionDigest: z.ZodString;
490
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
491
+ attemptReference: z.ZodString;
492
+ reasonCode: z.ZodString;
493
+ }, z.core.$strict>;
494
+ }, z.core.$strict>, z.ZodObject<{
495
+ eventType: z.ZodLiteral<"EFFECT_UNRESOLVED">;
496
+ payload: z.ZodObject<{
497
+ actionDigest: z.ZodString;
498
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
499
+ attemptReference: z.ZodString;
500
+ }, z.core.$strict>;
501
+ }, z.core.$strict>, z.ZodObject<{
502
+ eventType: z.ZodLiteral<"EFFECT_VERIFIED">;
503
+ payload: z.ZodObject<{
504
+ actionDigest: z.ZodString;
505
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
506
+ attemptReference: z.ZodString;
507
+ effectDigest: z.ZodString;
508
+ }, z.core.$strict>;
509
+ }, z.core.$strict>, z.ZodObject<{
510
+ eventType: z.ZodLiteral<"EXECUTION_FAILED">;
511
+ payload: z.ZodObject<{
512
+ actionDigest: z.ZodString;
513
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
514
+ attemptReference: z.ZodString;
515
+ failureCode: z.ZodString;
516
+ failureDigest: z.ZodOptional<z.ZodString>;
517
+ }, z.core.$strict>;
518
+ }, z.core.$strict>, z.ZodObject<{
519
+ eventType: z.ZodLiteral<"AUTHORITY_REVOKED">;
520
+ payload: z.ZodObject<{
521
+ grantId: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
522
+ grantVersion: z.ZodNumber;
523
+ revocationDigest: z.ZodString;
524
+ }, z.core.$strict>;
525
+ }, z.core.$strict>], "eventType">;
526
+ sequence: z.ZodNumber;
527
+ previousRecordHash: z.ZodNullable<z.ZodString>;
528
+ payloadDigest: z.ZodString;
529
+ schemaVersion: z.ZodLiteral<1>;
530
+ id: z.core.$ZodBranded<z.ZodString, "EvidenceId", "out">;
531
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
532
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
533
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
534
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
535
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
536
+ eventTimeEpochMs: z.ZodNumber;
537
+ }, z.core.$strict>>;
538
+ recordCount: z.ZodNumber;
539
+ headRecordHash: z.ZodString;
540
+ }, z.core.$strict>;
541
+ export declare const ReceiptProofSchema: z.ZodObject<{
542
+ algorithm: z.ZodLiteral<"Ed25519">;
543
+ canonicalization: z.ZodLiteral<"guardian-canonical-json.v1">;
544
+ domain: z.ZodLiteral<"odingard.guardian.receipt.v1">;
545
+ keyId: z.ZodString;
546
+ signature: z.ZodString;
547
+ }, z.core.$strict>;
548
+ /** Everything the signature covers; the proof is the only unsigned field. */
549
+ export declare const PortableReceiptBodySchema: z.ZodObject<{
550
+ format: z.ZodLiteral<"greceipt.v1">;
551
+ schemaVersion: z.ZodLiteral<1>;
552
+ receiptId: z.core.$ZodBranded<z.ZodString, "ReceiptId", "out">;
553
+ issuedAtEpochMs: z.ZodNumber;
554
+ subject: z.ZodObject<{
555
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
556
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
557
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
558
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
559
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
560
+ }, z.core.$strict>;
561
+ runtime: z.ZodObject<{
562
+ interface: z.ZodEnum<{
563
+ mcp: "mcp";
564
+ rest: "rest";
565
+ internal: "internal";
566
+ }>;
567
+ requestedAdapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
568
+ adapterId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "AdapterId", "out">>;
569
+ }, z.core.$strict>;
570
+ action: z.ZodObject<{
571
+ schemaVersion: z.ZodLiteral<1>;
572
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
573
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
574
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
575
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
576
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
577
+ action: z.core.$ZodBranded<z.ZodString, "ActionType", "out">;
578
+ resource: z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">;
579
+ interface: z.ZodEnum<{
580
+ mcp: "mcp";
581
+ rest: "rest";
582
+ internal: "internal";
583
+ }>;
584
+ valueCents: z.ZodOptional<z.ZodNumber>;
585
+ merchantId: z.ZodOptional<z.ZodString>;
586
+ merchantCategory: z.ZodOptional<z.ZodString>;
587
+ recurring: z.ZodOptional<z.ZodBoolean>;
588
+ taskId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TaskId", "out">>;
589
+ intentId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "IntentId", "out">>;
590
+ planId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "PlanId", "out">>;
591
+ obligations: z.ZodOptional<z.ZodArray<z.ZodObject<{
592
+ type: z.ZodEnum<{
593
+ log: "log";
594
+ retain_receipt: "retain_receipt";
595
+ notify: "notify";
596
+ delay: "delay";
597
+ cooling_period: "cooling_period";
598
+ delete_after_use: "delete_after_use";
599
+ redact: "redact";
600
+ encrypt: "encrypt";
601
+ tokenize: "tokenize";
602
+ minimize: "minimize";
603
+ verify_counterparty: "verify_counterparty";
604
+ verify_resource: "verify_resource";
605
+ verify_effect: "verify_effect";
606
+ attest_runtime: "attest_runtime";
607
+ require_consent: "require_consent";
608
+ require_location: "require_location";
609
+ require_device: "require_device";
610
+ require_network: "require_network";
611
+ require_contract: "require_contract";
612
+ step_up: "step_up";
613
+ second_approver: "second_approver";
614
+ quorum: "quorum";
615
+ authenticate: "authenticate";
616
+ }>;
617
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
618
+ }, z.core.$strict>>>;
619
+ obligationStates: z.ZodOptional<z.ZodArray<z.ZodObject<{
620
+ obligationType: z.ZodEnum<{
621
+ log: "log";
622
+ retain_receipt: "retain_receipt";
623
+ notify: "notify";
624
+ delay: "delay";
625
+ cooling_period: "cooling_period";
626
+ delete_after_use: "delete_after_use";
627
+ redact: "redact";
628
+ encrypt: "encrypt";
629
+ tokenize: "tokenize";
630
+ minimize: "minimize";
631
+ verify_counterparty: "verify_counterparty";
632
+ verify_resource: "verify_resource";
633
+ verify_effect: "verify_effect";
634
+ attest_runtime: "attest_runtime";
635
+ require_consent: "require_consent";
636
+ require_location: "require_location";
637
+ require_device: "require_device";
638
+ require_network: "require_network";
639
+ require_contract: "require_contract";
640
+ step_up: "step_up";
641
+ second_approver: "second_approver";
642
+ quorum: "quorum";
643
+ authenticate: "authenticate";
644
+ }>;
645
+ state: z.ZodEnum<{
646
+ satisfied: "satisfied";
647
+ pending: "pending";
648
+ failed: "failed";
649
+ not_applicable: "not_applicable";
650
+ }>;
651
+ rule: z.ZodEnum<{
652
+ OBLIGATION_SATISFIED: "OBLIGATION_SATISFIED";
653
+ PENDING_POST_ACTION: "PENDING_POST_ACTION";
654
+ PENDING_TIME: "PENDING_TIME";
655
+ PENDING_HUMAN: "PENDING_HUMAN";
656
+ OBLIGATION_PARAMS_INVALID: "OBLIGATION_PARAMS_INVALID";
657
+ COUNTERPARTY_UNVERIFIED: "COUNTERPARTY_UNVERIFIED";
658
+ RESOURCE_NOT_COVERED: "RESOURCE_NOT_COVERED";
659
+ OBLIGATION_VERIFIER_UNAVAILABLE: "OBLIGATION_VERIFIER_UNAVAILABLE";
660
+ }>;
661
+ detail: z.ZodOptional<z.ZodString>;
662
+ dueEpochMs: z.ZodOptional<z.ZodNumber>;
663
+ }, z.core.$strict>>>;
664
+ prerequisiteResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
665
+ id: z.ZodString;
666
+ prerequisiteType: z.ZodString;
667
+ state: z.ZodEnum<{
668
+ satisfied: "satisfied";
669
+ pending: "pending";
670
+ failed: "failed";
671
+ not_applicable: "not_applicable";
672
+ }>;
673
+ rule: z.ZodEnum<{
674
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
675
+ PENDING_HUMAN: "PENDING_HUMAN";
676
+ PREREQUISITE_SATISFIED: "PREREQUISITE_SATISFIED";
677
+ MERCHANT_UNVERIFIED: "MERCHANT_UNVERIFIED";
678
+ BUDGET_NOT_DECLARED: "BUDGET_NOT_DECLARED";
679
+ CAPABILITY_NOT_COVERED: "CAPABILITY_NOT_COVERED";
680
+ ADDRESS_NOT_AUTHORIZED: "ADDRESS_NOT_AUTHORIZED";
681
+ PREREQUISITE_PARAMS_INVALID: "PREREQUISITE_PARAMS_INVALID";
682
+ PREREQUISITE_VERIFIER_UNAVAILABLE: "PREREQUISITE_VERIFIER_UNAVAILABLE";
683
+ }>;
684
+ detail: z.ZodOptional<z.ZodString>;
685
+ }, z.core.$strict>>>;
686
+ parentActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "RequestId", "out">>;
687
+ sourceEffectId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "AttemptId", "out">>;
688
+ sequenceMatches: z.ZodOptional<z.ZodArray<z.ZodObject<{
689
+ ruleId: z.ZodString;
690
+ effect: z.ZodEnum<{
691
+ deny: "deny";
692
+ require_approval: "require_approval";
693
+ }>;
694
+ matchedActionRefs: z.ZodArray<z.ZodString>;
695
+ }, z.core.$strict>>>;
696
+ lineageMatches: z.ZodOptional<z.ZodArray<z.ZodObject<{
697
+ dataObjectId: z.core.$ZodBranded<z.ZodString, "DataObjectId", "out">;
698
+ effectiveClassification: z.ZodEnum<{
699
+ financial: "financial";
700
+ internal: "internal";
701
+ public: "public";
702
+ pii: "pii";
703
+ phi: "phi";
704
+ credential: "credential";
705
+ confidential: "confidential";
706
+ }>;
707
+ effect: z.ZodEnum<{
708
+ allowed: "allowed";
709
+ deny: "deny";
710
+ require_approval: "require_approval";
711
+ }>;
712
+ expired: z.ZodBoolean;
713
+ }, z.core.$strict>>>;
714
+ runtimeTrustLevel: z.ZodOptional<z.ZodEnum<{
715
+ T0_UNKNOWN: "T0_UNKNOWN";
716
+ T1_IDENTIFIED: "T1_IDENTIFIED";
717
+ T2_VERIFIED: "T2_VERIFIED";
718
+ T3_ATTESTED: "T3_ATTESTED";
719
+ T4_HARDWARE_BACKED: "T4_HARDWARE_BACKED";
720
+ }>>;
721
+ enforcementAssurance: z.ZodOptional<z.ZodEnum<{
722
+ G2_CREDENTIAL_MEDIATED: "G2_CREDENTIAL_MEDIATED";
723
+ G1_POLICY_MEDIATED: "G1_POLICY_MEDIATED";
724
+ G3_RUNTIME_CONTAINED: "G3_RUNTIME_CONTAINED";
725
+ G0_OBSERVED: "G0_OBSERVED";
726
+ G4_COUNTERPARTY_INTERLOCKED: "G4_COUNTERPARTY_INTERLOCKED";
727
+ }>>;
728
+ approvalStructures: z.ZodOptional<z.ZodArray<z.ZodObject<{
729
+ schema: z.ZodLiteral<"guardian.multiparty.v1">;
730
+ structureId: z.ZodString;
731
+ members: z.ZodArray<z.ZodObject<{
732
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
733
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
734
+ }, z.core.$strict>>;
735
+ requirement: z.ZodDiscriminatedUnion<[z.ZodObject<{
736
+ kind: z.ZodLiteral<"single">;
737
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
738
+ }, z.core.$strict>, z.ZodObject<{
739
+ kind: z.ZodLiteral<"nOfM">;
740
+ n: z.ZodNumber;
741
+ members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
742
+ }, z.core.$strict>, z.ZodObject<{
743
+ kind: z.ZodLiteral<"unanimous">;
744
+ members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
745
+ }, z.core.$strict>, z.ZodObject<{
746
+ kind: z.ZodLiteral<"roleQuorum">;
747
+ role: z.ZodString;
748
+ n: z.ZodNumber;
749
+ m: z.ZodNumber;
750
+ }, z.core.$strict>], "kind">;
751
+ specificRequired: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
752
+ veto: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
753
+ separationOfDuties: z.ZodOptional<z.ZodObject<{
754
+ mutuallyExclusive: z.ZodArray<z.ZodArray<z.ZodString>>;
755
+ }, z.core.$strict>>;
756
+ temporaryApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
757
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
758
+ expiresAtEpochMs: z.ZodNumber;
759
+ }, z.core.$strict>>>;
760
+ delegatedApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
761
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
762
+ delegatedBy: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
763
+ }, z.core.$strict>>>;
764
+ emergencyApprovers: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
765
+ coolingPeriod: z.ZodOptional<z.ZodObject<{
766
+ seconds: z.ZodNumber;
767
+ }, z.core.$strict>>;
768
+ }, z.core.$strict>>>;
769
+ appliedAuthoritySources: z.ZodOptional<z.ZodObject<{
770
+ applied: z.ZodArray<z.ZodString>;
771
+ constraints: z.ZodObject<{
772
+ allowedActions: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ActionType", "out">>>;
773
+ deniedActions: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ActionType", "out">>>;
774
+ allowedResources: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">>>;
775
+ allowedInterfaces: z.ZodOptional<z.ZodArray<z.ZodEnum<{
776
+ mcp: "mcp";
777
+ rest: "rest";
778
+ internal: "internal";
779
+ }>>>;
780
+ maxValueCents: z.ZodOptional<z.ZodNumber>;
781
+ maxUses: z.ZodOptional<z.ZodNumber>;
782
+ minRuntimeLevel: z.ZodOptional<z.ZodEnum<{
783
+ T0_UNKNOWN: "T0_UNKNOWN";
784
+ T1_IDENTIFIED: "T1_IDENTIFIED";
785
+ T2_VERIFIED: "T2_VERIFIED";
786
+ T3_ATTESTED: "T3_ATTESTED";
787
+ T4_HARDWARE_BACKED: "T4_HARDWARE_BACKED";
788
+ }>>;
789
+ minAssuranceLevel: z.ZodOptional<z.ZodEnum<{
790
+ G2_CREDENTIAL_MEDIATED: "G2_CREDENTIAL_MEDIATED";
791
+ G1_POLICY_MEDIATED: "G1_POLICY_MEDIATED";
792
+ G3_RUNTIME_CONTAINED: "G3_RUNTIME_CONTAINED";
793
+ G0_OBSERVED: "G0_OBSERVED";
794
+ G4_COUNTERPARTY_INTERLOCKED: "G4_COUNTERPARTY_INTERLOCKED";
795
+ }>>;
796
+ requiredApprovals: z.ZodOptional<z.ZodNumber>;
797
+ }, z.core.$strict>;
798
+ }, z.core.$strict>>;
799
+ transaction: z.ZodOptional<z.ZodObject<{
800
+ schema: z.ZodLiteral<"guardian.transaction.v1">;
801
+ stages: z.ZodArray<z.ZodEnum<{
802
+ PROPOSE: "PROPOSE";
803
+ PREPARE: "PREPARE";
804
+ AUTHORIZE: "AUTHORIZE";
805
+ LOCK: "LOCK";
806
+ COMMIT: "COMMIT";
807
+ VERIFY: "VERIFY";
808
+ SETTLE: "SETTLE";
809
+ }>>;
810
+ deadlineMs: z.ZodOptional<z.ZodNumber>;
811
+ }, z.core.$strict>>;
812
+ compensates: z.ZodOptional<z.ZodObject<{
813
+ transactionId: z.core.$ZodBranded<z.ZodString, "TransactionId", "out">;
814
+ }, z.core.$strict>>;
815
+ physicalFacts: z.ZodOptional<z.ZodObject<{
816
+ zone: z.ZodOptional<z.ZodString>;
817
+ speed: z.ZodOptional<z.ZodNumber>;
818
+ force: z.ZodOptional<z.ZodNumber>;
819
+ payload: z.ZodOptional<z.ZodNumber>;
820
+ atEpochMs: z.ZodOptional<z.ZodNumber>;
821
+ humanDistance: z.ZodOptional<z.ZodNumber>;
822
+ environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
823
+ supervised: z.ZodOptional<z.ZodBoolean>;
824
+ }, z.core.$strict>>;
825
+ safetyEnvelopeOutcome: z.ZodOptional<z.ZodObject<{
826
+ envelopeDigest: z.ZodString;
827
+ satisfied: z.ZodBoolean;
828
+ violations: z.ZodArray<z.ZodEnum<{
829
+ OUT_OF_ZONE: "OUT_OF_ZONE";
830
+ FORBIDDEN_ZONE: "FORBIDDEN_ZONE";
831
+ OVER_SPEED: "OVER_SPEED";
832
+ OVER_FORCE: "OVER_FORCE";
833
+ OVER_PAYLOAD: "OVER_PAYLOAD";
834
+ OUTSIDE_TIME_WINDOW: "OUTSIDE_TIME_WINDOW";
835
+ PROXIMITY_VIOLATION: "PROXIMITY_VIOLATION";
836
+ ENVIRONMENT_VIOLATION: "ENVIRONMENT_VIOLATION";
837
+ SUPERVISION_REQUIRED: "SUPERVISION_REQUIRED";
838
+ }>>;
839
+ emergencyStopped: z.ZodBoolean;
840
+ failSafeApplied: z.ZodBoolean;
841
+ }, z.core.$strict>>;
842
+ uses: z.ZodNumber;
843
+ materialParameters: z.ZodPipe<z.ZodUnknown, z.ZodTransform<Readonly<Record<string, import("./canonical-json.js").CanonicalJsonValue>>, unknown>>;
844
+ initiatingContext: z.ZodEnum<{
845
+ agent: "agent";
846
+ user: "user";
847
+ scheduled: "scheduled";
848
+ "external-event": "external-event";
849
+ }>;
850
+ authority: z.ZodObject<{
851
+ policy: z.ZodObject<{
852
+ id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
853
+ version: z.ZodNumber;
854
+ }, z.core.$strict>;
855
+ evaluatedGrants: z.ZodArray<z.ZodObject<{
856
+ id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
857
+ version: z.ZodNumber;
858
+ }, z.core.$strict>>;
859
+ }, z.core.$strict>;
860
+ issuedAtEpochMs: z.ZodNumber;
861
+ expiresAtEpochMs: z.ZodNumber;
862
+ nonce: z.core.$ZodBranded<z.ZodString, "Nonce", "out">;
863
+ requestedAdapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
864
+ purpose: z.ZodString;
865
+ materialDigest: z.ZodString;
866
+ }, z.core.$strict>;
867
+ delegationChain: z.ZodArray<z.ZodObject<{
868
+ grantId: z.ZodString;
869
+ version: z.ZodNumber;
870
+ }, z.core.$strict>>;
871
+ decision: z.ZodObject<{
872
+ decision: z.ZodEnum<{
873
+ ALLOW: "ALLOW";
874
+ ASK: "ASK";
875
+ DENY: "DENY";
876
+ }>;
877
+ reasonCode: z.ZodUnion<readonly [z.ZodLiteral<"AUTHORIZED">, z.ZodLiteral<"APPROVAL_REQUIRED">, z.ZodEnum<{
878
+ MALFORMED_INPUT: "MALFORMED_INPUT";
879
+ TENANT_MISMATCH: "TENANT_MISMATCH";
880
+ PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
881
+ PRINCIPAL_NOT_ACTIVE: "PRINCIPAL_NOT_ACTIVE";
882
+ AGENT_TENANT_MISMATCH: "AGENT_TENANT_MISMATCH";
883
+ AGENT_OWNER_MISMATCH: "AGENT_OWNER_MISMATCH";
884
+ AGENT_MISMATCH: "AGENT_MISMATCH";
885
+ AGENT_NOT_ACTIVE: "AGENT_NOT_ACTIVE";
886
+ INTERFACE_NOT_ALLOWED: "INTERFACE_NOT_ALLOWED";
887
+ AUTHORITY_PAUSED: "AUTHORITY_PAUSED";
888
+ AUTHORITY_CHAIN_MISSING: "AUTHORITY_CHAIN_MISSING";
889
+ DUPLICATE_GRANT_ID: "DUPLICATE_GRANT_ID";
890
+ GRANT_TENANT_MISMATCH: "GRANT_TENANT_MISMATCH";
891
+ GRANT_PRINCIPAL_MISMATCH: "GRANT_PRINCIPAL_MISMATCH";
892
+ GRANT_AGENT_MISMATCH: "GRANT_AGENT_MISMATCH";
893
+ GRANT_NOT_ACTIVE: "GRANT_NOT_ACTIVE";
894
+ GRANT_REVOKED: "GRANT_REVOKED";
895
+ GRANT_NOT_YET_VALID: "GRANT_NOT_YET_VALID";
896
+ GRANT_EXPIRED: "GRANT_EXPIRED";
897
+ INVALID_PARENT_LINK: "INVALID_PARENT_LINK";
898
+ DELEGATION_NOT_ALLOWED: "DELEGATION_NOT_ALLOWED";
899
+ AUTHORITY_AMPLIFICATION: "AUTHORITY_AMPLIFICATION";
900
+ ACTION_NOT_ALLOWED: "ACTION_NOT_ALLOWED";
901
+ RESOURCE_NOT_ALLOWED: "RESOURCE_NOT_ALLOWED";
902
+ ADAPTER_NOT_ALLOWED: "ADAPTER_NOT_ALLOWED";
903
+ VALUE_LIMIT_EXCEEDED: "VALUE_LIMIT_EXCEEDED";
904
+ USE_LIMIT_EXCEEDED: "USE_LIMIT_EXCEEDED";
905
+ MERCHANT_NOT_ALLOWED: "MERCHANT_NOT_ALLOWED";
906
+ CATEGORY_NOT_ALLOWED: "CATEGORY_NOT_ALLOWED";
907
+ RECURRENCE_NOT_ALLOWED: "RECURRENCE_NOT_ALLOWED";
908
+ BUDGET_NOT_FOUND: "BUDGET_NOT_FOUND";
909
+ BUDGET_SCOPE_MISMATCH: "BUDGET_SCOPE_MISMATCH";
910
+ BUDGET_NOT_ACTIVE: "BUDGET_NOT_ACTIVE";
911
+ BUDGET_EXPIRED: "BUDGET_EXPIRED";
912
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
913
+ TRANSACTION_LIMIT_EXCEEDED: "TRANSACTION_LIMIT_EXCEEDED";
914
+ }>, z.ZodString]>;
915
+ actionDecisionDigest: z.ZodString;
916
+ decidedAtEpochMs: z.ZodNumber;
917
+ }, z.core.$strict>;
918
+ approval: z.ZodNullable<z.ZodObject<{
919
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
920
+ state: z.ZodEnum<{
921
+ revoked: "revoked";
922
+ pending: "pending";
923
+ expired: "expired";
924
+ approved: "approved";
925
+ denied: "denied";
926
+ superseded: "superseded";
927
+ consumed: "consumed";
928
+ }>;
929
+ version: z.ZodNumber;
930
+ approvalDigest: z.ZodString;
931
+ record: z.ZodObject<{
932
+ schemaVersion: z.ZodLiteral<1>;
933
+ binding: z.ZodObject<{
934
+ schemaVersion: z.ZodLiteral<1>;
935
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
936
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
937
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
938
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
939
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
940
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
941
+ actionDigest: z.ZodString;
942
+ actionDecisionRecordDigest: z.ZodString;
943
+ askDecisionDigest: z.ZodString;
944
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
945
+ policy: z.ZodObject<{
946
+ id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
947
+ version: z.ZodNumber;
948
+ }, z.core.$strict>;
949
+ evaluatedGrants: z.ZodArray<z.ZodObject<{
950
+ id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
951
+ version: z.ZodNumber;
952
+ }, z.core.$strict>>;
953
+ presentationDigest: z.ZodString;
954
+ requestedAtEpochMs: z.ZodNumber;
955
+ expiresAtEpochMs: z.ZodNumber;
956
+ eligiblePrincipalIds: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
957
+ requiredFactor: z.ZodOptional<z.ZodEnum<{
958
+ tap: "tap";
959
+ passkey: "passkey";
960
+ biometric: "biometric";
961
+ "second-device": "second-device";
962
+ "multi-approver": "multi-approver";
963
+ }>>;
964
+ requiredApprovals: z.ZodOptional<z.ZodNumber>;
965
+ scopeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
966
+ structures: z.ZodOptional<z.ZodArray<z.ZodObject<{
967
+ schema: z.ZodLiteral<"guardian.multiparty.v1">;
968
+ structureId: z.ZodString;
969
+ members: z.ZodArray<z.ZodObject<{
970
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
971
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
972
+ }, z.core.$strict>>;
973
+ requirement: z.ZodDiscriminatedUnion<[z.ZodObject<{
974
+ kind: z.ZodLiteral<"single">;
975
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
976
+ }, z.core.$strict>, z.ZodObject<{
977
+ kind: z.ZodLiteral<"nOfM">;
978
+ n: z.ZodNumber;
979
+ members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
980
+ }, z.core.$strict>, z.ZodObject<{
981
+ kind: z.ZodLiteral<"unanimous">;
982
+ members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
983
+ }, z.core.$strict>, z.ZodObject<{
984
+ kind: z.ZodLiteral<"roleQuorum">;
985
+ role: z.ZodString;
986
+ n: z.ZodNumber;
987
+ m: z.ZodNumber;
988
+ }, z.core.$strict>], "kind">;
989
+ specificRequired: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
990
+ veto: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
991
+ separationOfDuties: z.ZodOptional<z.ZodObject<{
992
+ mutuallyExclusive: z.ZodArray<z.ZodArray<z.ZodString>>;
993
+ }, z.core.$strict>>;
994
+ temporaryApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
995
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
996
+ expiresAtEpochMs: z.ZodNumber;
997
+ }, z.core.$strict>>>;
998
+ delegatedApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
999
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
1000
+ delegatedBy: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
1001
+ }, z.core.$strict>>>;
1002
+ emergencyApprovers: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
1003
+ coolingPeriod: z.ZodOptional<z.ZodObject<{
1004
+ seconds: z.ZodNumber;
1005
+ }, z.core.$strict>>;
1006
+ }, z.core.$strict>>>;
1007
+ }, z.core.$strict>;
1008
+ state: z.ZodEnum<{
1009
+ revoked: "revoked";
1010
+ pending: "pending";
1011
+ expired: "expired";
1012
+ approved: "approved";
1013
+ denied: "denied";
1014
+ superseded: "superseded";
1015
+ consumed: "consumed";
1016
+ }>;
1017
+ version: z.ZodNumber;
1018
+ updatedAtEpochMs: z.ZodNumber;
1019
+ decidedByPrincipalId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
1020
+ endorsements: z.ZodOptional<z.ZodArray<z.ZodObject<{
1021
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
1022
+ factor: z.ZodEnum<{
1023
+ tap: "tap";
1024
+ passkey: "passkey";
1025
+ biometric: "biometric";
1026
+ "second-device": "second-device";
1027
+ }>;
1028
+ atEpochMs: z.ZodNumber;
1029
+ }, z.core.$strict>>>;
1030
+ structureApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
1031
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
1032
+ decision: z.ZodEnum<{
1033
+ veto: "veto";
1034
+ approve: "approve";
1035
+ deny: "deny";
1036
+ }>;
1037
+ atEpochMs: z.ZodNumber;
1038
+ via: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
1039
+ emergency: z.ZodOptional<z.ZodLiteral<true>>;
1040
+ }, z.core.$strict>>>;
1041
+ cooling: z.ZodOptional<z.ZodObject<{
1042
+ startedAtEpochMs: z.ZodNumber;
1043
+ endsAtEpochMs: z.ZodNumber;
1044
+ }, z.core.$strict>>;
1045
+ }, z.core.$strict>;
1046
+ }, z.core.$strict>>;
1047
+ capability: z.ZodNullable<z.ZodObject<{
1048
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
1049
+ claims: z.ZodObject<{
1050
+ schemaVersion: z.ZodLiteral<1>;
1051
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
1052
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
1053
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
1054
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
1055
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
1056
+ actionDigest: z.ZodString;
1057
+ actionNonce: z.core.$ZodBranded<z.ZodString, "Nonce", "out">;
1058
+ audience: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
1059
+ policy: z.ZodObject<{
1060
+ id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
1061
+ version: z.ZodNumber;
1062
+ }, z.core.$strict>;
1063
+ evaluatedGrants: z.ZodArray<z.ZodObject<{
1064
+ id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
1065
+ version: z.ZodNumber;
1066
+ }, z.core.$strict>>;
1067
+ issuedAtEpochMs: z.ZodNumber;
1068
+ expiresAtEpochMs: z.ZodNumber;
1069
+ maxUses: z.ZodLiteral<1>;
1070
+ keyId: z.core.$ZodBranded<z.ZodString, "CapabilityKeyId", "out">;
1071
+ algorithm: z.ZodLiteral<"HS256">;
1072
+ }, z.core.$strict>;
1073
+ claimsDigest: z.ZodString;
1074
+ state: z.ZodEnum<{
1075
+ revoked: "revoked";
1076
+ expired: "expired";
1077
+ issued: "issued";
1078
+ used: "used";
1079
+ }>;
1080
+ }, z.core.$strict>>;
1081
+ execution: z.ZodNullable<z.ZodObject<{
1082
+ schemaVersion: z.ZodLiteral<1>;
1083
+ attemptId: z.core.$ZodBranded<z.ZodString, "AttemptId", "out">;
1084
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
1085
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
1086
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
1087
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
1088
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
1089
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
1090
+ actionDigest: z.ZodString;
1091
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
1092
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
1093
+ provider: z.ZodEnum<{
1094
+ api: "api";
1095
+ tool: "tool";
1096
+ local: "local";
1097
+ guardian: "guardian";
1098
+ gmail: "gmail";
1099
+ gcalendar: "gcalendar";
1100
+ file: "file";
1101
+ protected_data: "protected_data";
1102
+ graph: "graph";
1103
+ clawlink: "clawlink";
1104
+ "payment-sandbox": "payment-sandbox";
1105
+ }>;
1106
+ profile: z.ZodEnum<{
1107
+ "guardian-agent-v1": "guardian-agent-v1";
1108
+ "gmail-split-compose-metadata": "gmail-split-compose-metadata";
1109
+ "gmail-compose-readonly": "gmail-compose-readonly";
1110
+ "graph-readwrite-send": "graph-readwrite-send";
1111
+ "api-bearer-request": "api-bearer-request";
1112
+ "tool-mcp-server": "tool-mcp-server";
1113
+ "gcalendar-events-v1": "gcalendar-events-v1";
1114
+ "payment-sandbox-charge": "payment-sandbox-charge";
1115
+ "file-local-store": "file-local-store";
1116
+ "protected-data-store": "protected-data-store";
1117
+ "local-agent-runtime": "local-agent-runtime";
1118
+ "clawlink-executions": "clawlink-executions";
1119
+ }>;
1120
+ effectKey: z.ZodString;
1121
+ expectedProjectionDigest: z.ZodString;
1122
+ expectedEnvelopeDigest: z.ZodString;
1123
+ state: z.ZodEnum<{
1124
+ unknown: "unknown";
1125
+ verified: "verified";
1126
+ mismatch: "mismatch";
1127
+ "commit-rejected": "commit-rejected";
1128
+ aborted: "aborted";
1129
+ reserved: "reserved";
1130
+ redeemed: "redeemed";
1131
+ preparing: "preparing";
1132
+ prepared: "prepared";
1133
+ committing: "committing";
1134
+ unresolved: "unresolved";
1135
+ }>;
1136
+ version: z.ZodNumber;
1137
+ reservedAtEpochMs: z.ZodNumber;
1138
+ updatedAtEpochMs: z.ZodNumber;
1139
+ commitDeadlineEpochMs: z.ZodNumber;
1140
+ commitLeaseDeadlineEpochMs: z.ZodNullable<z.ZodNumber>;
1141
+ reconcileDeadlineEpochMs: z.ZodNullable<z.ZodNumber>;
1142
+ lateReconcileDeadlineEpochMs: z.ZodNullable<z.ZodNumber>;
1143
+ commitLeaseIssued: z.ZodBoolean;
1144
+ providerObjectRef: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1145
+ kind: z.ZodLiteral<"gmail-draft">;
1146
+ draftId: z.ZodString;
1147
+ messageId: z.ZodString;
1148
+ threadId: z.ZodString;
1149
+ }, z.core.$strict>, z.ZodObject<{
1150
+ kind: z.ZodLiteral<"graph-message">;
1151
+ immutableId: z.ZodString;
1152
+ internetMessageId: z.ZodString;
1153
+ }, z.core.$strict>, z.ZodObject<{
1154
+ kind: z.ZodLiteral<"api-request">;
1155
+ requestDigest: z.ZodString;
1156
+ }, z.core.$strict>, z.ZodObject<{
1157
+ kind: z.ZodLiteral<"tool-call">;
1158
+ callDigest: z.ZodString;
1159
+ }, z.core.$strict>, z.ZodObject<{
1160
+ kind: z.ZodLiteral<"gcalendar-plan">;
1161
+ requestDigest: z.ZodString;
1162
+ }, z.core.$strict>, z.ZodObject<{
1163
+ kind: z.ZodLiteral<"payment-order">;
1164
+ orderId: z.ZodString;
1165
+ intentId: z.ZodString;
1166
+ }, z.core.$strict>, z.ZodObject<{
1167
+ kind: z.ZodLiteral<"file-request">;
1168
+ requestDigest: z.ZodString;
1169
+ }, z.core.$strict>, z.ZodObject<{
1170
+ kind: z.ZodLiteral<"protected_data-op">;
1171
+ operationDigest: z.ZodString;
1172
+ }, z.core.$strict>, z.ZodObject<{
1173
+ kind: z.ZodLiteral<"guardian-call">;
1174
+ callDigest: z.ZodString;
1175
+ }, z.core.$strict>, z.ZodObject<{
1176
+ kind: z.ZodLiteral<"clawlink-execution">;
1177
+ requestDigest: z.ZodString;
1178
+ }, z.core.$strict>], "kind">>;
1179
+ sentRef: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1180
+ kind: z.ZodLiteral<"gmail-message">;
1181
+ messageId: z.ZodString;
1182
+ threadId: z.ZodString;
1183
+ }, z.core.$strict>, z.ZodObject<{
1184
+ kind: z.ZodLiteral<"graph-message">;
1185
+ immutableId: z.ZodString;
1186
+ }, z.core.$strict>, z.ZodObject<{
1187
+ kind: z.ZodLiteral<"api-response">;
1188
+ status: z.ZodNumber;
1189
+ bodyBytes: z.ZodNumber;
1190
+ headersDigest: z.ZodString;
1191
+ bodyDigest: z.ZodString;
1192
+ bodyPreview: z.ZodString;
1193
+ truncated: z.ZodBoolean;
1194
+ }, z.core.$strict>, z.ZodObject<{
1195
+ kind: z.ZodLiteral<"tool-response">;
1196
+ operation: z.ZodEnum<{
1197
+ enable: "enable";
1198
+ install: "install";
1199
+ invoke: "invoke";
1200
+ }>;
1201
+ toolName: z.ZodString;
1202
+ status: z.ZodNullable<z.ZodNumber>;
1203
+ resultDigest: z.ZodString;
1204
+ detail: z.ZodString;
1205
+ }, z.core.$strict>, z.ZodObject<{
1206
+ kind: z.ZodLiteral<"gcalendar-event">;
1207
+ eventId: z.ZodString;
1208
+ status: z.ZodEnum<{
1209
+ cancelled: "cancelled";
1210
+ confirmed: "confirmed";
1211
+ }>;
1212
+ }, z.core.$strict>, z.ZodObject<{
1213
+ kind: z.ZodLiteral<"payment-charge">;
1214
+ chargeId: z.ZodString;
1215
+ amountCents: z.ZodNumber;
1216
+ currency: z.ZodString;
1217
+ status: z.ZodEnum<{
1218
+ succeeded: "succeeded";
1219
+ refunded: "refunded";
1220
+ returned: "returned";
1221
+ voided: "voided";
1222
+ }>;
1223
+ }, z.core.$strict>, z.ZodObject<{
1224
+ kind: z.ZodLiteral<"file-effect">;
1225
+ operation: z.ZodEnum<{
1226
+ share: "share";
1227
+ delete: "delete";
1228
+ read: "read";
1229
+ write: "write";
1230
+ }>;
1231
+ path: z.ZodString;
1232
+ contentDigest: z.ZodNullable<z.ZodString>;
1233
+ bytes: z.ZodNumber;
1234
+ shareId: z.ZodNullable<z.ZodString>;
1235
+ grantee: z.ZodNullable<z.ZodString>;
1236
+ }, z.core.$strict>, z.ZodObject<{
1237
+ kind: z.ZodLiteral<"protected_data-effect">;
1238
+ operation: z.ZodEnum<{
1239
+ view: "view";
1240
+ use: "use";
1241
+ disclose: "disclose";
1242
+ persist: "persist";
1243
+ }>;
1244
+ fieldRef: z.ZodString;
1245
+ valueDigest: z.ZodString;
1246
+ counterparty: z.ZodNullable<z.ZodString>;
1247
+ maskedPreview: z.ZodNullable<z.ZodString>;
1248
+ }, z.core.$strict>, z.ZodObject<{
1249
+ kind: z.ZodLiteral<"guardian-effect">;
1250
+ operation: z.ZodString;
1251
+ subject: z.ZodNullable<z.ZodString>;
1252
+ status: z.ZodString;
1253
+ resultDigest: z.ZodString;
1254
+ detail: z.ZodString;
1255
+ }, z.core.$strict>, z.ZodObject<{
1256
+ kind: z.ZodLiteral<"clawlink-execution">;
1257
+ executionId: z.ZodString;
1258
+ executionStatus: z.ZodLiteral<"succeeded">;
1259
+ resultDigest: z.ZodString;
1260
+ detail: z.ZodString;
1261
+ }, z.core.$strict>], "kind">>;
1262
+ orphanDraftPossible: z.ZodBoolean;
1263
+ pendingOutcome: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1264
+ kind: z.ZodLiteral<"verified">;
1265
+ sentRef: z.ZodDiscriminatedUnion<[z.ZodObject<{
1266
+ kind: z.ZodLiteral<"gmail-message">;
1267
+ messageId: z.ZodString;
1268
+ threadId: z.ZodString;
1269
+ }, z.core.$strict>, z.ZodObject<{
1270
+ kind: z.ZodLiteral<"graph-message">;
1271
+ immutableId: z.ZodString;
1272
+ }, z.core.$strict>, z.ZodObject<{
1273
+ kind: z.ZodLiteral<"api-response">;
1274
+ status: z.ZodNumber;
1275
+ bodyBytes: z.ZodNumber;
1276
+ headersDigest: z.ZodString;
1277
+ bodyDigest: z.ZodString;
1278
+ bodyPreview: z.ZodString;
1279
+ truncated: z.ZodBoolean;
1280
+ }, z.core.$strict>, z.ZodObject<{
1281
+ kind: z.ZodLiteral<"tool-response">;
1282
+ operation: z.ZodEnum<{
1283
+ enable: "enable";
1284
+ install: "install";
1285
+ invoke: "invoke";
1286
+ }>;
1287
+ toolName: z.ZodString;
1288
+ status: z.ZodNullable<z.ZodNumber>;
1289
+ resultDigest: z.ZodString;
1290
+ detail: z.ZodString;
1291
+ }, z.core.$strict>, z.ZodObject<{
1292
+ kind: z.ZodLiteral<"gcalendar-event">;
1293
+ eventId: z.ZodString;
1294
+ status: z.ZodEnum<{
1295
+ cancelled: "cancelled";
1296
+ confirmed: "confirmed";
1297
+ }>;
1298
+ }, z.core.$strict>, z.ZodObject<{
1299
+ kind: z.ZodLiteral<"payment-charge">;
1300
+ chargeId: z.ZodString;
1301
+ amountCents: z.ZodNumber;
1302
+ currency: z.ZodString;
1303
+ status: z.ZodEnum<{
1304
+ succeeded: "succeeded";
1305
+ refunded: "refunded";
1306
+ returned: "returned";
1307
+ voided: "voided";
1308
+ }>;
1309
+ }, z.core.$strict>, z.ZodObject<{
1310
+ kind: z.ZodLiteral<"file-effect">;
1311
+ operation: z.ZodEnum<{
1312
+ share: "share";
1313
+ delete: "delete";
1314
+ read: "read";
1315
+ write: "write";
1316
+ }>;
1317
+ path: z.ZodString;
1318
+ contentDigest: z.ZodNullable<z.ZodString>;
1319
+ bytes: z.ZodNumber;
1320
+ shareId: z.ZodNullable<z.ZodString>;
1321
+ grantee: z.ZodNullable<z.ZodString>;
1322
+ }, z.core.$strict>, z.ZodObject<{
1323
+ kind: z.ZodLiteral<"protected_data-effect">;
1324
+ operation: z.ZodEnum<{
1325
+ view: "view";
1326
+ use: "use";
1327
+ disclose: "disclose";
1328
+ persist: "persist";
1329
+ }>;
1330
+ fieldRef: z.ZodString;
1331
+ valueDigest: z.ZodString;
1332
+ counterparty: z.ZodNullable<z.ZodString>;
1333
+ maskedPreview: z.ZodNullable<z.ZodString>;
1334
+ }, z.core.$strict>, z.ZodObject<{
1335
+ kind: z.ZodLiteral<"guardian-effect">;
1336
+ operation: z.ZodString;
1337
+ subject: z.ZodNullable<z.ZodString>;
1338
+ status: z.ZodString;
1339
+ resultDigest: z.ZodString;
1340
+ detail: z.ZodString;
1341
+ }, z.core.$strict>, z.ZodObject<{
1342
+ kind: z.ZodLiteral<"clawlink-execution">;
1343
+ executionId: z.ZodString;
1344
+ executionStatus: z.ZodLiteral<"succeeded">;
1345
+ resultDigest: z.ZodString;
1346
+ detail: z.ZodString;
1347
+ }, z.core.$strict>], "kind">;
1348
+ observedDigest: z.ZodString;
1349
+ effectDigest: z.ZodString;
1350
+ level: z.ZodEnum<{
1351
+ "pre-commit-content+post-commit-envelope": "pre-commit-content+post-commit-envelope";
1352
+ "post-commit-content": "post-commit-content";
1353
+ }>;
1354
+ observedAtEpochMs: z.ZodNumber;
1355
+ }, z.core.$strict>, z.ZodObject<{
1356
+ kind: z.ZodLiteral<"mismatch">;
1357
+ code: z.ZodEnum<{
1358
+ EFFECT_MISMATCH: "EFFECT_MISMATCH";
1359
+ DUPLICATE_EFFECT_DETECTED: "DUPLICATE_EFFECT_DETECTED";
1360
+ }>;
1361
+ observedDigest: z.ZodNullable<z.ZodString>;
1362
+ }, z.core.$strict>, z.ZodObject<{
1363
+ kind: z.ZodLiteral<"commit-rejected">;
1364
+ providerStatus: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>, z.ZodLiteral<404>, z.ZodLiteral<409>, z.ZodLiteral<413>, z.ZodLiteral<422>, z.ZodLiteral<429>]>;
1365
+ confirmedAtEpochMs: z.ZodNumber;
1366
+ }, z.core.$strict>, z.ZodObject<{
1367
+ kind: z.ZodLiteral<"unknown">;
1368
+ reason: z.ZodEnum<{
1369
+ COMMIT_RESPONSE_LOST: "COMMIT_RESPONSE_LOST";
1370
+ COMMIT_TIMEOUT: "COMMIT_TIMEOUT";
1371
+ COMMIT_SERVER_ERROR: "COMMIT_SERVER_ERROR";
1372
+ COMMIT_RESPONSE_INVALID: "COMMIT_RESPONSE_INVALID";
1373
+ COMMIT_REDIRECT_REFUSED: "COMMIT_REDIRECT_REFUSED";
1374
+ COMMIT_TARGET_NOT_FOUND: "COMMIT_TARGET_NOT_FOUND";
1375
+ REJECTION_UNCONFIRMED: "REJECTION_UNCONFIRMED";
1376
+ AWAITING_PROVIDER_RECORD: "AWAITING_PROVIDER_RECORD";
1377
+ VERIFICATION_UNAVAILABLE: "VERIFICATION_UNAVAILABLE";
1378
+ }>;
1379
+ }, z.core.$strict>, z.ZodObject<{
1380
+ kind: z.ZodLiteral<"aborted">;
1381
+ code: z.ZodEnum<{
1382
+ SENDER_ACCOUNT_MISMATCH: "SENDER_ACCOUNT_MISMATCH";
1383
+ CREDENTIAL_UNAVAILABLE: "CREDENTIAL_UNAVAILABLE";
1384
+ PREPARE_REJECTED: "PREPARE_REJECTED";
1385
+ PREPARE_AMBIGUOUS: "PREPARE_AMBIGUOUS";
1386
+ READBACK_UNAVAILABLE: "READBACK_UNAVAILABLE";
1387
+ PREPARED_CONTENT_MISMATCH: "PREPARED_CONTENT_MISMATCH";
1388
+ COMMIT_NOT_AUTHORIZED: "COMMIT_NOT_AUTHORIZED";
1389
+ AUTHORITY_REVOKED_BEFORE_COMMIT: "AUTHORITY_REVOKED_BEFORE_COMMIT";
1390
+ COMMIT_DEADLINE_EXPIRED: "COMMIT_DEADLINE_EXPIRED";
1391
+ ABORTED_BEFORE_COMMIT: "ABORTED_BEFORE_COMMIT";
1392
+ COMMIT_NOT_ISSUED: "COMMIT_NOT_ISSUED";
1393
+ COMMIT_REJECTED: "COMMIT_REJECTED";
1394
+ EFFECT_MISMATCH: "EFFECT_MISMATCH";
1395
+ DUPLICATE_EFFECT_DETECTED: "DUPLICATE_EFFECT_DETECTED";
1396
+ }>;
1397
+ orphanDraftPossible: z.ZodBoolean;
1398
+ }, z.core.$strict>, z.ZodObject<{
1399
+ kind: z.ZodLiteral<"unresolved">;
1400
+ reason: z.ZodEnum<{
1401
+ COMMIT_RESPONSE_LOST: "COMMIT_RESPONSE_LOST";
1402
+ COMMIT_TIMEOUT: "COMMIT_TIMEOUT";
1403
+ COMMIT_SERVER_ERROR: "COMMIT_SERVER_ERROR";
1404
+ COMMIT_RESPONSE_INVALID: "COMMIT_RESPONSE_INVALID";
1405
+ COMMIT_REDIRECT_REFUSED: "COMMIT_REDIRECT_REFUSED";
1406
+ COMMIT_TARGET_NOT_FOUND: "COMMIT_TARGET_NOT_FOUND";
1407
+ REJECTION_UNCONFIRMED: "REJECTION_UNCONFIRMED";
1408
+ AWAITING_PROVIDER_RECORD: "AWAITING_PROVIDER_RECORD";
1409
+ VERIFICATION_UNAVAILABLE: "VERIFICATION_UNAVAILABLE";
1410
+ }>;
1411
+ }, z.core.$strict>], "kind">>;
1412
+ outcome: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1413
+ kind: z.ZodLiteral<"verified">;
1414
+ sentRef: z.ZodDiscriminatedUnion<[z.ZodObject<{
1415
+ kind: z.ZodLiteral<"gmail-message">;
1416
+ messageId: z.ZodString;
1417
+ threadId: z.ZodString;
1418
+ }, z.core.$strict>, z.ZodObject<{
1419
+ kind: z.ZodLiteral<"graph-message">;
1420
+ immutableId: z.ZodString;
1421
+ }, z.core.$strict>, z.ZodObject<{
1422
+ kind: z.ZodLiteral<"api-response">;
1423
+ status: z.ZodNumber;
1424
+ bodyBytes: z.ZodNumber;
1425
+ headersDigest: z.ZodString;
1426
+ bodyDigest: z.ZodString;
1427
+ bodyPreview: z.ZodString;
1428
+ truncated: z.ZodBoolean;
1429
+ }, z.core.$strict>, z.ZodObject<{
1430
+ kind: z.ZodLiteral<"tool-response">;
1431
+ operation: z.ZodEnum<{
1432
+ enable: "enable";
1433
+ install: "install";
1434
+ invoke: "invoke";
1435
+ }>;
1436
+ toolName: z.ZodString;
1437
+ status: z.ZodNullable<z.ZodNumber>;
1438
+ resultDigest: z.ZodString;
1439
+ detail: z.ZodString;
1440
+ }, z.core.$strict>, z.ZodObject<{
1441
+ kind: z.ZodLiteral<"gcalendar-event">;
1442
+ eventId: z.ZodString;
1443
+ status: z.ZodEnum<{
1444
+ cancelled: "cancelled";
1445
+ confirmed: "confirmed";
1446
+ }>;
1447
+ }, z.core.$strict>, z.ZodObject<{
1448
+ kind: z.ZodLiteral<"payment-charge">;
1449
+ chargeId: z.ZodString;
1450
+ amountCents: z.ZodNumber;
1451
+ currency: z.ZodString;
1452
+ status: z.ZodEnum<{
1453
+ succeeded: "succeeded";
1454
+ refunded: "refunded";
1455
+ returned: "returned";
1456
+ voided: "voided";
1457
+ }>;
1458
+ }, z.core.$strict>, z.ZodObject<{
1459
+ kind: z.ZodLiteral<"file-effect">;
1460
+ operation: z.ZodEnum<{
1461
+ share: "share";
1462
+ delete: "delete";
1463
+ read: "read";
1464
+ write: "write";
1465
+ }>;
1466
+ path: z.ZodString;
1467
+ contentDigest: z.ZodNullable<z.ZodString>;
1468
+ bytes: z.ZodNumber;
1469
+ shareId: z.ZodNullable<z.ZodString>;
1470
+ grantee: z.ZodNullable<z.ZodString>;
1471
+ }, z.core.$strict>, z.ZodObject<{
1472
+ kind: z.ZodLiteral<"protected_data-effect">;
1473
+ operation: z.ZodEnum<{
1474
+ view: "view";
1475
+ use: "use";
1476
+ disclose: "disclose";
1477
+ persist: "persist";
1478
+ }>;
1479
+ fieldRef: z.ZodString;
1480
+ valueDigest: z.ZodString;
1481
+ counterparty: z.ZodNullable<z.ZodString>;
1482
+ maskedPreview: z.ZodNullable<z.ZodString>;
1483
+ }, z.core.$strict>, z.ZodObject<{
1484
+ kind: z.ZodLiteral<"guardian-effect">;
1485
+ operation: z.ZodString;
1486
+ subject: z.ZodNullable<z.ZodString>;
1487
+ status: z.ZodString;
1488
+ resultDigest: z.ZodString;
1489
+ detail: z.ZodString;
1490
+ }, z.core.$strict>, z.ZodObject<{
1491
+ kind: z.ZodLiteral<"clawlink-execution">;
1492
+ executionId: z.ZodString;
1493
+ executionStatus: z.ZodLiteral<"succeeded">;
1494
+ resultDigest: z.ZodString;
1495
+ detail: z.ZodString;
1496
+ }, z.core.$strict>], "kind">;
1497
+ observedDigest: z.ZodString;
1498
+ effectDigest: z.ZodString;
1499
+ level: z.ZodEnum<{
1500
+ "pre-commit-content+post-commit-envelope": "pre-commit-content+post-commit-envelope";
1501
+ "post-commit-content": "post-commit-content";
1502
+ }>;
1503
+ observedAtEpochMs: z.ZodNumber;
1504
+ }, z.core.$strict>, z.ZodObject<{
1505
+ kind: z.ZodLiteral<"mismatch">;
1506
+ code: z.ZodEnum<{
1507
+ EFFECT_MISMATCH: "EFFECT_MISMATCH";
1508
+ DUPLICATE_EFFECT_DETECTED: "DUPLICATE_EFFECT_DETECTED";
1509
+ }>;
1510
+ observedDigest: z.ZodNullable<z.ZodString>;
1511
+ }, z.core.$strict>, z.ZodObject<{
1512
+ kind: z.ZodLiteral<"commit-rejected">;
1513
+ providerStatus: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>, z.ZodLiteral<404>, z.ZodLiteral<409>, z.ZodLiteral<413>, z.ZodLiteral<422>, z.ZodLiteral<429>]>;
1514
+ confirmedAtEpochMs: z.ZodNumber;
1515
+ }, z.core.$strict>, z.ZodObject<{
1516
+ kind: z.ZodLiteral<"unknown">;
1517
+ reason: z.ZodEnum<{
1518
+ COMMIT_RESPONSE_LOST: "COMMIT_RESPONSE_LOST";
1519
+ COMMIT_TIMEOUT: "COMMIT_TIMEOUT";
1520
+ COMMIT_SERVER_ERROR: "COMMIT_SERVER_ERROR";
1521
+ COMMIT_RESPONSE_INVALID: "COMMIT_RESPONSE_INVALID";
1522
+ COMMIT_REDIRECT_REFUSED: "COMMIT_REDIRECT_REFUSED";
1523
+ COMMIT_TARGET_NOT_FOUND: "COMMIT_TARGET_NOT_FOUND";
1524
+ REJECTION_UNCONFIRMED: "REJECTION_UNCONFIRMED";
1525
+ AWAITING_PROVIDER_RECORD: "AWAITING_PROVIDER_RECORD";
1526
+ VERIFICATION_UNAVAILABLE: "VERIFICATION_UNAVAILABLE";
1527
+ }>;
1528
+ }, z.core.$strict>, z.ZodObject<{
1529
+ kind: z.ZodLiteral<"aborted">;
1530
+ code: z.ZodEnum<{
1531
+ SENDER_ACCOUNT_MISMATCH: "SENDER_ACCOUNT_MISMATCH";
1532
+ CREDENTIAL_UNAVAILABLE: "CREDENTIAL_UNAVAILABLE";
1533
+ PREPARE_REJECTED: "PREPARE_REJECTED";
1534
+ PREPARE_AMBIGUOUS: "PREPARE_AMBIGUOUS";
1535
+ READBACK_UNAVAILABLE: "READBACK_UNAVAILABLE";
1536
+ PREPARED_CONTENT_MISMATCH: "PREPARED_CONTENT_MISMATCH";
1537
+ COMMIT_NOT_AUTHORIZED: "COMMIT_NOT_AUTHORIZED";
1538
+ AUTHORITY_REVOKED_BEFORE_COMMIT: "AUTHORITY_REVOKED_BEFORE_COMMIT";
1539
+ COMMIT_DEADLINE_EXPIRED: "COMMIT_DEADLINE_EXPIRED";
1540
+ ABORTED_BEFORE_COMMIT: "ABORTED_BEFORE_COMMIT";
1541
+ COMMIT_NOT_ISSUED: "COMMIT_NOT_ISSUED";
1542
+ COMMIT_REJECTED: "COMMIT_REJECTED";
1543
+ EFFECT_MISMATCH: "EFFECT_MISMATCH";
1544
+ DUPLICATE_EFFECT_DETECTED: "DUPLICATE_EFFECT_DETECTED";
1545
+ }>;
1546
+ orphanDraftPossible: z.ZodBoolean;
1547
+ }, z.core.$strict>, z.ZodObject<{
1548
+ kind: z.ZodLiteral<"unresolved">;
1549
+ reason: z.ZodEnum<{
1550
+ COMMIT_RESPONSE_LOST: "COMMIT_RESPONSE_LOST";
1551
+ COMMIT_TIMEOUT: "COMMIT_TIMEOUT";
1552
+ COMMIT_SERVER_ERROR: "COMMIT_SERVER_ERROR";
1553
+ COMMIT_RESPONSE_INVALID: "COMMIT_RESPONSE_INVALID";
1554
+ COMMIT_REDIRECT_REFUSED: "COMMIT_REDIRECT_REFUSED";
1555
+ COMMIT_TARGET_NOT_FOUND: "COMMIT_TARGET_NOT_FOUND";
1556
+ REJECTION_UNCONFIRMED: "REJECTION_UNCONFIRMED";
1557
+ AWAITING_PROVIDER_RECORD: "AWAITING_PROVIDER_RECORD";
1558
+ VERIFICATION_UNAVAILABLE: "VERIFICATION_UNAVAILABLE";
1559
+ }>;
1560
+ }, z.core.$strict>], "kind">>;
1561
+ }, z.core.$strict>>;
1562
+ effect: z.ZodObject<{
1563
+ kind: z.ZodEnum<{
1564
+ none: "none";
1565
+ failed: "failed";
1566
+ verified: "verified";
1567
+ "outcome-pending": "outcome-pending";
1568
+ }>;
1569
+ terminalEvent: z.ZodNullable<z.ZodEnum<{
1570
+ EXECUTION_ABORTED: "EXECUTION_ABORTED";
1571
+ EFFECT_VERIFIED: "EFFECT_VERIFIED";
1572
+ EXECUTION_FAILED: "EXECUTION_FAILED";
1573
+ }>>;
1574
+ failureCode: z.ZodNullable<z.ZodString>;
1575
+ effectDigest: z.ZodNullable<z.ZodString>;
1576
+ failureDigest: z.ZodNullable<z.ZodString>;
1577
+ }, z.core.$strict>;
1578
+ evidence: z.ZodObject<{
1579
+ chain: z.ZodArray<z.ZodObject<{
1580
+ recordHash: z.ZodString;
1581
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
1582
+ eventType: z.ZodLiteral<"AUTHENTICATION_RECORDED">;
1583
+ payload: z.ZodObject<{
1584
+ interface: z.ZodEnum<{
1585
+ mcp: "mcp";
1586
+ rest: "rest";
1587
+ internal: "internal";
1588
+ }>;
1589
+ outcome: z.ZodEnum<{
1590
+ rejected: "rejected";
1591
+ authenticated: "authenticated";
1592
+ }>;
1593
+ credentialReference: z.ZodString;
1594
+ }, z.core.$strict>;
1595
+ }, z.core.$strict>, z.ZodObject<{
1596
+ eventType: z.ZodLiteral<"ADAPTER_AUTHENTICATION_RECORDED">;
1597
+ payload: z.ZodObject<{
1598
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
1599
+ outcome: z.ZodLiteral<"authenticated">;
1600
+ credentialReference: z.ZodString;
1601
+ }, z.core.$strict>;
1602
+ }, z.core.$strict>, z.ZodObject<{
1603
+ eventType: z.ZodLiteral<"REQUEST_RECEIVED">;
1604
+ payload: z.ZodObject<{
1605
+ actionDigest: z.ZodString;
1606
+ }, z.core.$strict>;
1607
+ }, z.core.$strict>, z.ZodObject<{
1608
+ eventType: z.ZodLiteral<"ACTION_NORMALIZED">;
1609
+ payload: z.ZodObject<{
1610
+ actionDigest: z.ZodString;
1611
+ }, z.core.$strict>;
1612
+ }, z.core.$strict>, z.ZodObject<{
1613
+ eventType: z.ZodLiteral<"DECISION_RECORDED">;
1614
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
1615
+ actionDigest: z.ZodString;
1616
+ actionDecisionDigest: z.ZodString;
1617
+ decision: z.ZodLiteral<"ALLOW">;
1618
+ reasonCode: z.ZodLiteral<"AUTHORIZED">;
1619
+ }, z.core.$strict>, z.ZodObject<{
1620
+ actionDigest: z.ZodString;
1621
+ actionDecisionDigest: z.ZodString;
1622
+ decision: z.ZodLiteral<"ASK">;
1623
+ reasonCode: z.ZodLiteral<"APPROVAL_REQUIRED">;
1624
+ }, z.core.$strict>, z.ZodObject<{
1625
+ actionDigest: z.ZodString;
1626
+ actionDecisionDigest: z.ZodString;
1627
+ decision: z.ZodLiteral<"DENY">;
1628
+ reasonCode: z.ZodEnum<{
1629
+ MALFORMED_INPUT: "MALFORMED_INPUT";
1630
+ TENANT_MISMATCH: "TENANT_MISMATCH";
1631
+ PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
1632
+ PRINCIPAL_NOT_ACTIVE: "PRINCIPAL_NOT_ACTIVE";
1633
+ AGENT_TENANT_MISMATCH: "AGENT_TENANT_MISMATCH";
1634
+ AGENT_OWNER_MISMATCH: "AGENT_OWNER_MISMATCH";
1635
+ AGENT_MISMATCH: "AGENT_MISMATCH";
1636
+ AGENT_NOT_ACTIVE: "AGENT_NOT_ACTIVE";
1637
+ INTERFACE_NOT_ALLOWED: "INTERFACE_NOT_ALLOWED";
1638
+ AUTHORITY_PAUSED: "AUTHORITY_PAUSED";
1639
+ AUTHORITY_CHAIN_MISSING: "AUTHORITY_CHAIN_MISSING";
1640
+ DUPLICATE_GRANT_ID: "DUPLICATE_GRANT_ID";
1641
+ GRANT_TENANT_MISMATCH: "GRANT_TENANT_MISMATCH";
1642
+ GRANT_PRINCIPAL_MISMATCH: "GRANT_PRINCIPAL_MISMATCH";
1643
+ GRANT_AGENT_MISMATCH: "GRANT_AGENT_MISMATCH";
1644
+ GRANT_NOT_ACTIVE: "GRANT_NOT_ACTIVE";
1645
+ GRANT_REVOKED: "GRANT_REVOKED";
1646
+ GRANT_NOT_YET_VALID: "GRANT_NOT_YET_VALID";
1647
+ GRANT_EXPIRED: "GRANT_EXPIRED";
1648
+ INVALID_PARENT_LINK: "INVALID_PARENT_LINK";
1649
+ DELEGATION_NOT_ALLOWED: "DELEGATION_NOT_ALLOWED";
1650
+ AUTHORITY_AMPLIFICATION: "AUTHORITY_AMPLIFICATION";
1651
+ ACTION_NOT_ALLOWED: "ACTION_NOT_ALLOWED";
1652
+ RESOURCE_NOT_ALLOWED: "RESOURCE_NOT_ALLOWED";
1653
+ ADAPTER_NOT_ALLOWED: "ADAPTER_NOT_ALLOWED";
1654
+ VALUE_LIMIT_EXCEEDED: "VALUE_LIMIT_EXCEEDED";
1655
+ USE_LIMIT_EXCEEDED: "USE_LIMIT_EXCEEDED";
1656
+ MERCHANT_NOT_ALLOWED: "MERCHANT_NOT_ALLOWED";
1657
+ CATEGORY_NOT_ALLOWED: "CATEGORY_NOT_ALLOWED";
1658
+ RECURRENCE_NOT_ALLOWED: "RECURRENCE_NOT_ALLOWED";
1659
+ BUDGET_NOT_FOUND: "BUDGET_NOT_FOUND";
1660
+ BUDGET_SCOPE_MISMATCH: "BUDGET_SCOPE_MISMATCH";
1661
+ BUDGET_NOT_ACTIVE: "BUDGET_NOT_ACTIVE";
1662
+ BUDGET_EXPIRED: "BUDGET_EXPIRED";
1663
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
1664
+ TRANSACTION_LIMIT_EXCEEDED: "TRANSACTION_LIMIT_EXCEEDED";
1665
+ }>;
1666
+ }, z.core.$strict>], "decision">;
1667
+ }, z.core.$strict>, z.ZodObject<{
1668
+ eventType: z.ZodLiteral<"REQUEST_DENIED">;
1669
+ payload: z.ZodObject<{
1670
+ decision: z.ZodLiteral<"DENY">;
1671
+ actionDigest: z.ZodNullable<z.ZodString>;
1672
+ requestDeniedDigest: z.ZodString;
1673
+ reasonCode: z.ZodString;
1674
+ decidedAtEpochMs: z.ZodNumber;
1675
+ }, z.core.$strict>;
1676
+ }, z.core.$strict>, z.ZodObject<{
1677
+ eventType: z.ZodLiteral<"APPROVAL_STATE_REFERENCED">;
1678
+ payload: z.ZodObject<{
1679
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
1680
+ version: z.ZodNumber;
1681
+ state: z.ZodEnum<{
1682
+ revoked: "revoked";
1683
+ pending: "pending";
1684
+ expired: "expired";
1685
+ approved: "approved";
1686
+ denied: "denied";
1687
+ superseded: "superseded";
1688
+ consumed: "consumed";
1689
+ }>;
1690
+ approvalDigest: z.ZodString;
1691
+ }, z.core.$strict>;
1692
+ }, z.core.$strict>, z.ZodObject<{
1693
+ eventType: z.ZodLiteral<"APPROVAL_PRESENTED">;
1694
+ payload: z.ZodObject<{
1695
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
1696
+ presentationDigest: z.ZodString;
1697
+ viewerReference: z.ZodString;
1698
+ }, z.core.$strict>;
1699
+ }, z.core.$strict>, z.ZodObject<{
1700
+ eventType: z.ZodLiteral<"APPROVAL_DECISION_RECORDED">;
1701
+ payload: z.ZodObject<{
1702
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
1703
+ version: z.ZodNumber;
1704
+ decision: z.ZodEnum<{
1705
+ veto: "veto";
1706
+ approve: "approve";
1707
+ deny: "deny";
1708
+ revoke: "revoke";
1709
+ endorse: "endorse";
1710
+ dissent: "dissent";
1711
+ mature: "mature";
1712
+ }>;
1713
+ actorPrincipalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
1714
+ actorReference: z.ZodString;
1715
+ presentationDigest: z.ZodString;
1716
+ }, z.core.$strict>;
1717
+ }, z.core.$strict>, z.ZodObject<{
1718
+ eventType: z.ZodLiteral<"APPROVAL_REJECTED">;
1719
+ payload: z.ZodObject<{
1720
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
1721
+ reasonCode: z.ZodString;
1722
+ }, z.core.$strict>;
1723
+ }, z.core.$strict>, z.ZodObject<{
1724
+ eventType: z.ZodLiteral<"CAPABILITY_STATE_REFERENCED">;
1725
+ payload: z.ZodObject<{
1726
+ actionDigest: z.ZodString;
1727
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
1728
+ state: z.ZodEnum<{
1729
+ revoked: "revoked";
1730
+ expired: "expired";
1731
+ issued: "issued";
1732
+ used: "used";
1733
+ }>;
1734
+ capabilityDigest: z.ZodString;
1735
+ }, z.core.$strict>;
1736
+ }, z.core.$strict>, z.ZodObject<{
1737
+ eventType: z.ZodLiteral<"CAPABILITY_REJECTED">;
1738
+ payload: z.ZodObject<{
1739
+ actionDigest: z.ZodString;
1740
+ reasonCode: z.ZodString;
1741
+ }, z.core.$strict>;
1742
+ }, z.core.$strict>, z.ZodObject<{
1743
+ eventType: z.ZodLiteral<"EXECUTION_ATTEMPTED">;
1744
+ payload: z.ZodObject<{
1745
+ actionDigest: z.ZodString;
1746
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
1747
+ attemptReference: z.ZodString;
1748
+ idempotencyDigest: z.ZodString;
1749
+ }, z.core.$strict>;
1750
+ }, z.core.$strict>, z.ZodObject<{
1751
+ eventType: z.ZodLiteral<"EXECUTION_ABORTED">;
1752
+ payload: z.ZodObject<{
1753
+ actionDigest: z.ZodString;
1754
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
1755
+ attemptReference: z.ZodString;
1756
+ reasonCode: z.ZodString;
1757
+ }, z.core.$strict>;
1758
+ }, z.core.$strict>, z.ZodObject<{
1759
+ eventType: z.ZodLiteral<"EFFECT_PREPARED">;
1760
+ payload: z.ZodObject<{
1761
+ actionDigest: z.ZodString;
1762
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
1763
+ attemptReference: z.ZodString;
1764
+ preparedDigest: z.ZodString;
1765
+ }, z.core.$strict>;
1766
+ }, z.core.$strict>, z.ZodObject<{
1767
+ eventType: z.ZodLiteral<"EFFECT_COMMIT_AUTHORIZED">;
1768
+ payload: z.ZodObject<{
1769
+ actionDigest: z.ZodString;
1770
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
1771
+ attemptReference: z.ZodString;
1772
+ actionDecisionDigest: z.ZodString;
1773
+ }, z.core.$strict>;
1774
+ }, z.core.$strict>, z.ZodObject<{
1775
+ eventType: z.ZodLiteral<"EFFECT_OUTCOME_UNKNOWN">;
1776
+ payload: z.ZodObject<{
1777
+ actionDigest: z.ZodString;
1778
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
1779
+ attemptReference: z.ZodString;
1780
+ reasonCode: z.ZodString;
1781
+ }, z.core.$strict>;
1782
+ }, z.core.$strict>, z.ZodObject<{
1783
+ eventType: z.ZodLiteral<"EFFECT_UNRESOLVED">;
1784
+ payload: z.ZodObject<{
1785
+ actionDigest: z.ZodString;
1786
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
1787
+ attemptReference: z.ZodString;
1788
+ }, z.core.$strict>;
1789
+ }, z.core.$strict>, z.ZodObject<{
1790
+ eventType: z.ZodLiteral<"EFFECT_VERIFIED">;
1791
+ payload: z.ZodObject<{
1792
+ actionDigest: z.ZodString;
1793
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
1794
+ attemptReference: z.ZodString;
1795
+ effectDigest: z.ZodString;
1796
+ }, z.core.$strict>;
1797
+ }, z.core.$strict>, z.ZodObject<{
1798
+ eventType: z.ZodLiteral<"EXECUTION_FAILED">;
1799
+ payload: z.ZodObject<{
1800
+ actionDigest: z.ZodString;
1801
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
1802
+ attemptReference: z.ZodString;
1803
+ failureCode: z.ZodString;
1804
+ failureDigest: z.ZodOptional<z.ZodString>;
1805
+ }, z.core.$strict>;
1806
+ }, z.core.$strict>, z.ZodObject<{
1807
+ eventType: z.ZodLiteral<"AUTHORITY_REVOKED">;
1808
+ payload: z.ZodObject<{
1809
+ grantId: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
1810
+ grantVersion: z.ZodNumber;
1811
+ revocationDigest: z.ZodString;
1812
+ }, z.core.$strict>;
1813
+ }, z.core.$strict>], "eventType">;
1814
+ sequence: z.ZodNumber;
1815
+ previousRecordHash: z.ZodNullable<z.ZodString>;
1816
+ payloadDigest: z.ZodString;
1817
+ schemaVersion: z.ZodLiteral<1>;
1818
+ id: z.core.$ZodBranded<z.ZodString, "EvidenceId", "out">;
1819
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
1820
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
1821
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
1822
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
1823
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
1824
+ eventTimeEpochMs: z.ZodNumber;
1825
+ }, z.core.$strict>>;
1826
+ recordCount: z.ZodNumber;
1827
+ headRecordHash: z.ZodString;
1828
+ }, z.core.$strict>;
1829
+ generatedBy: z.ZodLiteral<"guardian-control-plane">;
1830
+ }, z.core.$strict>;
1831
+ export declare const PortableAuthorityReceiptSchema: z.ZodObject<{
1832
+ format: z.ZodLiteral<"greceipt.v1">;
1833
+ schemaVersion: z.ZodLiteral<1>;
1834
+ receiptId: z.core.$ZodBranded<z.ZodString, "ReceiptId", "out">;
1835
+ issuedAtEpochMs: z.ZodNumber;
1836
+ subject: z.ZodObject<{
1837
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
1838
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
1839
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
1840
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
1841
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
1842
+ }, z.core.$strict>;
1843
+ runtime: z.ZodObject<{
1844
+ interface: z.ZodEnum<{
1845
+ mcp: "mcp";
1846
+ rest: "rest";
1847
+ internal: "internal";
1848
+ }>;
1849
+ requestedAdapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
1850
+ adapterId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "AdapterId", "out">>;
1851
+ }, z.core.$strict>;
1852
+ action: z.ZodObject<{
1853
+ schemaVersion: z.ZodLiteral<1>;
1854
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
1855
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
1856
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
1857
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
1858
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
1859
+ action: z.core.$ZodBranded<z.ZodString, "ActionType", "out">;
1860
+ resource: z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">;
1861
+ interface: z.ZodEnum<{
1862
+ mcp: "mcp";
1863
+ rest: "rest";
1864
+ internal: "internal";
1865
+ }>;
1866
+ valueCents: z.ZodOptional<z.ZodNumber>;
1867
+ merchantId: z.ZodOptional<z.ZodString>;
1868
+ merchantCategory: z.ZodOptional<z.ZodString>;
1869
+ recurring: z.ZodOptional<z.ZodBoolean>;
1870
+ taskId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TaskId", "out">>;
1871
+ intentId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "IntentId", "out">>;
1872
+ planId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "PlanId", "out">>;
1873
+ obligations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1874
+ type: z.ZodEnum<{
1875
+ log: "log";
1876
+ retain_receipt: "retain_receipt";
1877
+ notify: "notify";
1878
+ delay: "delay";
1879
+ cooling_period: "cooling_period";
1880
+ delete_after_use: "delete_after_use";
1881
+ redact: "redact";
1882
+ encrypt: "encrypt";
1883
+ tokenize: "tokenize";
1884
+ minimize: "minimize";
1885
+ verify_counterparty: "verify_counterparty";
1886
+ verify_resource: "verify_resource";
1887
+ verify_effect: "verify_effect";
1888
+ attest_runtime: "attest_runtime";
1889
+ require_consent: "require_consent";
1890
+ require_location: "require_location";
1891
+ require_device: "require_device";
1892
+ require_network: "require_network";
1893
+ require_contract: "require_contract";
1894
+ step_up: "step_up";
1895
+ second_approver: "second_approver";
1896
+ quorum: "quorum";
1897
+ authenticate: "authenticate";
1898
+ }>;
1899
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
1900
+ }, z.core.$strict>>>;
1901
+ obligationStates: z.ZodOptional<z.ZodArray<z.ZodObject<{
1902
+ obligationType: z.ZodEnum<{
1903
+ log: "log";
1904
+ retain_receipt: "retain_receipt";
1905
+ notify: "notify";
1906
+ delay: "delay";
1907
+ cooling_period: "cooling_period";
1908
+ delete_after_use: "delete_after_use";
1909
+ redact: "redact";
1910
+ encrypt: "encrypt";
1911
+ tokenize: "tokenize";
1912
+ minimize: "minimize";
1913
+ verify_counterparty: "verify_counterparty";
1914
+ verify_resource: "verify_resource";
1915
+ verify_effect: "verify_effect";
1916
+ attest_runtime: "attest_runtime";
1917
+ require_consent: "require_consent";
1918
+ require_location: "require_location";
1919
+ require_device: "require_device";
1920
+ require_network: "require_network";
1921
+ require_contract: "require_contract";
1922
+ step_up: "step_up";
1923
+ second_approver: "second_approver";
1924
+ quorum: "quorum";
1925
+ authenticate: "authenticate";
1926
+ }>;
1927
+ state: z.ZodEnum<{
1928
+ satisfied: "satisfied";
1929
+ pending: "pending";
1930
+ failed: "failed";
1931
+ not_applicable: "not_applicable";
1932
+ }>;
1933
+ rule: z.ZodEnum<{
1934
+ OBLIGATION_SATISFIED: "OBLIGATION_SATISFIED";
1935
+ PENDING_POST_ACTION: "PENDING_POST_ACTION";
1936
+ PENDING_TIME: "PENDING_TIME";
1937
+ PENDING_HUMAN: "PENDING_HUMAN";
1938
+ OBLIGATION_PARAMS_INVALID: "OBLIGATION_PARAMS_INVALID";
1939
+ COUNTERPARTY_UNVERIFIED: "COUNTERPARTY_UNVERIFIED";
1940
+ RESOURCE_NOT_COVERED: "RESOURCE_NOT_COVERED";
1941
+ OBLIGATION_VERIFIER_UNAVAILABLE: "OBLIGATION_VERIFIER_UNAVAILABLE";
1942
+ }>;
1943
+ detail: z.ZodOptional<z.ZodString>;
1944
+ dueEpochMs: z.ZodOptional<z.ZodNumber>;
1945
+ }, z.core.$strict>>>;
1946
+ prerequisiteResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
1947
+ id: z.ZodString;
1948
+ prerequisiteType: z.ZodString;
1949
+ state: z.ZodEnum<{
1950
+ satisfied: "satisfied";
1951
+ pending: "pending";
1952
+ failed: "failed";
1953
+ not_applicable: "not_applicable";
1954
+ }>;
1955
+ rule: z.ZodEnum<{
1956
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
1957
+ PENDING_HUMAN: "PENDING_HUMAN";
1958
+ PREREQUISITE_SATISFIED: "PREREQUISITE_SATISFIED";
1959
+ MERCHANT_UNVERIFIED: "MERCHANT_UNVERIFIED";
1960
+ BUDGET_NOT_DECLARED: "BUDGET_NOT_DECLARED";
1961
+ CAPABILITY_NOT_COVERED: "CAPABILITY_NOT_COVERED";
1962
+ ADDRESS_NOT_AUTHORIZED: "ADDRESS_NOT_AUTHORIZED";
1963
+ PREREQUISITE_PARAMS_INVALID: "PREREQUISITE_PARAMS_INVALID";
1964
+ PREREQUISITE_VERIFIER_UNAVAILABLE: "PREREQUISITE_VERIFIER_UNAVAILABLE";
1965
+ }>;
1966
+ detail: z.ZodOptional<z.ZodString>;
1967
+ }, z.core.$strict>>>;
1968
+ parentActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "RequestId", "out">>;
1969
+ sourceEffectId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "AttemptId", "out">>;
1970
+ sequenceMatches: z.ZodOptional<z.ZodArray<z.ZodObject<{
1971
+ ruleId: z.ZodString;
1972
+ effect: z.ZodEnum<{
1973
+ deny: "deny";
1974
+ require_approval: "require_approval";
1975
+ }>;
1976
+ matchedActionRefs: z.ZodArray<z.ZodString>;
1977
+ }, z.core.$strict>>>;
1978
+ lineageMatches: z.ZodOptional<z.ZodArray<z.ZodObject<{
1979
+ dataObjectId: z.core.$ZodBranded<z.ZodString, "DataObjectId", "out">;
1980
+ effectiveClassification: z.ZodEnum<{
1981
+ financial: "financial";
1982
+ internal: "internal";
1983
+ public: "public";
1984
+ pii: "pii";
1985
+ phi: "phi";
1986
+ credential: "credential";
1987
+ confidential: "confidential";
1988
+ }>;
1989
+ effect: z.ZodEnum<{
1990
+ allowed: "allowed";
1991
+ deny: "deny";
1992
+ require_approval: "require_approval";
1993
+ }>;
1994
+ expired: z.ZodBoolean;
1995
+ }, z.core.$strict>>>;
1996
+ runtimeTrustLevel: z.ZodOptional<z.ZodEnum<{
1997
+ T0_UNKNOWN: "T0_UNKNOWN";
1998
+ T1_IDENTIFIED: "T1_IDENTIFIED";
1999
+ T2_VERIFIED: "T2_VERIFIED";
2000
+ T3_ATTESTED: "T3_ATTESTED";
2001
+ T4_HARDWARE_BACKED: "T4_HARDWARE_BACKED";
2002
+ }>>;
2003
+ enforcementAssurance: z.ZodOptional<z.ZodEnum<{
2004
+ G2_CREDENTIAL_MEDIATED: "G2_CREDENTIAL_MEDIATED";
2005
+ G1_POLICY_MEDIATED: "G1_POLICY_MEDIATED";
2006
+ G3_RUNTIME_CONTAINED: "G3_RUNTIME_CONTAINED";
2007
+ G0_OBSERVED: "G0_OBSERVED";
2008
+ G4_COUNTERPARTY_INTERLOCKED: "G4_COUNTERPARTY_INTERLOCKED";
2009
+ }>>;
2010
+ approvalStructures: z.ZodOptional<z.ZodArray<z.ZodObject<{
2011
+ schema: z.ZodLiteral<"guardian.multiparty.v1">;
2012
+ structureId: z.ZodString;
2013
+ members: z.ZodArray<z.ZodObject<{
2014
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2015
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
2016
+ }, z.core.$strict>>;
2017
+ requirement: z.ZodDiscriminatedUnion<[z.ZodObject<{
2018
+ kind: z.ZodLiteral<"single">;
2019
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2020
+ }, z.core.$strict>, z.ZodObject<{
2021
+ kind: z.ZodLiteral<"nOfM">;
2022
+ n: z.ZodNumber;
2023
+ members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
2024
+ }, z.core.$strict>, z.ZodObject<{
2025
+ kind: z.ZodLiteral<"unanimous">;
2026
+ members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
2027
+ }, z.core.$strict>, z.ZodObject<{
2028
+ kind: z.ZodLiteral<"roleQuorum">;
2029
+ role: z.ZodString;
2030
+ n: z.ZodNumber;
2031
+ m: z.ZodNumber;
2032
+ }, z.core.$strict>], "kind">;
2033
+ specificRequired: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
2034
+ veto: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
2035
+ separationOfDuties: z.ZodOptional<z.ZodObject<{
2036
+ mutuallyExclusive: z.ZodArray<z.ZodArray<z.ZodString>>;
2037
+ }, z.core.$strict>>;
2038
+ temporaryApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
2039
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2040
+ expiresAtEpochMs: z.ZodNumber;
2041
+ }, z.core.$strict>>>;
2042
+ delegatedApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
2043
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2044
+ delegatedBy: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2045
+ }, z.core.$strict>>>;
2046
+ emergencyApprovers: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
2047
+ coolingPeriod: z.ZodOptional<z.ZodObject<{
2048
+ seconds: z.ZodNumber;
2049
+ }, z.core.$strict>>;
2050
+ }, z.core.$strict>>>;
2051
+ appliedAuthoritySources: z.ZodOptional<z.ZodObject<{
2052
+ applied: z.ZodArray<z.ZodString>;
2053
+ constraints: z.ZodObject<{
2054
+ allowedActions: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ActionType", "out">>>;
2055
+ deniedActions: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ActionType", "out">>>;
2056
+ allowedResources: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">>>;
2057
+ allowedInterfaces: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2058
+ mcp: "mcp";
2059
+ rest: "rest";
2060
+ internal: "internal";
2061
+ }>>>;
2062
+ maxValueCents: z.ZodOptional<z.ZodNumber>;
2063
+ maxUses: z.ZodOptional<z.ZodNumber>;
2064
+ minRuntimeLevel: z.ZodOptional<z.ZodEnum<{
2065
+ T0_UNKNOWN: "T0_UNKNOWN";
2066
+ T1_IDENTIFIED: "T1_IDENTIFIED";
2067
+ T2_VERIFIED: "T2_VERIFIED";
2068
+ T3_ATTESTED: "T3_ATTESTED";
2069
+ T4_HARDWARE_BACKED: "T4_HARDWARE_BACKED";
2070
+ }>>;
2071
+ minAssuranceLevel: z.ZodOptional<z.ZodEnum<{
2072
+ G2_CREDENTIAL_MEDIATED: "G2_CREDENTIAL_MEDIATED";
2073
+ G1_POLICY_MEDIATED: "G1_POLICY_MEDIATED";
2074
+ G3_RUNTIME_CONTAINED: "G3_RUNTIME_CONTAINED";
2075
+ G0_OBSERVED: "G0_OBSERVED";
2076
+ G4_COUNTERPARTY_INTERLOCKED: "G4_COUNTERPARTY_INTERLOCKED";
2077
+ }>>;
2078
+ requiredApprovals: z.ZodOptional<z.ZodNumber>;
2079
+ }, z.core.$strict>;
2080
+ }, z.core.$strict>>;
2081
+ transaction: z.ZodOptional<z.ZodObject<{
2082
+ schema: z.ZodLiteral<"guardian.transaction.v1">;
2083
+ stages: z.ZodArray<z.ZodEnum<{
2084
+ PROPOSE: "PROPOSE";
2085
+ PREPARE: "PREPARE";
2086
+ AUTHORIZE: "AUTHORIZE";
2087
+ LOCK: "LOCK";
2088
+ COMMIT: "COMMIT";
2089
+ VERIFY: "VERIFY";
2090
+ SETTLE: "SETTLE";
2091
+ }>>;
2092
+ deadlineMs: z.ZodOptional<z.ZodNumber>;
2093
+ }, z.core.$strict>>;
2094
+ compensates: z.ZodOptional<z.ZodObject<{
2095
+ transactionId: z.core.$ZodBranded<z.ZodString, "TransactionId", "out">;
2096
+ }, z.core.$strict>>;
2097
+ physicalFacts: z.ZodOptional<z.ZodObject<{
2098
+ zone: z.ZodOptional<z.ZodString>;
2099
+ speed: z.ZodOptional<z.ZodNumber>;
2100
+ force: z.ZodOptional<z.ZodNumber>;
2101
+ payload: z.ZodOptional<z.ZodNumber>;
2102
+ atEpochMs: z.ZodOptional<z.ZodNumber>;
2103
+ humanDistance: z.ZodOptional<z.ZodNumber>;
2104
+ environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2105
+ supervised: z.ZodOptional<z.ZodBoolean>;
2106
+ }, z.core.$strict>>;
2107
+ safetyEnvelopeOutcome: z.ZodOptional<z.ZodObject<{
2108
+ envelopeDigest: z.ZodString;
2109
+ satisfied: z.ZodBoolean;
2110
+ violations: z.ZodArray<z.ZodEnum<{
2111
+ OUT_OF_ZONE: "OUT_OF_ZONE";
2112
+ FORBIDDEN_ZONE: "FORBIDDEN_ZONE";
2113
+ OVER_SPEED: "OVER_SPEED";
2114
+ OVER_FORCE: "OVER_FORCE";
2115
+ OVER_PAYLOAD: "OVER_PAYLOAD";
2116
+ OUTSIDE_TIME_WINDOW: "OUTSIDE_TIME_WINDOW";
2117
+ PROXIMITY_VIOLATION: "PROXIMITY_VIOLATION";
2118
+ ENVIRONMENT_VIOLATION: "ENVIRONMENT_VIOLATION";
2119
+ SUPERVISION_REQUIRED: "SUPERVISION_REQUIRED";
2120
+ }>>;
2121
+ emergencyStopped: z.ZodBoolean;
2122
+ failSafeApplied: z.ZodBoolean;
2123
+ }, z.core.$strict>>;
2124
+ uses: z.ZodNumber;
2125
+ materialParameters: z.ZodPipe<z.ZodUnknown, z.ZodTransform<Readonly<Record<string, import("./canonical-json.js").CanonicalJsonValue>>, unknown>>;
2126
+ initiatingContext: z.ZodEnum<{
2127
+ agent: "agent";
2128
+ user: "user";
2129
+ scheduled: "scheduled";
2130
+ "external-event": "external-event";
2131
+ }>;
2132
+ authority: z.ZodObject<{
2133
+ policy: z.ZodObject<{
2134
+ id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
2135
+ version: z.ZodNumber;
2136
+ }, z.core.$strict>;
2137
+ evaluatedGrants: z.ZodArray<z.ZodObject<{
2138
+ id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
2139
+ version: z.ZodNumber;
2140
+ }, z.core.$strict>>;
2141
+ }, z.core.$strict>;
2142
+ issuedAtEpochMs: z.ZodNumber;
2143
+ expiresAtEpochMs: z.ZodNumber;
2144
+ nonce: z.core.$ZodBranded<z.ZodString, "Nonce", "out">;
2145
+ requestedAdapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
2146
+ purpose: z.ZodString;
2147
+ materialDigest: z.ZodString;
2148
+ }, z.core.$strict>;
2149
+ delegationChain: z.ZodArray<z.ZodObject<{
2150
+ grantId: z.ZodString;
2151
+ version: z.ZodNumber;
2152
+ }, z.core.$strict>>;
2153
+ decision: z.ZodObject<{
2154
+ decision: z.ZodEnum<{
2155
+ ALLOW: "ALLOW";
2156
+ ASK: "ASK";
2157
+ DENY: "DENY";
2158
+ }>;
2159
+ reasonCode: z.ZodUnion<readonly [z.ZodLiteral<"AUTHORIZED">, z.ZodLiteral<"APPROVAL_REQUIRED">, z.ZodEnum<{
2160
+ MALFORMED_INPUT: "MALFORMED_INPUT";
2161
+ TENANT_MISMATCH: "TENANT_MISMATCH";
2162
+ PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
2163
+ PRINCIPAL_NOT_ACTIVE: "PRINCIPAL_NOT_ACTIVE";
2164
+ AGENT_TENANT_MISMATCH: "AGENT_TENANT_MISMATCH";
2165
+ AGENT_OWNER_MISMATCH: "AGENT_OWNER_MISMATCH";
2166
+ AGENT_MISMATCH: "AGENT_MISMATCH";
2167
+ AGENT_NOT_ACTIVE: "AGENT_NOT_ACTIVE";
2168
+ INTERFACE_NOT_ALLOWED: "INTERFACE_NOT_ALLOWED";
2169
+ AUTHORITY_PAUSED: "AUTHORITY_PAUSED";
2170
+ AUTHORITY_CHAIN_MISSING: "AUTHORITY_CHAIN_MISSING";
2171
+ DUPLICATE_GRANT_ID: "DUPLICATE_GRANT_ID";
2172
+ GRANT_TENANT_MISMATCH: "GRANT_TENANT_MISMATCH";
2173
+ GRANT_PRINCIPAL_MISMATCH: "GRANT_PRINCIPAL_MISMATCH";
2174
+ GRANT_AGENT_MISMATCH: "GRANT_AGENT_MISMATCH";
2175
+ GRANT_NOT_ACTIVE: "GRANT_NOT_ACTIVE";
2176
+ GRANT_REVOKED: "GRANT_REVOKED";
2177
+ GRANT_NOT_YET_VALID: "GRANT_NOT_YET_VALID";
2178
+ GRANT_EXPIRED: "GRANT_EXPIRED";
2179
+ INVALID_PARENT_LINK: "INVALID_PARENT_LINK";
2180
+ DELEGATION_NOT_ALLOWED: "DELEGATION_NOT_ALLOWED";
2181
+ AUTHORITY_AMPLIFICATION: "AUTHORITY_AMPLIFICATION";
2182
+ ACTION_NOT_ALLOWED: "ACTION_NOT_ALLOWED";
2183
+ RESOURCE_NOT_ALLOWED: "RESOURCE_NOT_ALLOWED";
2184
+ ADAPTER_NOT_ALLOWED: "ADAPTER_NOT_ALLOWED";
2185
+ VALUE_LIMIT_EXCEEDED: "VALUE_LIMIT_EXCEEDED";
2186
+ USE_LIMIT_EXCEEDED: "USE_LIMIT_EXCEEDED";
2187
+ MERCHANT_NOT_ALLOWED: "MERCHANT_NOT_ALLOWED";
2188
+ CATEGORY_NOT_ALLOWED: "CATEGORY_NOT_ALLOWED";
2189
+ RECURRENCE_NOT_ALLOWED: "RECURRENCE_NOT_ALLOWED";
2190
+ BUDGET_NOT_FOUND: "BUDGET_NOT_FOUND";
2191
+ BUDGET_SCOPE_MISMATCH: "BUDGET_SCOPE_MISMATCH";
2192
+ BUDGET_NOT_ACTIVE: "BUDGET_NOT_ACTIVE";
2193
+ BUDGET_EXPIRED: "BUDGET_EXPIRED";
2194
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
2195
+ TRANSACTION_LIMIT_EXCEEDED: "TRANSACTION_LIMIT_EXCEEDED";
2196
+ }>, z.ZodString]>;
2197
+ actionDecisionDigest: z.ZodString;
2198
+ decidedAtEpochMs: z.ZodNumber;
2199
+ }, z.core.$strict>;
2200
+ approval: z.ZodNullable<z.ZodObject<{
2201
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
2202
+ state: z.ZodEnum<{
2203
+ revoked: "revoked";
2204
+ pending: "pending";
2205
+ expired: "expired";
2206
+ approved: "approved";
2207
+ denied: "denied";
2208
+ superseded: "superseded";
2209
+ consumed: "consumed";
2210
+ }>;
2211
+ version: z.ZodNumber;
2212
+ approvalDigest: z.ZodString;
2213
+ record: z.ZodObject<{
2214
+ schemaVersion: z.ZodLiteral<1>;
2215
+ binding: z.ZodObject<{
2216
+ schemaVersion: z.ZodLiteral<1>;
2217
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
2218
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
2219
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2220
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
2221
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
2222
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
2223
+ actionDigest: z.ZodString;
2224
+ actionDecisionRecordDigest: z.ZodString;
2225
+ askDecisionDigest: z.ZodString;
2226
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
2227
+ policy: z.ZodObject<{
2228
+ id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
2229
+ version: z.ZodNumber;
2230
+ }, z.core.$strict>;
2231
+ evaluatedGrants: z.ZodArray<z.ZodObject<{
2232
+ id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
2233
+ version: z.ZodNumber;
2234
+ }, z.core.$strict>>;
2235
+ presentationDigest: z.ZodString;
2236
+ requestedAtEpochMs: z.ZodNumber;
2237
+ expiresAtEpochMs: z.ZodNumber;
2238
+ eligiblePrincipalIds: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
2239
+ requiredFactor: z.ZodOptional<z.ZodEnum<{
2240
+ tap: "tap";
2241
+ passkey: "passkey";
2242
+ biometric: "biometric";
2243
+ "second-device": "second-device";
2244
+ "multi-approver": "multi-approver";
2245
+ }>>;
2246
+ requiredApprovals: z.ZodOptional<z.ZodNumber>;
2247
+ scopeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
2248
+ structures: z.ZodOptional<z.ZodArray<z.ZodObject<{
2249
+ schema: z.ZodLiteral<"guardian.multiparty.v1">;
2250
+ structureId: z.ZodString;
2251
+ members: z.ZodArray<z.ZodObject<{
2252
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2253
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
2254
+ }, z.core.$strict>>;
2255
+ requirement: z.ZodDiscriminatedUnion<[z.ZodObject<{
2256
+ kind: z.ZodLiteral<"single">;
2257
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2258
+ }, z.core.$strict>, z.ZodObject<{
2259
+ kind: z.ZodLiteral<"nOfM">;
2260
+ n: z.ZodNumber;
2261
+ members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
2262
+ }, z.core.$strict>, z.ZodObject<{
2263
+ kind: z.ZodLiteral<"unanimous">;
2264
+ members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
2265
+ }, z.core.$strict>, z.ZodObject<{
2266
+ kind: z.ZodLiteral<"roleQuorum">;
2267
+ role: z.ZodString;
2268
+ n: z.ZodNumber;
2269
+ m: z.ZodNumber;
2270
+ }, z.core.$strict>], "kind">;
2271
+ specificRequired: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
2272
+ veto: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
2273
+ separationOfDuties: z.ZodOptional<z.ZodObject<{
2274
+ mutuallyExclusive: z.ZodArray<z.ZodArray<z.ZodString>>;
2275
+ }, z.core.$strict>>;
2276
+ temporaryApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
2277
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2278
+ expiresAtEpochMs: z.ZodNumber;
2279
+ }, z.core.$strict>>>;
2280
+ delegatedApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
2281
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2282
+ delegatedBy: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2283
+ }, z.core.$strict>>>;
2284
+ emergencyApprovers: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
2285
+ coolingPeriod: z.ZodOptional<z.ZodObject<{
2286
+ seconds: z.ZodNumber;
2287
+ }, z.core.$strict>>;
2288
+ }, z.core.$strict>>>;
2289
+ }, z.core.$strict>;
2290
+ state: z.ZodEnum<{
2291
+ revoked: "revoked";
2292
+ pending: "pending";
2293
+ expired: "expired";
2294
+ approved: "approved";
2295
+ denied: "denied";
2296
+ superseded: "superseded";
2297
+ consumed: "consumed";
2298
+ }>;
2299
+ version: z.ZodNumber;
2300
+ updatedAtEpochMs: z.ZodNumber;
2301
+ decidedByPrincipalId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
2302
+ endorsements: z.ZodOptional<z.ZodArray<z.ZodObject<{
2303
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2304
+ factor: z.ZodEnum<{
2305
+ tap: "tap";
2306
+ passkey: "passkey";
2307
+ biometric: "biometric";
2308
+ "second-device": "second-device";
2309
+ }>;
2310
+ atEpochMs: z.ZodNumber;
2311
+ }, z.core.$strict>>>;
2312
+ structureApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
2313
+ memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2314
+ decision: z.ZodEnum<{
2315
+ veto: "veto";
2316
+ approve: "approve";
2317
+ deny: "deny";
2318
+ }>;
2319
+ atEpochMs: z.ZodNumber;
2320
+ via: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
2321
+ emergency: z.ZodOptional<z.ZodLiteral<true>>;
2322
+ }, z.core.$strict>>>;
2323
+ cooling: z.ZodOptional<z.ZodObject<{
2324
+ startedAtEpochMs: z.ZodNumber;
2325
+ endsAtEpochMs: z.ZodNumber;
2326
+ }, z.core.$strict>>;
2327
+ }, z.core.$strict>;
2328
+ }, z.core.$strict>>;
2329
+ capability: z.ZodNullable<z.ZodObject<{
2330
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
2331
+ claims: z.ZodObject<{
2332
+ schemaVersion: z.ZodLiteral<1>;
2333
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
2334
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
2335
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2336
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
2337
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
2338
+ actionDigest: z.ZodString;
2339
+ actionNonce: z.core.$ZodBranded<z.ZodString, "Nonce", "out">;
2340
+ audience: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
2341
+ policy: z.ZodObject<{
2342
+ id: z.core.$ZodBranded<z.ZodString, "PolicyId", "out">;
2343
+ version: z.ZodNumber;
2344
+ }, z.core.$strict>;
2345
+ evaluatedGrants: z.ZodArray<z.ZodObject<{
2346
+ id: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
2347
+ version: z.ZodNumber;
2348
+ }, z.core.$strict>>;
2349
+ issuedAtEpochMs: z.ZodNumber;
2350
+ expiresAtEpochMs: z.ZodNumber;
2351
+ maxUses: z.ZodLiteral<1>;
2352
+ keyId: z.core.$ZodBranded<z.ZodString, "CapabilityKeyId", "out">;
2353
+ algorithm: z.ZodLiteral<"HS256">;
2354
+ }, z.core.$strict>;
2355
+ claimsDigest: z.ZodString;
2356
+ state: z.ZodEnum<{
2357
+ revoked: "revoked";
2358
+ expired: "expired";
2359
+ issued: "issued";
2360
+ used: "used";
2361
+ }>;
2362
+ }, z.core.$strict>>;
2363
+ execution: z.ZodNullable<z.ZodObject<{
2364
+ schemaVersion: z.ZodLiteral<1>;
2365
+ attemptId: z.core.$ZodBranded<z.ZodString, "AttemptId", "out">;
2366
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
2367
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2368
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
2369
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
2370
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
2371
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
2372
+ actionDigest: z.ZodString;
2373
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
2374
+ connectionId: z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">;
2375
+ provider: z.ZodEnum<{
2376
+ api: "api";
2377
+ tool: "tool";
2378
+ local: "local";
2379
+ guardian: "guardian";
2380
+ gmail: "gmail";
2381
+ gcalendar: "gcalendar";
2382
+ file: "file";
2383
+ protected_data: "protected_data";
2384
+ graph: "graph";
2385
+ clawlink: "clawlink";
2386
+ "payment-sandbox": "payment-sandbox";
2387
+ }>;
2388
+ profile: z.ZodEnum<{
2389
+ "guardian-agent-v1": "guardian-agent-v1";
2390
+ "gmail-split-compose-metadata": "gmail-split-compose-metadata";
2391
+ "gmail-compose-readonly": "gmail-compose-readonly";
2392
+ "graph-readwrite-send": "graph-readwrite-send";
2393
+ "api-bearer-request": "api-bearer-request";
2394
+ "tool-mcp-server": "tool-mcp-server";
2395
+ "gcalendar-events-v1": "gcalendar-events-v1";
2396
+ "payment-sandbox-charge": "payment-sandbox-charge";
2397
+ "file-local-store": "file-local-store";
2398
+ "protected-data-store": "protected-data-store";
2399
+ "local-agent-runtime": "local-agent-runtime";
2400
+ "clawlink-executions": "clawlink-executions";
2401
+ }>;
2402
+ effectKey: z.ZodString;
2403
+ expectedProjectionDigest: z.ZodString;
2404
+ expectedEnvelopeDigest: z.ZodString;
2405
+ state: z.ZodEnum<{
2406
+ unknown: "unknown";
2407
+ verified: "verified";
2408
+ mismatch: "mismatch";
2409
+ "commit-rejected": "commit-rejected";
2410
+ aborted: "aborted";
2411
+ reserved: "reserved";
2412
+ redeemed: "redeemed";
2413
+ preparing: "preparing";
2414
+ prepared: "prepared";
2415
+ committing: "committing";
2416
+ unresolved: "unresolved";
2417
+ }>;
2418
+ version: z.ZodNumber;
2419
+ reservedAtEpochMs: z.ZodNumber;
2420
+ updatedAtEpochMs: z.ZodNumber;
2421
+ commitDeadlineEpochMs: z.ZodNumber;
2422
+ commitLeaseDeadlineEpochMs: z.ZodNullable<z.ZodNumber>;
2423
+ reconcileDeadlineEpochMs: z.ZodNullable<z.ZodNumber>;
2424
+ lateReconcileDeadlineEpochMs: z.ZodNullable<z.ZodNumber>;
2425
+ commitLeaseIssued: z.ZodBoolean;
2426
+ providerObjectRef: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
2427
+ kind: z.ZodLiteral<"gmail-draft">;
2428
+ draftId: z.ZodString;
2429
+ messageId: z.ZodString;
2430
+ threadId: z.ZodString;
2431
+ }, z.core.$strict>, z.ZodObject<{
2432
+ kind: z.ZodLiteral<"graph-message">;
2433
+ immutableId: z.ZodString;
2434
+ internetMessageId: z.ZodString;
2435
+ }, z.core.$strict>, z.ZodObject<{
2436
+ kind: z.ZodLiteral<"api-request">;
2437
+ requestDigest: z.ZodString;
2438
+ }, z.core.$strict>, z.ZodObject<{
2439
+ kind: z.ZodLiteral<"tool-call">;
2440
+ callDigest: z.ZodString;
2441
+ }, z.core.$strict>, z.ZodObject<{
2442
+ kind: z.ZodLiteral<"gcalendar-plan">;
2443
+ requestDigest: z.ZodString;
2444
+ }, z.core.$strict>, z.ZodObject<{
2445
+ kind: z.ZodLiteral<"payment-order">;
2446
+ orderId: z.ZodString;
2447
+ intentId: z.ZodString;
2448
+ }, z.core.$strict>, z.ZodObject<{
2449
+ kind: z.ZodLiteral<"file-request">;
2450
+ requestDigest: z.ZodString;
2451
+ }, z.core.$strict>, z.ZodObject<{
2452
+ kind: z.ZodLiteral<"protected_data-op">;
2453
+ operationDigest: z.ZodString;
2454
+ }, z.core.$strict>, z.ZodObject<{
2455
+ kind: z.ZodLiteral<"guardian-call">;
2456
+ callDigest: z.ZodString;
2457
+ }, z.core.$strict>, z.ZodObject<{
2458
+ kind: z.ZodLiteral<"clawlink-execution">;
2459
+ requestDigest: z.ZodString;
2460
+ }, z.core.$strict>], "kind">>;
2461
+ sentRef: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
2462
+ kind: z.ZodLiteral<"gmail-message">;
2463
+ messageId: z.ZodString;
2464
+ threadId: z.ZodString;
2465
+ }, z.core.$strict>, z.ZodObject<{
2466
+ kind: z.ZodLiteral<"graph-message">;
2467
+ immutableId: z.ZodString;
2468
+ }, z.core.$strict>, z.ZodObject<{
2469
+ kind: z.ZodLiteral<"api-response">;
2470
+ status: z.ZodNumber;
2471
+ bodyBytes: z.ZodNumber;
2472
+ headersDigest: z.ZodString;
2473
+ bodyDigest: z.ZodString;
2474
+ bodyPreview: z.ZodString;
2475
+ truncated: z.ZodBoolean;
2476
+ }, z.core.$strict>, z.ZodObject<{
2477
+ kind: z.ZodLiteral<"tool-response">;
2478
+ operation: z.ZodEnum<{
2479
+ enable: "enable";
2480
+ install: "install";
2481
+ invoke: "invoke";
2482
+ }>;
2483
+ toolName: z.ZodString;
2484
+ status: z.ZodNullable<z.ZodNumber>;
2485
+ resultDigest: z.ZodString;
2486
+ detail: z.ZodString;
2487
+ }, z.core.$strict>, z.ZodObject<{
2488
+ kind: z.ZodLiteral<"gcalendar-event">;
2489
+ eventId: z.ZodString;
2490
+ status: z.ZodEnum<{
2491
+ cancelled: "cancelled";
2492
+ confirmed: "confirmed";
2493
+ }>;
2494
+ }, z.core.$strict>, z.ZodObject<{
2495
+ kind: z.ZodLiteral<"payment-charge">;
2496
+ chargeId: z.ZodString;
2497
+ amountCents: z.ZodNumber;
2498
+ currency: z.ZodString;
2499
+ status: z.ZodEnum<{
2500
+ succeeded: "succeeded";
2501
+ refunded: "refunded";
2502
+ returned: "returned";
2503
+ voided: "voided";
2504
+ }>;
2505
+ }, z.core.$strict>, z.ZodObject<{
2506
+ kind: z.ZodLiteral<"file-effect">;
2507
+ operation: z.ZodEnum<{
2508
+ share: "share";
2509
+ delete: "delete";
2510
+ read: "read";
2511
+ write: "write";
2512
+ }>;
2513
+ path: z.ZodString;
2514
+ contentDigest: z.ZodNullable<z.ZodString>;
2515
+ bytes: z.ZodNumber;
2516
+ shareId: z.ZodNullable<z.ZodString>;
2517
+ grantee: z.ZodNullable<z.ZodString>;
2518
+ }, z.core.$strict>, z.ZodObject<{
2519
+ kind: z.ZodLiteral<"protected_data-effect">;
2520
+ operation: z.ZodEnum<{
2521
+ view: "view";
2522
+ use: "use";
2523
+ disclose: "disclose";
2524
+ persist: "persist";
2525
+ }>;
2526
+ fieldRef: z.ZodString;
2527
+ valueDigest: z.ZodString;
2528
+ counterparty: z.ZodNullable<z.ZodString>;
2529
+ maskedPreview: z.ZodNullable<z.ZodString>;
2530
+ }, z.core.$strict>, z.ZodObject<{
2531
+ kind: z.ZodLiteral<"guardian-effect">;
2532
+ operation: z.ZodString;
2533
+ subject: z.ZodNullable<z.ZodString>;
2534
+ status: z.ZodString;
2535
+ resultDigest: z.ZodString;
2536
+ detail: z.ZodString;
2537
+ }, z.core.$strict>, z.ZodObject<{
2538
+ kind: z.ZodLiteral<"clawlink-execution">;
2539
+ executionId: z.ZodString;
2540
+ executionStatus: z.ZodLiteral<"succeeded">;
2541
+ resultDigest: z.ZodString;
2542
+ detail: z.ZodString;
2543
+ }, z.core.$strict>], "kind">>;
2544
+ orphanDraftPossible: z.ZodBoolean;
2545
+ pendingOutcome: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
2546
+ kind: z.ZodLiteral<"verified">;
2547
+ sentRef: z.ZodDiscriminatedUnion<[z.ZodObject<{
2548
+ kind: z.ZodLiteral<"gmail-message">;
2549
+ messageId: z.ZodString;
2550
+ threadId: z.ZodString;
2551
+ }, z.core.$strict>, z.ZodObject<{
2552
+ kind: z.ZodLiteral<"graph-message">;
2553
+ immutableId: z.ZodString;
2554
+ }, z.core.$strict>, z.ZodObject<{
2555
+ kind: z.ZodLiteral<"api-response">;
2556
+ status: z.ZodNumber;
2557
+ bodyBytes: z.ZodNumber;
2558
+ headersDigest: z.ZodString;
2559
+ bodyDigest: z.ZodString;
2560
+ bodyPreview: z.ZodString;
2561
+ truncated: z.ZodBoolean;
2562
+ }, z.core.$strict>, z.ZodObject<{
2563
+ kind: z.ZodLiteral<"tool-response">;
2564
+ operation: z.ZodEnum<{
2565
+ enable: "enable";
2566
+ install: "install";
2567
+ invoke: "invoke";
2568
+ }>;
2569
+ toolName: z.ZodString;
2570
+ status: z.ZodNullable<z.ZodNumber>;
2571
+ resultDigest: z.ZodString;
2572
+ detail: z.ZodString;
2573
+ }, z.core.$strict>, z.ZodObject<{
2574
+ kind: z.ZodLiteral<"gcalendar-event">;
2575
+ eventId: z.ZodString;
2576
+ status: z.ZodEnum<{
2577
+ cancelled: "cancelled";
2578
+ confirmed: "confirmed";
2579
+ }>;
2580
+ }, z.core.$strict>, z.ZodObject<{
2581
+ kind: z.ZodLiteral<"payment-charge">;
2582
+ chargeId: z.ZodString;
2583
+ amountCents: z.ZodNumber;
2584
+ currency: z.ZodString;
2585
+ status: z.ZodEnum<{
2586
+ succeeded: "succeeded";
2587
+ refunded: "refunded";
2588
+ returned: "returned";
2589
+ voided: "voided";
2590
+ }>;
2591
+ }, z.core.$strict>, z.ZodObject<{
2592
+ kind: z.ZodLiteral<"file-effect">;
2593
+ operation: z.ZodEnum<{
2594
+ share: "share";
2595
+ delete: "delete";
2596
+ read: "read";
2597
+ write: "write";
2598
+ }>;
2599
+ path: z.ZodString;
2600
+ contentDigest: z.ZodNullable<z.ZodString>;
2601
+ bytes: z.ZodNumber;
2602
+ shareId: z.ZodNullable<z.ZodString>;
2603
+ grantee: z.ZodNullable<z.ZodString>;
2604
+ }, z.core.$strict>, z.ZodObject<{
2605
+ kind: z.ZodLiteral<"protected_data-effect">;
2606
+ operation: z.ZodEnum<{
2607
+ view: "view";
2608
+ use: "use";
2609
+ disclose: "disclose";
2610
+ persist: "persist";
2611
+ }>;
2612
+ fieldRef: z.ZodString;
2613
+ valueDigest: z.ZodString;
2614
+ counterparty: z.ZodNullable<z.ZodString>;
2615
+ maskedPreview: z.ZodNullable<z.ZodString>;
2616
+ }, z.core.$strict>, z.ZodObject<{
2617
+ kind: z.ZodLiteral<"guardian-effect">;
2618
+ operation: z.ZodString;
2619
+ subject: z.ZodNullable<z.ZodString>;
2620
+ status: z.ZodString;
2621
+ resultDigest: z.ZodString;
2622
+ detail: z.ZodString;
2623
+ }, z.core.$strict>, z.ZodObject<{
2624
+ kind: z.ZodLiteral<"clawlink-execution">;
2625
+ executionId: z.ZodString;
2626
+ executionStatus: z.ZodLiteral<"succeeded">;
2627
+ resultDigest: z.ZodString;
2628
+ detail: z.ZodString;
2629
+ }, z.core.$strict>], "kind">;
2630
+ observedDigest: z.ZodString;
2631
+ effectDigest: z.ZodString;
2632
+ level: z.ZodEnum<{
2633
+ "pre-commit-content+post-commit-envelope": "pre-commit-content+post-commit-envelope";
2634
+ "post-commit-content": "post-commit-content";
2635
+ }>;
2636
+ observedAtEpochMs: z.ZodNumber;
2637
+ }, z.core.$strict>, z.ZodObject<{
2638
+ kind: z.ZodLiteral<"mismatch">;
2639
+ code: z.ZodEnum<{
2640
+ EFFECT_MISMATCH: "EFFECT_MISMATCH";
2641
+ DUPLICATE_EFFECT_DETECTED: "DUPLICATE_EFFECT_DETECTED";
2642
+ }>;
2643
+ observedDigest: z.ZodNullable<z.ZodString>;
2644
+ }, z.core.$strict>, z.ZodObject<{
2645
+ kind: z.ZodLiteral<"commit-rejected">;
2646
+ providerStatus: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>, z.ZodLiteral<404>, z.ZodLiteral<409>, z.ZodLiteral<413>, z.ZodLiteral<422>, z.ZodLiteral<429>]>;
2647
+ confirmedAtEpochMs: z.ZodNumber;
2648
+ }, z.core.$strict>, z.ZodObject<{
2649
+ kind: z.ZodLiteral<"unknown">;
2650
+ reason: z.ZodEnum<{
2651
+ COMMIT_RESPONSE_LOST: "COMMIT_RESPONSE_LOST";
2652
+ COMMIT_TIMEOUT: "COMMIT_TIMEOUT";
2653
+ COMMIT_SERVER_ERROR: "COMMIT_SERVER_ERROR";
2654
+ COMMIT_RESPONSE_INVALID: "COMMIT_RESPONSE_INVALID";
2655
+ COMMIT_REDIRECT_REFUSED: "COMMIT_REDIRECT_REFUSED";
2656
+ COMMIT_TARGET_NOT_FOUND: "COMMIT_TARGET_NOT_FOUND";
2657
+ REJECTION_UNCONFIRMED: "REJECTION_UNCONFIRMED";
2658
+ AWAITING_PROVIDER_RECORD: "AWAITING_PROVIDER_RECORD";
2659
+ VERIFICATION_UNAVAILABLE: "VERIFICATION_UNAVAILABLE";
2660
+ }>;
2661
+ }, z.core.$strict>, z.ZodObject<{
2662
+ kind: z.ZodLiteral<"aborted">;
2663
+ code: z.ZodEnum<{
2664
+ SENDER_ACCOUNT_MISMATCH: "SENDER_ACCOUNT_MISMATCH";
2665
+ CREDENTIAL_UNAVAILABLE: "CREDENTIAL_UNAVAILABLE";
2666
+ PREPARE_REJECTED: "PREPARE_REJECTED";
2667
+ PREPARE_AMBIGUOUS: "PREPARE_AMBIGUOUS";
2668
+ READBACK_UNAVAILABLE: "READBACK_UNAVAILABLE";
2669
+ PREPARED_CONTENT_MISMATCH: "PREPARED_CONTENT_MISMATCH";
2670
+ COMMIT_NOT_AUTHORIZED: "COMMIT_NOT_AUTHORIZED";
2671
+ AUTHORITY_REVOKED_BEFORE_COMMIT: "AUTHORITY_REVOKED_BEFORE_COMMIT";
2672
+ COMMIT_DEADLINE_EXPIRED: "COMMIT_DEADLINE_EXPIRED";
2673
+ ABORTED_BEFORE_COMMIT: "ABORTED_BEFORE_COMMIT";
2674
+ COMMIT_NOT_ISSUED: "COMMIT_NOT_ISSUED";
2675
+ COMMIT_REJECTED: "COMMIT_REJECTED";
2676
+ EFFECT_MISMATCH: "EFFECT_MISMATCH";
2677
+ DUPLICATE_EFFECT_DETECTED: "DUPLICATE_EFFECT_DETECTED";
2678
+ }>;
2679
+ orphanDraftPossible: z.ZodBoolean;
2680
+ }, z.core.$strict>, z.ZodObject<{
2681
+ kind: z.ZodLiteral<"unresolved">;
2682
+ reason: z.ZodEnum<{
2683
+ COMMIT_RESPONSE_LOST: "COMMIT_RESPONSE_LOST";
2684
+ COMMIT_TIMEOUT: "COMMIT_TIMEOUT";
2685
+ COMMIT_SERVER_ERROR: "COMMIT_SERVER_ERROR";
2686
+ COMMIT_RESPONSE_INVALID: "COMMIT_RESPONSE_INVALID";
2687
+ COMMIT_REDIRECT_REFUSED: "COMMIT_REDIRECT_REFUSED";
2688
+ COMMIT_TARGET_NOT_FOUND: "COMMIT_TARGET_NOT_FOUND";
2689
+ REJECTION_UNCONFIRMED: "REJECTION_UNCONFIRMED";
2690
+ AWAITING_PROVIDER_RECORD: "AWAITING_PROVIDER_RECORD";
2691
+ VERIFICATION_UNAVAILABLE: "VERIFICATION_UNAVAILABLE";
2692
+ }>;
2693
+ }, z.core.$strict>], "kind">>;
2694
+ outcome: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
2695
+ kind: z.ZodLiteral<"verified">;
2696
+ sentRef: z.ZodDiscriminatedUnion<[z.ZodObject<{
2697
+ kind: z.ZodLiteral<"gmail-message">;
2698
+ messageId: z.ZodString;
2699
+ threadId: z.ZodString;
2700
+ }, z.core.$strict>, z.ZodObject<{
2701
+ kind: z.ZodLiteral<"graph-message">;
2702
+ immutableId: z.ZodString;
2703
+ }, z.core.$strict>, z.ZodObject<{
2704
+ kind: z.ZodLiteral<"api-response">;
2705
+ status: z.ZodNumber;
2706
+ bodyBytes: z.ZodNumber;
2707
+ headersDigest: z.ZodString;
2708
+ bodyDigest: z.ZodString;
2709
+ bodyPreview: z.ZodString;
2710
+ truncated: z.ZodBoolean;
2711
+ }, z.core.$strict>, z.ZodObject<{
2712
+ kind: z.ZodLiteral<"tool-response">;
2713
+ operation: z.ZodEnum<{
2714
+ enable: "enable";
2715
+ install: "install";
2716
+ invoke: "invoke";
2717
+ }>;
2718
+ toolName: z.ZodString;
2719
+ status: z.ZodNullable<z.ZodNumber>;
2720
+ resultDigest: z.ZodString;
2721
+ detail: z.ZodString;
2722
+ }, z.core.$strict>, z.ZodObject<{
2723
+ kind: z.ZodLiteral<"gcalendar-event">;
2724
+ eventId: z.ZodString;
2725
+ status: z.ZodEnum<{
2726
+ cancelled: "cancelled";
2727
+ confirmed: "confirmed";
2728
+ }>;
2729
+ }, z.core.$strict>, z.ZodObject<{
2730
+ kind: z.ZodLiteral<"payment-charge">;
2731
+ chargeId: z.ZodString;
2732
+ amountCents: z.ZodNumber;
2733
+ currency: z.ZodString;
2734
+ status: z.ZodEnum<{
2735
+ succeeded: "succeeded";
2736
+ refunded: "refunded";
2737
+ returned: "returned";
2738
+ voided: "voided";
2739
+ }>;
2740
+ }, z.core.$strict>, z.ZodObject<{
2741
+ kind: z.ZodLiteral<"file-effect">;
2742
+ operation: z.ZodEnum<{
2743
+ share: "share";
2744
+ delete: "delete";
2745
+ read: "read";
2746
+ write: "write";
2747
+ }>;
2748
+ path: z.ZodString;
2749
+ contentDigest: z.ZodNullable<z.ZodString>;
2750
+ bytes: z.ZodNumber;
2751
+ shareId: z.ZodNullable<z.ZodString>;
2752
+ grantee: z.ZodNullable<z.ZodString>;
2753
+ }, z.core.$strict>, z.ZodObject<{
2754
+ kind: z.ZodLiteral<"protected_data-effect">;
2755
+ operation: z.ZodEnum<{
2756
+ view: "view";
2757
+ use: "use";
2758
+ disclose: "disclose";
2759
+ persist: "persist";
2760
+ }>;
2761
+ fieldRef: z.ZodString;
2762
+ valueDigest: z.ZodString;
2763
+ counterparty: z.ZodNullable<z.ZodString>;
2764
+ maskedPreview: z.ZodNullable<z.ZodString>;
2765
+ }, z.core.$strict>, z.ZodObject<{
2766
+ kind: z.ZodLiteral<"guardian-effect">;
2767
+ operation: z.ZodString;
2768
+ subject: z.ZodNullable<z.ZodString>;
2769
+ status: z.ZodString;
2770
+ resultDigest: z.ZodString;
2771
+ detail: z.ZodString;
2772
+ }, z.core.$strict>, z.ZodObject<{
2773
+ kind: z.ZodLiteral<"clawlink-execution">;
2774
+ executionId: z.ZodString;
2775
+ executionStatus: z.ZodLiteral<"succeeded">;
2776
+ resultDigest: z.ZodString;
2777
+ detail: z.ZodString;
2778
+ }, z.core.$strict>], "kind">;
2779
+ observedDigest: z.ZodString;
2780
+ effectDigest: z.ZodString;
2781
+ level: z.ZodEnum<{
2782
+ "pre-commit-content+post-commit-envelope": "pre-commit-content+post-commit-envelope";
2783
+ "post-commit-content": "post-commit-content";
2784
+ }>;
2785
+ observedAtEpochMs: z.ZodNumber;
2786
+ }, z.core.$strict>, z.ZodObject<{
2787
+ kind: z.ZodLiteral<"mismatch">;
2788
+ code: z.ZodEnum<{
2789
+ EFFECT_MISMATCH: "EFFECT_MISMATCH";
2790
+ DUPLICATE_EFFECT_DETECTED: "DUPLICATE_EFFECT_DETECTED";
2791
+ }>;
2792
+ observedDigest: z.ZodNullable<z.ZodString>;
2793
+ }, z.core.$strict>, z.ZodObject<{
2794
+ kind: z.ZodLiteral<"commit-rejected">;
2795
+ providerStatus: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<400>, z.ZodLiteral<401>, z.ZodLiteral<403>, z.ZodLiteral<404>, z.ZodLiteral<409>, z.ZodLiteral<413>, z.ZodLiteral<422>, z.ZodLiteral<429>]>;
2796
+ confirmedAtEpochMs: z.ZodNumber;
2797
+ }, z.core.$strict>, z.ZodObject<{
2798
+ kind: z.ZodLiteral<"unknown">;
2799
+ reason: z.ZodEnum<{
2800
+ COMMIT_RESPONSE_LOST: "COMMIT_RESPONSE_LOST";
2801
+ COMMIT_TIMEOUT: "COMMIT_TIMEOUT";
2802
+ COMMIT_SERVER_ERROR: "COMMIT_SERVER_ERROR";
2803
+ COMMIT_RESPONSE_INVALID: "COMMIT_RESPONSE_INVALID";
2804
+ COMMIT_REDIRECT_REFUSED: "COMMIT_REDIRECT_REFUSED";
2805
+ COMMIT_TARGET_NOT_FOUND: "COMMIT_TARGET_NOT_FOUND";
2806
+ REJECTION_UNCONFIRMED: "REJECTION_UNCONFIRMED";
2807
+ AWAITING_PROVIDER_RECORD: "AWAITING_PROVIDER_RECORD";
2808
+ VERIFICATION_UNAVAILABLE: "VERIFICATION_UNAVAILABLE";
2809
+ }>;
2810
+ }, z.core.$strict>, z.ZodObject<{
2811
+ kind: z.ZodLiteral<"aborted">;
2812
+ code: z.ZodEnum<{
2813
+ SENDER_ACCOUNT_MISMATCH: "SENDER_ACCOUNT_MISMATCH";
2814
+ CREDENTIAL_UNAVAILABLE: "CREDENTIAL_UNAVAILABLE";
2815
+ PREPARE_REJECTED: "PREPARE_REJECTED";
2816
+ PREPARE_AMBIGUOUS: "PREPARE_AMBIGUOUS";
2817
+ READBACK_UNAVAILABLE: "READBACK_UNAVAILABLE";
2818
+ PREPARED_CONTENT_MISMATCH: "PREPARED_CONTENT_MISMATCH";
2819
+ COMMIT_NOT_AUTHORIZED: "COMMIT_NOT_AUTHORIZED";
2820
+ AUTHORITY_REVOKED_BEFORE_COMMIT: "AUTHORITY_REVOKED_BEFORE_COMMIT";
2821
+ COMMIT_DEADLINE_EXPIRED: "COMMIT_DEADLINE_EXPIRED";
2822
+ ABORTED_BEFORE_COMMIT: "ABORTED_BEFORE_COMMIT";
2823
+ COMMIT_NOT_ISSUED: "COMMIT_NOT_ISSUED";
2824
+ COMMIT_REJECTED: "COMMIT_REJECTED";
2825
+ EFFECT_MISMATCH: "EFFECT_MISMATCH";
2826
+ DUPLICATE_EFFECT_DETECTED: "DUPLICATE_EFFECT_DETECTED";
2827
+ }>;
2828
+ orphanDraftPossible: z.ZodBoolean;
2829
+ }, z.core.$strict>, z.ZodObject<{
2830
+ kind: z.ZodLiteral<"unresolved">;
2831
+ reason: z.ZodEnum<{
2832
+ COMMIT_RESPONSE_LOST: "COMMIT_RESPONSE_LOST";
2833
+ COMMIT_TIMEOUT: "COMMIT_TIMEOUT";
2834
+ COMMIT_SERVER_ERROR: "COMMIT_SERVER_ERROR";
2835
+ COMMIT_RESPONSE_INVALID: "COMMIT_RESPONSE_INVALID";
2836
+ COMMIT_REDIRECT_REFUSED: "COMMIT_REDIRECT_REFUSED";
2837
+ COMMIT_TARGET_NOT_FOUND: "COMMIT_TARGET_NOT_FOUND";
2838
+ REJECTION_UNCONFIRMED: "REJECTION_UNCONFIRMED";
2839
+ AWAITING_PROVIDER_RECORD: "AWAITING_PROVIDER_RECORD";
2840
+ VERIFICATION_UNAVAILABLE: "VERIFICATION_UNAVAILABLE";
2841
+ }>;
2842
+ }, z.core.$strict>], "kind">>;
2843
+ }, z.core.$strict>>;
2844
+ effect: z.ZodObject<{
2845
+ kind: z.ZodEnum<{
2846
+ none: "none";
2847
+ failed: "failed";
2848
+ verified: "verified";
2849
+ "outcome-pending": "outcome-pending";
2850
+ }>;
2851
+ terminalEvent: z.ZodNullable<z.ZodEnum<{
2852
+ EXECUTION_ABORTED: "EXECUTION_ABORTED";
2853
+ EFFECT_VERIFIED: "EFFECT_VERIFIED";
2854
+ EXECUTION_FAILED: "EXECUTION_FAILED";
2855
+ }>>;
2856
+ failureCode: z.ZodNullable<z.ZodString>;
2857
+ effectDigest: z.ZodNullable<z.ZodString>;
2858
+ failureDigest: z.ZodNullable<z.ZodString>;
2859
+ }, z.core.$strict>;
2860
+ evidence: z.ZodObject<{
2861
+ chain: z.ZodArray<z.ZodObject<{
2862
+ recordHash: z.ZodString;
2863
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
2864
+ eventType: z.ZodLiteral<"AUTHENTICATION_RECORDED">;
2865
+ payload: z.ZodObject<{
2866
+ interface: z.ZodEnum<{
2867
+ mcp: "mcp";
2868
+ rest: "rest";
2869
+ internal: "internal";
2870
+ }>;
2871
+ outcome: z.ZodEnum<{
2872
+ rejected: "rejected";
2873
+ authenticated: "authenticated";
2874
+ }>;
2875
+ credentialReference: z.ZodString;
2876
+ }, z.core.$strict>;
2877
+ }, z.core.$strict>, z.ZodObject<{
2878
+ eventType: z.ZodLiteral<"ADAPTER_AUTHENTICATION_RECORDED">;
2879
+ payload: z.ZodObject<{
2880
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
2881
+ outcome: z.ZodLiteral<"authenticated">;
2882
+ credentialReference: z.ZodString;
2883
+ }, z.core.$strict>;
2884
+ }, z.core.$strict>, z.ZodObject<{
2885
+ eventType: z.ZodLiteral<"REQUEST_RECEIVED">;
2886
+ payload: z.ZodObject<{
2887
+ actionDigest: z.ZodString;
2888
+ }, z.core.$strict>;
2889
+ }, z.core.$strict>, z.ZodObject<{
2890
+ eventType: z.ZodLiteral<"ACTION_NORMALIZED">;
2891
+ payload: z.ZodObject<{
2892
+ actionDigest: z.ZodString;
2893
+ }, z.core.$strict>;
2894
+ }, z.core.$strict>, z.ZodObject<{
2895
+ eventType: z.ZodLiteral<"DECISION_RECORDED">;
2896
+ payload: z.ZodDiscriminatedUnion<[z.ZodObject<{
2897
+ actionDigest: z.ZodString;
2898
+ actionDecisionDigest: z.ZodString;
2899
+ decision: z.ZodLiteral<"ALLOW">;
2900
+ reasonCode: z.ZodLiteral<"AUTHORIZED">;
2901
+ }, z.core.$strict>, z.ZodObject<{
2902
+ actionDigest: z.ZodString;
2903
+ actionDecisionDigest: z.ZodString;
2904
+ decision: z.ZodLiteral<"ASK">;
2905
+ reasonCode: z.ZodLiteral<"APPROVAL_REQUIRED">;
2906
+ }, z.core.$strict>, z.ZodObject<{
2907
+ actionDigest: z.ZodString;
2908
+ actionDecisionDigest: z.ZodString;
2909
+ decision: z.ZodLiteral<"DENY">;
2910
+ reasonCode: z.ZodEnum<{
2911
+ MALFORMED_INPUT: "MALFORMED_INPUT";
2912
+ TENANT_MISMATCH: "TENANT_MISMATCH";
2913
+ PRINCIPAL_MISMATCH: "PRINCIPAL_MISMATCH";
2914
+ PRINCIPAL_NOT_ACTIVE: "PRINCIPAL_NOT_ACTIVE";
2915
+ AGENT_TENANT_MISMATCH: "AGENT_TENANT_MISMATCH";
2916
+ AGENT_OWNER_MISMATCH: "AGENT_OWNER_MISMATCH";
2917
+ AGENT_MISMATCH: "AGENT_MISMATCH";
2918
+ AGENT_NOT_ACTIVE: "AGENT_NOT_ACTIVE";
2919
+ INTERFACE_NOT_ALLOWED: "INTERFACE_NOT_ALLOWED";
2920
+ AUTHORITY_PAUSED: "AUTHORITY_PAUSED";
2921
+ AUTHORITY_CHAIN_MISSING: "AUTHORITY_CHAIN_MISSING";
2922
+ DUPLICATE_GRANT_ID: "DUPLICATE_GRANT_ID";
2923
+ GRANT_TENANT_MISMATCH: "GRANT_TENANT_MISMATCH";
2924
+ GRANT_PRINCIPAL_MISMATCH: "GRANT_PRINCIPAL_MISMATCH";
2925
+ GRANT_AGENT_MISMATCH: "GRANT_AGENT_MISMATCH";
2926
+ GRANT_NOT_ACTIVE: "GRANT_NOT_ACTIVE";
2927
+ GRANT_REVOKED: "GRANT_REVOKED";
2928
+ GRANT_NOT_YET_VALID: "GRANT_NOT_YET_VALID";
2929
+ GRANT_EXPIRED: "GRANT_EXPIRED";
2930
+ INVALID_PARENT_LINK: "INVALID_PARENT_LINK";
2931
+ DELEGATION_NOT_ALLOWED: "DELEGATION_NOT_ALLOWED";
2932
+ AUTHORITY_AMPLIFICATION: "AUTHORITY_AMPLIFICATION";
2933
+ ACTION_NOT_ALLOWED: "ACTION_NOT_ALLOWED";
2934
+ RESOURCE_NOT_ALLOWED: "RESOURCE_NOT_ALLOWED";
2935
+ ADAPTER_NOT_ALLOWED: "ADAPTER_NOT_ALLOWED";
2936
+ VALUE_LIMIT_EXCEEDED: "VALUE_LIMIT_EXCEEDED";
2937
+ USE_LIMIT_EXCEEDED: "USE_LIMIT_EXCEEDED";
2938
+ MERCHANT_NOT_ALLOWED: "MERCHANT_NOT_ALLOWED";
2939
+ CATEGORY_NOT_ALLOWED: "CATEGORY_NOT_ALLOWED";
2940
+ RECURRENCE_NOT_ALLOWED: "RECURRENCE_NOT_ALLOWED";
2941
+ BUDGET_NOT_FOUND: "BUDGET_NOT_FOUND";
2942
+ BUDGET_SCOPE_MISMATCH: "BUDGET_SCOPE_MISMATCH";
2943
+ BUDGET_NOT_ACTIVE: "BUDGET_NOT_ACTIVE";
2944
+ BUDGET_EXPIRED: "BUDGET_EXPIRED";
2945
+ BUDGET_EXCEEDED: "BUDGET_EXCEEDED";
2946
+ TRANSACTION_LIMIT_EXCEEDED: "TRANSACTION_LIMIT_EXCEEDED";
2947
+ }>;
2948
+ }, z.core.$strict>], "decision">;
2949
+ }, z.core.$strict>, z.ZodObject<{
2950
+ eventType: z.ZodLiteral<"REQUEST_DENIED">;
2951
+ payload: z.ZodObject<{
2952
+ decision: z.ZodLiteral<"DENY">;
2953
+ actionDigest: z.ZodNullable<z.ZodString>;
2954
+ requestDeniedDigest: z.ZodString;
2955
+ reasonCode: z.ZodString;
2956
+ decidedAtEpochMs: z.ZodNumber;
2957
+ }, z.core.$strict>;
2958
+ }, z.core.$strict>, z.ZodObject<{
2959
+ eventType: z.ZodLiteral<"APPROVAL_STATE_REFERENCED">;
2960
+ payload: z.ZodObject<{
2961
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
2962
+ version: z.ZodNumber;
2963
+ state: z.ZodEnum<{
2964
+ revoked: "revoked";
2965
+ pending: "pending";
2966
+ expired: "expired";
2967
+ approved: "approved";
2968
+ denied: "denied";
2969
+ superseded: "superseded";
2970
+ consumed: "consumed";
2971
+ }>;
2972
+ approvalDigest: z.ZodString;
2973
+ }, z.core.$strict>;
2974
+ }, z.core.$strict>, z.ZodObject<{
2975
+ eventType: z.ZodLiteral<"APPROVAL_PRESENTED">;
2976
+ payload: z.ZodObject<{
2977
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
2978
+ presentationDigest: z.ZodString;
2979
+ viewerReference: z.ZodString;
2980
+ }, z.core.$strict>;
2981
+ }, z.core.$strict>, z.ZodObject<{
2982
+ eventType: z.ZodLiteral<"APPROVAL_DECISION_RECORDED">;
2983
+ payload: z.ZodObject<{
2984
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
2985
+ version: z.ZodNumber;
2986
+ decision: z.ZodEnum<{
2987
+ veto: "veto";
2988
+ approve: "approve";
2989
+ deny: "deny";
2990
+ revoke: "revoke";
2991
+ endorse: "endorse";
2992
+ dissent: "dissent";
2993
+ mature: "mature";
2994
+ }>;
2995
+ actorPrincipalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
2996
+ actorReference: z.ZodString;
2997
+ presentationDigest: z.ZodString;
2998
+ }, z.core.$strict>;
2999
+ }, z.core.$strict>, z.ZodObject<{
3000
+ eventType: z.ZodLiteral<"APPROVAL_REJECTED">;
3001
+ payload: z.ZodObject<{
3002
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId", "out">;
3003
+ reasonCode: z.ZodString;
3004
+ }, z.core.$strict>;
3005
+ }, z.core.$strict>, z.ZodObject<{
3006
+ eventType: z.ZodLiteral<"CAPABILITY_STATE_REFERENCED">;
3007
+ payload: z.ZodObject<{
3008
+ actionDigest: z.ZodString;
3009
+ capabilityId: z.core.$ZodBranded<z.ZodString, "CapabilityId", "out">;
3010
+ state: z.ZodEnum<{
3011
+ revoked: "revoked";
3012
+ expired: "expired";
3013
+ issued: "issued";
3014
+ used: "used";
3015
+ }>;
3016
+ capabilityDigest: z.ZodString;
3017
+ }, z.core.$strict>;
3018
+ }, z.core.$strict>, z.ZodObject<{
3019
+ eventType: z.ZodLiteral<"CAPABILITY_REJECTED">;
3020
+ payload: z.ZodObject<{
3021
+ actionDigest: z.ZodString;
3022
+ reasonCode: z.ZodString;
3023
+ }, z.core.$strict>;
3024
+ }, z.core.$strict>, z.ZodObject<{
3025
+ eventType: z.ZodLiteral<"EXECUTION_ATTEMPTED">;
3026
+ payload: z.ZodObject<{
3027
+ actionDigest: z.ZodString;
3028
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
3029
+ attemptReference: z.ZodString;
3030
+ idempotencyDigest: z.ZodString;
3031
+ }, z.core.$strict>;
3032
+ }, z.core.$strict>, z.ZodObject<{
3033
+ eventType: z.ZodLiteral<"EXECUTION_ABORTED">;
3034
+ payload: z.ZodObject<{
3035
+ actionDigest: z.ZodString;
3036
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
3037
+ attemptReference: z.ZodString;
3038
+ reasonCode: z.ZodString;
3039
+ }, z.core.$strict>;
3040
+ }, z.core.$strict>, z.ZodObject<{
3041
+ eventType: z.ZodLiteral<"EFFECT_PREPARED">;
3042
+ payload: z.ZodObject<{
3043
+ actionDigest: z.ZodString;
3044
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
3045
+ attemptReference: z.ZodString;
3046
+ preparedDigest: z.ZodString;
3047
+ }, z.core.$strict>;
3048
+ }, z.core.$strict>, z.ZodObject<{
3049
+ eventType: z.ZodLiteral<"EFFECT_COMMIT_AUTHORIZED">;
3050
+ payload: z.ZodObject<{
3051
+ actionDigest: z.ZodString;
3052
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
3053
+ attemptReference: z.ZodString;
3054
+ actionDecisionDigest: z.ZodString;
3055
+ }, z.core.$strict>;
3056
+ }, z.core.$strict>, z.ZodObject<{
3057
+ eventType: z.ZodLiteral<"EFFECT_OUTCOME_UNKNOWN">;
3058
+ payload: z.ZodObject<{
3059
+ actionDigest: z.ZodString;
3060
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
3061
+ attemptReference: z.ZodString;
3062
+ reasonCode: z.ZodString;
3063
+ }, z.core.$strict>;
3064
+ }, z.core.$strict>, z.ZodObject<{
3065
+ eventType: z.ZodLiteral<"EFFECT_UNRESOLVED">;
3066
+ payload: z.ZodObject<{
3067
+ actionDigest: z.ZodString;
3068
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
3069
+ attemptReference: z.ZodString;
3070
+ }, z.core.$strict>;
3071
+ }, z.core.$strict>, z.ZodObject<{
3072
+ eventType: z.ZodLiteral<"EFFECT_VERIFIED">;
3073
+ payload: z.ZodObject<{
3074
+ actionDigest: z.ZodString;
3075
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
3076
+ attemptReference: z.ZodString;
3077
+ effectDigest: z.ZodString;
3078
+ }, z.core.$strict>;
3079
+ }, z.core.$strict>, z.ZodObject<{
3080
+ eventType: z.ZodLiteral<"EXECUTION_FAILED">;
3081
+ payload: z.ZodObject<{
3082
+ actionDigest: z.ZodString;
3083
+ adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
3084
+ attemptReference: z.ZodString;
3085
+ failureCode: z.ZodString;
3086
+ failureDigest: z.ZodOptional<z.ZodString>;
3087
+ }, z.core.$strict>;
3088
+ }, z.core.$strict>, z.ZodObject<{
3089
+ eventType: z.ZodLiteral<"AUTHORITY_REVOKED">;
3090
+ payload: z.ZodObject<{
3091
+ grantId: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
3092
+ grantVersion: z.ZodNumber;
3093
+ revocationDigest: z.ZodString;
3094
+ }, z.core.$strict>;
3095
+ }, z.core.$strict>], "eventType">;
3096
+ sequence: z.ZodNumber;
3097
+ previousRecordHash: z.ZodNullable<z.ZodString>;
3098
+ payloadDigest: z.ZodString;
3099
+ schemaVersion: z.ZodLiteral<1>;
3100
+ id: z.core.$ZodBranded<z.ZodString, "EvidenceId", "out">;
3101
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
3102
+ principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
3103
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
3104
+ requestId: z.core.$ZodBranded<z.ZodString, "RequestId", "out">;
3105
+ correlationId: z.core.$ZodBranded<z.ZodString, "CorrelationId", "out">;
3106
+ eventTimeEpochMs: z.ZodNumber;
3107
+ }, z.core.$strict>>;
3108
+ recordCount: z.ZodNumber;
3109
+ headRecordHash: z.ZodString;
3110
+ }, z.core.$strict>;
3111
+ generatedBy: z.ZodLiteral<"guardian-control-plane">;
3112
+ proof: z.ZodObject<{
3113
+ algorithm: z.ZodLiteral<"Ed25519">;
3114
+ canonicalization: z.ZodLiteral<"guardian-canonical-json.v1">;
3115
+ domain: z.ZodLiteral<"odingard.guardian.receipt.v1">;
3116
+ keyId: z.ZodString;
3117
+ signature: z.ZodString;
3118
+ }, z.core.$strict>;
3119
+ }, z.core.$strict>;
3120
+ /** Canonical bytes an Ed25519 verifier signs/verifies for a receipt body. */
3121
+ export declare function portableReceiptSigningInput(body: z.infer<typeof PortableReceiptBodySchema>): Uint8Array;
3122
+ export type ReceiptKeyId = z.infer<typeof ReceiptKeyIdSchema>;
3123
+ export type ReceiptVerificationJwk = z.infer<typeof ReceiptVerificationJwkSchema>;
3124
+ export type ReceiptVerificationKeySet = z.infer<typeof ReceiptVerificationKeySetSchema>;
3125
+ export type PortableReceiptBody = z.infer<typeof PortableReceiptBodySchema>;
3126
+ export type PortableAuthorityReceipt = z.infer<typeof PortableAuthorityReceiptSchema>;