@agentconnect.md/daemon 1.41.0-rc.223 → 1.41.0-rc.224
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.
|
@@ -13835,6 +13835,8 @@ var IpcClient = class {
|
|
|
13835
13835
|
pending = /* @__PURE__ */ new Map();
|
|
13836
13836
|
buf = "";
|
|
13837
13837
|
ready;
|
|
13838
|
+
/** Installed once the bridge serves stdio; a closed control socket then ends the process. */
|
|
13839
|
+
onClose;
|
|
13838
13840
|
constructor(endpoint, token) {
|
|
13839
13841
|
this.token = token;
|
|
13840
13842
|
this.socket = net.connect(endpoint);
|
|
@@ -13858,6 +13860,7 @@ var IpcClient = class {
|
|
|
13858
13860
|
this.socket.on("close", () => {
|
|
13859
13861
|
for (const p of this.pending.values()) p.reject(/* @__PURE__ */ new Error("daemon connection closed"));
|
|
13860
13862
|
this.pending.clear();
|
|
13863
|
+
this.onClose?.();
|
|
13861
13864
|
});
|
|
13862
13865
|
}
|
|
13863
13866
|
async request(call) {
|
|
@@ -13941,9 +13944,16 @@ async function runBridge(opts = {}) {
|
|
|
13941
13944
|
};
|
|
13942
13945
|
}
|
|
13943
13946
|
});
|
|
13947
|
+
ipc.onClose = () => {
|
|
13948
|
+
process.stderr.write("mcp-bridge: daemon control socket closed, exiting\n");
|
|
13949
|
+
process.exit(1);
|
|
13950
|
+
};
|
|
13951
|
+
const exitWhenHarnessGone = () => process.exit(0);
|
|
13952
|
+
process.stdin.on("end", exitWhenHarnessGone);
|
|
13953
|
+
process.stdin.on("close", exitWhenHarnessGone);
|
|
13944
13954
|
await server.connect(new StdioServerTransport());
|
|
13945
13955
|
}
|
|
13946
13956
|
//#endregion
|
|
13947
13957
|
export { runBridge };
|
|
13948
13958
|
|
|
13949
|
-
//# sourceMappingURL=bridge-
|
|
13959
|
+
//# sourceMappingURL=bridge-BX8_2M8S.js.map
|