@kya-os/contracts 1.5.2-canary.3 → 1.5.2-canary.5

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.
@@ -37,25 +37,48 @@ exports.agentShieldAPIResponseSchema = agentShieldAPIResponseSchema;
37
37
  // ============================================================================
38
38
  // Proof Submission Schemas
39
39
  // ============================================================================
40
+ /**
41
+ * Tool Call Context Schema (AgentShield Extension)
42
+ * Optional plaintext context for dashboard enrichment
43
+ */
44
+ const toolCallContextSchema = zod_1.z.object({
45
+ tool: zod_1.z.string().min(1, "Tool name is required"),
46
+ args: zod_1.z.record(zod_1.z.unknown()),
47
+ result: zod_1.z.unknown().optional(),
48
+ scopeId: zod_1.z.string().min(1, "scopeId is required to link context to proof"),
49
+ userIdentifier: zod_1.z.string().optional(),
50
+ });
40
51
  /**
41
52
  * Proof submission request schema
42
53
  */
43
54
  exports.proofSubmissionRequestSchema = zod_1.z.object({
44
- delegation_id: zod_1.z.string().uuid().nullable(),
45
- session_id: zod_1.z.string().uuid(),
55
+ session_id: zod_1.z.string().max(100), // AgentShield session ID (may differ from MCP-I sessionId)
56
+ delegation_id: zod_1.z.string().uuid().nullish(),
46
57
  proofs: zod_1.z.array(proof_js_1.DetachedProofSchema).min(1),
58
+ // AgentShield extension: Optional context for dashboard enrichment
59
+ context: zod_1.z
60
+ .object({
61
+ toolCalls: zod_1.z.array(toolCallContextSchema).optional(),
62
+ mcpServerUrl: zod_1.z.string().url().optional(), // MCP server URL for tool discovery
63
+ })
64
+ .optional(),
47
65
  });
48
66
  /**
49
67
  * Proof submission response schema
50
68
  */
51
69
  exports.proofSubmissionResponseSchema = zod_1.z.object({
52
70
  success: zod_1.z.boolean(),
53
- received: zod_1.z.number().int().min(0),
54
- processed: zod_1.z.number().int().min(0),
71
+ accepted: zod_1.z.number().int().min(0),
72
+ rejected: zod_1.z.number().int().min(0),
73
+ outcomes: zod_1.z.record(zod_1.z.string(), zod_1.z.number().int().min(0)), // Record<BouncerOutcome, number>
55
74
  errors: zod_1.z
56
75
  .array(zod_1.z.object({
57
- proofId: zod_1.z.string(),
58
- error: zod_1.z.string(),
76
+ proof_index: zod_1.z.number().int().min(0),
77
+ error: zod_1.z.object({
78
+ code: zod_1.z.string(),
79
+ message: zod_1.z.string(),
80
+ details: zod_1.z.record(zod_1.z.unknown()).optional(),
81
+ }),
59
82
  }))
60
83
  .optional(),
61
84
  });
@@ -79,7 +102,9 @@ exports.delegationCredentialSchema = zod_1.z.object({
79
102
  */
80
103
  exports.verifyDelegationRequestSchema = zod_1.z.object({
81
104
  agent_did: zod_1.z.string(),
82
- scopes: zod_1.z.array(zod_1.z.string()).min(1),
105
+ credential_jwt: zod_1.z.string().optional(), // Optional, omit (don't set to empty string) when not available for OAuth flow
106
+ delegation_token: zod_1.z.string().optional(), // Optional, for stateless MCP servers
107
+ scopes: zod_1.z.array(zod_1.z.string()).optional(), // Optional, can be empty array
83
108
  timestamp: zod_1.z.number().int().positive().optional(),
84
109
  client_info: zod_1.z
85
110
  .object({
@@ -88,7 +113,7 @@ exports.verifyDelegationRequestSchema = zod_1.z.object({
88
113
  user_agent: zod_1.z.string().optional(),
89
114
  })
90
115
  .optional(),
91
- });
116
+ }).partial({ scopes: true }); // Make scopes truly optional by using partial
92
117
  /**
93
118
  * Delegation verification response schema
94
119
  */
@@ -127,6 +152,14 @@ exports.toolProtectionConfigResponseSchema = zod_1.z.object({
127
152
  tools: zod_1.z.record(zod_1.z.string(), exports.agentShieldToolProtectionSchema),
128
153
  reputation_threshold: zod_1.z.number().min(0).max(1).optional(),
129
154
  denied_agents: zod_1.z.array(zod_1.z.string()).optional(),
155
+ crisp_budget: zod_1.z
156
+ .object({
157
+ max_tokens: zod_1.z.number(),
158
+ max_cost: zod_1.z.number(),
159
+ currency: zod_1.z.string(),
160
+ time_window: zod_1.z.string(),
161
+ })
162
+ .optional(),
130
163
  });
131
164
  /**
132
165
  * Wrapped config response schema
@@ -28,28 +28,55 @@ export interface AgentShieldAPIErrorResponse {
28
28
  message: string;
29
29
  details?: Record<string, unknown>;
30
30
  }
31
+ /**
32
+ * Tool Call Context (AgentShield Extension to MCP-I)
33
+ *
34
+ * Optional plaintext context for dashboard enrichment.
35
+ * Links to MCP-I proof via scopeId.
36
+ */
37
+ export interface ToolCallContext {
38
+ tool: string;
39
+ args: Record<string, unknown>;
40
+ result?: unknown;
41
+ scopeId: string;
42
+ userIdentifier?: string;
43
+ }
31
44
  /**
32
45
  * Request body for proof submission endpoint
33
46
  * POST /api/v1/bouncer/proofs
34
47
  */
35
48
  export interface ProofSubmissionRequest {
36
- /** Delegation ID (null if no delegation context) */
37
- delegation_id: string | null;
38
- /** Session ID for grouping proofs */
49
+ /** Delegation ID (nullable, optional - null if no delegation context) */
50
+ delegation_id?: string | null;
51
+ /** Session ID for grouping proofs (AgentShield session ID, may differ from MCP-I sessionId) */
39
52
  session_id: string;
40
53
  /** Array of proofs to submit */
41
54
  proofs: DetachedProof[];
55
+ /** AgentShield extension: Optional context for dashboard enrichment */
56
+ context?: {
57
+ toolCalls?: ToolCallContext[];
58
+ mcpServerUrl?: string;
59
+ };
42
60
  }
61
+ /**
62
+ * Bouncer outcome types
63
+ */
64
+ export type BouncerOutcome = "success" | "failed" | "blocked" | "error";
43
65
  /**
44
66
  * Response from proof submission endpoint
45
67
  */
46
68
  export interface ProofSubmissionResponse {
47
69
  success: boolean;
48
- received: number;
49
- processed: number;
70
+ accepted: number;
71
+ rejected: number;
72
+ outcomes: Record<BouncerOutcome, number>;
50
73
  errors?: Array<{
51
- proofId: string;
52
- error: string;
74
+ proof_index: number;
75
+ error: {
76
+ code: string;
77
+ message: string;
78
+ details?: Record<string, unknown>;
79
+ };
53
80
  }>;
54
81
  }
55
82
  /**
@@ -59,8 +86,12 @@ export interface ProofSubmissionResponse {
59
86
  export interface VerifyDelegationRequest {
60
87
  /** Agent DID to verify */
61
88
  agent_did: string;
62
- /** Required scopes */
63
- scopes: string[];
89
+ /** Credential JWT (optional, defaults to empty string for OAuth flow) */
90
+ credential_jwt?: string;
91
+ /** Delegation token from OAuth flow (optional, for stateless MCP servers) */
92
+ delegation_token?: string;
93
+ /** Required scopes (optional, can be empty array) */
94
+ scopes?: string[];
64
95
  /** Optional timestamp for verification */
65
96
  timestamp?: number;
66
97
  /** Optional client info for IP/origin checking */
@@ -116,6 +147,12 @@ export interface ToolProtectionConfigResponse {
116
147
  tools: Record<string, AgentShieldToolProtection>;
117
148
  reputation_threshold?: number;
118
149
  denied_agents?: string[];
150
+ crisp_budget?: {
151
+ max_tokens: number;
152
+ max_cost: number;
153
+ currency: string;
154
+ time_window: string;
155
+ };
119
156
  }
120
157
  /**
121
158
  * Wrapped config response
@@ -31,4 +31,3 @@ export interface MCPIConfig extends MCPIBaseConfig {
31
31
  * @returns Complete MCPIConfig object
32
32
  */
33
33
  export declare function buildBaseConfig(env: Record<string, any>): MCPIConfig;
34
- //# sourceMappingURL=builder.d.ts.map
@@ -114,4 +114,3 @@ export interface AgentIdentity {
114
114
  [key: string]: unknown;
115
115
  };
116
116
  }
117
- //# sourceMappingURL=identity.d.ts.map
@@ -8,4 +8,3 @@
8
8
  * @module @kya-os/contracts/config
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- //# sourceMappingURL=identity.js.map
@@ -32,4 +32,3 @@ export interface MCPIConfig extends MCPIBaseConfig {
32
32
  delegation?: DelegationConfig;
33
33
  toolProtection?: ToolProtectionSourceConfig;
34
34
  }
35
- //# sourceMappingURL=index.d.ts.map
@@ -12,4 +12,3 @@ exports.buildBaseConfig = void 0;
12
12
  // Configuration builder utilities
13
13
  var builder_js_1 = require("./builder.js");
14
14
  Object.defineProperty(exports, "buildBaseConfig", { enumerable: true, get: function () { return builder_js_1.buildBaseConfig; } });
15
- //# sourceMappingURL=index.js.map
@@ -37,14 +37,14 @@ export declare const consentTermsSchema: z.ZodObject<{
37
37
  required: z.ZodDefault<z.ZodBoolean>;
38
38
  }, "strip", z.ZodTypeAny, {
39
39
  required: boolean;
40
- text?: string | undefined;
41
- url?: string | undefined;
42
40
  version?: string | undefined;
43
- }, {
44
- text?: string | undefined;
45
41
  url?: string | undefined;
42
+ text?: string | undefined;
43
+ }, {
46
44
  version?: string | undefined;
45
+ url?: string | undefined;
47
46
  required?: boolean | undefined;
47
+ text?: string | undefined;
48
48
  }>;
49
49
  export type ConsentTerms = z.infer<typeof consentTermsSchema>;
50
50
  /**
@@ -82,9 +82,9 @@ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
82
82
  pattern: z.ZodOptional<z.ZodString>;
83
83
  }, "strip", z.ZodTypeAny, {
84
84
  type: "text" | "textarea" | "checkbox" | "select";
85
+ name: string;
85
86
  required: boolean;
86
87
  label: string;
87
- name: string;
88
88
  options?: {
89
89
  value: string;
90
90
  label: string;
@@ -93,9 +93,9 @@ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
93
93
  pattern?: string | undefined;
94
94
  }, {
95
95
  type: "text" | "textarea" | "checkbox" | "select";
96
+ name: string;
96
97
  required: boolean;
97
98
  label: string;
98
- name: string;
99
99
  options?: {
100
100
  value: string;
101
101
  label: string;
@@ -104,9 +104,9 @@ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
104
104
  pattern?: string | undefined;
105
105
  }>, {
106
106
  type: "text" | "textarea" | "checkbox" | "select";
107
+ name: string;
107
108
  required: boolean;
108
109
  label: string;
109
- name: string;
110
110
  options?: {
111
111
  value: string;
112
112
  label: string;
@@ -115,9 +115,9 @@ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
115
115
  pattern?: string | undefined;
116
116
  }, {
117
117
  type: "text" | "textarea" | "checkbox" | "select";
118
+ name: string;
118
119
  required: boolean;
119
120
  label: string;
120
- name: string;
121
121
  options?: {
122
122
  value: string;
123
123
  label: string;
@@ -159,14 +159,14 @@ export declare const consentPageConfigSchema: z.ZodObject<{
159
159
  required: z.ZodDefault<z.ZodBoolean>;
160
160
  }, "strip", z.ZodTypeAny, {
161
161
  required: boolean;
162
- text?: string | undefined;
163
- url?: string | undefined;
164
162
  version?: string | undefined;
165
- }, {
166
- text?: string | undefined;
167
163
  url?: string | undefined;
164
+ text?: string | undefined;
165
+ }, {
168
166
  version?: string | undefined;
167
+ url?: string | undefined;
169
168
  required?: boolean | undefined;
169
+ text?: string | undefined;
170
170
  }>>;
171
171
  customFields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
172
172
  name: z.ZodString;
@@ -187,9 +187,9 @@ export declare const consentPageConfigSchema: z.ZodObject<{
187
187
  pattern: z.ZodOptional<z.ZodString>;
188
188
  }, "strip", z.ZodTypeAny, {
189
189
  type: "text" | "textarea" | "checkbox" | "select";
190
+ name: string;
190
191
  required: boolean;
191
192
  label: string;
192
- name: string;
193
193
  options?: {
194
194
  value: string;
195
195
  label: string;
@@ -198,9 +198,9 @@ export declare const consentPageConfigSchema: z.ZodObject<{
198
198
  pattern?: string | undefined;
199
199
  }, {
200
200
  type: "text" | "textarea" | "checkbox" | "select";
201
+ name: string;
201
202
  required: boolean;
202
203
  label: string;
203
- name: string;
204
204
  options?: {
205
205
  value: string;
206
206
  label: string;
@@ -209,9 +209,9 @@ export declare const consentPageConfigSchema: z.ZodObject<{
209
209
  pattern?: string | undefined;
210
210
  }>, {
211
211
  type: "text" | "textarea" | "checkbox" | "select";
212
+ name: string;
212
213
  required: boolean;
213
214
  label: string;
214
- name: string;
215
215
  options?: {
216
216
  value: string;
217
217
  label: string;
@@ -220,9 +220,9 @@ export declare const consentPageConfigSchema: z.ZodObject<{
220
220
  pattern?: string | undefined;
221
221
  }, {
222
222
  type: "text" | "textarea" | "checkbox" | "select";
223
+ name: string;
223
224
  required: boolean;
224
225
  label: string;
225
- name: string;
226
226
  options?: {
227
227
  value: string;
228
228
  label: string;
@@ -233,11 +233,11 @@ export declare const consentPageConfigSchema: z.ZodObject<{
233
233
  serverUrl: z.ZodString;
234
234
  autoClose: z.ZodOptional<z.ZodBoolean>;
235
235
  }, "strip", z.ZodTypeAny, {
236
- tool: string;
237
- toolDescription: string;
238
- scopes: string[];
239
236
  agentDid: string;
240
237
  sessionId: string;
238
+ tool: string;
239
+ scopes: string[];
240
+ toolDescription: string;
241
241
  projectId: string;
242
242
  serverUrl: string;
243
243
  branding?: {
@@ -248,15 +248,15 @@ export declare const consentPageConfigSchema: z.ZodObject<{
248
248
  } | undefined;
249
249
  terms?: {
250
250
  required: boolean;
251
- text?: string | undefined;
252
- url?: string | undefined;
253
251
  version?: string | undefined;
252
+ url?: string | undefined;
253
+ text?: string | undefined;
254
254
  } | undefined;
255
255
  customFields?: {
256
256
  type: "text" | "textarea" | "checkbox" | "select";
257
+ name: string;
257
258
  required: boolean;
258
259
  label: string;
259
- name: string;
260
260
  options?: {
261
261
  value: string;
262
262
  label: string;
@@ -266,11 +266,11 @@ export declare const consentPageConfigSchema: z.ZodObject<{
266
266
  }[] | undefined;
267
267
  autoClose?: boolean | undefined;
268
268
  }, {
269
- tool: string;
270
- toolDescription: string;
271
- scopes: string[];
272
269
  agentDid: string;
273
270
  sessionId: string;
271
+ tool: string;
272
+ scopes: string[];
273
+ toolDescription: string;
274
274
  projectId: string;
275
275
  serverUrl: string;
276
276
  branding?: {
@@ -280,16 +280,16 @@ export declare const consentPageConfigSchema: z.ZodObject<{
280
280
  theme?: "light" | "dark" | "auto" | undefined;
281
281
  } | undefined;
282
282
  terms?: {
283
- text?: string | undefined;
284
- url?: string | undefined;
285
283
  version?: string | undefined;
284
+ url?: string | undefined;
286
285
  required?: boolean | undefined;
286
+ text?: string | undefined;
287
287
  } | undefined;
288
288
  customFields?: {
289
289
  type: "text" | "textarea" | "checkbox" | "select";
290
+ name: string;
290
291
  required: boolean;
291
292
  label: string;
292
- name: string;
293
293
  options?: {
294
294
  value: string;
295
295
  label: string;
@@ -316,18 +316,18 @@ export declare const consentApprovalRequestSchema: z.ZodObject<{
316
316
  customFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean]>>>;
317
317
  }, "strip", z.ZodTypeAny, {
318
318
  tool: string;
319
+ session_id: string;
319
320
  scopes: string[];
320
321
  agent_did: string;
321
- session_id: string;
322
322
  project_id: string;
323
323
  termsAccepted: boolean;
324
324
  customFields?: Record<string, string | boolean> | undefined;
325
325
  termsVersion?: string | undefined;
326
326
  }, {
327
327
  tool: string;
328
+ session_id: string;
328
329
  scopes: string[];
329
330
  agent_did: string;
330
- session_id: string;
331
331
  project_id: string;
332
332
  termsAccepted: boolean;
333
333
  customFields?: Record<string, string | boolean> | undefined;
@@ -345,27 +345,27 @@ export declare const consentApprovalResponseSchema: z.ZodEffects<z.ZodObject<{
345
345
  error_code: z.ZodOptional<z.ZodString>;
346
346
  }, "strip", z.ZodTypeAny, {
347
347
  success: boolean;
348
+ error?: string | undefined;
348
349
  delegation_id?: string | undefined;
349
350
  delegation_token?: string | undefined;
350
- error?: string | undefined;
351
351
  error_code?: string | undefined;
352
352
  }, {
353
353
  success: boolean;
354
+ error?: string | undefined;
354
355
  delegation_id?: string | undefined;
355
356
  delegation_token?: string | undefined;
356
- error?: string | undefined;
357
357
  error_code?: string | undefined;
358
358
  }>, {
359
359
  success: boolean;
360
+ error?: string | undefined;
360
361
  delegation_id?: string | undefined;
361
362
  delegation_token?: string | undefined;
362
- error?: string | undefined;
363
363
  error_code?: string | undefined;
364
364
  }, {
365
365
  success: boolean;
366
+ error?: string | undefined;
366
367
  delegation_id?: string | undefined;
367
368
  delegation_token?: string | undefined;
368
- error?: string | undefined;
369
369
  error_code?: string | undefined;
370
370
  }>;
371
371
  export type ConsentApprovalResponse = z.infer<typeof consentApprovalResponseSchema>;
@@ -396,14 +396,14 @@ export declare const consentConfigSchema: z.ZodObject<{
396
396
  required: z.ZodDefault<z.ZodBoolean>;
397
397
  }, "strip", z.ZodTypeAny, {
398
398
  required: boolean;
399
- text?: string | undefined;
400
- url?: string | undefined;
401
399
  version?: string | undefined;
402
- }, {
403
- text?: string | undefined;
404
400
  url?: string | undefined;
401
+ text?: string | undefined;
402
+ }, {
405
403
  version?: string | undefined;
404
+ url?: string | undefined;
406
405
  required?: boolean | undefined;
406
+ text?: string | undefined;
407
407
  }>>;
408
408
  customFields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
409
409
  name: z.ZodString;
@@ -424,9 +424,9 @@ export declare const consentConfigSchema: z.ZodObject<{
424
424
  pattern: z.ZodOptional<z.ZodString>;
425
425
  }, "strip", z.ZodTypeAny, {
426
426
  type: "text" | "textarea" | "checkbox" | "select";
427
+ name: string;
427
428
  required: boolean;
428
429
  label: string;
429
- name: string;
430
430
  options?: {
431
431
  value: string;
432
432
  label: string;
@@ -435,9 +435,9 @@ export declare const consentConfigSchema: z.ZodObject<{
435
435
  pattern?: string | undefined;
436
436
  }, {
437
437
  type: "text" | "textarea" | "checkbox" | "select";
438
+ name: string;
438
439
  required: boolean;
439
440
  label: string;
440
- name: string;
441
441
  options?: {
442
442
  value: string;
443
443
  label: string;
@@ -446,9 +446,9 @@ export declare const consentConfigSchema: z.ZodObject<{
446
446
  pattern?: string | undefined;
447
447
  }>, {
448
448
  type: "text" | "textarea" | "checkbox" | "select";
449
+ name: string;
449
450
  required: boolean;
450
451
  label: string;
451
- name: string;
452
452
  options?: {
453
453
  value: string;
454
454
  label: string;
@@ -457,9 +457,9 @@ export declare const consentConfigSchema: z.ZodObject<{
457
457
  pattern?: string | undefined;
458
458
  }, {
459
459
  type: "text" | "textarea" | "checkbox" | "select";
460
+ name: string;
460
461
  required: boolean;
461
462
  label: string;
462
- name: string;
463
463
  options?: {
464
464
  value: string;
465
465
  label: string;
@@ -492,15 +492,15 @@ export declare const consentConfigSchema: z.ZodObject<{
492
492
  } | undefined;
493
493
  terms?: {
494
494
  required: boolean;
495
- text?: string | undefined;
496
- url?: string | undefined;
497
495
  version?: string | undefined;
496
+ url?: string | undefined;
497
+ text?: string | undefined;
498
498
  } | undefined;
499
499
  customFields?: {
500
500
  type: "text" | "textarea" | "checkbox" | "select";
501
+ name: string;
501
502
  required: boolean;
502
503
  label: string;
503
- name: string;
504
504
  options?: {
505
505
  value: string;
506
506
  label: string;
@@ -522,16 +522,16 @@ export declare const consentConfigSchema: z.ZodObject<{
522
522
  theme?: "light" | "dark" | "auto" | undefined;
523
523
  } | undefined;
524
524
  terms?: {
525
- text?: string | undefined;
526
- url?: string | undefined;
527
525
  version?: string | undefined;
526
+ url?: string | undefined;
528
527
  required?: boolean | undefined;
528
+ text?: string | undefined;
529
529
  } | undefined;
530
530
  customFields?: {
531
531
  type: "text" | "textarea" | "checkbox" | "select";
532
+ name: string;
532
533
  required: boolean;
533
534
  label: string;
534
- name: string;
535
535
  options?: {
536
536
  value: string;
537
537
  label: string;
@@ -557,11 +557,11 @@ export type ConsentConfig = z.infer<typeof consentConfigSchema>;
557
557
  * @returns Validation result
558
558
  */
559
559
  export declare function validateConsentPageConfig(config: unknown): z.SafeParseReturnType<{
560
- tool: string;
561
- toolDescription: string;
562
- scopes: string[];
563
560
  agentDid: string;
564
561
  sessionId: string;
562
+ tool: string;
563
+ scopes: string[];
564
+ toolDescription: string;
565
565
  projectId: string;
566
566
  serverUrl: string;
567
567
  branding?: {
@@ -571,16 +571,16 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
571
571
  theme?: "light" | "dark" | "auto" | undefined;
572
572
  } | undefined;
573
573
  terms?: {
574
- text?: string | undefined;
575
- url?: string | undefined;
576
574
  version?: string | undefined;
575
+ url?: string | undefined;
577
576
  required?: boolean | undefined;
577
+ text?: string | undefined;
578
578
  } | undefined;
579
579
  customFields?: {
580
580
  type: "text" | "textarea" | "checkbox" | "select";
581
+ name: string;
581
582
  required: boolean;
582
583
  label: string;
583
- name: string;
584
584
  options?: {
585
585
  value: string;
586
586
  label: string;
@@ -590,11 +590,11 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
590
590
  }[] | undefined;
591
591
  autoClose?: boolean | undefined;
592
592
  }, {
593
- tool: string;
594
- toolDescription: string;
595
- scopes: string[];
596
593
  agentDid: string;
597
594
  sessionId: string;
595
+ tool: string;
596
+ scopes: string[];
597
+ toolDescription: string;
598
598
  projectId: string;
599
599
  serverUrl: string;
600
600
  branding?: {
@@ -605,15 +605,15 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
605
605
  } | undefined;
606
606
  terms?: {
607
607
  required: boolean;
608
- text?: string | undefined;
609
- url?: string | undefined;
610
608
  version?: string | undefined;
609
+ url?: string | undefined;
610
+ text?: string | undefined;
611
611
  } | undefined;
612
612
  customFields?: {
613
613
  type: "text" | "textarea" | "checkbox" | "select";
614
+ name: string;
614
615
  required: boolean;
615
616
  label: string;
616
- name: string;
617
617
  options?: {
618
618
  value: string;
619
619
  label: string;
@@ -631,18 +631,18 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
631
631
  */
632
632
  export declare function validateConsentApprovalRequest(request: unknown): z.SafeParseReturnType<{
633
633
  tool: string;
634
+ session_id: string;
634
635
  scopes: string[];
635
636
  agent_did: string;
636
- session_id: string;
637
637
  project_id: string;
638
638
  termsAccepted: boolean;
639
639
  customFields?: Record<string, string | boolean> | undefined;
640
640
  termsVersion?: string | undefined;
641
641
  }, {
642
642
  tool: string;
643
+ session_id: string;
643
644
  scopes: string[];
644
645
  agent_did: string;
645
- session_id: string;
646
646
  project_id: string;
647
647
  termsAccepted: boolean;
648
648
  customFields?: Record<string, string | boolean> | undefined;
@@ -656,15 +656,15 @@ export declare function validateConsentApprovalRequest(request: unknown): z.Safe
656
656
  */
657
657
  export declare function validateConsentApprovalResponse(response: unknown): z.SafeParseReturnType<{
658
658
  success: boolean;
659
+ error?: string | undefined;
659
660
  delegation_id?: string | undefined;
660
661
  delegation_token?: string | undefined;
661
- error?: string | undefined;
662
662
  error_code?: string | undefined;
663
663
  }, {
664
664
  success: boolean;
665
+ error?: string | undefined;
665
666
  delegation_id?: string | undefined;
666
667
  delegation_token?: string | undefined;
667
- error?: string | undefined;
668
668
  error_code?: string | undefined;
669
669
  }>;
670
670
  /**
@@ -681,16 +681,16 @@ export declare function validateConsentConfig(config: unknown): z.SafeParseRetur
681
681
  theme?: "light" | "dark" | "auto" | undefined;
682
682
  } | undefined;
683
683
  terms?: {
684
- text?: string | undefined;
685
- url?: string | undefined;
686
684
  version?: string | undefined;
685
+ url?: string | undefined;
687
686
  required?: boolean | undefined;
687
+ text?: string | undefined;
688
688
  } | undefined;
689
689
  customFields?: {
690
690
  type: "text" | "textarea" | "checkbox" | "select";
691
+ name: string;
691
692
  required: boolean;
692
693
  label: string;
693
- name: string;
694
694
  options?: {
695
695
  value: string;
696
696
  label: string;
@@ -713,15 +713,15 @@ export declare function validateConsentConfig(config: unknown): z.SafeParseRetur
713
713
  } | undefined;
714
714
  terms?: {
715
715
  required: boolean;
716
- text?: string | undefined;
717
- url?: string | undefined;
718
716
  version?: string | undefined;
717
+ url?: string | undefined;
718
+ text?: string | undefined;
719
719
  } | undefined;
720
720
  customFields?: {
721
721
  type: "text" | "textarea" | "checkbox" | "select";
722
+ name: string;
722
723
  required: boolean;
723
724
  label: string;
724
- name: string;
725
725
  options?: {
726
726
  value: string;
727
727
  label: string;