@bendyline/gezel-mcp 1.2.4 → 1.2.5
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.d.ts +11 -2
- package/dist/index.js +5 -0
- package/dist/server.js +1879 -1623
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -92,9 +92,17 @@ declare const SCRIPT_NETWORK_ALLOWED_ENV = "GEZEL_SCRIPT_NETWORK_ALLOWED";
|
|
|
92
92
|
* applies RestrictAddressFamilies and rejects an AF_INET socket.
|
|
93
93
|
*/
|
|
94
94
|
declare function canUseLinuxSystemdDenyNet(): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Set to `windows-mxc` on the MCP child when the service's own executable
|
|
97
|
+
* probe found a working Windows process container. The service decides once,
|
|
98
|
+
* asynchronously; this child only reads the answer, so registering tools never
|
|
99
|
+
* starts a container on anyone's event loop.
|
|
100
|
+
*/
|
|
101
|
+
declare const SCRIPT_DENY_NET_BOUNDARY_ENV = "GEZEL_SCRIPT_DENY_NET_BOUNDARY";
|
|
95
102
|
/**
|
|
96
103
|
* The deny-net tools this host cannot offer. Without an enforceable network
|
|
97
|
-
* boundary (Windows; Linux without the probed
|
|
104
|
+
* boundary (Windows without a probed MXC container; Linux without the probed
|
|
105
|
+
* systemd manager) they are
|
|
98
106
|
* withheld — unless `networkAllowed`: when the policy already lets gezellen
|
|
99
107
|
* reach the network, the boundary has nothing left to protect, and the
|
|
100
108
|
* service runs these scripts without it. Where a boundary exists it is always
|
|
@@ -102,7 +110,8 @@ declare function canUseLinuxSystemdDenyNet(): boolean;
|
|
|
102
110
|
*/
|
|
103
111
|
declare function unavailableToolsForPlatform(platform: NodeJS.Platform, options?: {
|
|
104
112
|
linuxSystemdAvailable?: boolean;
|
|
113
|
+
windowsMxcAvailable?: boolean;
|
|
105
114
|
networkAllowed?: boolean;
|
|
106
115
|
}): readonly string[];
|
|
107
116
|
|
|
108
|
-
export { type FileContent, SCRIPT_NETWORK_ALLOWED_ENV, type ValidateCheck, type ValidateResult, canUseLinuxSystemdDenyNet, formatValidateResult, unavailableToolsForPlatform, validateFile };
|
|
117
|
+
export { type FileContent, SCRIPT_DENY_NET_BOUNDARY_ENV, SCRIPT_NETWORK_ALLOWED_ENV, type ValidateCheck, type ValidateResult, canUseLinuxSystemdDenyNet, formatValidateResult, unavailableToolsForPlatform, validateFile };
|
package/dist/index.js
CHANGED
|
@@ -644,11 +644,15 @@ function canUseLinuxSystemdDenyNet() {
|
|
|
644
644
|
linuxSystemdProbe = result.status === 0;
|
|
645
645
|
return linuxSystemdProbe;
|
|
646
646
|
}
|
|
647
|
+
var SCRIPT_DENY_NET_BOUNDARY_ENV = "GEZEL_SCRIPT_DENY_NET_BOUNDARY";
|
|
647
648
|
function unavailableToolsForPlatform(platform, options = {}) {
|
|
648
649
|
if (platform === "darwin") return [];
|
|
649
650
|
if (platform === "linux" && (options.linuxSystemdAvailable ?? canUseLinuxSystemdDenyNet())) {
|
|
650
651
|
return [];
|
|
651
652
|
}
|
|
653
|
+
if (platform === "win32" && (options.windowsMxcAvailable ?? process.env[SCRIPT_DENY_NET_BOUNDARY_ENV] === "windows-mxc")) {
|
|
654
|
+
return [];
|
|
655
|
+
}
|
|
652
656
|
if (options.networkAllowed) return [];
|
|
653
657
|
return DENY_NET_TOOLS;
|
|
654
658
|
}
|
|
@@ -666,6 +670,7 @@ export {
|
|
|
666
670
|
LEGACY_TOOL_NAMES,
|
|
667
671
|
RENAMED_TOOLS,
|
|
668
672
|
RESERVED_TOOL_NAMES,
|
|
673
|
+
SCRIPT_DENY_NET_BOUNDARY_ENV,
|
|
669
674
|
SCRIPT_NETWORK_ALLOWED_ENV,
|
|
670
675
|
TOOL_NAME_TOMBSTONES,
|
|
671
676
|
TOOL_REGISTRY,
|