@kya-os/mcp-i 1.12.4 → 1.13.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/README.md +9 -9
- package/dist/227.js +1 -1
- package/dist/283.js +1 -1
- package/dist/295.js +1 -1
- package/dist/317.js +1 -1
- package/dist/65.js +1 -1
- package/dist/843.js +1 -1
- package/dist/runtime/adapter-express.js +3 -3
- package/dist/runtime/adapter-nextjs.js +5 -5
- package/dist/runtime/{delegation-verifier-agentshield.d.ts → delegation-verifier-checkpoint.d.ts} +8 -13
- package/dist/runtime/{delegation-verifier-agentshield.js → delegation-verifier-checkpoint.js} +23 -103
- package/dist/runtime/delegation-verifier.d.ts +15 -7
- package/dist/runtime/delegation-verifier.js +6 -5
- package/dist/runtime/former-names.d.ts +20 -0
- package/dist/runtime/former-names.js +17 -0
- package/dist/runtime/http.js +2 -2
- package/dist/runtime/index.d.ts +4 -3
- package/dist/runtime/index.js +21 -5
- package/dist/runtime/mcpi-runtime.d.ts +7 -1
- package/dist/runtime/mcpi-runtime.js +6 -5
- package/dist/runtime/proof-batch-queue.d.ts +1 -1
- package/dist/runtime/proof-batch-queue.js +3 -3
- package/dist/runtime/stdio.js +3 -3
- package/dist/runtime/tool-protection.d.ts +7 -1
- package/dist/runtime/tool-protection.js +7 -6
- package/dist/runtime/utils/tools.js +3 -3
- package/package.json +3 -3
|
@@ -64,7 +64,7 @@ export declare class FileToolProtectionSource implements ToolProtectionConfigSou
|
|
|
64
64
|
* Checkpoint API configuration source (lowest priority)
|
|
65
65
|
* NOTE: This is a placeholder for future implementation
|
|
66
66
|
*/
|
|
67
|
-
export declare class
|
|
67
|
+
export declare class CheckpointToolProtectionSource implements ToolProtectionConfigSource {
|
|
68
68
|
private apiUrl;
|
|
69
69
|
private agentDid;
|
|
70
70
|
private apiKey?;
|
|
@@ -113,6 +113,12 @@ export declare function createToolProtectionResolver(options: {
|
|
|
113
113
|
/** Local file path (default: tool-protections.json) */
|
|
114
114
|
localFile?: string | false;
|
|
115
115
|
/** Checkpoint API configuration */
|
|
116
|
+
checkpoint?: {
|
|
117
|
+
apiUrl: string;
|
|
118
|
+
agentDid: string;
|
|
119
|
+
apiKey?: string;
|
|
120
|
+
};
|
|
121
|
+
/** @deprecated Use `checkpoint`; read only when `checkpoint` is absent. */
|
|
116
122
|
agentShield?: {
|
|
117
123
|
apiUrl: string;
|
|
118
124
|
agentDid: string;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* 3. Checkpoint API - for production (NOT IMPLEMENTED YET)
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.ToolProtectionResolver = exports.
|
|
14
|
+
exports.ToolProtectionResolver = exports.CheckpointToolProtectionSource = exports.FileToolProtectionSource = exports.InlineToolProtectionSource = void 0;
|
|
15
15
|
exports.createToolProtectionResolver = createToolProtectionResolver;
|
|
16
16
|
/**
|
|
17
17
|
* Inline configuration source (highest priority)
|
|
@@ -68,11 +68,11 @@ exports.FileToolProtectionSource = FileToolProtectionSource;
|
|
|
68
68
|
* Checkpoint API configuration source (lowest priority)
|
|
69
69
|
* NOTE: This is a placeholder for future implementation
|
|
70
70
|
*/
|
|
71
|
-
class
|
|
71
|
+
class CheckpointToolProtectionSource {
|
|
72
72
|
apiUrl;
|
|
73
73
|
agentDid;
|
|
74
74
|
apiKey;
|
|
75
|
-
name = '
|
|
75
|
+
name = 'checkpoint';
|
|
76
76
|
priority = 10;
|
|
77
77
|
constructor(apiUrl, agentDid, apiKey) {
|
|
78
78
|
this.apiUrl = apiUrl;
|
|
@@ -87,7 +87,7 @@ class AgentShieldToolProtectionSource {
|
|
|
87
87
|
return null;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
exports.
|
|
90
|
+
exports.CheckpointToolProtectionSource = CheckpointToolProtectionSource;
|
|
91
91
|
/**
|
|
92
92
|
* Tool protection resolver - merges configs from multiple sources
|
|
93
93
|
*/
|
|
@@ -185,8 +185,9 @@ function createToolProtectionResolver(options) {
|
|
|
185
185
|
resolver.addSource(new FileToolProtectionSource(filePath));
|
|
186
186
|
}
|
|
187
187
|
// Add Checkpoint source if configured
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
const checkpoint = options.checkpoint ?? options.agentShield;
|
|
189
|
+
if (checkpoint) {
|
|
190
|
+
resolver.addSource(new CheckpointToolProtectionSource(checkpoint.apiUrl, checkpoint.agentDid, checkpoint.apiKey));
|
|
190
191
|
}
|
|
191
192
|
return resolver;
|
|
192
193
|
}
|
|
@@ -101,8 +101,8 @@ async function initializeProofBatchQueue(debug) {
|
|
|
101
101
|
// Create proof destinations
|
|
102
102
|
const destinations = [];
|
|
103
103
|
for (const destConfig of proofingConfig.batchQueue.destinations) {
|
|
104
|
-
if (destConfig.type === "agentshield") {
|
|
105
|
-
destinations.push(new proof_batch_queue_1.
|
|
104
|
+
if (destConfig.type === "checkpoint" || destConfig.type === "agentshield") {
|
|
105
|
+
destinations.push(new proof_batch_queue_1.CheckpointProofDestination(destConfig.apiUrl, destConfig.apiKey));
|
|
106
106
|
if (debug) {
|
|
107
107
|
console.error(`[MCPI] Added Checkpoint destination: ${destConfig.apiUrl}`);
|
|
108
108
|
}
|
|
@@ -480,7 +480,7 @@ async function addToolsToServer(server, toolModules, identityConfig, clientMessa
|
|
|
480
480
|
`1. Configure a delegation verifier:\n` +
|
|
481
481
|
` - MemoryDelegationVerifier (development/testing)\n` +
|
|
482
482
|
` - KVDelegationVerifier (production with KV store)\n` +
|
|
483
|
-
` -
|
|
483
|
+
` - CheckpointVerifier (production with Checkpoint service)\n\n` +
|
|
484
484
|
`2. Enable delegation in your runtime config:\n` +
|
|
485
485
|
` const runtime = new MCPIRuntime({\n` +
|
|
486
486
|
` delegation: { enabled: true },\n` +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/mcp-i",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "The TypeScript MCP framework with identity features built-in",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"model-context-protocol"
|
|
64
64
|
],
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@kya-os/contracts": "^1.
|
|
66
|
+
"@kya-os/contracts": "^1.13.0",
|
|
67
67
|
"@kya-os/mcp-i-core": "^1.9.2",
|
|
68
|
-
"@kya-os/mcp-i-runtime": "^1.
|
|
68
|
+
"@kya-os/mcp-i-runtime": "^1.3.0",
|
|
69
69
|
"@modelcontextprotocol/sdk": "^1.11.4",
|
|
70
70
|
"@swc/core": "^1.15.11",
|
|
71
71
|
"@types/express": "^5.0.6",
|