@kya-os/checkpoint-shared 1.2.0 → 1.3.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 (53) hide show
  1. package/README.md +1 -1
  2. package/dist/beacon-types/index.d.mts +10 -1
  3. package/dist/beacon-types/index.d.ts +10 -1
  4. package/dist/beacon-types/index.js +20 -1
  5. package/dist/beacon-types/index.mjs +20 -2
  6. package/dist/browser.d.mts +6 -1
  7. package/dist/browser.d.ts +6 -1
  8. package/dist/browser.js +1 -1
  9. package/dist/browser.mjs +1 -1
  10. package/dist/canonical-signer/index.js +31 -2
  11. package/dist/canonical-signer/index.mjs +31 -2
  12. package/dist/deploy/index.d.mts +827 -0
  13. package/dist/deploy/index.d.ts +827 -0
  14. package/dist/deploy/index.js +458 -0
  15. package/dist/deploy/index.mjs +433 -0
  16. package/dist/gateway/index.d.mts +575 -0
  17. package/dist/gateway/index.d.ts +575 -0
  18. package/dist/gateway/index.js +98 -0
  19. package/dist/gateway/index.mjs +88 -0
  20. package/dist/index.d.mts +3071 -871
  21. package/dist/index.d.ts +3071 -871
  22. package/dist/index.js +3344 -1308
  23. package/dist/index.mjs +4593 -2667
  24. package/dist/mcpi/agentshield-api/index.d.mts +47 -0
  25. package/dist/mcpi/agentshield-api/index.d.ts +47 -0
  26. package/dist/mcpi/agentshield-api/index.js +2 -0
  27. package/dist/mcpi/agentshield-api/index.mjs +1 -0
  28. package/dist/mcpi/approval-grant/index.d.mts +79 -0
  29. package/dist/mcpi/approval-grant/index.d.ts +79 -0
  30. package/dist/mcpi/approval-grant/index.js +157 -0
  31. package/dist/mcpi/approval-grant/index.mjs +150 -0
  32. package/dist/mcpi/dashboard-config/index.d.mts +14075 -0
  33. package/dist/mcpi/dashboard-config/index.d.ts +14075 -0
  34. package/dist/mcpi/dashboard-config/index.js +517 -0
  35. package/dist/mcpi/dashboard-config/index.mjs +492 -0
  36. package/dist/mcpi/multibase-ed25519.d.mts +8 -0
  37. package/dist/mcpi/multibase-ed25519.d.ts +8 -0
  38. package/dist/mcpi/multibase-ed25519.js +125 -0
  39. package/dist/mcpi/multibase-ed25519.mjs +119 -0
  40. package/dist/signals/index.d.mts +158 -0
  41. package/dist/signals/index.d.ts +158 -0
  42. package/dist/signals/index.js +1574 -0
  43. package/dist/signals/index.mjs +1544 -0
  44. package/dist/test-fixtures/index.d.mts +53 -8
  45. package/dist/test-fixtures/index.d.ts +53 -8
  46. package/dist/test-fixtures/index.js +164 -7
  47. package/dist/test-fixtures/index.mjs +158 -8
  48. package/dist/tool-protection/index.d.mts +1120 -0
  49. package/dist/tool-protection/index.d.ts +1120 -0
  50. package/dist/tool-protection/index.js +370 -0
  51. package/dist/tool-protection/index.mjs +338 -0
  52. package/package.json +54 -8
  53. package/src/data/compiled/merged-rules.json +8 -2
@@ -0,0 +1,1120 @@
1
+ import { z } from 'zod';
2
+
3
+ type AuthorizationRequirement = {
4
+ type: 'oauth';
5
+ provider: string;
6
+ requiredScopes?: string[];
7
+ } | {
8
+ type: 'oauth2';
9
+ provider: string;
10
+ requiredScopes?: string[];
11
+ } | {
12
+ type: 'password';
13
+ provider: string;
14
+ } | {
15
+ type: 'mdl';
16
+ issuer: string;
17
+ credentialType?: string;
18
+ } | {
19
+ type: 'idv';
20
+ provider: string;
21
+ verificationLevel?: 'basic' | 'enhanced' | 'loa3';
22
+ } | {
23
+ type: 'verifiable_credential';
24
+ credentialType: string;
25
+ issuer?: string;
26
+ } | {
27
+ type: 'credential';
28
+ credentialType: string;
29
+ issuer?: string;
30
+ } | {
31
+ type: 'webauthn';
32
+ rpId?: string;
33
+ userVerification?: 'required' | 'preferred' | 'discouraged';
34
+ } | {
35
+ type: 'siwe';
36
+ chainId?: number;
37
+ domain?: string;
38
+ } | {
39
+ type: 'apikey';
40
+ envVarNames: string[];
41
+ headerMapping: Record<string, string>;
42
+ } | {
43
+ type: 'none';
44
+ };
45
+ declare const AUTHORIZATION_TYPES: {
46
+ readonly OAUTH: "oauth";
47
+ readonly OAUTH2: "oauth2";
48
+ readonly PASSWORD: "password";
49
+ readonly MDL: "mdl";
50
+ readonly IDV: "idv";
51
+ readonly VERIFIABLE_CREDENTIAL: "verifiable_credential";
52
+ readonly WEBAUTHN: "webauthn";
53
+ readonly SIWE: "siwe";
54
+ readonly APIKEY: "apikey";
55
+ readonly NONE: "none";
56
+ };
57
+ type AuthorizationType = (typeof AUTHORIZATION_TYPES)[keyof typeof AUTHORIZATION_TYPES];
58
+ interface ToolProtection {
59
+ requiresDelegation: boolean;
60
+ requiredScopes: string[];
61
+ riskLevel?: 'low' | 'medium' | 'high' | 'critical';
62
+ oauthProvider?: string;
63
+ authorization?: AuthorizationRequirement;
64
+ }
65
+ type ToolProtectionMap = Record<string, ToolProtection>;
66
+ type PartialToolProtection = Partial<ToolProtection>;
67
+ type ToolProtectionUpdate = {
68
+ requiresDelegation?: boolean;
69
+ requiredScopes?: string[];
70
+ riskLevel?: 'low' | 'medium' | 'high' | 'critical';
71
+ oauthProvider?: string | null;
72
+ authorization?: AuthorizationRequirement | null;
73
+ };
74
+ interface ToolProtectionResponse {
75
+ toolProtections: ToolProtectionMap;
76
+ metadata?: {
77
+ lastUpdated?: string;
78
+ version?: string;
79
+ source?: string;
80
+ };
81
+ }
82
+ interface DelegationRequiredErrorData {
83
+ toolName: string;
84
+ requiredScopes: string[];
85
+ consentUrl?: string;
86
+ authorizationUrl?: string;
87
+ reason?: string;
88
+ }
89
+ interface AuthRequiredErrorData {
90
+ error: 'auth_required';
91
+ type: 'apikey' | 'oauth' | 'credential';
92
+ envVarNames?: string[];
93
+ configUrl: string;
94
+ message: string;
95
+ }
96
+ declare const AuthRequiredErrorDataSchema: z.ZodObject<{
97
+ error: z.ZodLiteral<"auth_required">;
98
+ type: z.ZodEnum<["apikey", "oauth", "credential"]>;
99
+ envVarNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
100
+ configUrl: z.ZodString;
101
+ message: z.ZodString;
102
+ }, "strip", z.ZodTypeAny, {
103
+ error: "auth_required";
104
+ message: string;
105
+ type: "oauth" | "credential" | "apikey";
106
+ configUrl: string;
107
+ envVarNames?: string[] | undefined;
108
+ }, {
109
+ error: "auth_required";
110
+ message: string;
111
+ type: "oauth" | "credential" | "apikey";
112
+ configUrl: string;
113
+ envVarNames?: string[] | undefined;
114
+ }>;
115
+ declare class AuthRequiredError extends Error {
116
+ readonly type: AuthRequiredErrorData['type'];
117
+ readonly envVarNames?: string[];
118
+ readonly configUrl: string;
119
+ constructor(opts: {
120
+ type: AuthRequiredErrorData['type'];
121
+ envVarNames?: string[];
122
+ configUrl: string;
123
+ message?: string;
124
+ });
125
+ toJSON(): AuthRequiredErrorData;
126
+ }
127
+ type LegacyToolProtection = Omit<ToolProtection, 'authorization'> & {
128
+ oauthProvider?: string;
129
+ };
130
+ type ToolProtectionInput = ToolProtection | LegacyToolProtection;
131
+ declare const AuthorizationRequirementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
132
+ type: z.ZodLiteral<"oauth">;
133
+ provider: z.ZodString;
134
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ type: "oauth";
137
+ provider: string;
138
+ requiredScopes?: string[] | undefined;
139
+ }, {
140
+ type: "oauth";
141
+ provider: string;
142
+ requiredScopes?: string[] | undefined;
143
+ }>, z.ZodObject<{
144
+ type: z.ZodLiteral<"oauth2">;
145
+ provider: z.ZodString;
146
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
147
+ }, "strip", z.ZodTypeAny, {
148
+ type: "oauth2";
149
+ provider: string;
150
+ requiredScopes?: string[] | undefined;
151
+ }, {
152
+ type: "oauth2";
153
+ provider: string;
154
+ requiredScopes?: string[] | undefined;
155
+ }>, z.ZodObject<{
156
+ type: z.ZodLiteral<"password">;
157
+ provider: z.ZodString;
158
+ }, "strip", z.ZodTypeAny, {
159
+ type: "password";
160
+ provider: string;
161
+ }, {
162
+ type: "password";
163
+ provider: string;
164
+ }>, z.ZodObject<{
165
+ type: z.ZodLiteral<"mdl">;
166
+ issuer: z.ZodString;
167
+ credentialType: z.ZodOptional<z.ZodString>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ type: "mdl";
170
+ issuer: string;
171
+ credentialType?: string | undefined;
172
+ }, {
173
+ type: "mdl";
174
+ issuer: string;
175
+ credentialType?: string | undefined;
176
+ }>, z.ZodObject<{
177
+ type: z.ZodLiteral<"idv">;
178
+ provider: z.ZodString;
179
+ verificationLevel: z.ZodOptional<z.ZodEnum<["basic", "enhanced", "loa3"]>>;
180
+ }, "strip", z.ZodTypeAny, {
181
+ type: "idv";
182
+ provider: string;
183
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
184
+ }, {
185
+ type: "idv";
186
+ provider: string;
187
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
188
+ }>, z.ZodObject<{
189
+ type: z.ZodLiteral<"verifiable_credential">;
190
+ credentialType: z.ZodString;
191
+ issuer: z.ZodOptional<z.ZodString>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ type: "verifiable_credential";
194
+ credentialType: string;
195
+ issuer?: string | undefined;
196
+ }, {
197
+ type: "verifiable_credential";
198
+ credentialType: string;
199
+ issuer?: string | undefined;
200
+ }>, z.ZodObject<{
201
+ type: z.ZodLiteral<"credential">;
202
+ credentialType: z.ZodString;
203
+ issuer: z.ZodOptional<z.ZodString>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ type: "credential";
206
+ credentialType: string;
207
+ issuer?: string | undefined;
208
+ }, {
209
+ type: "credential";
210
+ credentialType: string;
211
+ issuer?: string | undefined;
212
+ }>, z.ZodObject<{
213
+ type: z.ZodLiteral<"webauthn">;
214
+ rpId: z.ZodOptional<z.ZodString>;
215
+ userVerification: z.ZodOptional<z.ZodEnum<["required", "preferred", "discouraged"]>>;
216
+ }, "strip", z.ZodTypeAny, {
217
+ type: "webauthn";
218
+ rpId?: string | undefined;
219
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
220
+ }, {
221
+ type: "webauthn";
222
+ rpId?: string | undefined;
223
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
224
+ }>, z.ZodObject<{
225
+ type: z.ZodLiteral<"siwe">;
226
+ chainId: z.ZodOptional<z.ZodNumber>;
227
+ domain: z.ZodOptional<z.ZodString>;
228
+ }, "strip", z.ZodTypeAny, {
229
+ type: "siwe";
230
+ chainId?: number | undefined;
231
+ domain?: string | undefined;
232
+ }, {
233
+ type: "siwe";
234
+ chainId?: number | undefined;
235
+ domain?: string | undefined;
236
+ }>, z.ZodObject<{
237
+ type: z.ZodLiteral<"apikey">;
238
+ envVarNames: z.ZodArray<z.ZodString, "many">;
239
+ headerMapping: z.ZodRecord<z.ZodString, z.ZodString>;
240
+ }, "strip", z.ZodTypeAny, {
241
+ type: "apikey";
242
+ envVarNames: string[];
243
+ headerMapping: Record<string, string>;
244
+ }, {
245
+ type: "apikey";
246
+ envVarNames: string[];
247
+ headerMapping: Record<string, string>;
248
+ }>, z.ZodObject<{
249
+ type: z.ZodLiteral<"none">;
250
+ }, "strip", z.ZodTypeAny, {
251
+ type: "none";
252
+ }, {
253
+ type: "none";
254
+ }>]>;
255
+ declare const ToolProtectionSchema: z.ZodObject<{
256
+ requiresDelegation: z.ZodBoolean;
257
+ requiredScopes: z.ZodArray<z.ZodString, "many">;
258
+ riskLevel: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
259
+ oauthProvider: z.ZodOptional<z.ZodString>;
260
+ authorization: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
261
+ type: z.ZodLiteral<"oauth">;
262
+ provider: z.ZodString;
263
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
264
+ }, "strip", z.ZodTypeAny, {
265
+ type: "oauth";
266
+ provider: string;
267
+ requiredScopes?: string[] | undefined;
268
+ }, {
269
+ type: "oauth";
270
+ provider: string;
271
+ requiredScopes?: string[] | undefined;
272
+ }>, z.ZodObject<{
273
+ type: z.ZodLiteral<"oauth2">;
274
+ provider: z.ZodString;
275
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
276
+ }, "strip", z.ZodTypeAny, {
277
+ type: "oauth2";
278
+ provider: string;
279
+ requiredScopes?: string[] | undefined;
280
+ }, {
281
+ type: "oauth2";
282
+ provider: string;
283
+ requiredScopes?: string[] | undefined;
284
+ }>, z.ZodObject<{
285
+ type: z.ZodLiteral<"password">;
286
+ provider: z.ZodString;
287
+ }, "strip", z.ZodTypeAny, {
288
+ type: "password";
289
+ provider: string;
290
+ }, {
291
+ type: "password";
292
+ provider: string;
293
+ }>, z.ZodObject<{
294
+ type: z.ZodLiteral<"mdl">;
295
+ issuer: z.ZodString;
296
+ credentialType: z.ZodOptional<z.ZodString>;
297
+ }, "strip", z.ZodTypeAny, {
298
+ type: "mdl";
299
+ issuer: string;
300
+ credentialType?: string | undefined;
301
+ }, {
302
+ type: "mdl";
303
+ issuer: string;
304
+ credentialType?: string | undefined;
305
+ }>, z.ZodObject<{
306
+ type: z.ZodLiteral<"idv">;
307
+ provider: z.ZodString;
308
+ verificationLevel: z.ZodOptional<z.ZodEnum<["basic", "enhanced", "loa3"]>>;
309
+ }, "strip", z.ZodTypeAny, {
310
+ type: "idv";
311
+ provider: string;
312
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
313
+ }, {
314
+ type: "idv";
315
+ provider: string;
316
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
317
+ }>, z.ZodObject<{
318
+ type: z.ZodLiteral<"verifiable_credential">;
319
+ credentialType: z.ZodString;
320
+ issuer: z.ZodOptional<z.ZodString>;
321
+ }, "strip", z.ZodTypeAny, {
322
+ type: "verifiable_credential";
323
+ credentialType: string;
324
+ issuer?: string | undefined;
325
+ }, {
326
+ type: "verifiable_credential";
327
+ credentialType: string;
328
+ issuer?: string | undefined;
329
+ }>, z.ZodObject<{
330
+ type: z.ZodLiteral<"credential">;
331
+ credentialType: z.ZodString;
332
+ issuer: z.ZodOptional<z.ZodString>;
333
+ }, "strip", z.ZodTypeAny, {
334
+ type: "credential";
335
+ credentialType: string;
336
+ issuer?: string | undefined;
337
+ }, {
338
+ type: "credential";
339
+ credentialType: string;
340
+ issuer?: string | undefined;
341
+ }>, z.ZodObject<{
342
+ type: z.ZodLiteral<"webauthn">;
343
+ rpId: z.ZodOptional<z.ZodString>;
344
+ userVerification: z.ZodOptional<z.ZodEnum<["required", "preferred", "discouraged"]>>;
345
+ }, "strip", z.ZodTypeAny, {
346
+ type: "webauthn";
347
+ rpId?: string | undefined;
348
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
349
+ }, {
350
+ type: "webauthn";
351
+ rpId?: string | undefined;
352
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
353
+ }>, z.ZodObject<{
354
+ type: z.ZodLiteral<"siwe">;
355
+ chainId: z.ZodOptional<z.ZodNumber>;
356
+ domain: z.ZodOptional<z.ZodString>;
357
+ }, "strip", z.ZodTypeAny, {
358
+ type: "siwe";
359
+ chainId?: number | undefined;
360
+ domain?: string | undefined;
361
+ }, {
362
+ type: "siwe";
363
+ chainId?: number | undefined;
364
+ domain?: string | undefined;
365
+ }>, z.ZodObject<{
366
+ type: z.ZodLiteral<"apikey">;
367
+ envVarNames: z.ZodArray<z.ZodString, "many">;
368
+ headerMapping: z.ZodRecord<z.ZodString, z.ZodString>;
369
+ }, "strip", z.ZodTypeAny, {
370
+ type: "apikey";
371
+ envVarNames: string[];
372
+ headerMapping: Record<string, string>;
373
+ }, {
374
+ type: "apikey";
375
+ envVarNames: string[];
376
+ headerMapping: Record<string, string>;
377
+ }>, z.ZodObject<{
378
+ type: z.ZodLiteral<"none">;
379
+ }, "strip", z.ZodTypeAny, {
380
+ type: "none";
381
+ }, {
382
+ type: "none";
383
+ }>]>>;
384
+ }, "strip", z.ZodTypeAny, {
385
+ requiresDelegation: boolean;
386
+ requiredScopes: string[];
387
+ authorization?: {
388
+ type: "oauth";
389
+ provider: string;
390
+ requiredScopes?: string[] | undefined;
391
+ } | {
392
+ type: "oauth2";
393
+ provider: string;
394
+ requiredScopes?: string[] | undefined;
395
+ } | {
396
+ type: "password";
397
+ provider: string;
398
+ } | {
399
+ type: "mdl";
400
+ issuer: string;
401
+ credentialType?: string | undefined;
402
+ } | {
403
+ type: "idv";
404
+ provider: string;
405
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
406
+ } | {
407
+ type: "verifiable_credential";
408
+ credentialType: string;
409
+ issuer?: string | undefined;
410
+ } | {
411
+ type: "credential";
412
+ credentialType: string;
413
+ issuer?: string | undefined;
414
+ } | {
415
+ type: "webauthn";
416
+ rpId?: string | undefined;
417
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
418
+ } | {
419
+ type: "siwe";
420
+ chainId?: number | undefined;
421
+ domain?: string | undefined;
422
+ } | {
423
+ type: "apikey";
424
+ envVarNames: string[];
425
+ headerMapping: Record<string, string>;
426
+ } | {
427
+ type: "none";
428
+ } | undefined;
429
+ riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
430
+ oauthProvider?: string | undefined;
431
+ }, {
432
+ requiresDelegation: boolean;
433
+ requiredScopes: string[];
434
+ authorization?: {
435
+ type: "oauth";
436
+ provider: string;
437
+ requiredScopes?: string[] | undefined;
438
+ } | {
439
+ type: "oauth2";
440
+ provider: string;
441
+ requiredScopes?: string[] | undefined;
442
+ } | {
443
+ type: "password";
444
+ provider: string;
445
+ } | {
446
+ type: "mdl";
447
+ issuer: string;
448
+ credentialType?: string | undefined;
449
+ } | {
450
+ type: "idv";
451
+ provider: string;
452
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
453
+ } | {
454
+ type: "verifiable_credential";
455
+ credentialType: string;
456
+ issuer?: string | undefined;
457
+ } | {
458
+ type: "credential";
459
+ credentialType: string;
460
+ issuer?: string | undefined;
461
+ } | {
462
+ type: "webauthn";
463
+ rpId?: string | undefined;
464
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
465
+ } | {
466
+ type: "siwe";
467
+ chainId?: number | undefined;
468
+ domain?: string | undefined;
469
+ } | {
470
+ type: "apikey";
471
+ envVarNames: string[];
472
+ headerMapping: Record<string, string>;
473
+ } | {
474
+ type: "none";
475
+ } | undefined;
476
+ riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
477
+ oauthProvider?: string | undefined;
478
+ }>;
479
+ declare const ToolProtectionMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
480
+ requiresDelegation: z.ZodBoolean;
481
+ requiredScopes: z.ZodArray<z.ZodString, "many">;
482
+ riskLevel: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
483
+ oauthProvider: z.ZodOptional<z.ZodString>;
484
+ authorization: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
485
+ type: z.ZodLiteral<"oauth">;
486
+ provider: z.ZodString;
487
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
488
+ }, "strip", z.ZodTypeAny, {
489
+ type: "oauth";
490
+ provider: string;
491
+ requiredScopes?: string[] | undefined;
492
+ }, {
493
+ type: "oauth";
494
+ provider: string;
495
+ requiredScopes?: string[] | undefined;
496
+ }>, z.ZodObject<{
497
+ type: z.ZodLiteral<"oauth2">;
498
+ provider: z.ZodString;
499
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
500
+ }, "strip", z.ZodTypeAny, {
501
+ type: "oauth2";
502
+ provider: string;
503
+ requiredScopes?: string[] | undefined;
504
+ }, {
505
+ type: "oauth2";
506
+ provider: string;
507
+ requiredScopes?: string[] | undefined;
508
+ }>, z.ZodObject<{
509
+ type: z.ZodLiteral<"password">;
510
+ provider: z.ZodString;
511
+ }, "strip", z.ZodTypeAny, {
512
+ type: "password";
513
+ provider: string;
514
+ }, {
515
+ type: "password";
516
+ provider: string;
517
+ }>, z.ZodObject<{
518
+ type: z.ZodLiteral<"mdl">;
519
+ issuer: z.ZodString;
520
+ credentialType: z.ZodOptional<z.ZodString>;
521
+ }, "strip", z.ZodTypeAny, {
522
+ type: "mdl";
523
+ issuer: string;
524
+ credentialType?: string | undefined;
525
+ }, {
526
+ type: "mdl";
527
+ issuer: string;
528
+ credentialType?: string | undefined;
529
+ }>, z.ZodObject<{
530
+ type: z.ZodLiteral<"idv">;
531
+ provider: z.ZodString;
532
+ verificationLevel: z.ZodOptional<z.ZodEnum<["basic", "enhanced", "loa3"]>>;
533
+ }, "strip", z.ZodTypeAny, {
534
+ type: "idv";
535
+ provider: string;
536
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
537
+ }, {
538
+ type: "idv";
539
+ provider: string;
540
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
541
+ }>, z.ZodObject<{
542
+ type: z.ZodLiteral<"verifiable_credential">;
543
+ credentialType: z.ZodString;
544
+ issuer: z.ZodOptional<z.ZodString>;
545
+ }, "strip", z.ZodTypeAny, {
546
+ type: "verifiable_credential";
547
+ credentialType: string;
548
+ issuer?: string | undefined;
549
+ }, {
550
+ type: "verifiable_credential";
551
+ credentialType: string;
552
+ issuer?: string | undefined;
553
+ }>, z.ZodObject<{
554
+ type: z.ZodLiteral<"credential">;
555
+ credentialType: z.ZodString;
556
+ issuer: z.ZodOptional<z.ZodString>;
557
+ }, "strip", z.ZodTypeAny, {
558
+ type: "credential";
559
+ credentialType: string;
560
+ issuer?: string | undefined;
561
+ }, {
562
+ type: "credential";
563
+ credentialType: string;
564
+ issuer?: string | undefined;
565
+ }>, z.ZodObject<{
566
+ type: z.ZodLiteral<"webauthn">;
567
+ rpId: z.ZodOptional<z.ZodString>;
568
+ userVerification: z.ZodOptional<z.ZodEnum<["required", "preferred", "discouraged"]>>;
569
+ }, "strip", z.ZodTypeAny, {
570
+ type: "webauthn";
571
+ rpId?: string | undefined;
572
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
573
+ }, {
574
+ type: "webauthn";
575
+ rpId?: string | undefined;
576
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
577
+ }>, z.ZodObject<{
578
+ type: z.ZodLiteral<"siwe">;
579
+ chainId: z.ZodOptional<z.ZodNumber>;
580
+ domain: z.ZodOptional<z.ZodString>;
581
+ }, "strip", z.ZodTypeAny, {
582
+ type: "siwe";
583
+ chainId?: number | undefined;
584
+ domain?: string | undefined;
585
+ }, {
586
+ type: "siwe";
587
+ chainId?: number | undefined;
588
+ domain?: string | undefined;
589
+ }>, z.ZodObject<{
590
+ type: z.ZodLiteral<"apikey">;
591
+ envVarNames: z.ZodArray<z.ZodString, "many">;
592
+ headerMapping: z.ZodRecord<z.ZodString, z.ZodString>;
593
+ }, "strip", z.ZodTypeAny, {
594
+ type: "apikey";
595
+ envVarNames: string[];
596
+ headerMapping: Record<string, string>;
597
+ }, {
598
+ type: "apikey";
599
+ envVarNames: string[];
600
+ headerMapping: Record<string, string>;
601
+ }>, z.ZodObject<{
602
+ type: z.ZodLiteral<"none">;
603
+ }, "strip", z.ZodTypeAny, {
604
+ type: "none";
605
+ }, {
606
+ type: "none";
607
+ }>]>>;
608
+ }, "strip", z.ZodTypeAny, {
609
+ requiresDelegation: boolean;
610
+ requiredScopes: string[];
611
+ authorization?: {
612
+ type: "oauth";
613
+ provider: string;
614
+ requiredScopes?: string[] | undefined;
615
+ } | {
616
+ type: "oauth2";
617
+ provider: string;
618
+ requiredScopes?: string[] | undefined;
619
+ } | {
620
+ type: "password";
621
+ provider: string;
622
+ } | {
623
+ type: "mdl";
624
+ issuer: string;
625
+ credentialType?: string | undefined;
626
+ } | {
627
+ type: "idv";
628
+ provider: string;
629
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
630
+ } | {
631
+ type: "verifiable_credential";
632
+ credentialType: string;
633
+ issuer?: string | undefined;
634
+ } | {
635
+ type: "credential";
636
+ credentialType: string;
637
+ issuer?: string | undefined;
638
+ } | {
639
+ type: "webauthn";
640
+ rpId?: string | undefined;
641
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
642
+ } | {
643
+ type: "siwe";
644
+ chainId?: number | undefined;
645
+ domain?: string | undefined;
646
+ } | {
647
+ type: "apikey";
648
+ envVarNames: string[];
649
+ headerMapping: Record<string, string>;
650
+ } | {
651
+ type: "none";
652
+ } | undefined;
653
+ riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
654
+ oauthProvider?: string | undefined;
655
+ }, {
656
+ requiresDelegation: boolean;
657
+ requiredScopes: string[];
658
+ authorization?: {
659
+ type: "oauth";
660
+ provider: string;
661
+ requiredScopes?: string[] | undefined;
662
+ } | {
663
+ type: "oauth2";
664
+ provider: string;
665
+ requiredScopes?: string[] | undefined;
666
+ } | {
667
+ type: "password";
668
+ provider: string;
669
+ } | {
670
+ type: "mdl";
671
+ issuer: string;
672
+ credentialType?: string | undefined;
673
+ } | {
674
+ type: "idv";
675
+ provider: string;
676
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
677
+ } | {
678
+ type: "verifiable_credential";
679
+ credentialType: string;
680
+ issuer?: string | undefined;
681
+ } | {
682
+ type: "credential";
683
+ credentialType: string;
684
+ issuer?: string | undefined;
685
+ } | {
686
+ type: "webauthn";
687
+ rpId?: string | undefined;
688
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
689
+ } | {
690
+ type: "siwe";
691
+ chainId?: number | undefined;
692
+ domain?: string | undefined;
693
+ } | {
694
+ type: "apikey";
695
+ envVarNames: string[];
696
+ headerMapping: Record<string, string>;
697
+ } | {
698
+ type: "none";
699
+ } | undefined;
700
+ riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
701
+ oauthProvider?: string | undefined;
702
+ }>>;
703
+ declare const ToolProtectionResponseSchema: z.ZodObject<{
704
+ toolProtections: z.ZodRecord<z.ZodString, z.ZodObject<{
705
+ requiresDelegation: z.ZodBoolean;
706
+ requiredScopes: z.ZodArray<z.ZodString, "many">;
707
+ riskLevel: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
708
+ oauthProvider: z.ZodOptional<z.ZodString>;
709
+ authorization: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
710
+ type: z.ZodLiteral<"oauth">;
711
+ provider: z.ZodString;
712
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
713
+ }, "strip", z.ZodTypeAny, {
714
+ type: "oauth";
715
+ provider: string;
716
+ requiredScopes?: string[] | undefined;
717
+ }, {
718
+ type: "oauth";
719
+ provider: string;
720
+ requiredScopes?: string[] | undefined;
721
+ }>, z.ZodObject<{
722
+ type: z.ZodLiteral<"oauth2">;
723
+ provider: z.ZodString;
724
+ requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
725
+ }, "strip", z.ZodTypeAny, {
726
+ type: "oauth2";
727
+ provider: string;
728
+ requiredScopes?: string[] | undefined;
729
+ }, {
730
+ type: "oauth2";
731
+ provider: string;
732
+ requiredScopes?: string[] | undefined;
733
+ }>, z.ZodObject<{
734
+ type: z.ZodLiteral<"password">;
735
+ provider: z.ZodString;
736
+ }, "strip", z.ZodTypeAny, {
737
+ type: "password";
738
+ provider: string;
739
+ }, {
740
+ type: "password";
741
+ provider: string;
742
+ }>, z.ZodObject<{
743
+ type: z.ZodLiteral<"mdl">;
744
+ issuer: z.ZodString;
745
+ credentialType: z.ZodOptional<z.ZodString>;
746
+ }, "strip", z.ZodTypeAny, {
747
+ type: "mdl";
748
+ issuer: string;
749
+ credentialType?: string | undefined;
750
+ }, {
751
+ type: "mdl";
752
+ issuer: string;
753
+ credentialType?: string | undefined;
754
+ }>, z.ZodObject<{
755
+ type: z.ZodLiteral<"idv">;
756
+ provider: z.ZodString;
757
+ verificationLevel: z.ZodOptional<z.ZodEnum<["basic", "enhanced", "loa3"]>>;
758
+ }, "strip", z.ZodTypeAny, {
759
+ type: "idv";
760
+ provider: string;
761
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
762
+ }, {
763
+ type: "idv";
764
+ provider: string;
765
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
766
+ }>, z.ZodObject<{
767
+ type: z.ZodLiteral<"verifiable_credential">;
768
+ credentialType: z.ZodString;
769
+ issuer: z.ZodOptional<z.ZodString>;
770
+ }, "strip", z.ZodTypeAny, {
771
+ type: "verifiable_credential";
772
+ credentialType: string;
773
+ issuer?: string | undefined;
774
+ }, {
775
+ type: "verifiable_credential";
776
+ credentialType: string;
777
+ issuer?: string | undefined;
778
+ }>, z.ZodObject<{
779
+ type: z.ZodLiteral<"credential">;
780
+ credentialType: z.ZodString;
781
+ issuer: z.ZodOptional<z.ZodString>;
782
+ }, "strip", z.ZodTypeAny, {
783
+ type: "credential";
784
+ credentialType: string;
785
+ issuer?: string | undefined;
786
+ }, {
787
+ type: "credential";
788
+ credentialType: string;
789
+ issuer?: string | undefined;
790
+ }>, z.ZodObject<{
791
+ type: z.ZodLiteral<"webauthn">;
792
+ rpId: z.ZodOptional<z.ZodString>;
793
+ userVerification: z.ZodOptional<z.ZodEnum<["required", "preferred", "discouraged"]>>;
794
+ }, "strip", z.ZodTypeAny, {
795
+ type: "webauthn";
796
+ rpId?: string | undefined;
797
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
798
+ }, {
799
+ type: "webauthn";
800
+ rpId?: string | undefined;
801
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
802
+ }>, z.ZodObject<{
803
+ type: z.ZodLiteral<"siwe">;
804
+ chainId: z.ZodOptional<z.ZodNumber>;
805
+ domain: z.ZodOptional<z.ZodString>;
806
+ }, "strip", z.ZodTypeAny, {
807
+ type: "siwe";
808
+ chainId?: number | undefined;
809
+ domain?: string | undefined;
810
+ }, {
811
+ type: "siwe";
812
+ chainId?: number | undefined;
813
+ domain?: string | undefined;
814
+ }>, z.ZodObject<{
815
+ type: z.ZodLiteral<"apikey">;
816
+ envVarNames: z.ZodArray<z.ZodString, "many">;
817
+ headerMapping: z.ZodRecord<z.ZodString, z.ZodString>;
818
+ }, "strip", z.ZodTypeAny, {
819
+ type: "apikey";
820
+ envVarNames: string[];
821
+ headerMapping: Record<string, string>;
822
+ }, {
823
+ type: "apikey";
824
+ envVarNames: string[];
825
+ headerMapping: Record<string, string>;
826
+ }>, z.ZodObject<{
827
+ type: z.ZodLiteral<"none">;
828
+ }, "strip", z.ZodTypeAny, {
829
+ type: "none";
830
+ }, {
831
+ type: "none";
832
+ }>]>>;
833
+ }, "strip", z.ZodTypeAny, {
834
+ requiresDelegation: boolean;
835
+ requiredScopes: string[];
836
+ authorization?: {
837
+ type: "oauth";
838
+ provider: string;
839
+ requiredScopes?: string[] | undefined;
840
+ } | {
841
+ type: "oauth2";
842
+ provider: string;
843
+ requiredScopes?: string[] | undefined;
844
+ } | {
845
+ type: "password";
846
+ provider: string;
847
+ } | {
848
+ type: "mdl";
849
+ issuer: string;
850
+ credentialType?: string | undefined;
851
+ } | {
852
+ type: "idv";
853
+ provider: string;
854
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
855
+ } | {
856
+ type: "verifiable_credential";
857
+ credentialType: string;
858
+ issuer?: string | undefined;
859
+ } | {
860
+ type: "credential";
861
+ credentialType: string;
862
+ issuer?: string | undefined;
863
+ } | {
864
+ type: "webauthn";
865
+ rpId?: string | undefined;
866
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
867
+ } | {
868
+ type: "siwe";
869
+ chainId?: number | undefined;
870
+ domain?: string | undefined;
871
+ } | {
872
+ type: "apikey";
873
+ envVarNames: string[];
874
+ headerMapping: Record<string, string>;
875
+ } | {
876
+ type: "none";
877
+ } | undefined;
878
+ riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
879
+ oauthProvider?: string | undefined;
880
+ }, {
881
+ requiresDelegation: boolean;
882
+ requiredScopes: string[];
883
+ authorization?: {
884
+ type: "oauth";
885
+ provider: string;
886
+ requiredScopes?: string[] | undefined;
887
+ } | {
888
+ type: "oauth2";
889
+ provider: string;
890
+ requiredScopes?: string[] | undefined;
891
+ } | {
892
+ type: "password";
893
+ provider: string;
894
+ } | {
895
+ type: "mdl";
896
+ issuer: string;
897
+ credentialType?: string | undefined;
898
+ } | {
899
+ type: "idv";
900
+ provider: string;
901
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
902
+ } | {
903
+ type: "verifiable_credential";
904
+ credentialType: string;
905
+ issuer?: string | undefined;
906
+ } | {
907
+ type: "credential";
908
+ credentialType: string;
909
+ issuer?: string | undefined;
910
+ } | {
911
+ type: "webauthn";
912
+ rpId?: string | undefined;
913
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
914
+ } | {
915
+ type: "siwe";
916
+ chainId?: number | undefined;
917
+ domain?: string | undefined;
918
+ } | {
919
+ type: "apikey";
920
+ envVarNames: string[];
921
+ headerMapping: Record<string, string>;
922
+ } | {
923
+ type: "none";
924
+ } | undefined;
925
+ riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
926
+ oauthProvider?: string | undefined;
927
+ }>>;
928
+ metadata: z.ZodOptional<z.ZodObject<{
929
+ lastUpdated: z.ZodOptional<z.ZodString>;
930
+ version: z.ZodOptional<z.ZodString>;
931
+ source: z.ZodOptional<z.ZodString>;
932
+ }, "strip", z.ZodTypeAny, {
933
+ lastUpdated?: string | undefined;
934
+ version?: string | undefined;
935
+ source?: string | undefined;
936
+ }, {
937
+ lastUpdated?: string | undefined;
938
+ version?: string | undefined;
939
+ source?: string | undefined;
940
+ }>>;
941
+ }, "strip", z.ZodTypeAny, {
942
+ toolProtections: Record<string, {
943
+ requiresDelegation: boolean;
944
+ requiredScopes: string[];
945
+ authorization?: {
946
+ type: "oauth";
947
+ provider: string;
948
+ requiredScopes?: string[] | undefined;
949
+ } | {
950
+ type: "oauth2";
951
+ provider: string;
952
+ requiredScopes?: string[] | undefined;
953
+ } | {
954
+ type: "password";
955
+ provider: string;
956
+ } | {
957
+ type: "mdl";
958
+ issuer: string;
959
+ credentialType?: string | undefined;
960
+ } | {
961
+ type: "idv";
962
+ provider: string;
963
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
964
+ } | {
965
+ type: "verifiable_credential";
966
+ credentialType: string;
967
+ issuer?: string | undefined;
968
+ } | {
969
+ type: "credential";
970
+ credentialType: string;
971
+ issuer?: string | undefined;
972
+ } | {
973
+ type: "webauthn";
974
+ rpId?: string | undefined;
975
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
976
+ } | {
977
+ type: "siwe";
978
+ chainId?: number | undefined;
979
+ domain?: string | undefined;
980
+ } | {
981
+ type: "apikey";
982
+ envVarNames: string[];
983
+ headerMapping: Record<string, string>;
984
+ } | {
985
+ type: "none";
986
+ } | undefined;
987
+ riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
988
+ oauthProvider?: string | undefined;
989
+ }>;
990
+ metadata?: {
991
+ lastUpdated?: string | undefined;
992
+ version?: string | undefined;
993
+ source?: string | undefined;
994
+ } | undefined;
995
+ }, {
996
+ toolProtections: Record<string, {
997
+ requiresDelegation: boolean;
998
+ requiredScopes: string[];
999
+ authorization?: {
1000
+ type: "oauth";
1001
+ provider: string;
1002
+ requiredScopes?: string[] | undefined;
1003
+ } | {
1004
+ type: "oauth2";
1005
+ provider: string;
1006
+ requiredScopes?: string[] | undefined;
1007
+ } | {
1008
+ type: "password";
1009
+ provider: string;
1010
+ } | {
1011
+ type: "mdl";
1012
+ issuer: string;
1013
+ credentialType?: string | undefined;
1014
+ } | {
1015
+ type: "idv";
1016
+ provider: string;
1017
+ verificationLevel?: "basic" | "enhanced" | "loa3" | undefined;
1018
+ } | {
1019
+ type: "verifiable_credential";
1020
+ credentialType: string;
1021
+ issuer?: string | undefined;
1022
+ } | {
1023
+ type: "credential";
1024
+ credentialType: string;
1025
+ issuer?: string | undefined;
1026
+ } | {
1027
+ type: "webauthn";
1028
+ rpId?: string | undefined;
1029
+ userVerification?: "required" | "preferred" | "discouraged" | undefined;
1030
+ } | {
1031
+ type: "siwe";
1032
+ chainId?: number | undefined;
1033
+ domain?: string | undefined;
1034
+ } | {
1035
+ type: "apikey";
1036
+ envVarNames: string[];
1037
+ headerMapping: Record<string, string>;
1038
+ } | {
1039
+ type: "none";
1040
+ } | undefined;
1041
+ riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
1042
+ oauthProvider?: string | undefined;
1043
+ }>;
1044
+ metadata?: {
1045
+ lastUpdated?: string | undefined;
1046
+ version?: string | undefined;
1047
+ source?: string | undefined;
1048
+ } | undefined;
1049
+ }>;
1050
+ declare const DelegationRequiredErrorDataSchema: z.ZodObject<{
1051
+ toolName: z.ZodString;
1052
+ requiredScopes: z.ZodArray<z.ZodString, "many">;
1053
+ consentUrl: z.ZodOptional<z.ZodString>;
1054
+ authorizationUrl: z.ZodOptional<z.ZodString>;
1055
+ reason: z.ZodOptional<z.ZodString>;
1056
+ }, "strip", z.ZodTypeAny, {
1057
+ requiredScopes: string[];
1058
+ toolName: string;
1059
+ consentUrl?: string | undefined;
1060
+ authorizationUrl?: string | undefined;
1061
+ reason?: string | undefined;
1062
+ }, {
1063
+ requiredScopes: string[];
1064
+ toolName: string;
1065
+ consentUrl?: string | undefined;
1066
+ authorizationUrl?: string | undefined;
1067
+ reason?: string | undefined;
1068
+ }>;
1069
+ declare function isToolProtection(obj: unknown): obj is ToolProtection;
1070
+ declare function isToolProtectionMap(obj: unknown): obj is ToolProtectionMap;
1071
+ declare function isToolProtectionResponse(obj: unknown): obj is ToolProtectionResponse;
1072
+ declare function isDelegationRequiredErrorData(obj: unknown): obj is DelegationRequiredErrorData;
1073
+ declare function isAuthorizationRequirement(obj: unknown): obj is AuthorizationRequirement;
1074
+ declare function hasOAuthAuthorization(protection: ToolProtection): protection is ToolProtection & {
1075
+ authorization: {
1076
+ type: 'oauth' | 'oauth2';
1077
+ };
1078
+ };
1079
+ declare function hasPasswordAuthorization(protection: ToolProtection): protection is ToolProtection & {
1080
+ authorization: {
1081
+ type: 'password';
1082
+ };
1083
+ };
1084
+ declare function hasVerifiableCredentialAuthorization(protection: ToolProtection): protection is ToolProtection & {
1085
+ authorization: {
1086
+ type: 'verifiable_credential' | 'credential';
1087
+ };
1088
+ };
1089
+ declare function hasApiKeyAuthorization(protection: ToolProtection): protection is ToolProtection & {
1090
+ authorization: {
1091
+ type: 'apikey';
1092
+ };
1093
+ };
1094
+ declare function validateToolProtection(obj: unknown): ToolProtection;
1095
+ declare function validateToolProtectionMap(obj: unknown): ToolProtectionMap;
1096
+ declare function validateToolProtectionResponse(obj: unknown): ToolProtectionResponse;
1097
+ declare function validateDelegationRequiredErrorData(obj: unknown): DelegationRequiredErrorData;
1098
+ declare function toolRequiresDelegation(toolName: string, protections: ToolProtectionMap): boolean;
1099
+ declare function getToolRequiredScopes(toolName: string, protections: ToolProtectionMap): string[];
1100
+ declare function getToolRiskLevel(toolName: string, protections: ToolProtectionMap): ToolProtection['riskLevel'] | undefined;
1101
+ declare function createDelegationRequiredError(toolName: string, requiredScopes: string[], consentUrl?: string): DelegationRequiredErrorData;
1102
+ declare function normalizeToolProtection(raw: ToolProtection | PartialToolProtection): ToolProtection;
1103
+ declare const CONSENT_PROVIDER_TYPES: {
1104
+ readonly NONE: "none";
1105
+ readonly OAUTH2: "oauth2";
1106
+ readonly PASSWORD: "password";
1107
+ readonly CREDENTIAL: "credential";
1108
+ readonly MAGIC_LINK: "magic_link";
1109
+ readonly OTP: "otp";
1110
+ };
1111
+ type ConsentProviderType = (typeof CONSENT_PROVIDER_TYPES)[keyof typeof CONSENT_PROVIDER_TYPES];
1112
+ declare function determineConsentProviderType(hasOAuthIdentity: boolean, isPasswordFlow?: boolean, isMagicLinkFlow?: boolean, isOtpFlow?: boolean): ConsentProviderType;
1113
+ declare function getAuthorizationTypeLabel(auth: AuthorizationRequirement): string;
1114
+ declare function getAuthorizationTypeKey(auth: AuthorizationRequirement): string;
1115
+ declare function normalizeAuthorizationType(auth: AuthorizationRequirement, options?: {
1116
+ warn?: boolean;
1117
+ logger?: (message: string) => void;
1118
+ }): AuthorizationRequirement;
1119
+
1120
+ export { AUTHORIZATION_TYPES, AuthRequiredError, type AuthRequiredErrorData, AuthRequiredErrorDataSchema, type AuthorizationRequirement, AuthorizationRequirementSchema, type AuthorizationType, CONSENT_PROVIDER_TYPES, type ConsentProviderType, type DelegationRequiredErrorData, DelegationRequiredErrorDataSchema, type LegacyToolProtection, type PartialToolProtection, type ToolProtection, type ToolProtectionInput, type ToolProtectionMap, ToolProtectionMapSchema, type ToolProtectionResponse, ToolProtectionResponseSchema, ToolProtectionSchema, type ToolProtectionUpdate, createDelegationRequiredError, determineConsentProviderType, getAuthorizationTypeKey, getAuthorizationTypeLabel, getToolRequiredScopes, getToolRiskLevel, hasApiKeyAuthorization, hasOAuthAuthorization, hasPasswordAuthorization, hasVerifiableCredentialAuthorization, isAuthorizationRequirement, isDelegationRequiredErrorData, isToolProtection, isToolProtectionMap, isToolProtectionResponse, normalizeAuthorizationType, normalizeToolProtection, toolRequiresDelegation, validateDelegationRequiredErrorData, validateToolProtection, validateToolProtectionMap, validateToolProtectionResponse };