@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.
- package/README.md +252 -17
- package/dist/contracts.js +9865 -0
- package/dist/index.js +12976 -1787
- package/dist/public-catalog.v1.json +6915 -0
- package/dist-dts/catalog.d.ts +14 -0
- package/dist-dts/client.d.ts +51 -1
- package/dist-dts/contracts/action-pack.d.ts +464 -0
- package/dist-dts/contracts/action-registry.d.ts +91 -1
- package/dist-dts/contracts/action.d.ts +1408 -17
- package/dist-dts/contracts/agent-state.d.ts +386 -0
- package/dist-dts/contracts/approval.d.ts +224 -5
- package/dist-dts/contracts/assurance.d.ts +60 -0
- package/dist-dts/contracts/authority-graph.d.ts +294 -0
- package/dist-dts/contracts/authority-state.d.ts +17 -2
- package/dist-dts/contracts/authority.d.ts +31 -5
- package/dist-dts/contracts/billing.d.ts +32 -0
- package/dist-dts/contracts/calendar.d.ts +6 -6
- package/dist-dts/contracts/denial.d.ts +648 -0
- package/dist-dts/contracts/evidence.d.ts +73 -16
- package/dist-dts/contracts/execution.d.ts +449 -55
- package/dist-dts/contracts/identifiers.d.ts +16 -0
- package/dist-dts/contracts/index.d.ts +22 -0
- package/dist-dts/contracts/intent.d.ts +335 -0
- package/dist-dts/contracts/lineage.d.ts +218 -0
- package/dist-dts/contracts/local.d.ts +101 -0
- package/dist-dts/contracts/multi-principal.d.ts +292 -0
- package/dist-dts/contracts/multiparty.d.ts +169 -0
- package/dist-dts/contracts/obligation.d.ts +196 -0
- package/dist-dts/contracts/plan.d.ts +67 -0
- package/dist-dts/contracts/policy-simulation.d.ts +681 -0
- package/dist-dts/contracts/prerequisite.d.ts +147 -0
- package/dist-dts/contracts/protected-data.d.ts +67 -0
- package/dist-dts/contracts/receipt.d.ts +3126 -0
- package/dist-dts/contracts/resource-claims.d.ts +146 -0
- package/dist-dts/contracts/runtime.d.ts +111 -0
- package/dist-dts/contracts/safety-envelope.d.ts +287 -0
- package/dist-dts/contracts/sequence.d.ts +132 -0
- package/dist-dts/contracts/sources.d.ts +191 -0
- package/dist-dts/contracts/tools.d.ts +50 -5
- package/dist-dts/contracts/transaction.d.ts +360 -0
- package/dist-dts/contracts-entry.d.ts +1 -0
- package/dist-dts/embedded.d.ts +58 -0
- package/dist-dts/evidence/evidence.d.ts +25 -0
- package/dist-dts/evidence/receipt.d.ts +61 -0
- package/dist-dts/index.d.ts +5 -1
- package/dist-dts/lifecycle.d.ts +25 -0
- package/dist-dts/proposal.d.ts +16 -0
- package/dist-dts/receipts.d.ts +37 -0
- package/package.json +12 -6
- package/dist-dts/__tests__/client.test.d.ts +0 -1
|
@@ -46,9 +46,9 @@ export declare const ApprovalPresentationSchema: z.ZodObject<{
|
|
|
46
46
|
resource: z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">;
|
|
47
47
|
adapterId: z.core.$ZodBranded<z.ZodString, "AdapterId", "out">;
|
|
48
48
|
interface: z.ZodEnum<{
|
|
49
|
-
internal: "internal";
|
|
50
49
|
mcp: "mcp";
|
|
51
50
|
rest: "rest";
|
|
51
|
+
internal: "internal";
|
|
52
52
|
}>;
|
|
53
53
|
initiatingContext: z.ZodEnum<{
|
|
54
54
|
agent: "agent";
|
|
@@ -78,6 +78,89 @@ export declare const ApprovalPresentationSchema: z.ZodObject<{
|
|
|
78
78
|
}, z.core.$strict>>;
|
|
79
79
|
}, z.core.$strict>;
|
|
80
80
|
}, z.core.$strict>;
|
|
81
|
+
providedObligations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
82
|
+
type: z.ZodEnum<{
|
|
83
|
+
log: "log";
|
|
84
|
+
retain_receipt: "retain_receipt";
|
|
85
|
+
notify: "notify";
|
|
86
|
+
delay: "delay";
|
|
87
|
+
cooling_period: "cooling_period";
|
|
88
|
+
delete_after_use: "delete_after_use";
|
|
89
|
+
redact: "redact";
|
|
90
|
+
encrypt: "encrypt";
|
|
91
|
+
tokenize: "tokenize";
|
|
92
|
+
minimize: "minimize";
|
|
93
|
+
verify_counterparty: "verify_counterparty";
|
|
94
|
+
verify_resource: "verify_resource";
|
|
95
|
+
verify_effect: "verify_effect";
|
|
96
|
+
attest_runtime: "attest_runtime";
|
|
97
|
+
require_consent: "require_consent";
|
|
98
|
+
require_location: "require_location";
|
|
99
|
+
require_device: "require_device";
|
|
100
|
+
require_network: "require_network";
|
|
101
|
+
require_contract: "require_contract";
|
|
102
|
+
step_up: "step_up";
|
|
103
|
+
second_approver: "second_approver";
|
|
104
|
+
quorum: "quorum";
|
|
105
|
+
authenticate: "authenticate";
|
|
106
|
+
}>;
|
|
107
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>]>>>;
|
|
108
|
+
}, z.core.$strict>>>;
|
|
109
|
+
runtimeTrustLevel: z.ZodOptional<z.ZodEnum<{
|
|
110
|
+
T0_UNKNOWN: "T0_UNKNOWN";
|
|
111
|
+
T1_IDENTIFIED: "T1_IDENTIFIED";
|
|
112
|
+
T2_VERIFIED: "T2_VERIFIED";
|
|
113
|
+
T3_ATTESTED: "T3_ATTESTED";
|
|
114
|
+
T4_HARDWARE_BACKED: "T4_HARDWARE_BACKED";
|
|
115
|
+
}>>;
|
|
116
|
+
enforcementAssurance: z.ZodOptional<z.ZodEnum<{
|
|
117
|
+
G2_CREDENTIAL_MEDIATED: "G2_CREDENTIAL_MEDIATED";
|
|
118
|
+
G1_POLICY_MEDIATED: "G1_POLICY_MEDIATED";
|
|
119
|
+
G3_RUNTIME_CONTAINED: "G3_RUNTIME_CONTAINED";
|
|
120
|
+
G0_OBSERVED: "G0_OBSERVED";
|
|
121
|
+
G4_COUNTERPARTY_INTERLOCKED: "G4_COUNTERPARTY_INTERLOCKED";
|
|
122
|
+
}>>;
|
|
123
|
+
approvalStructures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
124
|
+
schema: z.ZodLiteral<"guardian.multiparty.v1">;
|
|
125
|
+
structureId: z.ZodString;
|
|
126
|
+
members: z.ZodArray<z.ZodObject<{
|
|
127
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
128
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
129
|
+
}, z.core.$strict>>;
|
|
130
|
+
requirement: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
131
|
+
kind: z.ZodLiteral<"single">;
|
|
132
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
133
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
134
|
+
kind: z.ZodLiteral<"nOfM">;
|
|
135
|
+
n: z.ZodNumber;
|
|
136
|
+
members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
|
|
137
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
138
|
+
kind: z.ZodLiteral<"unanimous">;
|
|
139
|
+
members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
|
|
140
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
141
|
+
kind: z.ZodLiteral<"roleQuorum">;
|
|
142
|
+
role: z.ZodString;
|
|
143
|
+
n: z.ZodNumber;
|
|
144
|
+
m: z.ZodNumber;
|
|
145
|
+
}, z.core.$strict>], "kind">;
|
|
146
|
+
specificRequired: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
|
|
147
|
+
veto: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
|
|
148
|
+
separationOfDuties: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
mutuallyExclusive: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
150
|
+
}, z.core.$strict>>;
|
|
151
|
+
temporaryApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
152
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
153
|
+
expiresAtEpochMs: z.ZodNumber;
|
|
154
|
+
}, z.core.$strict>>>;
|
|
155
|
+
delegatedApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
156
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
157
|
+
delegatedBy: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
158
|
+
}, z.core.$strict>>>;
|
|
159
|
+
emergencyApprovers: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
|
|
160
|
+
coolingPeriod: z.ZodOptional<z.ZodObject<{
|
|
161
|
+
seconds: z.ZodNumber;
|
|
162
|
+
}, z.core.$strict>>;
|
|
163
|
+
}, z.core.$strict>>>;
|
|
81
164
|
actionDigest: z.ZodString;
|
|
82
165
|
expiresAtEpochMs: z.ZodNumber;
|
|
83
166
|
}, z.core.$strict>;
|
|
@@ -104,13 +187,64 @@ export declare const ApprovalBindingSchema: z.ZodObject<{
|
|
|
104
187
|
presentationDigest: z.ZodString;
|
|
105
188
|
requestedAtEpochMs: z.ZodNumber;
|
|
106
189
|
expiresAtEpochMs: z.ZodNumber;
|
|
190
|
+
eligiblePrincipalIds: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
|
|
191
|
+
requiredFactor: z.ZodOptional<z.ZodEnum<{
|
|
192
|
+
tap: "tap";
|
|
193
|
+
passkey: "passkey";
|
|
194
|
+
biometric: "biometric";
|
|
195
|
+
"second-device": "second-device";
|
|
196
|
+
"multi-approver": "multi-approver";
|
|
197
|
+
}>>;
|
|
198
|
+
requiredApprovals: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
scopeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
|
|
200
|
+
structures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
201
|
+
schema: z.ZodLiteral<"guardian.multiparty.v1">;
|
|
202
|
+
structureId: z.ZodString;
|
|
203
|
+
members: z.ZodArray<z.ZodObject<{
|
|
204
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
205
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
206
|
+
}, z.core.$strict>>;
|
|
207
|
+
requirement: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
208
|
+
kind: z.ZodLiteral<"single">;
|
|
209
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
210
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
211
|
+
kind: z.ZodLiteral<"nOfM">;
|
|
212
|
+
n: z.ZodNumber;
|
|
213
|
+
members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
|
|
214
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
215
|
+
kind: z.ZodLiteral<"unanimous">;
|
|
216
|
+
members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
|
|
217
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
218
|
+
kind: z.ZodLiteral<"roleQuorum">;
|
|
219
|
+
role: z.ZodString;
|
|
220
|
+
n: z.ZodNumber;
|
|
221
|
+
m: z.ZodNumber;
|
|
222
|
+
}, z.core.$strict>], "kind">;
|
|
223
|
+
specificRequired: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
|
|
224
|
+
veto: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
|
|
225
|
+
separationOfDuties: z.ZodOptional<z.ZodObject<{
|
|
226
|
+
mutuallyExclusive: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
227
|
+
}, z.core.$strict>>;
|
|
228
|
+
temporaryApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
229
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
230
|
+
expiresAtEpochMs: z.ZodNumber;
|
|
231
|
+
}, z.core.$strict>>>;
|
|
232
|
+
delegatedApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
233
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
234
|
+
delegatedBy: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
235
|
+
}, z.core.$strict>>>;
|
|
236
|
+
emergencyApprovers: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
|
|
237
|
+
coolingPeriod: z.ZodOptional<z.ZodObject<{
|
|
238
|
+
seconds: z.ZodNumber;
|
|
239
|
+
}, z.core.$strict>>;
|
|
240
|
+
}, z.core.$strict>>>;
|
|
107
241
|
}, z.core.$strict>;
|
|
108
242
|
export declare const ApprovalStateSchema: z.ZodEnum<{
|
|
109
243
|
revoked: "revoked";
|
|
110
244
|
pending: "pending";
|
|
245
|
+
expired: "expired";
|
|
111
246
|
approved: "approved";
|
|
112
247
|
denied: "denied";
|
|
113
|
-
expired: "expired";
|
|
114
248
|
superseded: "superseded";
|
|
115
249
|
consumed: "consumed";
|
|
116
250
|
}>;
|
|
@@ -139,29 +273,114 @@ export declare const ApprovalRecordSchema: z.ZodObject<{
|
|
|
139
273
|
presentationDigest: z.ZodString;
|
|
140
274
|
requestedAtEpochMs: z.ZodNumber;
|
|
141
275
|
expiresAtEpochMs: z.ZodNumber;
|
|
276
|
+
eligiblePrincipalIds: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
|
|
277
|
+
requiredFactor: z.ZodOptional<z.ZodEnum<{
|
|
278
|
+
tap: "tap";
|
|
279
|
+
passkey: "passkey";
|
|
280
|
+
biometric: "biometric";
|
|
281
|
+
"second-device": "second-device";
|
|
282
|
+
"multi-approver": "multi-approver";
|
|
283
|
+
}>>;
|
|
284
|
+
requiredApprovals: z.ZodOptional<z.ZodNumber>;
|
|
285
|
+
scopeId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ScopeId", "out">>;
|
|
286
|
+
structures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
287
|
+
schema: z.ZodLiteral<"guardian.multiparty.v1">;
|
|
288
|
+
structureId: z.ZodString;
|
|
289
|
+
members: z.ZodArray<z.ZodObject<{
|
|
290
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
291
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
292
|
+
}, z.core.$strict>>;
|
|
293
|
+
requirement: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
294
|
+
kind: z.ZodLiteral<"single">;
|
|
295
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
296
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
297
|
+
kind: z.ZodLiteral<"nOfM">;
|
|
298
|
+
n: z.ZodNumber;
|
|
299
|
+
members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
|
|
300
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
301
|
+
kind: z.ZodLiteral<"unanimous">;
|
|
302
|
+
members: z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
|
|
303
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
304
|
+
kind: z.ZodLiteral<"roleQuorum">;
|
|
305
|
+
role: z.ZodString;
|
|
306
|
+
n: z.ZodNumber;
|
|
307
|
+
m: z.ZodNumber;
|
|
308
|
+
}, z.core.$strict>], "kind">;
|
|
309
|
+
specificRequired: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
|
|
310
|
+
veto: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
|
|
311
|
+
separationOfDuties: z.ZodOptional<z.ZodObject<{
|
|
312
|
+
mutuallyExclusive: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
313
|
+
}, z.core.$strict>>;
|
|
314
|
+
temporaryApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
315
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
316
|
+
expiresAtEpochMs: z.ZodNumber;
|
|
317
|
+
}, z.core.$strict>>>;
|
|
318
|
+
delegatedApprovers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
319
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
320
|
+
delegatedBy: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
321
|
+
}, z.core.$strict>>>;
|
|
322
|
+
emergencyApprovers: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>>;
|
|
323
|
+
coolingPeriod: z.ZodOptional<z.ZodObject<{
|
|
324
|
+
seconds: z.ZodNumber;
|
|
325
|
+
}, z.core.$strict>>;
|
|
326
|
+
}, z.core.$strict>>>;
|
|
142
327
|
}, z.core.$strict>;
|
|
143
328
|
state: z.ZodEnum<{
|
|
144
329
|
revoked: "revoked";
|
|
145
330
|
pending: "pending";
|
|
331
|
+
expired: "expired";
|
|
146
332
|
approved: "approved";
|
|
147
333
|
denied: "denied";
|
|
148
|
-
expired: "expired";
|
|
149
334
|
superseded: "superseded";
|
|
150
335
|
consumed: "consumed";
|
|
151
336
|
}>;
|
|
152
337
|
version: z.ZodNumber;
|
|
153
338
|
updatedAtEpochMs: z.ZodNumber;
|
|
154
339
|
decidedByPrincipalId: z.ZodNullable<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
|
|
340
|
+
endorsements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
341
|
+
principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
342
|
+
factor: z.ZodEnum<{
|
|
343
|
+
tap: "tap";
|
|
344
|
+
passkey: "passkey";
|
|
345
|
+
biometric: "biometric";
|
|
346
|
+
"second-device": "second-device";
|
|
347
|
+
}>;
|
|
348
|
+
atEpochMs: z.ZodNumber;
|
|
349
|
+
}, z.core.$strict>>>;
|
|
350
|
+
structureApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
351
|
+
memberId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
352
|
+
decision: z.ZodEnum<{
|
|
353
|
+
veto: "veto";
|
|
354
|
+
approve: "approve";
|
|
355
|
+
deny: "deny";
|
|
356
|
+
}>;
|
|
357
|
+
atEpochMs: z.ZodNumber;
|
|
358
|
+
via: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
|
|
359
|
+
emergency: z.ZodOptional<z.ZodLiteral<true>>;
|
|
360
|
+
}, z.core.$strict>>>;
|
|
361
|
+
cooling: z.ZodOptional<z.ZodObject<{
|
|
362
|
+
startedAtEpochMs: z.ZodNumber;
|
|
363
|
+
endsAtEpochMs: z.ZodNumber;
|
|
364
|
+
}, z.core.$strict>>;
|
|
155
365
|
}, z.core.$strict>;
|
|
156
366
|
/** Human-facing REST body for an explicit approve or deny decision. */
|
|
157
367
|
export declare const ApprovalDecisionRequestSchema: z.ZodObject<{
|
|
158
368
|
schemaVersion: z.ZodLiteral<1>;
|
|
159
369
|
decision: z.ZodEnum<{
|
|
160
|
-
|
|
370
|
+
veto: "veto";
|
|
161
371
|
approve: "approve";
|
|
372
|
+
deny: "deny";
|
|
162
373
|
}>;
|
|
163
374
|
expectedVersion: z.ZodNumber;
|
|
164
375
|
presentationDigest: z.ZodString;
|
|
376
|
+
via: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">>;
|
|
377
|
+
emergency: z.ZodOptional<z.ZodLiteral<true>>;
|
|
378
|
+
factor: z.ZodOptional<z.ZodEnum<{
|
|
379
|
+
tap: "tap";
|
|
380
|
+
passkey: "passkey";
|
|
381
|
+
biometric: "biometric";
|
|
382
|
+
"second-device": "second-device";
|
|
383
|
+
}>>;
|
|
165
384
|
}, z.core.$strict>;
|
|
166
385
|
/** Human-facing REST body for revoking a pending or approved decision. */
|
|
167
386
|
export declare const ApprovalRevocationRequestSchema: z.ZodObject<{
|
|
@@ -181,9 +400,9 @@ export declare const ApprovalReceiptSchema: z.ZodObject<{
|
|
|
181
400
|
state: z.ZodEnum<{
|
|
182
401
|
revoked: "revoked";
|
|
183
402
|
pending: "pending";
|
|
403
|
+
expired: "expired";
|
|
184
404
|
approved: "approved";
|
|
185
405
|
denied: "denied";
|
|
186
|
-
expired: "expired";
|
|
187
406
|
superseded: "superseded";
|
|
188
407
|
consumed: "consumed";
|
|
189
408
|
}>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* WO-026: guardian.assurance.v1 — enforcement assurance level contract
|
|
4
|
+
* (GUA-AUTHORITY-OS-001 §26–27).
|
|
5
|
+
*
|
|
6
|
+
* The assurance level states how strongly Guardian can enforce a decision
|
|
7
|
+
* for one action, computed deterministically from recorded surface
|
|
8
|
+
* evidence. It is honest by construction: G0/G1 describe mediation that
|
|
9
|
+
* does not physically prevent bypass, and the level never rises on
|
|
10
|
+
* evidence that was not recorded.
|
|
11
|
+
*
|
|
12
|
+
* The ladder (§26), precedence strongest-evidence G4 > G3 > G2 > G1 > G0:
|
|
13
|
+
*
|
|
14
|
+
* G4 COUNTERPARTY_INTERLOCKED — the destination/provider itself
|
|
15
|
+
* requires valid Guardian authority proof (recorded tool-server
|
|
16
|
+
* catalog bound on the connection).
|
|
17
|
+
* G3 RUNTIME_CONTAINED — execution is constrained inside a
|
|
18
|
+
* Guardian-controlled or Guardian-recognized environment (recorded
|
|
19
|
+
* attestation marks the execution environment recognized).
|
|
20
|
+
* G2 CREDENTIAL_MEDIATED — the underlying reusable credential is
|
|
21
|
+
* Guardian-mediated (a bound connection record backed the action).
|
|
22
|
+
* G1 POLICY_MEDIATED — the agent voluntarily called Guardian;
|
|
23
|
+
* alternate execution may exist.
|
|
24
|
+
* G0 OBSERVED — Guardian saw the action but could not
|
|
25
|
+
* prevent bypass.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ASSURANCE_CONTRACT_SCHEMA = "guardian.assurance.v1";
|
|
28
|
+
/** Ordered enforcement-assurance ladder (lowest → highest). */
|
|
29
|
+
export declare const EnforcementAssuranceLevelSchema: z.ZodEnum<{
|
|
30
|
+
G2_CREDENTIAL_MEDIATED: "G2_CREDENTIAL_MEDIATED";
|
|
31
|
+
G1_POLICY_MEDIATED: "G1_POLICY_MEDIATED";
|
|
32
|
+
G3_RUNTIME_CONTAINED: "G3_RUNTIME_CONTAINED";
|
|
33
|
+
G0_OBSERVED: "G0_OBSERVED";
|
|
34
|
+
G4_COUNTERPARTY_INTERLOCKED: "G4_COUNTERPARTY_INTERLOCKED";
|
|
35
|
+
}>;
|
|
36
|
+
export type EnforcementAssuranceLevel = z.infer<typeof EnforcementAssuranceLevelSchema>;
|
|
37
|
+
export declare const ENFORCEMENT_ASSURANCE_RANK: Record<EnforcementAssuranceLevel, number>;
|
|
38
|
+
/** Human-readable level names for display surfaces (§27). */
|
|
39
|
+
export declare const ENFORCEMENT_ASSURANCE_LABEL: Record<EnforcementAssuranceLevel, string>;
|
|
40
|
+
/**
|
|
41
|
+
* Recorded surface evidence the gateway derived for one action. Absent or
|
|
42
|
+
* false entries never raise the level.
|
|
43
|
+
*/
|
|
44
|
+
export declare const EnforcementAssuranceFactsSchema: z.ZodObject<{
|
|
45
|
+
voluntaryCall: z.ZodBoolean;
|
|
46
|
+
guardianMediatedCredential: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
guardianContainedEnvironment: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
counterpartyRequiresAuthorityProof: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
}, z.core.$strict>;
|
|
50
|
+
export type EnforcementAssuranceFacts = z.infer<typeof EnforcementAssuranceFactsSchema>;
|
|
51
|
+
export interface EnforcementAssuranceComputation {
|
|
52
|
+
level: EnforcementAssuranceLevel;
|
|
53
|
+
/** The recorded evidence names the level was computed from. */
|
|
54
|
+
evidence: readonly string[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Pure, deterministic level computation over recorded evidence. Strongest
|
|
58
|
+
* evidence wins; missing evidence never raises the level.
|
|
59
|
+
*/
|
|
60
|
+
export declare function computeEnforcementAssurance(facts: EnforcementAssuranceFacts | null | undefined): EnforcementAssuranceComputation;
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* WO-010 — the authority graph: principal → agent → task → tool/resource
|
|
4
|
+
* nodes with bounded delegated edges. This is a read model over the same
|
|
5
|
+
* authority state the kernel evaluates; it never carries a second policy
|
|
6
|
+
* path (GUA-UNIVERSAL-001 K15).
|
|
7
|
+
*/
|
|
8
|
+
export declare const AuthorityGraphNodeKindSchema: z.ZodEnum<{
|
|
9
|
+
tool: "tool";
|
|
10
|
+
agent: "agent";
|
|
11
|
+
task: "task";
|
|
12
|
+
principal: "principal";
|
|
13
|
+
resource: "resource";
|
|
14
|
+
connection: "connection";
|
|
15
|
+
}>;
|
|
16
|
+
export declare const AuthorityGraphNodeSchema: z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
kind: z.ZodEnum<{
|
|
19
|
+
tool: "tool";
|
|
20
|
+
agent: "agent";
|
|
21
|
+
task: "task";
|
|
22
|
+
principal: "principal";
|
|
23
|
+
resource: "resource";
|
|
24
|
+
connection: "connection";
|
|
25
|
+
}>;
|
|
26
|
+
label: z.ZodString;
|
|
27
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
active: "active";
|
|
29
|
+
revoked: "revoked";
|
|
30
|
+
expired: "expired";
|
|
31
|
+
paused: "paused";
|
|
32
|
+
}>>;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
/**
|
|
35
|
+
* A writ edge: one emitted version of a grant, dated and bounded. The edge's
|
|
36
|
+
* ceiling is the grant's constraints at that version — a delegated edge may
|
|
37
|
+
* only carry a ceiling equal to or narrower than its parent edge's.
|
|
38
|
+
*/
|
|
39
|
+
export declare const AuthorityWritSchema: z.ZodObject<{
|
|
40
|
+
grantId: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
|
|
41
|
+
version: z.ZodNumber;
|
|
42
|
+
issuedAtEpochMs: z.ZodNumber;
|
|
43
|
+
change: z.ZodEnum<{
|
|
44
|
+
revoked: "revoked";
|
|
45
|
+
issued: "issued";
|
|
46
|
+
paused: "paused";
|
|
47
|
+
amended: "amended";
|
|
48
|
+
resumed: "resumed";
|
|
49
|
+
}>;
|
|
50
|
+
ceiling: z.ZodObject<{
|
|
51
|
+
actions: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ActionType", "out">>, z.ZodTransform<(string & z.core.$brand<"ActionType">)[], (string & z.core.$brand<"ActionType">)[]>>;
|
|
52
|
+
resources: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">>, z.ZodTransform<(string & z.core.$brand<"ResourceRef">)[], (string & z.core.$brand<"ResourceRef">)[]>>;
|
|
53
|
+
adapterIds: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "AdapterId", "out">>, z.ZodTransform<(string & z.core.$brand<"AdapterId">)[], (string & z.core.$brand<"AdapterId">)[]>>;
|
|
54
|
+
maxValueCents: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
maxUsesPerRequest: z.ZodNumber;
|
|
56
|
+
notBeforeEpochMs: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
expiresAtEpochMs: z.ZodNumber;
|
|
58
|
+
approvalRequired: z.ZodBoolean;
|
|
59
|
+
askAboveValueCents: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
merchantAllowlist: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
61
|
+
categoryAllowlist: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
62
|
+
recurrence: z.ZodOptional<z.ZodEnum<{
|
|
63
|
+
never: "never";
|
|
64
|
+
allowed: "allowed";
|
|
65
|
+
}>>;
|
|
66
|
+
budgetIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "BudgetId", "out">>, z.ZodTransform<(string & z.core.$brand<"BudgetId">)[], (string & z.core.$brand<"BudgetId">)[]>>>;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
export declare const AuthorityGraphEdgeSchema: z.ZodObject<{
|
|
70
|
+
id: z.ZodString;
|
|
71
|
+
kind: z.ZodEnum<{
|
|
72
|
+
contains: "contains";
|
|
73
|
+
writ: "writ";
|
|
74
|
+
coverage: "coverage";
|
|
75
|
+
}>;
|
|
76
|
+
from: z.ZodString;
|
|
77
|
+
to: z.ZodString;
|
|
78
|
+
writ: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
grantId: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
|
|
80
|
+
version: z.ZodNumber;
|
|
81
|
+
issuedAtEpochMs: z.ZodNumber;
|
|
82
|
+
change: z.ZodEnum<{
|
|
83
|
+
revoked: "revoked";
|
|
84
|
+
issued: "issued";
|
|
85
|
+
paused: "paused";
|
|
86
|
+
amended: "amended";
|
|
87
|
+
resumed: "resumed";
|
|
88
|
+
}>;
|
|
89
|
+
ceiling: z.ZodObject<{
|
|
90
|
+
actions: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ActionType", "out">>, z.ZodTransform<(string & z.core.$brand<"ActionType">)[], (string & z.core.$brand<"ActionType">)[]>>;
|
|
91
|
+
resources: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">>, z.ZodTransform<(string & z.core.$brand<"ResourceRef">)[], (string & z.core.$brand<"ResourceRef">)[]>>;
|
|
92
|
+
adapterIds: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "AdapterId", "out">>, z.ZodTransform<(string & z.core.$brand<"AdapterId">)[], (string & z.core.$brand<"AdapterId">)[]>>;
|
|
93
|
+
maxValueCents: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
maxUsesPerRequest: z.ZodNumber;
|
|
95
|
+
notBeforeEpochMs: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
expiresAtEpochMs: z.ZodNumber;
|
|
97
|
+
approvalRequired: z.ZodBoolean;
|
|
98
|
+
askAboveValueCents: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
merchantAllowlist: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
100
|
+
categoryAllowlist: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
101
|
+
recurrence: z.ZodOptional<z.ZodEnum<{
|
|
102
|
+
never: "never";
|
|
103
|
+
allowed: "allowed";
|
|
104
|
+
}>>;
|
|
105
|
+
budgetIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "BudgetId", "out">>, z.ZodTransform<(string & z.core.$brand<"BudgetId">)[], (string & z.core.$brand<"BudgetId">)[]>>>;
|
|
106
|
+
}, z.core.$strict>;
|
|
107
|
+
}, z.core.$strict>>;
|
|
108
|
+
parentEdgeId: z.ZodOptional<z.ZodString>;
|
|
109
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
110
|
+
active: "active";
|
|
111
|
+
revoked: "revoked";
|
|
112
|
+
paused: "paused";
|
|
113
|
+
}>>;
|
|
114
|
+
}, z.core.$strict>;
|
|
115
|
+
/**
|
|
116
|
+
* The kernel's effective constraints: the restrictive intersection of a
|
|
117
|
+
* chain's ceilings. Unlike the issuance schema, computed intersections may
|
|
118
|
+
* leave a set empty — an empty actions/resources/adapterIds set means the
|
|
119
|
+
* chain can satisfy nothing, which is itself a truthful answer.
|
|
120
|
+
*/
|
|
121
|
+
export declare const EffectiveConstraintsSchema: z.ZodObject<{
|
|
122
|
+
actions: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ActionType", "out">>;
|
|
123
|
+
resources: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">>;
|
|
124
|
+
adapterIds: z.ZodArray<z.core.$ZodBranded<z.ZodString, "AdapterId", "out">>;
|
|
125
|
+
maxValueCents: z.ZodOptional<z.ZodNumber>;
|
|
126
|
+
maxUsesPerRequest: z.ZodNumber;
|
|
127
|
+
notBeforeEpochMs: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
expiresAtEpochMs: z.ZodNumber;
|
|
129
|
+
approvalRequired: z.ZodBoolean;
|
|
130
|
+
askAboveValueCents: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
merchantAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
132
|
+
categoryAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
133
|
+
recurrence: z.ZodOptional<z.ZodEnum<{
|
|
134
|
+
never: "never";
|
|
135
|
+
allowed: "allowed";
|
|
136
|
+
}>>;
|
|
137
|
+
budgetIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
/**
|
|
140
|
+
* Effective authority for one agent: the per-chain result of the kernel's
|
|
141
|
+
* own chain evaluation — the same computation the decision path runs, so the
|
|
142
|
+
* Authority Map can never drift from what the kernel enforces.
|
|
143
|
+
*/
|
|
144
|
+
export declare const EffectiveAuthoritySchema: z.ZodObject<{
|
|
145
|
+
agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
146
|
+
suspended: z.ZodBoolean;
|
|
147
|
+
chains: z.ZodArray<z.ZodObject<{
|
|
148
|
+
grantIds: z.ZodArray<z.core.$ZodBranded<z.ZodString, "GrantId", "out">>;
|
|
149
|
+
outcome: z.ZodEnum<{
|
|
150
|
+
denied: "denied";
|
|
151
|
+
effective: "effective";
|
|
152
|
+
}>;
|
|
153
|
+
reasonCode: z.ZodOptional<z.ZodString>;
|
|
154
|
+
effective: z.ZodOptional<z.ZodObject<{
|
|
155
|
+
actions: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ActionType", "out">>;
|
|
156
|
+
resources: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">>;
|
|
157
|
+
adapterIds: z.ZodArray<z.core.$ZodBranded<z.ZodString, "AdapterId", "out">>;
|
|
158
|
+
maxValueCents: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
maxUsesPerRequest: z.ZodNumber;
|
|
160
|
+
notBeforeEpochMs: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
expiresAtEpochMs: z.ZodNumber;
|
|
162
|
+
approvalRequired: z.ZodBoolean;
|
|
163
|
+
askAboveValueCents: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
merchantAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
165
|
+
categoryAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
166
|
+
recurrence: z.ZodOptional<z.ZodEnum<{
|
|
167
|
+
never: "never";
|
|
168
|
+
allowed: "allowed";
|
|
169
|
+
}>>;
|
|
170
|
+
budgetIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
171
|
+
}, z.core.$strict>>;
|
|
172
|
+
}, z.core.$strict>>;
|
|
173
|
+
}, z.core.$strict>;
|
|
174
|
+
export declare const AuthorityGraphSchema: z.ZodObject<{
|
|
175
|
+
tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
|
|
176
|
+
principalId: z.core.$ZodBranded<z.ZodString, "PrincipalId", "out">;
|
|
177
|
+
computedAtEpochMs: z.ZodNumber;
|
|
178
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
179
|
+
id: z.ZodString;
|
|
180
|
+
kind: z.ZodEnum<{
|
|
181
|
+
tool: "tool";
|
|
182
|
+
agent: "agent";
|
|
183
|
+
task: "task";
|
|
184
|
+
principal: "principal";
|
|
185
|
+
resource: "resource";
|
|
186
|
+
connection: "connection";
|
|
187
|
+
}>;
|
|
188
|
+
label: z.ZodString;
|
|
189
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
190
|
+
active: "active";
|
|
191
|
+
revoked: "revoked";
|
|
192
|
+
expired: "expired";
|
|
193
|
+
paused: "paused";
|
|
194
|
+
}>>;
|
|
195
|
+
}, z.core.$strict>>;
|
|
196
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
197
|
+
id: z.ZodString;
|
|
198
|
+
kind: z.ZodEnum<{
|
|
199
|
+
contains: "contains";
|
|
200
|
+
writ: "writ";
|
|
201
|
+
coverage: "coverage";
|
|
202
|
+
}>;
|
|
203
|
+
from: z.ZodString;
|
|
204
|
+
to: z.ZodString;
|
|
205
|
+
writ: z.ZodOptional<z.ZodObject<{
|
|
206
|
+
grantId: z.core.$ZodBranded<z.ZodString, "GrantId", "out">;
|
|
207
|
+
version: z.ZodNumber;
|
|
208
|
+
issuedAtEpochMs: z.ZodNumber;
|
|
209
|
+
change: z.ZodEnum<{
|
|
210
|
+
revoked: "revoked";
|
|
211
|
+
issued: "issued";
|
|
212
|
+
paused: "paused";
|
|
213
|
+
amended: "amended";
|
|
214
|
+
resumed: "resumed";
|
|
215
|
+
}>;
|
|
216
|
+
ceiling: z.ZodObject<{
|
|
217
|
+
actions: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ActionType", "out">>, z.ZodTransform<(string & z.core.$brand<"ActionType">)[], (string & z.core.$brand<"ActionType">)[]>>;
|
|
218
|
+
resources: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">>, z.ZodTransform<(string & z.core.$brand<"ResourceRef">)[], (string & z.core.$brand<"ResourceRef">)[]>>;
|
|
219
|
+
adapterIds: z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "AdapterId", "out">>, z.ZodTransform<(string & z.core.$brand<"AdapterId">)[], (string & z.core.$brand<"AdapterId">)[]>>;
|
|
220
|
+
maxValueCents: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
maxUsesPerRequest: z.ZodNumber;
|
|
222
|
+
notBeforeEpochMs: z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
expiresAtEpochMs: z.ZodNumber;
|
|
224
|
+
approvalRequired: z.ZodBoolean;
|
|
225
|
+
askAboveValueCents: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
merchantAllowlist: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
227
|
+
categoryAllowlist: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
228
|
+
recurrence: z.ZodOptional<z.ZodEnum<{
|
|
229
|
+
never: "never";
|
|
230
|
+
allowed: "allowed";
|
|
231
|
+
}>>;
|
|
232
|
+
budgetIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.core.$ZodBranded<z.ZodString, "BudgetId", "out">>, z.ZodTransform<(string & z.core.$brand<"BudgetId">)[], (string & z.core.$brand<"BudgetId">)[]>>>;
|
|
233
|
+
}, z.core.$strict>;
|
|
234
|
+
}, z.core.$strict>>;
|
|
235
|
+
parentEdgeId: z.ZodOptional<z.ZodString>;
|
|
236
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
237
|
+
active: "active";
|
|
238
|
+
revoked: "revoked";
|
|
239
|
+
paused: "paused";
|
|
240
|
+
}>>;
|
|
241
|
+
}, z.core.$strict>>;
|
|
242
|
+
effectiveAuthority: z.ZodArray<z.ZodObject<{
|
|
243
|
+
agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
244
|
+
suspended: z.ZodBoolean;
|
|
245
|
+
chains: z.ZodArray<z.ZodObject<{
|
|
246
|
+
grantIds: z.ZodArray<z.core.$ZodBranded<z.ZodString, "GrantId", "out">>;
|
|
247
|
+
outcome: z.ZodEnum<{
|
|
248
|
+
denied: "denied";
|
|
249
|
+
effective: "effective";
|
|
250
|
+
}>;
|
|
251
|
+
reasonCode: z.ZodOptional<z.ZodString>;
|
|
252
|
+
effective: z.ZodOptional<z.ZodObject<{
|
|
253
|
+
actions: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ActionType", "out">>;
|
|
254
|
+
resources: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ResourceRef", "out">>;
|
|
255
|
+
adapterIds: z.ZodArray<z.core.$ZodBranded<z.ZodString, "AdapterId", "out">>;
|
|
256
|
+
maxValueCents: z.ZodOptional<z.ZodNumber>;
|
|
257
|
+
maxUsesPerRequest: z.ZodNumber;
|
|
258
|
+
notBeforeEpochMs: z.ZodOptional<z.ZodNumber>;
|
|
259
|
+
expiresAtEpochMs: z.ZodNumber;
|
|
260
|
+
approvalRequired: z.ZodBoolean;
|
|
261
|
+
askAboveValueCents: z.ZodOptional<z.ZodNumber>;
|
|
262
|
+
merchantAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
263
|
+
categoryAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
264
|
+
recurrence: z.ZodOptional<z.ZodEnum<{
|
|
265
|
+
never: "never";
|
|
266
|
+
allowed: "allowed";
|
|
267
|
+
}>>;
|
|
268
|
+
budgetIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
269
|
+
}, z.core.$strict>>;
|
|
270
|
+
}, z.core.$strict>>;
|
|
271
|
+
}, z.core.$strict>>;
|
|
272
|
+
activePauses: z.ZodArray<z.ZodObject<{
|
|
273
|
+
id: z.core.$ZodBranded<z.ZodString, "PauseId", "out">;
|
|
274
|
+
scope: z.ZodEnum<{
|
|
275
|
+
agent: "agent";
|
|
276
|
+
principal: "principal";
|
|
277
|
+
grant: "grant";
|
|
278
|
+
connection: "connection";
|
|
279
|
+
}>;
|
|
280
|
+
agentId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "AgentId", "out">>;
|
|
281
|
+
grantId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "GrantId", "out">>;
|
|
282
|
+
connectionId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ConnectionId", "out">>;
|
|
283
|
+
adapterId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "AdapterId", "out">>;
|
|
284
|
+
taskId: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TaskId", "out">>;
|
|
285
|
+
createdAtEpochMs: z.ZodNumber;
|
|
286
|
+
}, z.core.$strict>>;
|
|
287
|
+
}, z.core.$strict>;
|
|
288
|
+
export type EffectiveConstraints = z.infer<typeof EffectiveConstraintsSchema>;
|
|
289
|
+
export type AuthorityGraphNodeKind = z.infer<typeof AuthorityGraphNodeKindSchema>;
|
|
290
|
+
export type AuthorityGraphNode = z.infer<typeof AuthorityGraphNodeSchema>;
|
|
291
|
+
export type AuthorityWrit = z.infer<typeof AuthorityWritSchema>;
|
|
292
|
+
export type AuthorityGraphEdge = z.infer<typeof AuthorityGraphEdgeSchema>;
|
|
293
|
+
export type EffectiveAuthority = z.infer<typeof EffectiveAuthoritySchema>;
|
|
294
|
+
export type AuthorityGraph = z.infer<typeof AuthorityGraphSchema>;
|