@kya-os/contracts 1.6.3 → 1.6.5
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/audit/index.d.ts +4 -4
- package/dist/config/identity.d.ts +477 -6
- package/dist/config/identity.js +68 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +6 -1
- package/dist/config/tool-context.d.ts +14 -2
- 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/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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/contracts",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
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"
|