@kya-os/contracts 1.7.16 → 1.7.17
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/dist/agentshield-api/schemas.d.ts +18 -18
- package/dist/audit/index.d.ts +21 -21
- package/dist/dashboard-config/schemas.d.ts +1919 -1919
- package/dist/delegation/schemas.d.ts +300 -1
- package/dist/delegation/schemas.js +46 -1
- package/dist/handshake.d.ts +30 -30
- package/dist/handshake.js +11 -2
- package/dist/tool-protection/index.d.ts +6 -6
- package/package.json +2 -2
package/dist/handshake.d.ts
CHANGED
|
@@ -23,15 +23,15 @@ export declare const MCPClientInfoSchema: z.ZodObject<{
|
|
|
23
23
|
persistentId: z.ZodOptional<z.ZodString>;
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
25
|
name: string;
|
|
26
|
-
version?: string | undefined;
|
|
27
26
|
title?: string | undefined;
|
|
27
|
+
version?: string | undefined;
|
|
28
28
|
platform?: string | undefined;
|
|
29
29
|
vendor?: string | undefined;
|
|
30
30
|
persistentId?: string | undefined;
|
|
31
31
|
}, {
|
|
32
32
|
name: string;
|
|
33
|
-
version?: string | undefined;
|
|
34
33
|
title?: string | undefined;
|
|
34
|
+
version?: string | undefined;
|
|
35
35
|
platform?: string | undefined;
|
|
36
36
|
vendor?: string | undefined;
|
|
37
37
|
persistentId?: string | undefined;
|
|
@@ -48,20 +48,20 @@ export declare const MCPClientSessionInfoSchema: z.ZodObject<{
|
|
|
48
48
|
protocolVersion: z.ZodOptional<z.ZodString>;
|
|
49
49
|
capabilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
50
50
|
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
clientId: string;
|
|
52
51
|
name: string;
|
|
53
|
-
|
|
52
|
+
clientId: string;
|
|
54
53
|
title?: string | undefined;
|
|
54
|
+
version?: string | undefined;
|
|
55
55
|
platform?: string | undefined;
|
|
56
56
|
vendor?: string | undefined;
|
|
57
57
|
persistentId?: string | undefined;
|
|
58
58
|
protocolVersion?: string | undefined;
|
|
59
59
|
capabilities?: Record<string, unknown> | undefined;
|
|
60
60
|
}, {
|
|
61
|
-
clientId: string;
|
|
62
61
|
name: string;
|
|
63
|
-
|
|
62
|
+
clientId: string;
|
|
64
63
|
title?: string | undefined;
|
|
64
|
+
version?: string | undefined;
|
|
65
65
|
platform?: string | undefined;
|
|
66
66
|
vendor?: string | undefined;
|
|
67
67
|
persistentId?: string | undefined;
|
|
@@ -84,20 +84,20 @@ export declare const HandshakeRequestSchema: z.ZodObject<{
|
|
|
84
84
|
clientId: z.ZodOptional<z.ZodString>;
|
|
85
85
|
}, "strip", z.ZodTypeAny, {
|
|
86
86
|
name: string;
|
|
87
|
-
clientId?: string | undefined;
|
|
88
|
-
version?: string | undefined;
|
|
89
87
|
title?: string | undefined;
|
|
88
|
+
version?: string | undefined;
|
|
90
89
|
platform?: string | undefined;
|
|
91
90
|
vendor?: string | undefined;
|
|
92
91
|
persistentId?: string | undefined;
|
|
92
|
+
clientId?: string | undefined;
|
|
93
93
|
}, {
|
|
94
94
|
name: string;
|
|
95
|
-
clientId?: string | undefined;
|
|
96
|
-
version?: string | undefined;
|
|
97
95
|
title?: string | undefined;
|
|
96
|
+
version?: string | undefined;
|
|
98
97
|
platform?: string | undefined;
|
|
99
98
|
vendor?: string | undefined;
|
|
100
99
|
persistentId?: string | undefined;
|
|
100
|
+
clientId?: string | undefined;
|
|
101
101
|
}>>;
|
|
102
102
|
clientProtocolVersion: z.ZodOptional<z.ZodString>;
|
|
103
103
|
clientCapabilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -108,12 +108,12 @@ export declare const HandshakeRequestSchema: z.ZodObject<{
|
|
|
108
108
|
agentDid?: string | undefined;
|
|
109
109
|
clientInfo?: {
|
|
110
110
|
name: string;
|
|
111
|
-
clientId?: string | undefined;
|
|
112
|
-
version?: string | undefined;
|
|
113
111
|
title?: string | undefined;
|
|
112
|
+
version?: string | undefined;
|
|
114
113
|
platform?: string | undefined;
|
|
115
114
|
vendor?: string | undefined;
|
|
116
115
|
persistentId?: string | undefined;
|
|
116
|
+
clientId?: string | undefined;
|
|
117
117
|
} | undefined;
|
|
118
118
|
clientProtocolVersion?: string | undefined;
|
|
119
119
|
clientCapabilities?: Record<string, unknown> | undefined;
|
|
@@ -124,12 +124,12 @@ export declare const HandshakeRequestSchema: z.ZodObject<{
|
|
|
124
124
|
agentDid?: string | undefined;
|
|
125
125
|
clientInfo?: {
|
|
126
126
|
name: string;
|
|
127
|
-
clientId?: string | undefined;
|
|
128
|
-
version?: string | undefined;
|
|
129
127
|
title?: string | undefined;
|
|
128
|
+
version?: string | undefined;
|
|
130
129
|
platform?: string | undefined;
|
|
131
130
|
vendor?: string | undefined;
|
|
132
131
|
persistentId?: string | undefined;
|
|
132
|
+
clientId?: string | undefined;
|
|
133
133
|
} | undefined;
|
|
134
134
|
clientProtocolVersion?: string | undefined;
|
|
135
135
|
clientCapabilities?: Record<string, unknown> | undefined;
|
|
@@ -158,20 +158,20 @@ export declare const SessionContextSchema: z.ZodObject<{
|
|
|
158
158
|
protocolVersion: z.ZodOptional<z.ZodString>;
|
|
159
159
|
capabilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
160
160
|
}, "strip", z.ZodTypeAny, {
|
|
161
|
-
clientId: string;
|
|
162
161
|
name: string;
|
|
163
|
-
|
|
162
|
+
clientId: string;
|
|
164
163
|
title?: string | undefined;
|
|
164
|
+
version?: string | undefined;
|
|
165
165
|
platform?: string | undefined;
|
|
166
166
|
vendor?: string | undefined;
|
|
167
167
|
persistentId?: string | undefined;
|
|
168
168
|
protocolVersion?: string | undefined;
|
|
169
169
|
capabilities?: Record<string, unknown> | undefined;
|
|
170
170
|
}, {
|
|
171
|
-
clientId: string;
|
|
172
171
|
name: string;
|
|
173
|
-
|
|
172
|
+
clientId: string;
|
|
174
173
|
title?: string | undefined;
|
|
174
|
+
version?: string | undefined;
|
|
175
175
|
platform?: string | undefined;
|
|
176
176
|
vendor?: string | undefined;
|
|
177
177
|
persistentId?: string | undefined;
|
|
@@ -195,29 +195,29 @@ export declare const SessionContextSchema: z.ZodObject<{
|
|
|
195
195
|
}, "strip", z.ZodTypeAny, {
|
|
196
196
|
provider: string;
|
|
197
197
|
subject: string;
|
|
198
|
-
email?: string | undefined;
|
|
199
198
|
name?: string | undefined;
|
|
199
|
+
email?: string | undefined;
|
|
200
200
|
}, {
|
|
201
201
|
provider: string;
|
|
202
202
|
subject: string;
|
|
203
|
-
email?: string | undefined;
|
|
204
203
|
name?: string | undefined;
|
|
204
|
+
email?: string | undefined;
|
|
205
205
|
}>>;
|
|
206
206
|
}, "strip", z.ZodTypeAny, {
|
|
207
|
-
createdAt: number;
|
|
208
207
|
nonce: string;
|
|
209
208
|
audience: string;
|
|
210
209
|
timestamp: number;
|
|
211
210
|
sessionId: string;
|
|
211
|
+
createdAt: number;
|
|
212
212
|
lastActivity: number;
|
|
213
213
|
ttlMinutes: number;
|
|
214
|
-
identityState: "
|
|
214
|
+
identityState: "anonymous" | "authenticated";
|
|
215
215
|
agentDid?: string | undefined;
|
|
216
216
|
clientInfo?: {
|
|
217
|
-
clientId: string;
|
|
218
217
|
name: string;
|
|
219
|
-
|
|
218
|
+
clientId: string;
|
|
220
219
|
title?: string | undefined;
|
|
220
|
+
version?: string | undefined;
|
|
221
221
|
platform?: string | undefined;
|
|
222
222
|
vendor?: string | undefined;
|
|
223
223
|
persistentId?: string | undefined;
|
|
@@ -230,22 +230,22 @@ export declare const SessionContextSchema: z.ZodObject<{
|
|
|
230
230
|
oauthIdentity?: {
|
|
231
231
|
provider: string;
|
|
232
232
|
subject: string;
|
|
233
|
-
email?: string | undefined;
|
|
234
233
|
name?: string | undefined;
|
|
234
|
+
email?: string | undefined;
|
|
235
235
|
} | undefined;
|
|
236
236
|
}, {
|
|
237
|
-
createdAt: number;
|
|
238
237
|
nonce: string;
|
|
239
238
|
audience: string;
|
|
240
239
|
timestamp: number;
|
|
241
240
|
sessionId: string;
|
|
241
|
+
createdAt: number;
|
|
242
242
|
lastActivity: number;
|
|
243
243
|
agentDid?: string | undefined;
|
|
244
244
|
clientInfo?: {
|
|
245
|
-
clientId: string;
|
|
246
245
|
name: string;
|
|
247
|
-
|
|
246
|
+
clientId: string;
|
|
248
247
|
title?: string | undefined;
|
|
248
|
+
version?: string | undefined;
|
|
249
249
|
platform?: string | undefined;
|
|
250
250
|
vendor?: string | undefined;
|
|
251
251
|
persistentId?: string | undefined;
|
|
@@ -256,12 +256,12 @@ export declare const SessionContextSchema: z.ZodObject<{
|
|
|
256
256
|
serverDid?: string | undefined;
|
|
257
257
|
clientDid?: string | undefined;
|
|
258
258
|
userDid?: string | undefined;
|
|
259
|
-
identityState?: "
|
|
259
|
+
identityState?: "anonymous" | "authenticated" | undefined;
|
|
260
260
|
oauthIdentity?: {
|
|
261
261
|
provider: string;
|
|
262
262
|
subject: string;
|
|
263
|
-
email?: string | undefined;
|
|
264
263
|
name?: string | undefined;
|
|
264
|
+
email?: string | undefined;
|
|
265
265
|
} | undefined;
|
|
266
266
|
}>;
|
|
267
267
|
export declare const NonceCacheEntrySchema: z.ZodObject<{
|
package/dist/handshake.js
CHANGED
|
@@ -2,7 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NONCE_LENGTH_BYTES = exports.DEFAULT_TIMESTAMP_SKEW_SECONDS = exports.DEFAULT_SESSION_TTL_MINUTES = exports.NonceCacheConfigSchema = exports.NonceCacheEntrySchema = exports.SessionContextSchema = exports.HandshakeRequestSchema = exports.MCPClientSessionInfoSchema = exports.MCPClientInfoSchema = exports.SessionIdentityStateSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* OAuth Identity schema (inlined to avoid ESM/CJS boundary issues with @kya-os/consent)
|
|
7
|
+
* This is a copy of OAuthIdentitySchema from @kya-os/consent for use in handshake types.
|
|
8
|
+
*/
|
|
9
|
+
const oauthIdentitySchema = zod_1.z.object({
|
|
10
|
+
provider: zod_1.z.string().min(1).max(50),
|
|
11
|
+
subject: zod_1.z.string().min(1).max(255),
|
|
12
|
+
email: zod_1.z.string().email().max(255).optional(),
|
|
13
|
+
name: zod_1.z.string().max(255).optional(),
|
|
14
|
+
});
|
|
6
15
|
/**
|
|
7
16
|
* Handshake and session management schemas
|
|
8
17
|
*/
|
|
@@ -65,7 +74,7 @@ exports.SessionContextSchema = zod_1.z.object({
|
|
|
65
74
|
* OAuth identity information (populated after successful OAuth)
|
|
66
75
|
* Contains provider, subject, email from OAuth provider
|
|
67
76
|
*/
|
|
68
|
-
oauthIdentity:
|
|
77
|
+
oauthIdentity: oauthIdentitySchema.optional(),
|
|
69
78
|
});
|
|
70
79
|
exports.NonceCacheEntrySchema = zod_1.z.object({
|
|
71
80
|
sessionId: zod_1.z.string().min(1),
|
|
@@ -943,12 +943,12 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
943
943
|
source: z.ZodOptional<z.ZodString>;
|
|
944
944
|
}, "strip", z.ZodTypeAny, {
|
|
945
945
|
version?: string | undefined;
|
|
946
|
-
source?: string | undefined;
|
|
947
946
|
lastUpdated?: string | undefined;
|
|
947
|
+
source?: string | undefined;
|
|
948
948
|
}, {
|
|
949
949
|
version?: string | undefined;
|
|
950
|
-
source?: string | undefined;
|
|
951
950
|
lastUpdated?: string | undefined;
|
|
951
|
+
source?: string | undefined;
|
|
952
952
|
}>>;
|
|
953
953
|
}, "strip", z.ZodTypeAny, {
|
|
954
954
|
toolProtections: Record<string, {
|
|
@@ -997,8 +997,8 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
997
997
|
}>;
|
|
998
998
|
metadata?: {
|
|
999
999
|
version?: string | undefined;
|
|
1000
|
-
source?: string | undefined;
|
|
1001
1000
|
lastUpdated?: string | undefined;
|
|
1001
|
+
source?: string | undefined;
|
|
1002
1002
|
} | undefined;
|
|
1003
1003
|
}, {
|
|
1004
1004
|
toolProtections: Record<string, {
|
|
@@ -1047,8 +1047,8 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
1047
1047
|
}>;
|
|
1048
1048
|
metadata?: {
|
|
1049
1049
|
version?: string | undefined;
|
|
1050
|
-
source?: string | undefined;
|
|
1051
1050
|
lastUpdated?: string | undefined;
|
|
1051
|
+
source?: string | undefined;
|
|
1052
1052
|
} | undefined;
|
|
1053
1053
|
}>;
|
|
1054
1054
|
export declare const DelegationRequiredErrorDataSchema: z.ZodObject<{
|
|
@@ -1060,15 +1060,15 @@ export declare const DelegationRequiredErrorDataSchema: z.ZodObject<{
|
|
|
1060
1060
|
}, "strip", z.ZodTypeAny, {
|
|
1061
1061
|
requiredScopes: string[];
|
|
1062
1062
|
toolName: string;
|
|
1063
|
+
authorizationUrl?: string | undefined;
|
|
1063
1064
|
reason?: string | undefined;
|
|
1064
1065
|
consentUrl?: string | undefined;
|
|
1065
|
-
authorizationUrl?: string | undefined;
|
|
1066
1066
|
}, {
|
|
1067
1067
|
requiredScopes: string[];
|
|
1068
1068
|
toolName: string;
|
|
1069
|
+
authorizationUrl?: string | undefined;
|
|
1069
1070
|
reason?: string | undefined;
|
|
1070
1071
|
consentUrl?: string | undefined;
|
|
1071
|
-
authorizationUrl?: string | undefined;
|
|
1072
1072
|
}>;
|
|
1073
1073
|
/**
|
|
1074
1074
|
* Type Guards
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/contracts",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.17",
|
|
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",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
},
|
|
96
96
|
"sideEffects": false,
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@kya-os/consent": "^0.1.
|
|
98
|
+
"@kya-os/consent": "^0.1.13",
|
|
99
99
|
"zod": "^3.25.76"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|