@elsium-ai/mcp 0.10.0 → 0.11.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/dist/index.js +17 -17
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1021,26 +1021,26 @@ function computeManifestHash(tools) {
|
|
|
1021
1021
|
const content = tools.map((t) => `${t.name}:${t.inputSchemaHash}`).join("|");
|
|
1022
1022
|
return createHash("sha256").update(content).digest("hex");
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1025
|
-
if (
|
|
1026
|
-
return
|
|
1027
|
-
|
|
1028
|
-
|
|
1024
|
+
function matchesServer(config, s) {
|
|
1025
|
+
if (s.name !== config.name)
|
|
1026
|
+
return false;
|
|
1027
|
+
if (s.transport !== config.transport)
|
|
1028
|
+
return false;
|
|
1029
|
+
if (config.transport === "http" && s.urlPattern) {
|
|
1030
|
+
if (!new RegExp(s.urlPattern).test(config.url))
|
|
1029
1031
|
return false;
|
|
1030
|
-
|
|
1032
|
+
}
|
|
1033
|
+
if (config.transport === "stdio" && s.commandHash) {
|
|
1034
|
+
const cmdHash = createHash("sha256").update(`${config.command}:${(config.args ?? []).join(":")}`).digest("hex");
|
|
1035
|
+
if (cmdHash !== s.commandHash)
|
|
1031
1036
|
return false;
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
if (config.transport === "stdio" && s.commandHash) {
|
|
1038
|
-
const cmdHash = createHash("sha256").update(`${config.command}:${(config.args ?? []).join(":")}`).digest("hex");
|
|
1039
|
-
if (cmdHash !== s.commandHash)
|
|
1040
|
-
return false;
|
|
1041
|
-
}
|
|
1037
|
+
}
|
|
1038
|
+
return true;
|
|
1039
|
+
}
|
|
1040
|
+
function isServerAllowed(config, trust) {
|
|
1041
|
+
if (!trust.allowedServers?.length)
|
|
1042
1042
|
return true;
|
|
1043
|
-
|
|
1043
|
+
return trust.allowedServers.some((s) => matchesServer(config, s));
|
|
1044
1044
|
}
|
|
1045
1045
|
function isToolAllowed(toolName, serverName, trust) {
|
|
1046
1046
|
if (!trust.allowedServers?.length)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elsium-ai/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Model Context Protocol (MCP) support for ElsiumAI — bidirectional bridge",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Eric Utrera <ebutrera9103@gmail.com>",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"dev": "bun --watch src/index.ts"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@elsium-ai/core": "^0.
|
|
30
|
-
"@elsium-ai/tools": "^0.
|
|
29
|
+
"@elsium-ai/core": "^0.11.0",
|
|
30
|
+
"@elsium-ai/tools": "^0.11.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"typescript": "^5.7.0"
|