@kya-os/contracts 1.6.9 → 1.6.11
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.
|
@@ -185,12 +185,12 @@ export declare const proofSubmissionRequestSchema: z.ZodObject<{
|
|
|
185
185
|
identifier: string;
|
|
186
186
|
}>>;
|
|
187
187
|
}, "strip", z.ZodTypeAny, {
|
|
188
|
-
sessionId: string;
|
|
189
|
-
scopes: string[];
|
|
190
188
|
timestamp: number;
|
|
189
|
+
sessionId: string;
|
|
191
190
|
eventType: "consent:page_viewed" | "consent:approved" | "consent:delegation_created" | "consent:credential_required";
|
|
192
191
|
agentDid: string;
|
|
193
192
|
targetTools: string[];
|
|
193
|
+
scopes: string[];
|
|
194
194
|
projectId: string;
|
|
195
195
|
userDid?: string | undefined;
|
|
196
196
|
delegationId?: string | undefined;
|
|
@@ -201,12 +201,12 @@ export declare const proofSubmissionRequestSchema: z.ZodObject<{
|
|
|
201
201
|
identifier: string;
|
|
202
202
|
} | undefined;
|
|
203
203
|
}, {
|
|
204
|
-
sessionId: string;
|
|
205
|
-
scopes: string[];
|
|
206
204
|
timestamp: number;
|
|
205
|
+
sessionId: string;
|
|
207
206
|
eventType: "consent:page_viewed" | "consent:approved" | "consent:delegation_created" | "consent:credential_required";
|
|
208
207
|
agentDid: string;
|
|
209
208
|
targetTools: string[];
|
|
209
|
+
scopes: string[];
|
|
210
210
|
projectId: string;
|
|
211
211
|
userDid?: string | undefined;
|
|
212
212
|
delegationId?: string | undefined;
|
|
@@ -227,12 +227,12 @@ export declare const proofSubmissionRequestSchema: z.ZodObject<{
|
|
|
227
227
|
userIdentifier?: string | undefined;
|
|
228
228
|
}[] | undefined;
|
|
229
229
|
consentEvents?: {
|
|
230
|
-
sessionId: string;
|
|
231
|
-
scopes: string[];
|
|
232
230
|
timestamp: number;
|
|
231
|
+
sessionId: string;
|
|
233
232
|
eventType: "consent:page_viewed" | "consent:approved" | "consent:delegation_created" | "consent:credential_required";
|
|
234
233
|
agentDid: string;
|
|
235
234
|
targetTools: string[];
|
|
235
|
+
scopes: string[];
|
|
236
236
|
projectId: string;
|
|
237
237
|
userDid?: string | undefined;
|
|
238
238
|
delegationId?: string | undefined;
|
|
@@ -253,12 +253,12 @@ export declare const proofSubmissionRequestSchema: z.ZodObject<{
|
|
|
253
253
|
userIdentifier?: string | undefined;
|
|
254
254
|
}[] | undefined;
|
|
255
255
|
consentEvents?: {
|
|
256
|
-
sessionId: string;
|
|
257
|
-
scopes: string[];
|
|
258
256
|
timestamp: number;
|
|
257
|
+
sessionId: string;
|
|
259
258
|
eventType: "consent:page_viewed" | "consent:approved" | "consent:delegation_created" | "consent:credential_required";
|
|
260
259
|
agentDid: string;
|
|
261
260
|
targetTools: string[];
|
|
261
|
+
scopes: string[];
|
|
262
262
|
projectId: string;
|
|
263
263
|
userDid?: string | undefined;
|
|
264
264
|
delegationId?: string | undefined;
|
|
@@ -299,12 +299,12 @@ export declare const proofSubmissionRequestSchema: z.ZodObject<{
|
|
|
299
299
|
userIdentifier?: string | undefined;
|
|
300
300
|
}[] | undefined;
|
|
301
301
|
consentEvents?: {
|
|
302
|
-
sessionId: string;
|
|
303
|
-
scopes: string[];
|
|
304
302
|
timestamp: number;
|
|
303
|
+
sessionId: string;
|
|
305
304
|
eventType: "consent:page_viewed" | "consent:approved" | "consent:delegation_created" | "consent:credential_required";
|
|
306
305
|
agentDid: string;
|
|
307
306
|
targetTools: string[];
|
|
307
|
+
scopes: string[];
|
|
308
308
|
projectId: string;
|
|
309
309
|
userDid?: string | undefined;
|
|
310
310
|
delegationId?: string | undefined;
|
|
@@ -345,12 +345,12 @@ export declare const proofSubmissionRequestSchema: z.ZodObject<{
|
|
|
345
345
|
userIdentifier?: string | undefined;
|
|
346
346
|
}[] | undefined;
|
|
347
347
|
consentEvents?: {
|
|
348
|
-
sessionId: string;
|
|
349
|
-
scopes: string[];
|
|
350
348
|
timestamp: number;
|
|
349
|
+
sessionId: string;
|
|
351
350
|
eventType: "consent:page_viewed" | "consent:approved" | "consent:delegation_created" | "consent:credential_required";
|
|
352
351
|
agentDid: string;
|
|
353
352
|
targetTools: string[];
|
|
353
|
+
scopes: string[];
|
|
354
354
|
projectId: string;
|
|
355
355
|
userDid?: string | undefined;
|
|
356
356
|
delegationId?: string | undefined;
|
|
@@ -388,19 +388,19 @@ export declare const proofSubmissionResponseSchema: z.ZodObject<{
|
|
|
388
388
|
details?: Record<string, unknown> | undefined;
|
|
389
389
|
}>;
|
|
390
390
|
}, "strip", z.ZodTypeAny, {
|
|
391
|
+
proof_index: number;
|
|
391
392
|
error: {
|
|
392
393
|
code: string;
|
|
393
394
|
message: string;
|
|
394
395
|
details?: Record<string, unknown> | undefined;
|
|
395
396
|
};
|
|
396
|
-
proof_index: number;
|
|
397
397
|
}, {
|
|
398
|
+
proof_index: number;
|
|
398
399
|
error: {
|
|
399
400
|
code: string;
|
|
400
401
|
message: string;
|
|
401
402
|
details?: Record<string, unknown> | undefined;
|
|
402
403
|
};
|
|
403
|
-
proof_index: number;
|
|
404
404
|
}>, "many">>;
|
|
405
405
|
}, "strip", z.ZodTypeAny, {
|
|
406
406
|
success: boolean;
|
|
@@ -408,12 +408,12 @@ export declare const proofSubmissionResponseSchema: z.ZodObject<{
|
|
|
408
408
|
rejected: number;
|
|
409
409
|
outcomes?: Record<string, number> | undefined;
|
|
410
410
|
errors?: {
|
|
411
|
+
proof_index: number;
|
|
411
412
|
error: {
|
|
412
413
|
code: string;
|
|
413
414
|
message: string;
|
|
414
415
|
details?: Record<string, unknown> | undefined;
|
|
415
416
|
};
|
|
416
|
-
proof_index: number;
|
|
417
417
|
}[] | undefined;
|
|
418
418
|
}, {
|
|
419
419
|
success: boolean;
|
|
@@ -421,12 +421,12 @@ export declare const proofSubmissionResponseSchema: z.ZodObject<{
|
|
|
421
421
|
rejected: number;
|
|
422
422
|
outcomes?: Record<string, number> | undefined;
|
|
423
423
|
errors?: {
|
|
424
|
+
proof_index: number;
|
|
424
425
|
error: {
|
|
425
426
|
code: string;
|
|
426
427
|
message: string;
|
|
427
428
|
details?: Record<string, unknown> | undefined;
|
|
428
429
|
};
|
|
429
|
-
proof_index: number;
|
|
430
430
|
}[] | undefined;
|
|
431
431
|
}>;
|
|
432
432
|
/**
|
|
@@ -445,24 +445,24 @@ export declare const delegationCredentialSchema: z.ZodObject<{
|
|
|
445
445
|
agent_did: string;
|
|
446
446
|
issued_at: number;
|
|
447
447
|
created_at: number;
|
|
448
|
-
constraints?: Record<string, unknown> | undefined;
|
|
449
448
|
user_id?: string | undefined;
|
|
450
449
|
user_identifier?: string | undefined;
|
|
450
|
+
constraints?: Record<string, unknown> | undefined;
|
|
451
451
|
}, {
|
|
452
452
|
scopes: string[];
|
|
453
453
|
agent_did: string;
|
|
454
454
|
issued_at: number;
|
|
455
455
|
created_at: number;
|
|
456
|
-
constraints?: Record<string, unknown> | undefined;
|
|
457
456
|
user_id?: string | undefined;
|
|
458
457
|
user_identifier?: string | undefined;
|
|
458
|
+
constraints?: Record<string, unknown> | undefined;
|
|
459
459
|
}>;
|
|
460
460
|
/**
|
|
461
461
|
* Delegation verification request schema
|
|
462
462
|
*/
|
|
463
463
|
export declare const verifyDelegationRequestSchema: z.ZodObject<{
|
|
464
|
-
scopes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
465
464
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
465
|
+
scopes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
466
466
|
agent_did: z.ZodString;
|
|
467
467
|
user_did: z.ZodOptional<z.ZodString>;
|
|
468
468
|
credential_jwt: z.ZodOptional<z.ZodString>;
|
|
@@ -482,8 +482,8 @@ export declare const verifyDelegationRequestSchema: z.ZodObject<{
|
|
|
482
482
|
}>>;
|
|
483
483
|
}, "strip", z.ZodTypeAny, {
|
|
484
484
|
agent_did: string;
|
|
485
|
-
scopes?: string[] | undefined;
|
|
486
485
|
timestamp?: number | undefined;
|
|
486
|
+
scopes?: string[] | undefined;
|
|
487
487
|
user_did?: string | undefined;
|
|
488
488
|
credential_jwt?: string | undefined;
|
|
489
489
|
delegation_token?: string | undefined;
|
|
@@ -494,8 +494,8 @@ export declare const verifyDelegationRequestSchema: z.ZodObject<{
|
|
|
494
494
|
} | undefined;
|
|
495
495
|
}, {
|
|
496
496
|
agent_did: string;
|
|
497
|
-
scopes?: string[] | undefined;
|
|
498
497
|
timestamp?: number | undefined;
|
|
498
|
+
scopes?: string[] | undefined;
|
|
499
499
|
user_did?: string | undefined;
|
|
500
500
|
credential_jwt?: string | undefined;
|
|
501
501
|
delegation_token?: string | undefined;
|
|
@@ -1755,17 +1755,17 @@ export declare const verifyDelegationResponseSchema: z.ZodObject<{
|
|
|
1755
1755
|
agent_did: string;
|
|
1756
1756
|
issued_at: number;
|
|
1757
1757
|
created_at: number;
|
|
1758
|
-
constraints?: Record<string, unknown> | undefined;
|
|
1759
1758
|
user_id?: string | undefined;
|
|
1760
1759
|
user_identifier?: string | undefined;
|
|
1760
|
+
constraints?: Record<string, unknown> | undefined;
|
|
1761
1761
|
}, {
|
|
1762
1762
|
scopes: string[];
|
|
1763
1763
|
agent_did: string;
|
|
1764
1764
|
issued_at: number;
|
|
1765
1765
|
created_at: number;
|
|
1766
|
-
constraints?: Record<string, unknown> | undefined;
|
|
1767
1766
|
user_id?: string | undefined;
|
|
1768
1767
|
user_identifier?: string | undefined;
|
|
1768
|
+
constraints?: Record<string, unknown> | undefined;
|
|
1769
1769
|
}>>;
|
|
1770
1770
|
error: z.ZodOptional<z.ZodObject<{
|
|
1771
1771
|
code: z.ZodString;
|
|
@@ -1783,12 +1783,12 @@ export declare const verifyDelegationResponseSchema: z.ZodObject<{
|
|
|
1783
1783
|
reason: z.ZodOptional<z.ZodString>;
|
|
1784
1784
|
}, "strip", z.ZodTypeAny, {
|
|
1785
1785
|
valid: boolean;
|
|
1786
|
+
delegation_id?: string | undefined;
|
|
1786
1787
|
error?: {
|
|
1787
1788
|
code: string;
|
|
1788
1789
|
message: string;
|
|
1789
1790
|
details?: Record<string, unknown> | undefined;
|
|
1790
1791
|
} | undefined;
|
|
1791
|
-
delegation_id?: string | undefined;
|
|
1792
1792
|
delegation?: z.objectOutputType<{
|
|
1793
1793
|
id: z.ZodString;
|
|
1794
1794
|
issuerDid: z.ZodString;
|
|
@@ -2205,19 +2205,19 @@ export declare const verifyDelegationResponseSchema: z.ZodObject<{
|
|
|
2205
2205
|
agent_did: string;
|
|
2206
2206
|
issued_at: number;
|
|
2207
2207
|
created_at: number;
|
|
2208
|
-
constraints?: Record<string, unknown> | undefined;
|
|
2209
2208
|
user_id?: string | undefined;
|
|
2210
2209
|
user_identifier?: string | undefined;
|
|
2210
|
+
constraints?: Record<string, unknown> | undefined;
|
|
2211
2211
|
} | undefined;
|
|
2212
2212
|
reason?: string | undefined;
|
|
2213
2213
|
}, {
|
|
2214
2214
|
valid: boolean;
|
|
2215
|
+
delegation_id?: string | undefined;
|
|
2215
2216
|
error?: {
|
|
2216
2217
|
code: string;
|
|
2217
2218
|
message: string;
|
|
2218
2219
|
details?: Record<string, unknown> | undefined;
|
|
2219
2220
|
} | undefined;
|
|
2220
|
-
delegation_id?: string | undefined;
|
|
2221
2221
|
delegation?: z.objectInputType<{
|
|
2222
2222
|
id: z.ZodString;
|
|
2223
2223
|
issuerDid: z.ZodString;
|
|
@@ -2634,9 +2634,9 @@ export declare const verifyDelegationResponseSchema: z.ZodObject<{
|
|
|
2634
2634
|
agent_did: string;
|
|
2635
2635
|
issued_at: number;
|
|
2636
2636
|
created_at: number;
|
|
2637
|
-
constraints?: Record<string, unknown> | undefined;
|
|
2638
2637
|
user_id?: string | undefined;
|
|
2639
2638
|
user_identifier?: string | undefined;
|
|
2639
|
+
constraints?: Record<string, unknown> | undefined;
|
|
2640
2640
|
} | undefined;
|
|
2641
2641
|
reason?: string | undefined;
|
|
2642
2642
|
}>;
|
|
@@ -3892,17 +3892,17 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
3892
3892
|
agent_did: string;
|
|
3893
3893
|
issued_at: number;
|
|
3894
3894
|
created_at: number;
|
|
3895
|
-
constraints?: Record<string, unknown> | undefined;
|
|
3896
3895
|
user_id?: string | undefined;
|
|
3897
3896
|
user_identifier?: string | undefined;
|
|
3897
|
+
constraints?: Record<string, unknown> | undefined;
|
|
3898
3898
|
}, {
|
|
3899
3899
|
scopes: string[];
|
|
3900
3900
|
agent_did: string;
|
|
3901
3901
|
issued_at: number;
|
|
3902
3902
|
created_at: number;
|
|
3903
|
-
constraints?: Record<string, unknown> | undefined;
|
|
3904
3903
|
user_id?: string | undefined;
|
|
3905
3904
|
user_identifier?: string | undefined;
|
|
3905
|
+
constraints?: Record<string, unknown> | undefined;
|
|
3906
3906
|
}>>;
|
|
3907
3907
|
error: z.ZodOptional<z.ZodObject<{
|
|
3908
3908
|
code: z.ZodString;
|
|
@@ -3920,12 +3920,12 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
3920
3920
|
reason: z.ZodOptional<z.ZodString>;
|
|
3921
3921
|
}, "strip", z.ZodTypeAny, {
|
|
3922
3922
|
valid: boolean;
|
|
3923
|
+
delegation_id?: string | undefined;
|
|
3923
3924
|
error?: {
|
|
3924
3925
|
code: string;
|
|
3925
3926
|
message: string;
|
|
3926
3927
|
details?: Record<string, unknown> | undefined;
|
|
3927
3928
|
} | undefined;
|
|
3928
|
-
delegation_id?: string | undefined;
|
|
3929
3929
|
delegation?: z.objectOutputType<{
|
|
3930
3930
|
id: z.ZodString;
|
|
3931
3931
|
issuerDid: z.ZodString;
|
|
@@ -4342,19 +4342,19 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
4342
4342
|
agent_did: string;
|
|
4343
4343
|
issued_at: number;
|
|
4344
4344
|
created_at: number;
|
|
4345
|
-
constraints?: Record<string, unknown> | undefined;
|
|
4346
4345
|
user_id?: string | undefined;
|
|
4347
4346
|
user_identifier?: string | undefined;
|
|
4347
|
+
constraints?: Record<string, unknown> | undefined;
|
|
4348
4348
|
} | undefined;
|
|
4349
4349
|
reason?: string | undefined;
|
|
4350
4350
|
}, {
|
|
4351
4351
|
valid: boolean;
|
|
4352
|
+
delegation_id?: string | undefined;
|
|
4352
4353
|
error?: {
|
|
4353
4354
|
code: string;
|
|
4354
4355
|
message: string;
|
|
4355
4356
|
details?: Record<string, unknown> | undefined;
|
|
4356
4357
|
} | undefined;
|
|
4357
|
-
delegation_id?: string | undefined;
|
|
4358
4358
|
delegation?: z.objectInputType<{
|
|
4359
4359
|
id: z.ZodString;
|
|
4360
4360
|
issuerDid: z.ZodString;
|
|
@@ -4771,9 +4771,9 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
4771
4771
|
agent_did: string;
|
|
4772
4772
|
issued_at: number;
|
|
4773
4773
|
created_at: number;
|
|
4774
|
-
constraints?: Record<string, unknown> | undefined;
|
|
4775
4774
|
user_id?: string | undefined;
|
|
4776
4775
|
user_identifier?: string | undefined;
|
|
4776
|
+
constraints?: Record<string, unknown> | undefined;
|
|
4777
4777
|
} | undefined;
|
|
4778
4778
|
reason?: string | undefined;
|
|
4779
4779
|
}>;
|
|
@@ -4791,12 +4791,12 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
4791
4791
|
success: boolean;
|
|
4792
4792
|
data: {
|
|
4793
4793
|
valid: boolean;
|
|
4794
|
+
delegation_id?: string | undefined;
|
|
4794
4795
|
error?: {
|
|
4795
4796
|
code: string;
|
|
4796
4797
|
message: string;
|
|
4797
4798
|
details?: Record<string, unknown> | undefined;
|
|
4798
4799
|
} | undefined;
|
|
4799
|
-
delegation_id?: string | undefined;
|
|
4800
4800
|
delegation?: z.objectOutputType<{
|
|
4801
4801
|
id: z.ZodString;
|
|
4802
4802
|
issuerDid: z.ZodString;
|
|
@@ -5213,9 +5213,9 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
5213
5213
|
agent_did: string;
|
|
5214
5214
|
issued_at: number;
|
|
5215
5215
|
created_at: number;
|
|
5216
|
-
constraints?: Record<string, unknown> | undefined;
|
|
5217
5216
|
user_id?: string | undefined;
|
|
5218
5217
|
user_identifier?: string | undefined;
|
|
5218
|
+
constraints?: Record<string, unknown> | undefined;
|
|
5219
5219
|
} | undefined;
|
|
5220
5220
|
reason?: string | undefined;
|
|
5221
5221
|
};
|
|
@@ -5227,12 +5227,12 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
5227
5227
|
success: boolean;
|
|
5228
5228
|
data: {
|
|
5229
5229
|
valid: boolean;
|
|
5230
|
+
delegation_id?: string | undefined;
|
|
5230
5231
|
error?: {
|
|
5231
5232
|
code: string;
|
|
5232
5233
|
message: string;
|
|
5233
5234
|
details?: Record<string, unknown> | undefined;
|
|
5234
5235
|
} | undefined;
|
|
5235
|
-
delegation_id?: string | undefined;
|
|
5236
5236
|
delegation?: z.objectInputType<{
|
|
5237
5237
|
id: z.ZodString;
|
|
5238
5238
|
issuerDid: z.ZodString;
|
|
@@ -5649,9 +5649,9 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
5649
5649
|
agent_did: string;
|
|
5650
5650
|
issued_at: number;
|
|
5651
5651
|
created_at: number;
|
|
5652
|
-
constraints?: Record<string, unknown> | undefined;
|
|
5653
5652
|
user_id?: string | undefined;
|
|
5654
5653
|
user_identifier?: string | undefined;
|
|
5654
|
+
constraints?: Record<string, unknown> | undefined;
|
|
5655
5655
|
} | undefined;
|
|
5656
5656
|
reason?: string | undefined;
|
|
5657
5657
|
};
|
|
@@ -5942,9 +5942,8 @@ export declare const createDelegationRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
5942
5942
|
*
|
|
5943
5943
|
* Canonical format returned by POST /api/v1/bouncer/delegations
|
|
5944
5944
|
*
|
|
5945
|
-
*
|
|
5946
|
-
*
|
|
5947
|
-
* and is passed as a URL parameter, not in the API response body.
|
|
5945
|
+
* As of AgentShield v2.x, delegation_token (JWT) IS returned for stateless verification.
|
|
5946
|
+
* The JWT enables MCP-I servers to verify delegations without database lookups.
|
|
5948
5947
|
*/
|
|
5949
5948
|
export declare const createDelegationResponseSchema: z.ZodObject<{
|
|
5950
5949
|
delegation_id: z.ZodString;
|
|
@@ -5956,26 +5955,35 @@ export declare const createDelegationResponseSchema: z.ZodObject<{
|
|
|
5956
5955
|
issued_at: z.ZodString;
|
|
5957
5956
|
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5958
5957
|
created_at: z.ZodString;
|
|
5958
|
+
delegation_token: z.ZodOptional<z.ZodString>;
|
|
5959
|
+
token_type: z.ZodOptional<z.ZodString>;
|
|
5960
|
+
expires_in: z.ZodOptional<z.ZodNumber>;
|
|
5959
5961
|
}, "strip", z.ZodTypeAny, {
|
|
5960
5962
|
status: "active" | "revoked" | "expired";
|
|
5961
|
-
scopes: string[];
|
|
5962
5963
|
delegation_id: string;
|
|
5964
|
+
scopes: string[];
|
|
5963
5965
|
agent_did: string;
|
|
5964
5966
|
issued_at: string;
|
|
5965
5967
|
created_at: string;
|
|
5966
5968
|
user_id?: string | undefined;
|
|
5967
5969
|
user_identifier?: string | undefined;
|
|
5970
|
+
delegation_token?: string | undefined;
|
|
5968
5971
|
expires_at?: string | null | undefined;
|
|
5972
|
+
token_type?: string | undefined;
|
|
5973
|
+
expires_in?: number | undefined;
|
|
5969
5974
|
}, {
|
|
5970
5975
|
status: "active" | "revoked" | "expired";
|
|
5971
|
-
scopes: string[];
|
|
5972
5976
|
delegation_id: string;
|
|
5977
|
+
scopes: string[];
|
|
5973
5978
|
agent_did: string;
|
|
5974
5979
|
issued_at: string;
|
|
5975
5980
|
created_at: string;
|
|
5976
5981
|
user_id?: string | undefined;
|
|
5977
5982
|
user_identifier?: string | undefined;
|
|
5983
|
+
delegation_token?: string | undefined;
|
|
5978
5984
|
expires_at?: string | null | undefined;
|
|
5985
|
+
token_type?: string | undefined;
|
|
5986
|
+
expires_in?: number | undefined;
|
|
5979
5987
|
}>;
|
|
5980
5988
|
/**
|
|
5981
5989
|
* Wrapped creation response schema
|
|
@@ -5992,26 +6000,35 @@ export declare const createDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
5992
6000
|
issued_at: z.ZodString;
|
|
5993
6001
|
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5994
6002
|
created_at: z.ZodString;
|
|
6003
|
+
delegation_token: z.ZodOptional<z.ZodString>;
|
|
6004
|
+
token_type: z.ZodOptional<z.ZodString>;
|
|
6005
|
+
expires_in: z.ZodOptional<z.ZodNumber>;
|
|
5995
6006
|
}, "strip", z.ZodTypeAny, {
|
|
5996
6007
|
status: "active" | "revoked" | "expired";
|
|
5997
|
-
scopes: string[];
|
|
5998
6008
|
delegation_id: string;
|
|
6009
|
+
scopes: string[];
|
|
5999
6010
|
agent_did: string;
|
|
6000
6011
|
issued_at: string;
|
|
6001
6012
|
created_at: string;
|
|
6002
6013
|
user_id?: string | undefined;
|
|
6003
6014
|
user_identifier?: string | undefined;
|
|
6015
|
+
delegation_token?: string | undefined;
|
|
6004
6016
|
expires_at?: string | null | undefined;
|
|
6017
|
+
token_type?: string | undefined;
|
|
6018
|
+
expires_in?: number | undefined;
|
|
6005
6019
|
}, {
|
|
6006
6020
|
status: "active" | "revoked" | "expired";
|
|
6007
|
-
scopes: string[];
|
|
6008
6021
|
delegation_id: string;
|
|
6022
|
+
scopes: string[];
|
|
6009
6023
|
agent_did: string;
|
|
6010
6024
|
issued_at: string;
|
|
6011
6025
|
created_at: string;
|
|
6012
6026
|
user_id?: string | undefined;
|
|
6013
6027
|
user_identifier?: string | undefined;
|
|
6028
|
+
delegation_token?: string | undefined;
|
|
6014
6029
|
expires_at?: string | null | undefined;
|
|
6030
|
+
token_type?: string | undefined;
|
|
6031
|
+
expires_in?: number | undefined;
|
|
6015
6032
|
}>;
|
|
6016
6033
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
6017
6034
|
requestId: z.ZodString;
|
|
@@ -6027,14 +6044,17 @@ export declare const createDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6027
6044
|
success: boolean;
|
|
6028
6045
|
data: {
|
|
6029
6046
|
status: "active" | "revoked" | "expired";
|
|
6030
|
-
scopes: string[];
|
|
6031
6047
|
delegation_id: string;
|
|
6048
|
+
scopes: string[];
|
|
6032
6049
|
agent_did: string;
|
|
6033
6050
|
issued_at: string;
|
|
6034
6051
|
created_at: string;
|
|
6035
6052
|
user_id?: string | undefined;
|
|
6036
6053
|
user_identifier?: string | undefined;
|
|
6054
|
+
delegation_token?: string | undefined;
|
|
6037
6055
|
expires_at?: string | null | undefined;
|
|
6056
|
+
token_type?: string | undefined;
|
|
6057
|
+
expires_in?: number | undefined;
|
|
6038
6058
|
};
|
|
6039
6059
|
metadata?: {
|
|
6040
6060
|
requestId: string;
|
|
@@ -6044,14 +6064,17 @@ export declare const createDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6044
6064
|
success: boolean;
|
|
6045
6065
|
data: {
|
|
6046
6066
|
status: "active" | "revoked" | "expired";
|
|
6047
|
-
scopes: string[];
|
|
6048
6067
|
delegation_id: string;
|
|
6068
|
+
scopes: string[];
|
|
6049
6069
|
agent_did: string;
|
|
6050
6070
|
issued_at: string;
|
|
6051
6071
|
created_at: string;
|
|
6052
6072
|
user_id?: string | undefined;
|
|
6053
6073
|
user_identifier?: string | undefined;
|
|
6074
|
+
delegation_token?: string | undefined;
|
|
6054
6075
|
expires_at?: string | null | undefined;
|
|
6076
|
+
token_type?: string | undefined;
|
|
6077
|
+
expires_in?: number | undefined;
|
|
6055
6078
|
};
|
|
6056
6079
|
metadata?: {
|
|
6057
6080
|
requestId: string;
|
|
@@ -6076,12 +6099,12 @@ export declare const revokeDelegationResponseSchema: z.ZodObject<{
|
|
|
6076
6099
|
revoked: z.ZodBoolean;
|
|
6077
6100
|
revoked_at: z.ZodNumber;
|
|
6078
6101
|
}, "strip", z.ZodTypeAny, {
|
|
6079
|
-
revoked: boolean;
|
|
6080
6102
|
delegation_id: string;
|
|
6103
|
+
revoked: boolean;
|
|
6081
6104
|
revoked_at: number;
|
|
6082
6105
|
}, {
|
|
6083
|
-
revoked: boolean;
|
|
6084
6106
|
delegation_id: string;
|
|
6107
|
+
revoked: boolean;
|
|
6085
6108
|
revoked_at: number;
|
|
6086
6109
|
}>;
|
|
6087
6110
|
/**
|
|
@@ -6094,12 +6117,12 @@ export declare const revokeDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6094
6117
|
revoked: z.ZodBoolean;
|
|
6095
6118
|
revoked_at: z.ZodNumber;
|
|
6096
6119
|
}, "strip", z.ZodTypeAny, {
|
|
6097
|
-
revoked: boolean;
|
|
6098
6120
|
delegation_id: string;
|
|
6121
|
+
revoked: boolean;
|
|
6099
6122
|
revoked_at: number;
|
|
6100
6123
|
}, {
|
|
6101
|
-
revoked: boolean;
|
|
6102
6124
|
delegation_id: string;
|
|
6125
|
+
revoked: boolean;
|
|
6103
6126
|
revoked_at: number;
|
|
6104
6127
|
}>;
|
|
6105
6128
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
@@ -6115,8 +6138,8 @@ export declare const revokeDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6115
6138
|
}, "strip", z.ZodTypeAny, {
|
|
6116
6139
|
success: boolean;
|
|
6117
6140
|
data: {
|
|
6118
|
-
revoked: boolean;
|
|
6119
6141
|
delegation_id: string;
|
|
6142
|
+
revoked: boolean;
|
|
6120
6143
|
revoked_at: number;
|
|
6121
6144
|
};
|
|
6122
6145
|
metadata?: {
|
|
@@ -6126,8 +6149,8 @@ export declare const revokeDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
6126
6149
|
}, {
|
|
6127
6150
|
success: boolean;
|
|
6128
6151
|
data: {
|
|
6129
|
-
revoked: boolean;
|
|
6130
6152
|
delegation_id: string;
|
|
6153
|
+
revoked: boolean;
|
|
6131
6154
|
revoked_at: number;
|
|
6132
6155
|
};
|
|
6133
6156
|
metadata?: {
|
|
@@ -232,9 +232,8 @@ exports.createDelegationRequestSchema = zod_1.z
|
|
|
232
232
|
*
|
|
233
233
|
* Canonical format returned by POST /api/v1/bouncer/delegations
|
|
234
234
|
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
* and is passed as a URL parameter, not in the API response body.
|
|
235
|
+
* As of AgentShield v2.x, delegation_token (JWT) IS returned for stateless verification.
|
|
236
|
+
* The JWT enables MCP-I servers to verify delegations without database lookups.
|
|
238
237
|
*/
|
|
239
238
|
exports.createDelegationResponseSchema = zod_1.z.object({
|
|
240
239
|
delegation_id: zod_1.z.string().uuid(),
|
|
@@ -246,6 +245,10 @@ exports.createDelegationResponseSchema = zod_1.z.object({
|
|
|
246
245
|
issued_at: zod_1.z.string().datetime(),
|
|
247
246
|
expires_at: zod_1.z.string().datetime().nullable().optional(), // AgentShield allows null values
|
|
248
247
|
created_at: zod_1.z.string().datetime(),
|
|
248
|
+
// JWT for stateless verification (added in AgentShield v2.x)
|
|
249
|
+
delegation_token: zod_1.z.string().optional(),
|
|
250
|
+
token_type: zod_1.z.string().optional(), // "Bearer"
|
|
251
|
+
expires_in: zod_1.z.number().int().positive().optional(), // Seconds until token expiry
|
|
249
252
|
});
|
|
250
253
|
/**
|
|
251
254
|
* Wrapped creation response schema
|