@enactprotocol/mcp-server 1.2.1 → 1.2.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.
- package/dist/index.js +2 -13
- package/dist/index.js.bak +2 -13
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -238908,7 +238908,6 @@ class EnactCore {
|
|
|
238908
238908
|
}
|
|
238909
238909
|
}
|
|
238910
238910
|
async verifyTool(tool, dangerouslySkipVerification = false) {
|
|
238911
|
-
console.log("=== VERIFY TOOL CALLED ===", tool.name, "skipVerification:", dangerouslySkipVerification);
|
|
238912
238911
|
if (dangerouslySkipVerification) {
|
|
238913
238912
|
logger_default.warn(`Skipping signature verification for tool: ${tool.name}`);
|
|
238914
238913
|
return;
|
|
@@ -238917,32 +238916,22 @@ class EnactCore {
|
|
|
238917
238916
|
if (!tool.signatures || tool.signatures.length === 0) {
|
|
238918
238917
|
throw new Error(`Tool ${tool.name} does not have any signatures`);
|
|
238919
238918
|
}
|
|
238920
|
-
console.log("=== TOOL SIGNATURE DATA ===");
|
|
238921
|
-
console.log("Tool signatures from database:", JSON.stringify(tool.signatures, null, 2));
|
|
238922
|
-
console.log("Tool command:", tool.command);
|
|
238923
238919
|
const documentForVerification = {
|
|
238924
238920
|
command: tool.command
|
|
238925
238921
|
};
|
|
238926
238922
|
const referenceSignature = {
|
|
238927
238923
|
signature: tool.signatures[0].value,
|
|
238928
|
-
publicKey:
|
|
238924
|
+
publicKey: tool.signatures[0].signer,
|
|
238929
238925
|
algorithm: tool.signatures[0].algorithm,
|
|
238930
238926
|
timestamp: new Date(tool.signatures[0].created).getTime()
|
|
238931
238927
|
};
|
|
238932
238928
|
const canonicalDoc = SigningService.getCanonicalDocument(documentForVerification, { includeFields: ["command"] });
|
|
238933
|
-
console.log("=== SIGNATURE VERIFICATION DEBUG ===");
|
|
238934
|
-
console.log("Original document for verification:", JSON.stringify(documentForVerification, null, 2));
|
|
238935
|
-
console.log("Canonical document:", JSON.stringify(canonicalDoc, null, 2));
|
|
238936
238929
|
const docString = JSON.stringify(canonicalDoc);
|
|
238937
238930
|
const messageHash = CryptoUtils.hash(docString);
|
|
238938
|
-
console.log("Document string:", docString);
|
|
238939
|
-
console.log("Message hash:", messageHash);
|
|
238940
|
-
console.log("Reference signature object:", JSON.stringify(referenceSignature, null, 2));
|
|
238941
238931
|
const directVerify = CryptoUtils.verify(referenceSignature.publicKey, messageHash, referenceSignature.signature);
|
|
238942
|
-
console.log("
|
|
238932
|
+
console.log("Direct crypto verification result:", directVerify);
|
|
238943
238933
|
const trustedKeys = KeyManager.getAllTrustedPublicKeys();
|
|
238944
238934
|
console.log("Trusted keys:", trustedKeys);
|
|
238945
|
-
console.log("Our referenceSignature.publicKey:", JSON.stringify(referenceSignature.publicKey));
|
|
238946
238935
|
console.log("Is our public key trusted?", trustedKeys.includes(referenceSignature.publicKey));
|
|
238947
238936
|
const isValid2 = SigningService.verifyDocument(documentForVerification, referenceSignature, { includeFields: ["command"] });
|
|
238948
238937
|
console.log("Final verification result:", isValid2);
|
package/dist/index.js.bak
CHANGED
|
@@ -238907,7 +238907,6 @@ class EnactCore {
|
|
|
238907
238907
|
}
|
|
238908
238908
|
}
|
|
238909
238909
|
async verifyTool(tool, dangerouslySkipVerification = false) {
|
|
238910
|
-
console.log("=== VERIFY TOOL CALLED ===", tool.name, "skipVerification:", dangerouslySkipVerification);
|
|
238911
238910
|
if (dangerouslySkipVerification) {
|
|
238912
238911
|
logger_default.warn(`Skipping signature verification for tool: ${tool.name}`);
|
|
238913
238912
|
return;
|
|
@@ -238916,32 +238915,22 @@ class EnactCore {
|
|
|
238916
238915
|
if (!tool.signatures || tool.signatures.length === 0) {
|
|
238917
238916
|
throw new Error(`Tool ${tool.name} does not have any signatures`);
|
|
238918
238917
|
}
|
|
238919
|
-
console.log("=== TOOL SIGNATURE DATA ===");
|
|
238920
|
-
console.log("Tool signatures from database:", JSON.stringify(tool.signatures, null, 2));
|
|
238921
|
-
console.log("Tool command:", tool.command);
|
|
238922
238918
|
const documentForVerification = {
|
|
238923
238919
|
command: tool.command
|
|
238924
238920
|
};
|
|
238925
238921
|
const referenceSignature = {
|
|
238926
238922
|
signature: tool.signatures[0].value,
|
|
238927
|
-
publicKey:
|
|
238923
|
+
publicKey: tool.signatures[0].signer,
|
|
238928
238924
|
algorithm: tool.signatures[0].algorithm,
|
|
238929
238925
|
timestamp: new Date(tool.signatures[0].created).getTime()
|
|
238930
238926
|
};
|
|
238931
238927
|
const canonicalDoc = SigningService.getCanonicalDocument(documentForVerification, { includeFields: ["command"] });
|
|
238932
|
-
console.log("=== SIGNATURE VERIFICATION DEBUG ===");
|
|
238933
|
-
console.log("Original document for verification:", JSON.stringify(documentForVerification, null, 2));
|
|
238934
|
-
console.log("Canonical document:", JSON.stringify(canonicalDoc, null, 2));
|
|
238935
238928
|
const docString = JSON.stringify(canonicalDoc);
|
|
238936
238929
|
const messageHash = CryptoUtils.hash(docString);
|
|
238937
|
-
console.log("Document string:", docString);
|
|
238938
|
-
console.log("Message hash:", messageHash);
|
|
238939
|
-
console.log("Reference signature object:", JSON.stringify(referenceSignature, null, 2));
|
|
238940
238930
|
const directVerify = CryptoUtils.verify(referenceSignature.publicKey, messageHash, referenceSignature.signature);
|
|
238941
|
-
console.log("
|
|
238931
|
+
console.log("Direct crypto verification result:", directVerify);
|
|
238942
238932
|
const trustedKeys = KeyManager.getAllTrustedPublicKeys();
|
|
238943
238933
|
console.log("Trusted keys:", trustedKeys);
|
|
238944
|
-
console.log("Our referenceSignature.publicKey:", JSON.stringify(referenceSignature.publicKey));
|
|
238945
238934
|
console.log("Is our public key trusted?", trustedKeys.includes(referenceSignature.publicKey));
|
|
238946
238935
|
const isValid2 = SigningService.verifyDocument(documentForVerification, referenceSignature, { includeFields: ["command"] });
|
|
238947
238936
|
console.log("Final verification result:", isValid2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enactprotocol/mcp-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "MCP server for the Enact Protocol - enables AI tools integration via Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"node": ">=18.0.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@enactprotocol/shared": "1.2.
|
|
44
|
+
"@enactprotocol/shared": "1.2.2",
|
|
45
45
|
"@modelcontextprotocol/sdk": "^1.13.0",
|
|
46
46
|
"zod": "^3.25.67"
|
|
47
47
|
},
|