muxed 0.2.1 → 0.2.3
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/README.md +76 -262
- package/dist/cli.mjs +976 -239
- package/dist/client/index.d.mts +1 -0
- package/dist/client/index.mjs +20 -1
- package/package.json +17 -7
package/dist/client/index.d.mts
CHANGED
package/dist/client/index.mjs
CHANGED
|
@@ -220,16 +220,32 @@ async function ensureDaemon(configPath) {
|
|
|
220
220
|
400
|
|
221
221
|
]);
|
|
222
222
|
}
|
|
223
|
-
async function sendRequest(method, params) {
|
|
223
|
+
async function sendRequest(method, params, timeout = 9e4) {
|
|
224
224
|
const socketPath = getSocketPath();
|
|
225
225
|
return new Promise((resolve, reject) => {
|
|
226
226
|
const socket = net.createConnection(socketPath);
|
|
227
227
|
let buffer = "";
|
|
228
|
+
let settled = false;
|
|
229
|
+
const timer = setTimeout(() => {
|
|
230
|
+
if (settled) return;
|
|
231
|
+
settled = true;
|
|
232
|
+
socket.destroy();
|
|
233
|
+
reject(/* @__PURE__ */ new Error(`Request timed out after ${timeout}ms`));
|
|
234
|
+
}, timeout);
|
|
228
235
|
socket.on("error", (err) => {
|
|
236
|
+
if (settled) return;
|
|
237
|
+
settled = true;
|
|
238
|
+
clearTimeout(timer);
|
|
229
239
|
if (err.code === "ENOENT") reject(/* @__PURE__ */ new Error("Daemon is not running. Run `muxed status` to check."));
|
|
230
240
|
else if (err.code === "ECONNREFUSED") reject(/* @__PURE__ */ new Error("Daemon may have crashed. Try running a command to auto-restart it."));
|
|
231
241
|
else reject(err);
|
|
232
242
|
});
|
|
243
|
+
socket.on("close", () => {
|
|
244
|
+
if (settled) return;
|
|
245
|
+
settled = true;
|
|
246
|
+
clearTimeout(timer);
|
|
247
|
+
reject(/* @__PURE__ */ new Error("Daemon closed the connection before sending a response"));
|
|
248
|
+
});
|
|
233
249
|
socket.on("connect", () => {
|
|
234
250
|
const request = {
|
|
235
251
|
jsonrpc: "2.0",
|
|
@@ -243,6 +259,9 @@ async function sendRequest(method, params) {
|
|
|
243
259
|
buffer += data.toString();
|
|
244
260
|
const newlineIndex = buffer.indexOf("\n");
|
|
245
261
|
if (newlineIndex === -1) return;
|
|
262
|
+
if (settled) return;
|
|
263
|
+
settled = true;
|
|
264
|
+
clearTimeout(timer);
|
|
246
265
|
const line = buffer.slice(0, newlineIndex).trim();
|
|
247
266
|
socket.destroy();
|
|
248
267
|
try {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muxed",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "MCP
|
|
3
|
+
"version": "0.2.3",
|
|
4
|
+
"description": "MCP tools don't belong in your model's context window. Offload them to a CLI – agents call tools through shell commands and scripts instead of loading schemas into context.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
],
|
|
46
46
|
"repository": {
|
|
47
47
|
"type": "git",
|
|
48
|
-
"url": "https://github.com/
|
|
48
|
+
"url": "https://github.com/muxedai/muxed.git",
|
|
49
49
|
"directory": "packages/muxed"
|
|
50
50
|
},
|
|
51
|
-
"homepage": "https://github.com/
|
|
51
|
+
"homepage": "https://github.com/muxedai/muxed#readme",
|
|
52
52
|
"bugs": {
|
|
53
|
-
"url": "https://github.com/
|
|
53
|
+
"url": "https://github.com/muxedai/muxed/issues"
|
|
54
54
|
},
|
|
55
55
|
"author": "Georgiy Tarasov",
|
|
56
56
|
"license": "MIT",
|
|
@@ -59,9 +59,12 @@
|
|
|
59
59
|
"dev": "node src/cli.ts",
|
|
60
60
|
"format": "prettier --write 'src/**/*.ts'",
|
|
61
61
|
"format:check": "prettier --check 'src/**/*.ts'",
|
|
62
|
-
"
|
|
62
|
+
"release": "tsc --noEmit && prettier --check 'src/**/*.ts' && pnpm build && cp ../../README.md . && npm publish",
|
|
63
63
|
"test": "vitest",
|
|
64
|
-
"type-check": "tsc --noEmit"
|
|
64
|
+
"type-check": "tsc --noEmit",
|
|
65
|
+
"eval": "npx braintrust eval evals/cases/**/eval.ts",
|
|
66
|
+
"eval:skill-priority": "npx braintrust eval evals/cases/skill-priority/eval.ts",
|
|
67
|
+
"eval:tool-accuracy": "npx braintrust eval evals/cases/tool-accuracy/eval.ts"
|
|
65
68
|
},
|
|
66
69
|
"dependencies": {
|
|
67
70
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
@@ -72,9 +75,16 @@
|
|
|
72
75
|
},
|
|
73
76
|
"devDependencies": {
|
|
74
77
|
"@modelcontextprotocol/server-everything": "^2026.1.26",
|
|
78
|
+
"@types/dockerode": "^3.3.0",
|
|
79
|
+
"@types/js-yaml": "^4.0.0",
|
|
75
80
|
"@types/node": "^22.0.0",
|
|
81
|
+
"autoevals": "^0.0.132",
|
|
82
|
+
"braintrust": "^3.7.1",
|
|
83
|
+
"dockerode": "^4.0.10",
|
|
84
|
+
"js-yaml": "^4.1.0",
|
|
76
85
|
"obuild": "^0.4.22",
|
|
77
86
|
"prettier": "^3.8.1",
|
|
87
|
+
"tinyrainbow": "^2.0.0",
|
|
78
88
|
"typescript": "^5.9.3",
|
|
79
89
|
"vitest": "^4.0.17"
|
|
80
90
|
}
|