@kya-os/mcp-i 1.12.1 → 1.12.2

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.
@@ -107,7 +107,15 @@ async function initializeProofBatchQueue(debug) {
107
107
  console.error(`[MCPI] Added AgentShield destination: ${destConfig.apiUrl}`);
108
108
  }
109
109
  }
110
- // Add other destination types here (KTA, etc.)
110
+ else if (destConfig.type === "kta") {
111
+ destinations.push(new proof_batch_queue_1.KTAProofDestination(destConfig.apiUrl, destConfig.apiKey));
112
+ if (debug) {
113
+ console.error(`[MCPI] Added KTA destination: ${destConfig.apiUrl}`);
114
+ }
115
+ }
116
+ else {
117
+ console.warn(`[MCPI] Unsupported proof destination type "${destConfig.type}" - skipping`);
118
+ }
111
119
  }
112
120
  if (destinations.length === 0) {
113
121
  if (debug) {
@@ -713,6 +721,8 @@ async function addToolsToServer(server, toolModules, identityConfig, clientMessa
713
721
  const proof = await proofGen.generateProof(toolRequest, toolResponse, proofSession, {
714
722
  scopeId, // Pass scopeId for tool auto-discovery
715
723
  clientDid: session?.clientDid,
724
+ toolName: name,
725
+ submissionOutcome: "success",
716
726
  });
717
727
  if (identityConfig?.debug) {
718
728
  console.error(`[MCPI] Generated proof for tool "${name}" - DID: ${proof.meta.did}`);
@@ -720,7 +730,14 @@ async function addToolsToServer(server, toolModules, identityConfig, clientMessa
720
730
  // Submit proof to ProofBatchQueue (if initialized)
721
731
  if (globalProofQueue) {
722
732
  try {
723
- globalProofQueue.enqueue(proof);
733
+ globalProofQueue.enqueue({
734
+ proof,
735
+ toolName: name,
736
+ // Derive from the signed proof metadata so the
737
+ // submitted value can never diverge from what the
738
+ // server's verifier checks against the JWS payload.
739
+ outcome: proof.meta.submissionOutcome ?? "success",
740
+ });
724
741
  if (identityConfig?.debug) {
725
742
  console.error(`[MCPI] Proof enqueued for submission to AgentShield`);
726
743
  }
@@ -19,6 +19,13 @@ export declare function exampleMockIdentityProvider(): MockIdentityProvider;
19
19
  export declare function exampleProofTesting(): Promise<{
20
20
  valid: boolean;
21
21
  warnings: string[];
22
+ proof: {
23
+ valid: boolean;
24
+ structure: boolean;
25
+ timestamps: boolean;
26
+ hashes: boolean;
27
+ error?: string | undefined;
28
+ };
22
29
  session: {
23
30
  valid: boolean;
24
31
  expired: boolean;
@@ -29,13 +36,6 @@ export declare function exampleProofTesting(): Promise<{
29
36
  algorithm: string;
30
37
  error?: string | undefined;
31
38
  };
32
- proof: {
33
- valid: boolean;
34
- structure: boolean;
35
- timestamps: boolean;
36
- hashes: boolean;
37
- error?: string | undefined;
38
- };
39
39
  errors: string[];
40
40
  did?: string | undefined;
41
41
  kid?: string | undefined;
@@ -85,6 +85,13 @@ export declare function exampleCompleteTestScenario(): Promise<{
85
85
  proofResult: {
86
86
  valid: boolean;
87
87
  warnings: string[];
88
+ proof: {
89
+ valid: boolean;
90
+ structure: boolean;
91
+ timestamps: boolean;
92
+ hashes: boolean;
93
+ error?: string | undefined;
94
+ };
88
95
  session: {
89
96
  valid: boolean;
90
97
  expired: boolean;
@@ -95,13 +102,6 @@ export declare function exampleCompleteTestScenario(): Promise<{
95
102
  algorithm: string;
96
103
  error?: string | undefined;
97
104
  };
98
- proof: {
99
- valid: boolean;
100
- structure: boolean;
101
- timestamps: boolean;
102
- hashes: boolean;
103
- error?: string | undefined;
104
- };
105
105
  errors: string[];
106
106
  did?: string | undefined;
107
107
  kid?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/mcp-i",
3
- "version": "1.12.1",
3
+ "version": "1.12.2",
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.10.1",
67
- "@kya-os/mcp-i-core": "^1.9.1",
68
- "@kya-os/mcp-i-runtime": "^1.2.2",
66
+ "@kya-os/contracts": "^1.12.1",
67
+ "@kya-os/mcp-i-core": "^1.9.2",
68
+ "@kya-os/mcp-i-runtime": "^1.2.4",
69
69
  "@modelcontextprotocol/sdk": "^1.11.4",
70
70
  "@swc/core": "^1.15.11",
71
71
  "@types/express": "^5.0.6",
@@ -88,7 +88,7 @@
88
88
  "glob": "^13.0.3",
89
89
  "handlebars": "^4.7.9",
90
90
  "jose": "^5.2.0",
91
- "json-canonicalize": "^2.0.0",
91
+ "json-canonicalize": "2.0.0",
92
92
  "json5": "^2.2.3",
93
93
  "jsonwebtoken": "^9.0.3",
94
94
  "memfs": "^4.17.2",
@@ -125,7 +125,7 @@
125
125
  "node": ">=20.0.0"
126
126
  },
127
127
  "peerDependencies": {
128
- "json-canonicalize": "^2.0.0",
128
+ "json-canonicalize": "2.0.0",
129
129
  "swc-loader": "^0.2.6",
130
130
  "zod": "^3.25.76"
131
131
  },