@fancyboi999/open-tag-daemon 0.8.0 → 0.8.1
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/cli.mjs +19 -2
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -4419,8 +4419,15 @@ var codexRuntime = {
|
|
|
4419
4419
|
const proc = spawn2("codex", ["app-server", "--listen", "stdio://"], { cwd: opts.cwd, stdio: ["pipe", "pipe", "pipe"], env: opts.env });
|
|
4420
4420
|
const client = new CodexClient(proc, cb);
|
|
4421
4421
|
let ready = false;
|
|
4422
|
+
let spawnFailed = false;
|
|
4423
|
+
let reportedExit = false;
|
|
4422
4424
|
const queue = [];
|
|
4423
4425
|
let turnBusy = false;
|
|
4426
|
+
function reportExit(code) {
|
|
4427
|
+
if (reportedExit) return;
|
|
4428
|
+
reportedExit = true;
|
|
4429
|
+
cb.onExit(code);
|
|
4430
|
+
}
|
|
4424
4431
|
client.onTurnDone = () => {
|
|
4425
4432
|
turnBusy = false;
|
|
4426
4433
|
pump();
|
|
@@ -4431,6 +4438,7 @@ var codexRuntime = {
|
|
|
4431
4438
|
turnBusy = true;
|
|
4432
4439
|
cb.onActivity("working", "turn");
|
|
4433
4440
|
client.request("turn/start", turnParams(opts, client.threadId, text)).catch((e) => {
|
|
4441
|
+
if (spawnFailed) return;
|
|
4434
4442
|
cb.log.warn("codex turn/start failed", { detail: String(e?.message ?? e) });
|
|
4435
4443
|
turnBusy = false;
|
|
4436
4444
|
pump();
|
|
@@ -4466,6 +4474,7 @@ var codexRuntime = {
|
|
|
4466
4474
|
queue.push(opts.initialPrompt);
|
|
4467
4475
|
pump();
|
|
4468
4476
|
} catch (e) {
|
|
4477
|
+
if (spawnFailed) return;
|
|
4469
4478
|
cb.log.error("codex init failed", { detail: String(e?.message ?? e) });
|
|
4470
4479
|
cb.onActivity("offline", "codex init failed");
|
|
4471
4480
|
}
|
|
@@ -4474,9 +4483,17 @@ var codexRuntime = {
|
|
|
4474
4483
|
const t = c.toString().trim();
|
|
4475
4484
|
if (t) cb.log.debug("codex stderr", { t: t.slice(0, 300) });
|
|
4476
4485
|
});
|
|
4486
|
+
proc.on("error", (e) => {
|
|
4487
|
+
spawnFailed = true;
|
|
4488
|
+
const detail = e.code === "ENOENT" ? "codex not found" : "codex spawn failed";
|
|
4489
|
+
client.closeAllPending(new Error(detail));
|
|
4490
|
+
cb.log.error("codex spawn failed", { detail: String(e?.message ?? e), code: e.code ?? "" });
|
|
4491
|
+
cb.onActivity("offline", detail);
|
|
4492
|
+
reportExit(1);
|
|
4493
|
+
});
|
|
4477
4494
|
proc.on("exit", (code) => {
|
|
4478
4495
|
client.closeAllPending(new Error("codex exited"));
|
|
4479
|
-
|
|
4496
|
+
reportExit(code);
|
|
4480
4497
|
});
|
|
4481
4498
|
return { deliver: (text) => {
|
|
4482
4499
|
queue.push(text);
|
|
@@ -6436,7 +6453,7 @@ conn = new Connection(serverUrl, apiKey, (msg) => {
|
|
|
6436
6453
|
runningAgents: mgr.running(),
|
|
6437
6454
|
hostname: os4.hostname(),
|
|
6438
6455
|
os: `${os4.platform()} ${os4.arch()}`,
|
|
6439
|
-
daemonVersion: "0.8.
|
|
6456
|
+
daemonVersion: "0.8.1",
|
|
6440
6457
|
machineId: readMachineId()
|
|
6441
6458
|
// Stable identity: empty on first connection; server sends it back via ready:ack for persistence.
|
|
6442
6459
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fancyboi999/open-tag-daemon",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "open-tag compute-plane daemon — connect any machine to an open-tag server so its agents run there. No repo clone needed.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|