@kya-os/contracts 1.6.2 → 1.6.3-canary.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.
- package/dist/agentshield-api/admin-schemas.d.ts +2 -2
- package/dist/agentshield-api/schemas.d.ts +100 -74
- package/dist/audit/index.d.ts +24 -24
- package/dist/config/identity.d.ts +6 -6
- package/dist/consent/schemas.d.ts +78 -78
- package/dist/dashboard-config/index.d.ts +2 -2
- package/dist/dashboard-config/index.js +4 -1
- package/dist/dashboard-config/schemas.d.ts +6595 -3160
- package/dist/dashboard-config/schemas.js +23 -1
- package/dist/dashboard-config/types.d.ts +28 -1
- package/dist/handshake.d.ts +14 -14
- package/dist/tool-protection/index.d.ts +6 -6
- package/dist/well-known/index.d.ts +2 -2
- package/package.json +5 -1
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @package @kya-os/contracts/dashboard-config
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.validateServerConfigResponseSchema = exports.validateServerConfigRequestSchema = exports.updateServerConfigResponseSchema = exports.updateServerConfigRequestSchema = exports.getServerConfigResponseSchema = exports.getServerConfigRequestSchema = exports.mcpIServerConfigSchema = exports.configMetadataSchema = exports.platformConfigSchema = exports.vercelPlatformConfigSchema = exports.nodePlatformConfigSchema = exports.cloudflarePlatformConfigSchema = exports.sessionConfigSchema = exports.auditConfigSchema = exports.toolProtectionConfigSchema = exports.delegationConfigSchema = exports.proofingConfigSchema = exports.identityConfigSchema = void 0;
|
|
11
|
+
exports.validateServerConfigResponseSchema = exports.validateServerConfigRequestSchema = exports.updateServerConfigResponseSchema = exports.updateServerConfigRequestSchema = exports.getMergedServerConfigResponseSchema = exports.getServerConfigResponseSchema = exports.getServerConfigRequestSchema = exports.mergedMcpIServerConfigSchema = exports.mcpIServerConfigSchema = exports.configMetadataSchema = exports.platformConfigSchema = exports.vercelPlatformConfigSchema = exports.nodePlatformConfigSchema = exports.cloudflarePlatformConfigSchema = exports.sessionConfigSchema = exports.auditConfigSchema = exports.mergedToolProtectionConfigSchema = exports.toolProtectionConfigSchema = exports.delegationConfigSchema = exports.proofingConfigSchema = exports.identityConfigSchema = void 0;
|
|
12
12
|
const zod_1 = require("zod");
|
|
13
13
|
const index_js_1 = require("../tool-protection/index.js");
|
|
14
14
|
/**
|
|
@@ -80,6 +80,10 @@ exports.toolProtectionConfigSchema = zod_1.z.object({
|
|
|
80
80
|
}).optional(),
|
|
81
81
|
fallback: index_js_1.ToolProtectionMapSchema.optional(),
|
|
82
82
|
});
|
|
83
|
+
/** Merged tool protection config with embedded tools */
|
|
84
|
+
exports.mergedToolProtectionConfigSchema = exports.toolProtectionConfigSchema.extend({
|
|
85
|
+
tools: index_js_1.ToolProtectionMapSchema,
|
|
86
|
+
});
|
|
83
87
|
/**
|
|
84
88
|
* Audit configuration schema
|
|
85
89
|
*/
|
|
@@ -179,6 +183,10 @@ exports.mcpIServerConfigSchema = zod_1.z.object({
|
|
|
179
183
|
platform: exports.platformConfigSchema,
|
|
180
184
|
metadata: exports.configMetadataSchema,
|
|
181
185
|
});
|
|
186
|
+
/** Merged MCP-I Server Configuration schema @since 1.6.0 */
|
|
187
|
+
exports.mergedMcpIServerConfigSchema = exports.mcpIServerConfigSchema.extend({
|
|
188
|
+
toolProtection: exports.mergedToolProtectionConfigSchema,
|
|
189
|
+
});
|
|
182
190
|
/**
|
|
183
191
|
* Get server config request schema
|
|
184
192
|
*/
|
|
@@ -198,6 +206,20 @@ exports.getServerConfigResponseSchema = zod_1.z.object({
|
|
|
198
206
|
timestamp: zod_1.z.string().optional(),
|
|
199
207
|
}).optional(),
|
|
200
208
|
});
|
|
209
|
+
/** Get merged server config response schema @since 1.6.0 */
|
|
210
|
+
exports.getMergedServerConfigResponseSchema = zod_1.z.object({
|
|
211
|
+
success: zod_1.z.boolean(),
|
|
212
|
+
data: zod_1.z.object({
|
|
213
|
+
config: exports.mergedMcpIServerConfigSchema,
|
|
214
|
+
/** @deprecated Use config.toolProtection.tools instead */
|
|
215
|
+
toolProtections: index_js_1.ToolProtectionMapSchema.optional(),
|
|
216
|
+
}),
|
|
217
|
+
metadata: zod_1.z.object({
|
|
218
|
+
requestId: zod_1.z.string().optional(),
|
|
219
|
+
timestamp: zod_1.z.string().optional(),
|
|
220
|
+
cachedUntil: zod_1.z.string().optional(),
|
|
221
|
+
}).optional(),
|
|
222
|
+
});
|
|
201
223
|
/**
|
|
202
224
|
* Update server config request schema
|
|
203
225
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @package @kya-os/contracts/dashboard-config
|
|
8
8
|
*/
|
|
9
|
-
import type { ToolProtectionMap } from '../tool-protection/index.js';
|
|
9
|
+
import type { ToolProtection, ToolProtectionMap } from '../tool-protection/index.js';
|
|
10
10
|
import type { DelegationVerifierType } from '../config/delegation.js';
|
|
11
11
|
/**
|
|
12
12
|
* MCP-I Server Configuration (Dashboard View Model)
|
|
@@ -256,6 +256,16 @@ export interface MCPIServerConfig {
|
|
|
256
256
|
deploymentStatus?: 'active' | 'inactive' | 'error';
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Merged MCP-I Server Configuration with embedded tool protections
|
|
261
|
+
* @since 1.6.0
|
|
262
|
+
*/
|
|
263
|
+
export interface MergedMCPIServerConfig extends MCPIServerConfig {
|
|
264
|
+
toolProtection: MCPIServerConfig['toolProtection'] & {
|
|
265
|
+
/** Embedded tool protection rules (keys are tool names) */
|
|
266
|
+
tools: Record<string, ToolProtection>;
|
|
267
|
+
};
|
|
268
|
+
}
|
|
259
269
|
/**
|
|
260
270
|
* API Request/Response types for dashboard config endpoints
|
|
261
271
|
*/
|
|
@@ -279,6 +289,23 @@ export interface GetServerConfigResponse {
|
|
|
279
289
|
timestamp?: string;
|
|
280
290
|
};
|
|
281
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* Response with merged tool protections
|
|
294
|
+
* @since 1.6.0
|
|
295
|
+
*/
|
|
296
|
+
export interface GetMergedServerConfigResponse {
|
|
297
|
+
success: boolean;
|
|
298
|
+
data: {
|
|
299
|
+
config: MergedMCPIServerConfig;
|
|
300
|
+
/** @deprecated Use config.toolProtection.tools instead */
|
|
301
|
+
toolProtections?: ToolProtectionMap;
|
|
302
|
+
};
|
|
303
|
+
metadata?: {
|
|
304
|
+
requestId?: string;
|
|
305
|
+
timestamp?: string;
|
|
306
|
+
cachedUntil?: string;
|
|
307
|
+
};
|
|
308
|
+
}
|
|
282
309
|
/**
|
|
283
310
|
* Request to update server configuration
|
|
284
311
|
* PUT /api/v1/bouncer/projects/{projectId}/config
|
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
|
-
version?: string | undefined;
|
|
16
15
|
title?: string | undefined;
|
|
16
|
+
version?: string | undefined;
|
|
17
17
|
platform?: string | undefined;
|
|
18
18
|
vendor?: string | undefined;
|
|
19
19
|
persistentId?: string | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
name: string;
|
|
22
|
-
version?: string | undefined;
|
|
23
22
|
title?: string | undefined;
|
|
23
|
+
version?: 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
|
-
version?: string | undefined;
|
|
43
42
|
title?: string | undefined;
|
|
43
|
+
version?: 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
|
-
version?: string | undefined;
|
|
53
52
|
title?: string | undefined;
|
|
53
|
+
version?: 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
|
-
version?: string | undefined;
|
|
77
76
|
title?: string | undefined;
|
|
77
|
+
version?: 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
|
-
version?: string | undefined;
|
|
85
84
|
title?: string | undefined;
|
|
85
|
+
version?: 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
|
-
version?: string | undefined;
|
|
101
100
|
title?: string | undefined;
|
|
101
|
+
version?: 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
|
-
version?: string | undefined;
|
|
117
116
|
title?: string | undefined;
|
|
117
|
+
version?: 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
|
-
version?: string | undefined;
|
|
153
152
|
title?: string | undefined;
|
|
153
|
+
version?: 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
|
-
version?: string | undefined;
|
|
163
162
|
title?: string | undefined;
|
|
163
|
+
version?: 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;
|
|
172
171
|
nonce: string;
|
|
173
172
|
audience: string;
|
|
174
173
|
timestamp: number;
|
|
175
174
|
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
|
-
version?: string | undefined;
|
|
183
182
|
title?: string | undefined;
|
|
183
|
+
version?: 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;
|
|
195
194
|
nonce: string;
|
|
196
195
|
audience: string;
|
|
197
196
|
timestamp: number;
|
|
198
197
|
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
|
-
version?: string | undefined;
|
|
205
204
|
title?: string | undefined;
|
|
205
|
+
version?: string | undefined;
|
|
206
206
|
platform?: string | undefined;
|
|
207
207
|
vendor?: string | undefined;
|
|
208
208
|
persistentId?: string | undefined;
|
|
@@ -553,12 +553,12 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
553
553
|
source: z.ZodOptional<z.ZodString>;
|
|
554
554
|
}, "strip", z.ZodTypeAny, {
|
|
555
555
|
version?: string | undefined;
|
|
556
|
-
lastUpdated?: string | undefined;
|
|
557
556
|
source?: string | undefined;
|
|
557
|
+
lastUpdated?: string | undefined;
|
|
558
558
|
}, {
|
|
559
559
|
version?: string | undefined;
|
|
560
|
-
lastUpdated?: string | undefined;
|
|
561
560
|
source?: string | undefined;
|
|
561
|
+
lastUpdated?: string | undefined;
|
|
562
562
|
}>>;
|
|
563
563
|
}, "strip", z.ZodTypeAny, {
|
|
564
564
|
toolProtections: Record<string, {
|
|
@@ -588,8 +588,8 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
588
588
|
}>;
|
|
589
589
|
metadata?: {
|
|
590
590
|
version?: string | undefined;
|
|
591
|
-
lastUpdated?: string | undefined;
|
|
592
591
|
source?: string | undefined;
|
|
592
|
+
lastUpdated?: string | undefined;
|
|
593
593
|
} | undefined;
|
|
594
594
|
}, {
|
|
595
595
|
toolProtections: Record<string, {
|
|
@@ -619,8 +619,8 @@ export declare const ToolProtectionResponseSchema: z.ZodObject<{
|
|
|
619
619
|
}>;
|
|
620
620
|
metadata?: {
|
|
621
621
|
version?: string | undefined;
|
|
622
|
-
lastUpdated?: string | undefined;
|
|
623
622
|
source?: string | undefined;
|
|
623
|
+
lastUpdated?: string | undefined;
|
|
624
624
|
} | undefined;
|
|
625
625
|
}>;
|
|
626
626
|
export declare const DelegationRequiredErrorDataSchema: z.ZodObject<{
|
|
@@ -632,14 +632,14 @@ export declare const DelegationRequiredErrorDataSchema: z.ZodObject<{
|
|
|
632
632
|
}, "strip", z.ZodTypeAny, {
|
|
633
633
|
requiredScopes: string[];
|
|
634
634
|
toolName: string;
|
|
635
|
-
reason?: string | undefined;
|
|
636
635
|
authorizationUrl?: string | undefined;
|
|
636
|
+
reason?: string | undefined;
|
|
637
637
|
consentUrl?: string | undefined;
|
|
638
638
|
}, {
|
|
639
639
|
requiredScopes: string[];
|
|
640
640
|
toolName: string;
|
|
641
|
-
reason?: string | undefined;
|
|
642
641
|
authorizationUrl?: string | undefined;
|
|
642
|
+
reason?: string | undefined;
|
|
643
643
|
consentUrl?: string | undefined;
|
|
644
644
|
}>;
|
|
645
645
|
/**
|
|
@@ -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;
|
|
212
213
|
capabilities: {
|
|
213
214
|
'mcp-i': ("handshake" | "signing" | "verification" | "delegation" | "proof-generation")[];
|
|
214
215
|
} & {
|
|
215
216
|
[k: string]: string[];
|
|
216
217
|
};
|
|
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;
|
|
225
226
|
capabilities: {
|
|
226
227
|
'mcp-i': ("handshake" | "signing" | "verification" | "delegation" | "proof-generation")[];
|
|
227
228
|
} & {
|
|
228
229
|
[k: string]: string[];
|
|
229
230
|
};
|
|
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.6.
|
|
3
|
+
"version": "1.6.3-canary.0",
|
|
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",
|
|
@@ -37,6 +37,10 @@
|
|
|
37
37
|
"types": "./dist/config/index.d.ts",
|
|
38
38
|
"default": "./dist/config/index.js"
|
|
39
39
|
},
|
|
40
|
+
"./dashboard-config": {
|
|
41
|
+
"types": "./dist/dashboard-config/index.d.ts",
|
|
42
|
+
"default": "./dist/dashboard-config/index.js"
|
|
43
|
+
},
|
|
40
44
|
"./audit": {
|
|
41
45
|
"types": "./dist/audit/index.d.ts",
|
|
42
46
|
"default": "./dist/audit/index.js"
|