@kya-os/contracts 1.5.3-canary.17 → 1.5.3-canary.19
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/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-test$colon$coverage.log +41 -85
- package/coverage/coverage-final.json +1 -1
- package/dist/agentshield-api/admin-schemas.d.ts +2 -2
- package/dist/agentshield-api/schemas.d.ts +86 -112
- package/dist/audit/index.d.ts +24 -24
- package/dist/config/identity.d.ts +6 -6
- package/dist/consent/schemas.d.ts +69 -69
- package/dist/dashboard-config/schemas.d.ts +1356 -1356
- package/dist/handshake.d.ts +14 -14
- package/dist/tool-protection/index.d.ts +16 -16
- package/dist/verifier/index.d.ts +1 -0
- package/dist/verifier/index.js +18 -0
- package/dist/well-known/index.d.ts +2 -2
- package/package.json +12 -2
- package/src/verifier/index.ts +2 -0
package/dist/handshake.d.ts
CHANGED
|
@@ -12,15 +12,15 @@ export declare const MCPClientInfoSchema: z.ZodObject<{
|
|
|
12
12
|
persistentId: z.ZodOptional<z.ZodString>;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
14
|
name: string;
|
|
15
|
-
title?: string | undefined;
|
|
16
15
|
version?: string | undefined;
|
|
16
|
+
title?: string | undefined;
|
|
17
17
|
platform?: string | undefined;
|
|
18
18
|
vendor?: string | undefined;
|
|
19
19
|
persistentId?: string | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
name: string;
|
|
22
|
-
title?: string | undefined;
|
|
23
22
|
version?: string | undefined;
|
|
23
|
+
title?: string | undefined;
|
|
24
24
|
platform?: string | undefined;
|
|
25
25
|
vendor?: string | undefined;
|
|
26
26
|
persistentId?: string | undefined;
|
|
@@ -39,8 +39,8 @@ export declare const MCPClientSessionInfoSchema: z.ZodObject<{
|
|
|
39
39
|
}, "strip", z.ZodTypeAny, {
|
|
40
40
|
name: string;
|
|
41
41
|
clientId: string;
|
|
42
|
-
title?: string | undefined;
|
|
43
42
|
version?: string | undefined;
|
|
43
|
+
title?: string | undefined;
|
|
44
44
|
platform?: string | undefined;
|
|
45
45
|
vendor?: string | undefined;
|
|
46
46
|
persistentId?: string | undefined;
|
|
@@ -49,8 +49,8 @@ export declare const MCPClientSessionInfoSchema: z.ZodObject<{
|
|
|
49
49
|
}, {
|
|
50
50
|
name: string;
|
|
51
51
|
clientId: string;
|
|
52
|
-
title?: string | undefined;
|
|
53
52
|
version?: string | undefined;
|
|
53
|
+
title?: string | undefined;
|
|
54
54
|
platform?: string | undefined;
|
|
55
55
|
vendor?: string | undefined;
|
|
56
56
|
persistentId?: string | undefined;
|
|
@@ -73,16 +73,16 @@ export declare const HandshakeRequestSchema: z.ZodObject<{
|
|
|
73
73
|
clientId: z.ZodOptional<z.ZodString>;
|
|
74
74
|
}, "strip", z.ZodTypeAny, {
|
|
75
75
|
name: string;
|
|
76
|
-
title?: string | undefined;
|
|
77
76
|
version?: string | undefined;
|
|
77
|
+
title?: string | undefined;
|
|
78
78
|
platform?: string | undefined;
|
|
79
79
|
vendor?: string | undefined;
|
|
80
80
|
persistentId?: string | undefined;
|
|
81
81
|
clientId?: string | undefined;
|
|
82
82
|
}, {
|
|
83
83
|
name: string;
|
|
84
|
-
title?: string | undefined;
|
|
85
84
|
version?: string | undefined;
|
|
85
|
+
title?: string | undefined;
|
|
86
86
|
platform?: string | undefined;
|
|
87
87
|
vendor?: string | undefined;
|
|
88
88
|
persistentId?: string | undefined;
|
|
@@ -97,8 +97,8 @@ export declare const HandshakeRequestSchema: z.ZodObject<{
|
|
|
97
97
|
agentDid?: string | undefined;
|
|
98
98
|
clientInfo?: {
|
|
99
99
|
name: string;
|
|
100
|
-
title?: string | undefined;
|
|
101
100
|
version?: string | undefined;
|
|
101
|
+
title?: string | undefined;
|
|
102
102
|
platform?: string | undefined;
|
|
103
103
|
vendor?: string | undefined;
|
|
104
104
|
persistentId?: string | undefined;
|
|
@@ -113,8 +113,8 @@ export declare const HandshakeRequestSchema: z.ZodObject<{
|
|
|
113
113
|
agentDid?: string | undefined;
|
|
114
114
|
clientInfo?: {
|
|
115
115
|
name: string;
|
|
116
|
-
title?: string | undefined;
|
|
117
116
|
version?: string | undefined;
|
|
117
|
+
title?: string | undefined;
|
|
118
118
|
platform?: string | undefined;
|
|
119
119
|
vendor?: string | undefined;
|
|
120
120
|
persistentId?: string | undefined;
|
|
@@ -149,8 +149,8 @@ export declare const SessionContextSchema: z.ZodObject<{
|
|
|
149
149
|
}, "strip", z.ZodTypeAny, {
|
|
150
150
|
name: string;
|
|
151
151
|
clientId: string;
|
|
152
|
-
title?: string | undefined;
|
|
153
152
|
version?: string | undefined;
|
|
153
|
+
title?: string | undefined;
|
|
154
154
|
platform?: string | undefined;
|
|
155
155
|
vendor?: string | undefined;
|
|
156
156
|
persistentId?: string | undefined;
|
|
@@ -159,8 +159,8 @@ export declare const SessionContextSchema: z.ZodObject<{
|
|
|
159
159
|
}, {
|
|
160
160
|
name: string;
|
|
161
161
|
clientId: string;
|
|
162
|
-
title?: string | undefined;
|
|
163
162
|
version?: string | undefined;
|
|
163
|
+
title?: string | undefined;
|
|
164
164
|
platform?: string | undefined;
|
|
165
165
|
vendor?: string | undefined;
|
|
166
166
|
persistentId?: string | undefined;
|
|
@@ -168,19 +168,19 @@ export declare const SessionContextSchema: z.ZodObject<{
|
|
|
168
168
|
capabilities?: Record<string, unknown> | undefined;
|
|
169
169
|
}>>;
|
|
170
170
|
}, "strip", z.ZodTypeAny, {
|
|
171
|
+
createdAt: number;
|
|
171
172
|
nonce: string;
|
|
172
173
|
audience: string;
|
|
173
174
|
timestamp: number;
|
|
174
175
|
sessionId: string;
|
|
175
|
-
createdAt: number;
|
|
176
176
|
lastActivity: number;
|
|
177
177
|
ttlMinutes: number;
|
|
178
178
|
agentDid?: string | undefined;
|
|
179
179
|
clientInfo?: {
|
|
180
180
|
name: string;
|
|
181
181
|
clientId: string;
|
|
182
|
-
title?: string | undefined;
|
|
183
182
|
version?: string | undefined;
|
|
183
|
+
title?: string | undefined;
|
|
184
184
|
platform?: string | undefined;
|
|
185
185
|
vendor?: string | undefined;
|
|
186
186
|
persistentId?: string | undefined;
|
|
@@ -191,18 +191,18 @@ export declare const SessionContextSchema: z.ZodObject<{
|
|
|
191
191
|
clientDid?: string | undefined;
|
|
192
192
|
userDid?: string | undefined;
|
|
193
193
|
}, {
|
|
194
|
+
createdAt: number;
|
|
194
195
|
nonce: string;
|
|
195
196
|
audience: string;
|
|
196
197
|
timestamp: number;
|
|
197
198
|
sessionId: string;
|
|
198
|
-
createdAt: number;
|
|
199
199
|
lastActivity: number;
|
|
200
200
|
agentDid?: string | undefined;
|
|
201
201
|
clientInfo?: {
|
|
202
202
|
name: string;
|
|
203
203
|
clientId: string;
|
|
204
|
-
title?: string | undefined;
|
|
205
204
|
version?: string | undefined;
|
|
205
|
+
title?: string | undefined;
|
|
206
206
|
platform?: string | undefined;
|
|
207
207
|
vendor?: string | undefined;
|
|
208
208
|
persistentId?: string | undefined;
|
|
@@ -251,8 +251,8 @@ export declare const ToolProtectionSchema: z.ZodObject<{
|
|
|
251
251
|
type: "none";
|
|
252
252
|
}>]>>;
|
|
253
253
|
}, "strip", z.ZodTypeAny, {
|
|
254
|
-
requiredScopes: string[];
|
|
255
254
|
requiresDelegation: boolean;
|
|
255
|
+
requiredScopes: string[];
|
|
256
256
|
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
257
257
|
oauthProvider?: string | undefined;
|
|
258
258
|
authorization?: {
|
|
@@ -275,8 +275,8 @@ export declare const ToolProtectionSchema: z.ZodObject<{
|
|
|
275
275
|
type: "none";
|
|
276
276
|
} | undefined;
|
|
277
277
|
}, {
|
|
278
|
-
requiredScopes: string[];
|
|
279
278
|
requiresDelegation: boolean;
|
|
279
|
+
requiredScopes: string[];
|
|
280
280
|
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
281
281
|
oauthProvider?: string | undefined;
|
|
282
282
|
authorization?: {
|
|
@@ -360,8 +360,8 @@ export declare const ToolProtectionMapSchema: z.ZodRecord<z.ZodString, z.ZodObje
|
|
|
360
360
|
type: "none";
|
|
361
361
|
}>]>>;
|
|
362
362
|
}, "strip", z.ZodTypeAny, {
|
|
363
|
-
requiredScopes: string[];
|
|
364
363
|
requiresDelegation: boolean;
|
|
364
|
+
requiredScopes: string[];
|
|
365
365
|
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
366
366
|
oauthProvider?: string | undefined;
|
|
367
367
|
authorization?: {
|
|
@@ -384,8 +384,8 @@ export declare const ToolProtectionMapSchema: z.ZodRecord<z.ZodString, z.ZodObje
|
|
|
384
384
|
type: "none";
|
|
385
385
|
} | undefined;
|
|
386
386
|
}, {
|
|
387
|
-
requiredScopes: string[];
|
|
388
387
|
requiresDelegation: boolean;
|
|
388
|
+
requiredScopes: string[];
|
|
389
389
|
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
390
390
|
oauthProvider?: string | undefined;
|
|
391
391
|
authorization?: {
|
|
@@ -470,8 +470,8 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
470
470
|
type: "none";
|
|
471
471
|
}>]>>;
|
|
472
472
|
}, "strip", z.ZodTypeAny, {
|
|
473
|
-
requiredScopes: string[];
|
|
474
473
|
requiresDelegation: boolean;
|
|
474
|
+
requiredScopes: string[];
|
|
475
475
|
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
476
476
|
oauthProvider?: string | undefined;
|
|
477
477
|
authorization?: {
|
|
@@ -494,8 +494,8 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
494
494
|
type: "none";
|
|
495
495
|
} | undefined;
|
|
496
496
|
}, {
|
|
497
|
-
requiredScopes: string[];
|
|
498
497
|
requiresDelegation: boolean;
|
|
498
|
+
requiredScopes: string[];
|
|
499
499
|
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
500
500
|
oauthProvider?: string | undefined;
|
|
501
501
|
authorization?: {
|
|
@@ -523,18 +523,18 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
523
523
|
version: z.ZodOptional<z.ZodString>;
|
|
524
524
|
source: z.ZodOptional<z.ZodString>;
|
|
525
525
|
}, "strip", z.ZodTypeAny, {
|
|
526
|
-
lastUpdated?: string | undefined;
|
|
527
526
|
version?: string | undefined;
|
|
527
|
+
lastUpdated?: string | undefined;
|
|
528
528
|
source?: string | undefined;
|
|
529
529
|
}, {
|
|
530
|
-
lastUpdated?: string | undefined;
|
|
531
530
|
version?: string | undefined;
|
|
531
|
+
lastUpdated?: string | undefined;
|
|
532
532
|
source?: string | undefined;
|
|
533
533
|
}>>;
|
|
534
534
|
}, "strip", z.ZodTypeAny, {
|
|
535
535
|
toolProtections: Record<string, {
|
|
536
|
-
requiredScopes: string[];
|
|
537
536
|
requiresDelegation: boolean;
|
|
537
|
+
requiredScopes: string[];
|
|
538
538
|
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
539
539
|
oauthProvider?: string | undefined;
|
|
540
540
|
authorization?: {
|
|
@@ -558,14 +558,14 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
558
558
|
} | undefined;
|
|
559
559
|
}>;
|
|
560
560
|
metadata?: {
|
|
561
|
-
lastUpdated?: string | undefined;
|
|
562
561
|
version?: string | undefined;
|
|
562
|
+
lastUpdated?: string | undefined;
|
|
563
563
|
source?: string | undefined;
|
|
564
564
|
} | undefined;
|
|
565
565
|
}, {
|
|
566
566
|
toolProtections: Record<string, {
|
|
567
|
-
requiredScopes: string[];
|
|
568
567
|
requiresDelegation: boolean;
|
|
568
|
+
requiredScopes: string[];
|
|
569
569
|
riskLevel?: "low" | "medium" | "high" | "critical" | undefined;
|
|
570
570
|
oauthProvider?: string | undefined;
|
|
571
571
|
authorization?: {
|
|
@@ -589,8 +589,8 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
589
589
|
} | undefined;
|
|
590
590
|
}>;
|
|
591
591
|
metadata?: {
|
|
592
|
-
lastUpdated?: string | undefined;
|
|
593
592
|
version?: string | undefined;
|
|
593
|
+
lastUpdated?: string | undefined;
|
|
594
594
|
source?: string | undefined;
|
|
595
595
|
} | undefined;
|
|
596
596
|
}>;
|
|
@@ -603,15 +603,15 @@ export declare const DelegationRequiredErrorDataSchema: z.ZodObject<{
|
|
|
603
603
|
}, "strip", z.ZodTypeAny, {
|
|
604
604
|
requiredScopes: string[];
|
|
605
605
|
toolName: string;
|
|
606
|
-
consentUrl?: string | undefined;
|
|
607
|
-
authorizationUrl?: string | undefined;
|
|
608
606
|
reason?: string | undefined;
|
|
607
|
+
authorizationUrl?: string | undefined;
|
|
608
|
+
consentUrl?: string | undefined;
|
|
609
609
|
}, {
|
|
610
610
|
requiredScopes: string[];
|
|
611
611
|
toolName: string;
|
|
612
|
-
consentUrl?: string | undefined;
|
|
613
|
-
authorizationUrl?: string | undefined;
|
|
614
612
|
reason?: string | undefined;
|
|
613
|
+
authorizationUrl?: string | undefined;
|
|
614
|
+
consentUrl?: string | undefined;
|
|
615
615
|
}>;
|
|
616
616
|
/**
|
|
617
617
|
* Type Guards
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../verifier";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Re-export everything from the main verifier file
|
|
18
|
+
__exportStar(require("../verifier"), exports);
|
|
@@ -209,12 +209,12 @@ export declare const AgentDocumentSchema: z.ZodObject<{
|
|
|
209
209
|
description?: string | undefined;
|
|
210
210
|
}>>;
|
|
211
211
|
}, "strip", z.ZodTypeAny, {
|
|
212
|
-
id: string;
|
|
213
212
|
capabilities: {
|
|
214
213
|
'mcp-i': ("handshake" | "signing" | "verification" | "delegation" | "proof-generation")[];
|
|
215
214
|
} & {
|
|
216
215
|
[k: string]: string[];
|
|
217
216
|
};
|
|
217
|
+
id: string;
|
|
218
218
|
metadata?: {
|
|
219
219
|
version?: string | undefined;
|
|
220
220
|
name?: string | undefined;
|
|
@@ -222,12 +222,12 @@ export declare const AgentDocumentSchema: z.ZodObject<{
|
|
|
222
222
|
description?: string | undefined;
|
|
223
223
|
} | undefined;
|
|
224
224
|
}, {
|
|
225
|
-
id: string;
|
|
226
225
|
capabilities: {
|
|
227
226
|
'mcp-i': ("handshake" | "signing" | "verification" | "delegation" | "proof-generation")[];
|
|
228
227
|
} & {
|
|
229
228
|
[k: string]: string[];
|
|
230
229
|
};
|
|
230
|
+
id: string;
|
|
231
231
|
metadata?: {
|
|
232
232
|
version?: string | undefined;
|
|
233
233
|
name?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/contracts",
|
|
3
|
-
"version": "1.5.3-canary.
|
|
3
|
+
"version": "1.5.3-canary.19",
|
|
4
4
|
"description": "Shared contracts, types, and schemas for MCP-I framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -40,12 +40,21 @@
|
|
|
40
40
|
"./audit": {
|
|
41
41
|
"types": "./dist/audit/index.d.ts",
|
|
42
42
|
"default": "./dist/audit/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./verifier": {
|
|
45
|
+
"types": "./dist/verifier/index.d.ts",
|
|
46
|
+
"default": "./dist/verifier/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./handshake": {
|
|
49
|
+
"types": "./dist/handshake.d.ts",
|
|
50
|
+
"default": "./dist/handshake.js"
|
|
43
51
|
}
|
|
44
52
|
},
|
|
45
53
|
"scripts": {
|
|
46
54
|
"build": "tsc -p tsconfig.build.json && npm run emit-schemas",
|
|
47
55
|
"emit-schemas": "node scripts/emit-schemas.js",
|
|
48
56
|
"test": "vitest run",
|
|
57
|
+
"test:coverage": "vitest run --coverage",
|
|
49
58
|
"test:watch": "vitest",
|
|
50
59
|
"lint": "eslint .",
|
|
51
60
|
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
@@ -57,9 +66,10 @@
|
|
|
57
66
|
},
|
|
58
67
|
"devDependencies": {
|
|
59
68
|
"@types/node": "^20.14.9",
|
|
69
|
+
"@vitest/coverage-v8": "^4.0.5",
|
|
60
70
|
"eslint": "^8.57.0",
|
|
61
71
|
"typescript": "^5.5.3",
|
|
62
|
-
"vitest": "^
|
|
72
|
+
"vitest": "^4.0.5"
|
|
63
73
|
},
|
|
64
74
|
"publishConfig": {
|
|
65
75
|
"access": "public"
|