@enactprotocol/cli 1.2.5 → 1.2.6
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 +6 -3
- package/dist/index.js.bak +6 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -229716,7 +229716,10 @@ class EnactCore {
|
|
|
229716
229716
|
throw new Error(`Tool ${tool.name} does not have any signatures`);
|
|
229717
229717
|
}
|
|
229718
229718
|
const documentForVerification = {
|
|
229719
|
-
command: tool.command
|
|
229719
|
+
command: tool.command,
|
|
229720
|
+
description: tool.description,
|
|
229721
|
+
from: tool.from,
|
|
229722
|
+
name: tool.name
|
|
229720
229723
|
};
|
|
229721
229724
|
const referenceSignature = {
|
|
229722
229725
|
signature: tool.signatures[0].value,
|
|
@@ -229724,11 +229727,11 @@ class EnactCore {
|
|
|
229724
229727
|
algorithm: tool.signatures[0].algorithm,
|
|
229725
229728
|
timestamp: new Date(tool.signatures[0].created).getTime()
|
|
229726
229729
|
};
|
|
229727
|
-
const canonicalDoc = SigningService.getCanonicalDocument(documentForVerification, { includeFields: ["command"] });
|
|
229730
|
+
const canonicalDoc = SigningService.getCanonicalDocument(documentForVerification, { includeFields: ["command", "description", "from", "name"] });
|
|
229728
229731
|
const docString = JSON.stringify(canonicalDoc);
|
|
229729
229732
|
const messageHash = CryptoUtils.hash(docString);
|
|
229730
229733
|
const directVerify = CryptoUtils.verify(referenceSignature.publicKey, messageHash, referenceSignature.signature);
|
|
229731
|
-
const isValid = SigningService.verifyDocument(documentForVerification, referenceSignature, { includeFields: ["command"] });
|
|
229734
|
+
const isValid = SigningService.verifyDocument(documentForVerification, referenceSignature, { includeFields: ["command", "description", "from", "name"] });
|
|
229732
229735
|
if (!isValid) {
|
|
229733
229736
|
throw new Error(`Tool ${tool.name} has invalid signatures`);
|
|
229734
229737
|
}
|
package/dist/index.js.bak
CHANGED
|
@@ -229715,7 +229715,10 @@ class EnactCore {
|
|
|
229715
229715
|
throw new Error(`Tool ${tool.name} does not have any signatures`);
|
|
229716
229716
|
}
|
|
229717
229717
|
const documentForVerification = {
|
|
229718
|
-
command: tool.command
|
|
229718
|
+
command: tool.command,
|
|
229719
|
+
description: tool.description,
|
|
229720
|
+
from: tool.from,
|
|
229721
|
+
name: tool.name
|
|
229719
229722
|
};
|
|
229720
229723
|
const referenceSignature = {
|
|
229721
229724
|
signature: tool.signatures[0].value,
|
|
@@ -229723,11 +229726,11 @@ class EnactCore {
|
|
|
229723
229726
|
algorithm: tool.signatures[0].algorithm,
|
|
229724
229727
|
timestamp: new Date(tool.signatures[0].created).getTime()
|
|
229725
229728
|
};
|
|
229726
|
-
const canonicalDoc = SigningService.getCanonicalDocument(documentForVerification, { includeFields: ["command"] });
|
|
229729
|
+
const canonicalDoc = SigningService.getCanonicalDocument(documentForVerification, { includeFields: ["command", "description", "from", "name"] });
|
|
229727
229730
|
const docString = JSON.stringify(canonicalDoc);
|
|
229728
229731
|
const messageHash = CryptoUtils.hash(docString);
|
|
229729
229732
|
const directVerify = CryptoUtils.verify(referenceSignature.publicKey, messageHash, referenceSignature.signature);
|
|
229730
|
-
const isValid = SigningService.verifyDocument(documentForVerification, referenceSignature, { includeFields: ["command"] });
|
|
229733
|
+
const isValid = SigningService.verifyDocument(documentForVerification, referenceSignature, { includeFields: ["command", "description", "from", "name"] });
|
|
229731
229734
|
if (!isValid) {
|
|
229732
229735
|
throw new Error(`Tool ${tool.name} has invalid signatures`);
|
|
229733
229736
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enactprotocol/cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "Official CLI for the Enact Protocol - package, secure, and discover AI tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"node": ">=18.0.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@enactprotocol/shared": "1.2.
|
|
45
|
+
"@enactprotocol/shared": "1.2.6",
|
|
46
46
|
"@clack/core": "^0.4.2",
|
|
47
47
|
"@clack/prompts": "^0.10.1",
|
|
48
48
|
"picocolors": "^1.1.1"
|