@kya-os/checkpoint-shared 1.4.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/beacon-types/index.d.mts +448 -432
- package/dist/beacon-types/index.d.mts.map +1 -0
- package/dist/beacon-types/index.d.ts +448 -432
- package/dist/beacon-types/index.d.ts.map +1 -0
- package/dist/beacon-types/index.js +286 -182
- package/dist/beacon-types/index.mjs +284 -180
- package/dist/beacon-types/index.mjs.map +1 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.mts +5 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.mts.map +1 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.ts +5 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.ts.map +1 -0
- package/dist/browser-posture-cookie.d.mts +2 -0
- package/dist/browser-posture-cookie.d.ts +2 -0
- package/dist/browser-posture-cookie.js +1 -0
- package/dist/browser-posture-cookie.mjs +2 -0
- package/dist/browser-posture-cookie.mjs.map +1 -0
- package/dist/browser-posture-report.d.mts +48 -44
- package/dist/browser-posture-report.d.mts.map +1 -0
- package/dist/browser-posture-report.d.ts +48 -44
- package/dist/browser-posture-report.d.ts.map +1 -0
- package/dist/browser-posture-report.js +1 -1
- package/dist/browser-posture-report.mjs +2 -1
- package/dist/browser-posture-report.mjs.map +1 -0
- package/dist/browser-posture.d.mts +82 -75
- package/dist/browser-posture.d.mts.map +1 -0
- package/dist/browser-posture.d.ts +82 -75
- package/dist/browser-posture.d.ts.map +1 -0
- package/dist/browser-posture.js +167 -18993
- package/dist/browser-posture.mjs +166 -18990
- package/dist/browser-posture.mjs.map +1 -0
- package/dist/browser.d.mts +323 -316
- package/dist/browser.d.mts.map +1 -0
- package/dist/browser.d.ts +323 -316
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +1 -1
- package/dist/browser.mjs +2 -1
- package/dist/browser.mjs.map +1 -0
- package/dist/canonical-signer/index.d.mts +38 -33
- package/dist/canonical-signer/index.d.mts.map +1 -0
- package/dist/canonical-signer/index.d.ts +38 -33
- package/dist/canonical-signer/index.d.ts.map +1 -0
- package/dist/canonical-signer/index.js +411 -181
- package/dist/canonical-signer/index.mjs +383 -175
- package/dist/canonical-signer/index.mjs.map +1 -0
- package/dist/clearance.d.mts +30 -0
- package/dist/clearance.d.mts.map +1 -0
- package/dist/clearance.d.ts +30 -0
- package/dist/clearance.d.ts.map +1 -0
- package/dist/clearance.js +120 -0
- package/dist/clearance.mjs +112 -0
- package/dist/clearance.mjs.map +1 -0
- package/dist/client-ip-1y2iXAYW.js +237 -0
- package/dist/client-ip-HOfe6ucV.mjs +215 -0
- package/dist/client-ip-HOfe6ucV.mjs.map +1 -0
- package/dist/deploy/index.d.mts +339 -339
- package/dist/deploy/index.d.mts.map +1 -0
- package/dist/deploy/index.d.ts +339 -339
- package/dist/deploy/index.d.ts.map +1 -0
- package/dist/deploy/index.js +505 -413
- package/dist/deploy/index.mjs +504 -410
- package/dist/deploy/index.mjs.map +1 -0
- package/dist/errors/index.d.mts +101 -101
- package/dist/errors/index.d.mts.map +1 -0
- package/dist/errors/index.d.ts +101 -101
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +341 -314
- package/dist/errors/index.mjs +340 -311
- package/dist/errors/index.mjs.map +1 -0
- package/dist/external-jr_S4iSS.d.mts +4187 -0
- package/dist/external-jr_S4iSS.d.mts.map +1 -0
- package/dist/external-jr_S4iSS.d.ts +4187 -0
- package/dist/external-jr_S4iSS.d.ts.map +1 -0
- package/dist/gateway/index.d.mts +138 -132
- package/dist/gateway/index.d.mts.map +1 -0
- package/dist/gateway/index.d.ts +138 -132
- package/dist/gateway/index.d.ts.map +1 -0
- package/dist/gateway/index.js +117 -81
- package/dist/gateway/index.mjs +116 -78
- package/dist/gateway/index.mjs.map +1 -0
- package/dist/gateway-client-ip.d.mts +59 -0
- package/dist/gateway-client-ip.d.mts.map +1 -0
- package/dist/gateway-client-ip.d.ts +59 -0
- package/dist/gateway-client-ip.d.ts.map +1 -0
- package/dist/gateway-client-ip.js +149 -0
- package/dist/gateway-client-ip.mjs +139 -0
- package/dist/gateway-client-ip.mjs.map +1 -0
- package/dist/index.d.mts +14901 -14246
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +14901 -14246
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15180 -31025
- package/dist/index.mjs +15065 -30942
- package/dist/index.mjs.map +1 -0
- package/dist/mcpi/agentshield-api/index.d.mts +45 -44
- package/dist/mcpi/agentshield-api/index.d.mts.map +1 -0
- package/dist/mcpi/agentshield-api/index.d.ts +45 -44
- package/dist/mcpi/agentshield-api/index.d.ts.map +1 -0
- package/dist/mcpi/agentshield-api/index.js +0 -2
- package/dist/mcpi/agentshield-api/index.mjs +1 -1
- package/dist/mcpi/approval-grant/index.d.mts +63 -61
- package/dist/mcpi/approval-grant/index.d.mts.map +1 -0
- package/dist/mcpi/approval-grant/index.d.ts +63 -61
- package/dist/mcpi/approval-grant/index.d.ts.map +1 -0
- package/dist/mcpi/approval-grant/index.js +220 -140
- package/dist/mcpi/approval-grant/index.mjs +219 -137
- package/dist/mcpi/approval-grant/index.mjs.map +1 -0
- package/dist/mcpi/dashboard-config/index.d.mts +2323 -2318
- package/dist/mcpi/dashboard-config/index.d.mts.map +1 -0
- package/dist/mcpi/dashboard-config/index.d.ts +2323 -2318
- package/dist/mcpi/dashboard-config/index.d.ts.map +1 -0
- package/dist/mcpi/dashboard-config/index.js +605 -458
- package/dist/mcpi/dashboard-config/index.mjs +604 -455
- package/dist/mcpi/dashboard-config/index.mjs.map +1 -0
- package/dist/mcpi/multibase-ed25519.d.mts +10 -8
- package/dist/mcpi/multibase-ed25519.d.mts.map +1 -0
- package/dist/mcpi/multibase-ed25519.d.ts +10 -8
- package/dist/mcpi/multibase-ed25519.d.ts.map +1 -0
- package/dist/mcpi/multibase-ed25519.js +182 -106
- package/dist/mcpi/multibase-ed25519.mjs +181 -103
- package/dist/mcpi/multibase-ed25519.mjs.map +1 -0
- package/dist/patterns-CkRVOdtV.js +243 -0
- package/dist/patterns-DzkGy_qk.mjs +173 -0
- package/dist/patterns-DzkGy_qk.mjs.map +1 -0
- package/dist/project-verification-key-C3L5rd8a.js +41 -0
- package/dist/project-verification-key-CgSVX9_m.mjs +37 -0
- package/dist/project-verification-key-CgSVX9_m.mjs.map +1 -0
- package/dist/rolldown-runtime-iY2fYEqi.mjs +19 -0
- package/dist/schemas-BmjNLAE7.js +5677 -0
- package/dist/schemas-DxY-dk9y.mjs +5511 -0
- package/dist/schemas-DxY-dk9y.mjs.map +1 -0
- package/dist/signals/index.d.mts +125 -115
- package/dist/signals/index.d.mts.map +1 -0
- package/dist/signals/index.d.ts +125 -115
- package/dist/signals/index.d.ts.map +1 -0
- package/dist/signals/index.js +1693 -1536
- package/dist/signals/index.mjs +1692 -1533
- package/dist/signals/index.mjs.map +1 -0
- package/dist/test-fixtures/index.d.mts +124 -119
- package/dist/test-fixtures/index.d.mts.map +1 -0
- package/dist/test-fixtures/index.d.ts +124 -119
- package/dist/test-fixtures/index.d.ts.map +1 -0
- package/dist/test-fixtures/index.js +460 -228
- package/dist/test-fixtures/index.mjs +459 -225
- package/dist/test-fixtures/index.mjs.map +1 -0
- package/dist/tool-protection/index.d.mts +343 -343
- package/dist/tool-protection/index.d.mts.map +1 -0
- package/dist/tool-protection/index.d.ts +343 -343
- package/dist/tool-protection/index.d.ts.map +1 -0
- package/dist/tool-protection/index.js +366 -285
- package/dist/tool-protection/index.mjs +365 -282
- package/dist/tool-protection/index.mjs.map +1 -0
- package/fixtures/bot-signal-resolution.json +142 -0
- package/fixtures/browser-posture-claims.json +421 -0
- package/fixtures/browser-posture-headers.json +46 -0
- package/fixtures/detection/reason-codes.json +10 -1
- package/fixtures/kya-http/challenge.delegation.fetcher-200.json +9 -3
- package/fixtures/kya-http/challenge.delegation.full.json +9 -3
- package/fixtures/kya-http/challenge.delegation.minimal.json +9 -3
- package/fixtures/kya-http/error-codes.json +7 -2
- package/package.json +20 -6
|
@@ -1,421 +1,421 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
|
|
3
|
-
type AuthorizationRequirement = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/tool-protection/index.d.ts
|
|
3
|
+
export type AuthorizationRequirement = {
|
|
4
|
+
type: 'oauth';
|
|
5
|
+
provider: string;
|
|
6
|
+
requiredScopes?: string[];
|
|
7
7
|
} | {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
type: 'oauth2';
|
|
9
|
+
provider: string;
|
|
10
|
+
requiredScopes?: string[];
|
|
11
11
|
} | {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
type: 'password';
|
|
13
|
+
provider: string;
|
|
14
14
|
} | {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
type: 'mdl';
|
|
16
|
+
issuer: string;
|
|
17
|
+
credentialType?: string;
|
|
18
18
|
} | {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
type: 'idv';
|
|
20
|
+
provider: string;
|
|
21
|
+
verificationLevel?: 'basic' | 'enhanced' | 'loa3';
|
|
22
22
|
} | {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
type: 'verifiable_credential';
|
|
24
|
+
credentialType: string;
|
|
25
|
+
issuer?: string;
|
|
26
26
|
} | {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
type: 'credential';
|
|
28
|
+
credentialType: string;
|
|
29
|
+
issuer?: string;
|
|
30
30
|
} | {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
type: 'webauthn';
|
|
32
|
+
rpId?: string;
|
|
33
|
+
userVerification?: 'required' | 'preferred' | 'discouraged';
|
|
34
34
|
} | {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
type: 'siwe';
|
|
36
|
+
chainId?: number;
|
|
37
|
+
domain?: string;
|
|
38
38
|
} | {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
type: 'apikey';
|
|
40
|
+
envVarNames: string[];
|
|
41
|
+
headerMapping: Record<string, string>;
|
|
42
42
|
} | {
|
|
43
|
-
|
|
43
|
+
type: 'none';
|
|
44
44
|
};
|
|
45
|
-
declare const AUTHORIZATION_TYPES: {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
export 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
56
|
};
|
|
57
|
-
type AuthorizationType = (typeof AUTHORIZATION_TYPES)[keyof typeof AUTHORIZATION_TYPES];
|
|
58
|
-
interface ToolProtection {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
export type AuthorizationType = (typeof AUTHORIZATION_TYPES)[keyof typeof AUTHORIZATION_TYPES];
|
|
58
|
+
export interface ToolProtection {
|
|
59
|
+
requiresDelegation: boolean;
|
|
60
|
+
requiredScopes: string[];
|
|
61
|
+
riskLevel?: 'low' | 'medium' | 'high' | 'critical';
|
|
62
|
+
oauthProvider?: string;
|
|
63
|
+
authorization?: AuthorizationRequirement;
|
|
64
64
|
}
|
|
65
|
-
type ToolProtectionMap = Record<string, ToolProtection>;
|
|
66
|
-
type PartialToolProtection = Partial<ToolProtection>;
|
|
67
|
-
type ToolProtectionUpdate = {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
export type ToolProtectionMap = Record<string, ToolProtection>;
|
|
66
|
+
export type PartialToolProtection = Partial<ToolProtection>;
|
|
67
|
+
export type ToolProtectionUpdate = {
|
|
68
|
+
requiresDelegation?: boolean;
|
|
69
|
+
requiredScopes?: string[];
|
|
70
|
+
riskLevel?: 'low' | 'medium' | 'high' | 'critical';
|
|
71
|
+
oauthProvider?: string | null;
|
|
72
|
+
authorization?: AuthorizationRequirement | null;
|
|
73
73
|
};
|
|
74
|
-
interface ToolProtectionResponse {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
export interface ToolProtectionResponse {
|
|
75
|
+
toolProtections: ToolProtectionMap;
|
|
76
|
+
metadata?: {
|
|
77
|
+
lastUpdated?: string;
|
|
78
|
+
version?: string;
|
|
79
|
+
source?: string;
|
|
80
|
+
};
|
|
81
81
|
}
|
|
82
|
-
interface DelegationRequiredErrorData {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
export interface DelegationRequiredErrorData {
|
|
83
|
+
toolName: string;
|
|
84
|
+
requiredScopes: string[];
|
|
85
|
+
consentUrl?: string;
|
|
86
|
+
authorizationUrl?: string;
|
|
87
|
+
reason?: string;
|
|
88
88
|
}
|
|
89
|
-
interface AuthRequiredErrorData {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
export interface AuthRequiredErrorData {
|
|
90
|
+
error: 'auth_required';
|
|
91
|
+
type: 'apikey' | 'oauth' | 'credential';
|
|
92
|
+
envVarNames?: string[];
|
|
93
|
+
configUrl: string;
|
|
94
|
+
message: string;
|
|
95
95
|
}
|
|
96
|
-
declare const AuthRequiredErrorDataSchema: z.ZodObject<{
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
export declare const AuthRequiredErrorDataSchema: z.ZodObject<{
|
|
97
|
+
error: z.ZodLiteral<"auth_required">;
|
|
98
|
+
type: z.ZodEnum<{
|
|
99
|
+
oauth: "oauth";
|
|
100
|
+
apikey: "apikey";
|
|
101
|
+
credential: "credential";
|
|
102
|
+
}>;
|
|
103
|
+
envVarNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
104
|
+
configUrl: z.ZodString;
|
|
105
|
+
message: z.ZodString;
|
|
106
106
|
}, z.core.$strip>;
|
|
107
|
-
declare class AuthRequiredError extends Error {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
export declare class AuthRequiredError extends Error {
|
|
108
|
+
readonly type: AuthRequiredErrorData['type'];
|
|
109
|
+
readonly envVarNames?: string[];
|
|
110
|
+
readonly configUrl: string;
|
|
111
|
+
constructor(opts: {
|
|
112
|
+
type: AuthRequiredErrorData['type'];
|
|
113
|
+
envVarNames?: string[];
|
|
114
|
+
configUrl: string;
|
|
115
|
+
message?: string;
|
|
116
|
+
});
|
|
117
|
+
toJSON(): AuthRequiredErrorData;
|
|
118
118
|
}
|
|
119
|
-
type LegacyToolProtection = Omit<ToolProtection, 'authorization'> & {
|
|
120
|
-
|
|
119
|
+
export type LegacyToolProtection = Omit<ToolProtection, 'authorization'> & {
|
|
120
|
+
oauthProvider?: string;
|
|
121
121
|
};
|
|
122
|
-
type ToolProtectionInput = ToolProtection | LegacyToolProtection;
|
|
123
|
-
declare const AuthorizationRequirementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
122
|
+
export type ToolProtectionInput = ToolProtection | LegacyToolProtection;
|
|
123
|
+
export declare const AuthorizationRequirementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
124
|
+
type: z.ZodLiteral<"oauth">;
|
|
125
|
+
provider: z.ZodString;
|
|
126
|
+
requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
128
|
+
type: z.ZodLiteral<"oauth2">;
|
|
129
|
+
provider: z.ZodString;
|
|
130
|
+
requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
131
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
132
|
+
type: z.ZodLiteral<"password">;
|
|
133
|
+
provider: z.ZodString;
|
|
134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
135
|
+
type: z.ZodLiteral<"mdl">;
|
|
136
|
+
issuer: z.ZodString;
|
|
137
|
+
credentialType: z.ZodOptional<z.ZodString>;
|
|
138
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
139
|
+
type: z.ZodLiteral<"idv">;
|
|
140
|
+
provider: z.ZodString;
|
|
141
|
+
verificationLevel: z.ZodOptional<z.ZodEnum<{
|
|
142
|
+
basic: "basic";
|
|
143
|
+
enhanced: "enhanced";
|
|
144
|
+
loa3: "loa3";
|
|
145
|
+
}>>;
|
|
146
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
147
|
+
type: z.ZodLiteral<"verifiable_credential">;
|
|
148
|
+
credentialType: z.ZodString;
|
|
149
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
151
|
+
type: z.ZodLiteral<"credential">;
|
|
152
|
+
credentialType: z.ZodString;
|
|
153
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
154
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
155
|
+
type: z.ZodLiteral<"webauthn">;
|
|
156
|
+
rpId: z.ZodOptional<z.ZodString>;
|
|
157
|
+
userVerification: z.ZodOptional<z.ZodEnum<{
|
|
158
|
+
required: "required";
|
|
159
|
+
preferred: "preferred";
|
|
160
|
+
discouraged: "discouraged";
|
|
161
|
+
}>>;
|
|
162
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
163
|
+
type: z.ZodLiteral<"siwe">;
|
|
164
|
+
chainId: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
166
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
167
|
+
type: z.ZodLiteral<"apikey">;
|
|
168
|
+
envVarNames: z.ZodArray<z.ZodString>;
|
|
169
|
+
headerMapping: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
170
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
171
|
+
type: z.ZodLiteral<"none">;
|
|
172
|
+
}, z.core.$strip>], "type">;
|
|
173
|
+
export declare const ToolProtectionSchema: z.ZodObject<{
|
|
174
|
+
requiresDelegation: z.ZodBoolean;
|
|
175
|
+
requiredScopes: z.ZodArray<z.ZodString>;
|
|
176
|
+
riskLevel: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
low: "low";
|
|
178
|
+
medium: "medium";
|
|
179
|
+
high: "high";
|
|
180
|
+
critical: "critical";
|
|
181
|
+
}>>;
|
|
182
|
+
oauthProvider: z.ZodOptional<z.ZodString>;
|
|
183
|
+
authorization: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
124
184
|
type: z.ZodLiteral<"oauth">;
|
|
125
185
|
provider: z.ZodString;
|
|
126
186
|
requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
127
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
128
188
|
type: z.ZodLiteral<"oauth2">;
|
|
129
189
|
provider: z.ZodString;
|
|
130
190
|
requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
131
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
191
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
132
192
|
type: z.ZodLiteral<"password">;
|
|
133
193
|
provider: z.ZodString;
|
|
134
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
194
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
135
195
|
type: z.ZodLiteral<"mdl">;
|
|
136
196
|
issuer: z.ZodString;
|
|
137
197
|
credentialType: z.ZodOptional<z.ZodString>;
|
|
138
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
198
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
139
199
|
type: z.ZodLiteral<"idv">;
|
|
140
200
|
provider: z.ZodString;
|
|
141
201
|
verificationLevel: z.ZodOptional<z.ZodEnum<{
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
202
|
+
basic: "basic";
|
|
203
|
+
enhanced: "enhanced";
|
|
204
|
+
loa3: "loa3";
|
|
145
205
|
}>>;
|
|
146
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
206
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
147
207
|
type: z.ZodLiteral<"verifiable_credential">;
|
|
148
208
|
credentialType: z.ZodString;
|
|
149
209
|
issuer: z.ZodOptional<z.ZodString>;
|
|
150
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
210
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
151
211
|
type: z.ZodLiteral<"credential">;
|
|
152
212
|
credentialType: z.ZodString;
|
|
153
213
|
issuer: z.ZodOptional<z.ZodString>;
|
|
154
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
214
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
155
215
|
type: z.ZodLiteral<"webauthn">;
|
|
156
216
|
rpId: z.ZodOptional<z.ZodString>;
|
|
157
217
|
userVerification: z.ZodOptional<z.ZodEnum<{
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
218
|
+
required: "required";
|
|
219
|
+
preferred: "preferred";
|
|
220
|
+
discouraged: "discouraged";
|
|
161
221
|
}>>;
|
|
162
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
222
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
163
223
|
type: z.ZodLiteral<"siwe">;
|
|
164
224
|
chainId: z.ZodOptional<z.ZodNumber>;
|
|
165
225
|
domain: z.ZodOptional<z.ZodString>;
|
|
166
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
226
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
167
227
|
type: z.ZodLiteral<"apikey">;
|
|
168
228
|
envVarNames: z.ZodArray<z.ZodString>;
|
|
169
229
|
headerMapping: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
170
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
230
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
171
231
|
type: z.ZodLiteral<"none">;
|
|
172
|
-
}, z.core.$strip>], "type"
|
|
173
|
-
declare const ToolProtectionSchema: z.ZodObject<{
|
|
174
|
-
requiresDelegation: z.ZodBoolean;
|
|
175
|
-
requiredScopes: z.ZodArray<z.ZodString>;
|
|
176
|
-
riskLevel: z.ZodOptional<z.ZodEnum<{
|
|
177
|
-
low: "low";
|
|
178
|
-
medium: "medium";
|
|
179
|
-
high: "high";
|
|
180
|
-
critical: "critical";
|
|
181
|
-
}>>;
|
|
182
|
-
oauthProvider: z.ZodOptional<z.ZodString>;
|
|
183
|
-
authorization: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
184
|
-
type: z.ZodLiteral<"oauth">;
|
|
185
|
-
provider: z.ZodString;
|
|
186
|
-
requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
187
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
188
|
-
type: z.ZodLiteral<"oauth2">;
|
|
189
|
-
provider: z.ZodString;
|
|
190
|
-
requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
191
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
192
|
-
type: z.ZodLiteral<"password">;
|
|
193
|
-
provider: z.ZodString;
|
|
194
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
195
|
-
type: z.ZodLiteral<"mdl">;
|
|
196
|
-
issuer: z.ZodString;
|
|
197
|
-
credentialType: z.ZodOptional<z.ZodString>;
|
|
198
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
199
|
-
type: z.ZodLiteral<"idv">;
|
|
200
|
-
provider: z.ZodString;
|
|
201
|
-
verificationLevel: z.ZodOptional<z.ZodEnum<{
|
|
202
|
-
basic: "basic";
|
|
203
|
-
enhanced: "enhanced";
|
|
204
|
-
loa3: "loa3";
|
|
205
|
-
}>>;
|
|
206
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
207
|
-
type: z.ZodLiteral<"verifiable_credential">;
|
|
208
|
-
credentialType: z.ZodString;
|
|
209
|
-
issuer: z.ZodOptional<z.ZodString>;
|
|
210
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
211
|
-
type: z.ZodLiteral<"credential">;
|
|
212
|
-
credentialType: z.ZodString;
|
|
213
|
-
issuer: z.ZodOptional<z.ZodString>;
|
|
214
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
215
|
-
type: z.ZodLiteral<"webauthn">;
|
|
216
|
-
rpId: z.ZodOptional<z.ZodString>;
|
|
217
|
-
userVerification: z.ZodOptional<z.ZodEnum<{
|
|
218
|
-
required: "required";
|
|
219
|
-
preferred: "preferred";
|
|
220
|
-
discouraged: "discouraged";
|
|
221
|
-
}>>;
|
|
222
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
223
|
-
type: z.ZodLiteral<"siwe">;
|
|
224
|
-
chainId: z.ZodOptional<z.ZodNumber>;
|
|
225
|
-
domain: z.ZodOptional<z.ZodString>;
|
|
226
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
227
|
-
type: z.ZodLiteral<"apikey">;
|
|
228
|
-
envVarNames: z.ZodArray<z.ZodString>;
|
|
229
|
-
headerMapping: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
230
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
231
|
-
type: z.ZodLiteral<"none">;
|
|
232
|
-
}, z.core.$strip>], "type">>;
|
|
232
|
+
}, z.core.$strip>], "type">>;
|
|
233
233
|
}, z.core.$strip>;
|
|
234
|
-
declare const ToolProtectionMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
234
|
+
export declare const ToolProtectionMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
235
|
+
requiresDelegation: z.ZodBoolean;
|
|
236
|
+
requiredScopes: z.ZodArray<z.ZodString>;
|
|
237
|
+
riskLevel: z.ZodOptional<z.ZodEnum<{
|
|
238
|
+
low: "low";
|
|
239
|
+
medium: "medium";
|
|
240
|
+
high: "high";
|
|
241
|
+
critical: "critical";
|
|
242
|
+
}>>;
|
|
243
|
+
oauthProvider: z.ZodOptional<z.ZodString>;
|
|
244
|
+
authorization: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
245
|
+
type: z.ZodLiteral<"oauth">;
|
|
246
|
+
provider: z.ZodString;
|
|
247
|
+
requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
248
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
+
type: z.ZodLiteral<"oauth2">;
|
|
250
|
+
provider: z.ZodString;
|
|
251
|
+
requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
252
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
253
|
+
type: z.ZodLiteral<"password">;
|
|
254
|
+
provider: z.ZodString;
|
|
255
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
256
|
+
type: z.ZodLiteral<"mdl">;
|
|
257
|
+
issuer: z.ZodString;
|
|
258
|
+
credentialType: z.ZodOptional<z.ZodString>;
|
|
259
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
260
|
+
type: z.ZodLiteral<"idv">;
|
|
261
|
+
provider: z.ZodString;
|
|
262
|
+
verificationLevel: z.ZodOptional<z.ZodEnum<{
|
|
263
|
+
basic: "basic";
|
|
264
|
+
enhanced: "enhanced";
|
|
265
|
+
loa3: "loa3";
|
|
266
|
+
}>>;
|
|
267
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
268
|
+
type: z.ZodLiteral<"verifiable_credential">;
|
|
269
|
+
credentialType: z.ZodString;
|
|
270
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
271
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
272
|
+
type: z.ZodLiteral<"credential">;
|
|
273
|
+
credentialType: z.ZodString;
|
|
274
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
275
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
276
|
+
type: z.ZodLiteral<"webauthn">;
|
|
277
|
+
rpId: z.ZodOptional<z.ZodString>;
|
|
278
|
+
userVerification: z.ZodOptional<z.ZodEnum<{
|
|
279
|
+
required: "required";
|
|
280
|
+
preferred: "preferred";
|
|
281
|
+
discouraged: "discouraged";
|
|
282
|
+
}>>;
|
|
283
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
284
|
+
type: z.ZodLiteral<"siwe">;
|
|
285
|
+
chainId: z.ZodOptional<z.ZodNumber>;
|
|
286
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
287
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
288
|
+
type: z.ZodLiteral<"apikey">;
|
|
289
|
+
envVarNames: z.ZodArray<z.ZodString>;
|
|
290
|
+
headerMapping: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
291
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
292
|
+
type: z.ZodLiteral<"none">;
|
|
293
|
+
}, z.core.$strip>], "type">>;
|
|
294
|
+
}, z.core.$strip>>;
|
|
295
|
+
export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
296
|
+
toolProtections: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
235
297
|
requiresDelegation: z.ZodBoolean;
|
|
236
298
|
requiredScopes: z.ZodArray<z.ZodString>;
|
|
237
299
|
riskLevel: z.ZodOptional<z.ZodEnum<{
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
300
|
+
low: "low";
|
|
301
|
+
medium: "medium";
|
|
302
|
+
high: "high";
|
|
303
|
+
critical: "critical";
|
|
242
304
|
}>>;
|
|
243
305
|
oauthProvider: z.ZodOptional<z.ZodString>;
|
|
244
306
|
authorization: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
307
|
+
type: z.ZodLiteral<"oauth">;
|
|
308
|
+
provider: z.ZodString;
|
|
309
|
+
requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
248
310
|
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
311
|
+
type: z.ZodLiteral<"oauth2">;
|
|
312
|
+
provider: z.ZodString;
|
|
313
|
+
requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
252
314
|
}, z.core.$strip>, z.ZodObject<{
|
|
253
|
-
|
|
254
|
-
|
|
315
|
+
type: z.ZodLiteral<"password">;
|
|
316
|
+
provider: z.ZodString;
|
|
255
317
|
}, z.core.$strip>, z.ZodObject<{
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
318
|
+
type: z.ZodLiteral<"mdl">;
|
|
319
|
+
issuer: z.ZodString;
|
|
320
|
+
credentialType: z.ZodOptional<z.ZodString>;
|
|
259
321
|
}, z.core.$strip>, z.ZodObject<{
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
322
|
+
type: z.ZodLiteral<"idv">;
|
|
323
|
+
provider: z.ZodString;
|
|
324
|
+
verificationLevel: z.ZodOptional<z.ZodEnum<{
|
|
325
|
+
basic: "basic";
|
|
326
|
+
enhanced: "enhanced";
|
|
327
|
+
loa3: "loa3";
|
|
328
|
+
}>>;
|
|
267
329
|
}, z.core.$strip>, z.ZodObject<{
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
330
|
+
type: z.ZodLiteral<"verifiable_credential">;
|
|
331
|
+
credentialType: z.ZodString;
|
|
332
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
271
333
|
}, z.core.$strip>, z.ZodObject<{
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
334
|
+
type: z.ZodLiteral<"credential">;
|
|
335
|
+
credentialType: z.ZodString;
|
|
336
|
+
issuer: z.ZodOptional<z.ZodString>;
|
|
275
337
|
}, z.core.$strip>, z.ZodObject<{
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
338
|
+
type: z.ZodLiteral<"webauthn">;
|
|
339
|
+
rpId: z.ZodOptional<z.ZodString>;
|
|
340
|
+
userVerification: z.ZodOptional<z.ZodEnum<{
|
|
341
|
+
required: "required";
|
|
342
|
+
preferred: "preferred";
|
|
343
|
+
discouraged: "discouraged";
|
|
344
|
+
}>>;
|
|
283
345
|
}, z.core.$strip>, z.ZodObject<{
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
346
|
+
type: z.ZodLiteral<"siwe">;
|
|
347
|
+
chainId: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
287
349
|
}, z.core.$strip>, z.ZodObject<{
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
350
|
+
type: z.ZodLiteral<"apikey">;
|
|
351
|
+
envVarNames: z.ZodArray<z.ZodString>;
|
|
352
|
+
headerMapping: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
291
353
|
}, z.core.$strip>, z.ZodObject<{
|
|
292
|
-
|
|
354
|
+
type: z.ZodLiteral<"none">;
|
|
293
355
|
}, z.core.$strip>], "type">>;
|
|
294
|
-
}, z.core.$strip>>;
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
low: "low";
|
|
301
|
-
medium: "medium";
|
|
302
|
-
high: "high";
|
|
303
|
-
critical: "critical";
|
|
304
|
-
}>>;
|
|
305
|
-
oauthProvider: z.ZodOptional<z.ZodString>;
|
|
306
|
-
authorization: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
307
|
-
type: z.ZodLiteral<"oauth">;
|
|
308
|
-
provider: z.ZodString;
|
|
309
|
-
requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
310
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
311
|
-
type: z.ZodLiteral<"oauth2">;
|
|
312
|
-
provider: z.ZodString;
|
|
313
|
-
requiredScopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
314
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
315
|
-
type: z.ZodLiteral<"password">;
|
|
316
|
-
provider: z.ZodString;
|
|
317
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
318
|
-
type: z.ZodLiteral<"mdl">;
|
|
319
|
-
issuer: z.ZodString;
|
|
320
|
-
credentialType: z.ZodOptional<z.ZodString>;
|
|
321
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
322
|
-
type: z.ZodLiteral<"idv">;
|
|
323
|
-
provider: z.ZodString;
|
|
324
|
-
verificationLevel: z.ZodOptional<z.ZodEnum<{
|
|
325
|
-
basic: "basic";
|
|
326
|
-
enhanced: "enhanced";
|
|
327
|
-
loa3: "loa3";
|
|
328
|
-
}>>;
|
|
329
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
330
|
-
type: z.ZodLiteral<"verifiable_credential">;
|
|
331
|
-
credentialType: z.ZodString;
|
|
332
|
-
issuer: z.ZodOptional<z.ZodString>;
|
|
333
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
334
|
-
type: z.ZodLiteral<"credential">;
|
|
335
|
-
credentialType: z.ZodString;
|
|
336
|
-
issuer: z.ZodOptional<z.ZodString>;
|
|
337
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
338
|
-
type: z.ZodLiteral<"webauthn">;
|
|
339
|
-
rpId: z.ZodOptional<z.ZodString>;
|
|
340
|
-
userVerification: z.ZodOptional<z.ZodEnum<{
|
|
341
|
-
required: "required";
|
|
342
|
-
preferred: "preferred";
|
|
343
|
-
discouraged: "discouraged";
|
|
344
|
-
}>>;
|
|
345
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
346
|
-
type: z.ZodLiteral<"siwe">;
|
|
347
|
-
chainId: z.ZodOptional<z.ZodNumber>;
|
|
348
|
-
domain: z.ZodOptional<z.ZodString>;
|
|
349
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
350
|
-
type: z.ZodLiteral<"apikey">;
|
|
351
|
-
envVarNames: z.ZodArray<z.ZodString>;
|
|
352
|
-
headerMapping: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
353
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
354
|
-
type: z.ZodLiteral<"none">;
|
|
355
|
-
}, z.core.$strip>], "type">>;
|
|
356
|
-
}, z.core.$strip>>;
|
|
357
|
-
metadata: z.ZodOptional<z.ZodObject<{
|
|
358
|
-
lastUpdated: z.ZodOptional<z.ZodString>;
|
|
359
|
-
version: z.ZodOptional<z.ZodString>;
|
|
360
|
-
source: z.ZodOptional<z.ZodString>;
|
|
361
|
-
}, z.core.$strip>>;
|
|
356
|
+
}, z.core.$strip>>;
|
|
357
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
358
|
+
lastUpdated: z.ZodOptional<z.ZodString>;
|
|
359
|
+
version: z.ZodOptional<z.ZodString>;
|
|
360
|
+
source: z.ZodOptional<z.ZodString>;
|
|
361
|
+
}, z.core.$strip>>;
|
|
362
362
|
}, z.core.$strip>;
|
|
363
|
-
declare const DelegationRequiredErrorDataSchema: z.ZodObject<{
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
363
|
+
export declare const DelegationRequiredErrorDataSchema: z.ZodObject<{
|
|
364
|
+
toolName: z.ZodString;
|
|
365
|
+
requiredScopes: z.ZodArray<z.ZodString>;
|
|
366
|
+
consentUrl: z.ZodOptional<z.ZodString>;
|
|
367
|
+
authorizationUrl: z.ZodOptional<z.ZodString>;
|
|
368
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
369
369
|
}, z.core.$strip>;
|
|
370
|
-
declare function isToolProtection(obj: unknown): obj is ToolProtection;
|
|
371
|
-
declare function isToolProtectionMap(obj: unknown): obj is ToolProtectionMap;
|
|
372
|
-
declare function isToolProtectionResponse(obj: unknown): obj is ToolProtectionResponse;
|
|
373
|
-
declare function isDelegationRequiredErrorData(obj: unknown): obj is DelegationRequiredErrorData;
|
|
374
|
-
declare function isAuthorizationRequirement(obj: unknown): obj is AuthorizationRequirement;
|
|
375
|
-
declare function hasOAuthAuthorization(protection: ToolProtection): protection is ToolProtection & {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
370
|
+
export declare function isToolProtection(obj: unknown): obj is ToolProtection;
|
|
371
|
+
export declare function isToolProtectionMap(obj: unknown): obj is ToolProtectionMap;
|
|
372
|
+
export declare function isToolProtectionResponse(obj: unknown): obj is ToolProtectionResponse;
|
|
373
|
+
export declare function isDelegationRequiredErrorData(obj: unknown): obj is DelegationRequiredErrorData;
|
|
374
|
+
export declare function isAuthorizationRequirement(obj: unknown): obj is AuthorizationRequirement;
|
|
375
|
+
export declare function hasOAuthAuthorization(protection: ToolProtection): protection is ToolProtection & {
|
|
376
|
+
authorization: {
|
|
377
|
+
type: 'oauth' | 'oauth2';
|
|
378
|
+
};
|
|
379
379
|
};
|
|
380
|
-
declare function hasPasswordAuthorization(protection: ToolProtection): protection is ToolProtection & {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
380
|
+
export declare function hasPasswordAuthorization(protection: ToolProtection): protection is ToolProtection & {
|
|
381
|
+
authorization: {
|
|
382
|
+
type: 'password';
|
|
383
|
+
};
|
|
384
384
|
};
|
|
385
|
-
declare function hasVerifiableCredentialAuthorization(protection: ToolProtection): protection is ToolProtection & {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
385
|
+
export declare function hasVerifiableCredentialAuthorization(protection: ToolProtection): protection is ToolProtection & {
|
|
386
|
+
authorization: {
|
|
387
|
+
type: 'verifiable_credential' | 'credential';
|
|
388
|
+
};
|
|
389
389
|
};
|
|
390
|
-
declare function hasApiKeyAuthorization(protection: ToolProtection): protection is ToolProtection & {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
390
|
+
export declare function hasApiKeyAuthorization(protection: ToolProtection): protection is ToolProtection & {
|
|
391
|
+
authorization: {
|
|
392
|
+
type: 'apikey';
|
|
393
|
+
};
|
|
394
394
|
};
|
|
395
|
-
declare function validateToolProtection(obj: unknown): ToolProtection;
|
|
396
|
-
declare function validateToolProtectionMap(obj: unknown): ToolProtectionMap;
|
|
397
|
-
declare function validateToolProtectionResponse(obj: unknown): ToolProtectionResponse;
|
|
398
|
-
declare function validateDelegationRequiredErrorData(obj: unknown): DelegationRequiredErrorData;
|
|
399
|
-
declare function toolRequiresDelegation(toolName: string, protections: ToolProtectionMap): boolean;
|
|
400
|
-
declare function getToolRequiredScopes(toolName: string, protections: ToolProtectionMap): string[];
|
|
401
|
-
declare function getToolRiskLevel(toolName: string, protections: ToolProtectionMap): ToolProtection['riskLevel'] | undefined;
|
|
402
|
-
declare function createDelegationRequiredError(toolName: string, requiredScopes: string[], consentUrl?: string): DelegationRequiredErrorData;
|
|
403
|
-
declare function normalizeToolProtection(raw: ToolProtection | PartialToolProtection): ToolProtection;
|
|
404
|
-
declare const CONSENT_PROVIDER_TYPES: {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
395
|
+
export declare function validateToolProtection(obj: unknown): ToolProtection;
|
|
396
|
+
export declare function validateToolProtectionMap(obj: unknown): ToolProtectionMap;
|
|
397
|
+
export declare function validateToolProtectionResponse(obj: unknown): ToolProtectionResponse;
|
|
398
|
+
export declare function validateDelegationRequiredErrorData(obj: unknown): DelegationRequiredErrorData;
|
|
399
|
+
export declare function toolRequiresDelegation(toolName: string, protections: ToolProtectionMap): boolean;
|
|
400
|
+
export declare function getToolRequiredScopes(toolName: string, protections: ToolProtectionMap): string[];
|
|
401
|
+
export declare function getToolRiskLevel(toolName: string, protections: ToolProtectionMap): ToolProtection['riskLevel'] | undefined;
|
|
402
|
+
export declare function createDelegationRequiredError(toolName: string, requiredScopes: string[], consentUrl?: string): DelegationRequiredErrorData;
|
|
403
|
+
export declare function normalizeToolProtection(raw: ToolProtection | PartialToolProtection): ToolProtection;
|
|
404
|
+
export declare const CONSENT_PROVIDER_TYPES: {
|
|
405
|
+
readonly NONE: "none";
|
|
406
|
+
readonly OAUTH2: "oauth2";
|
|
407
|
+
readonly PASSWORD: "password";
|
|
408
|
+
readonly CREDENTIAL: "credential";
|
|
409
|
+
readonly MAGIC_LINK: "magic_link";
|
|
410
|
+
readonly OTP: "otp";
|
|
411
411
|
};
|
|
412
|
-
type ConsentProviderType = (typeof CONSENT_PROVIDER_TYPES)[keyof typeof CONSENT_PROVIDER_TYPES];
|
|
413
|
-
declare function determineConsentProviderType(hasOAuthIdentity: boolean, isPasswordFlow?: boolean, isMagicLinkFlow?: boolean, isOtpFlow?: boolean): ConsentProviderType;
|
|
414
|
-
declare function getAuthorizationTypeLabel(auth: AuthorizationRequirement): string;
|
|
415
|
-
declare function getAuthorizationTypeKey(auth: AuthorizationRequirement): string;
|
|
416
|
-
declare function normalizeAuthorizationType(auth: AuthorizationRequirement, options?: {
|
|
417
|
-
|
|
418
|
-
|
|
412
|
+
export type ConsentProviderType = (typeof CONSENT_PROVIDER_TYPES)[keyof typeof CONSENT_PROVIDER_TYPES];
|
|
413
|
+
export declare function determineConsentProviderType(hasOAuthIdentity: boolean, isPasswordFlow?: boolean, isMagicLinkFlow?: boolean, isOtpFlow?: boolean): ConsentProviderType;
|
|
414
|
+
export declare function getAuthorizationTypeLabel(auth: AuthorizationRequirement): string;
|
|
415
|
+
export declare function getAuthorizationTypeKey(auth: AuthorizationRequirement): string;
|
|
416
|
+
export declare function normalizeAuthorizationType(auth: AuthorizationRequirement, options?: {
|
|
417
|
+
warn?: boolean;
|
|
418
|
+
logger?: (message: string) => void;
|
|
419
419
|
}): AuthorizationRequirement;
|
|
420
|
-
|
|
421
|
-
|
|
420
|
+
//#endregion
|
|
421
|
+
//# sourceMappingURL=index.d.mts.map
|