@clawos-dev/clawd 0.2.449 → 0.2.451
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.cjs +41 -37
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -45478,6 +45478,44 @@ function clearQueuedSends(next, effects) {
|
|
|
45478
45478
|
next.queuedSends = [];
|
|
45479
45479
|
effects.push(queueFrame(next));
|
|
45480
45480
|
}
|
|
45481
|
+
function ensureDeliverable(next, deps) {
|
|
45482
|
+
const effects = [];
|
|
45483
|
+
const sessionId = next.file.sessionId;
|
|
45484
|
+
if (next.status === "running-idle") {
|
|
45485
|
+
effects.push({ kind: "cancel-idle-kill", sessionId });
|
|
45486
|
+
next.status = next.procAlive ? "running" : "idle";
|
|
45487
|
+
if (next.procAlive) {
|
|
45488
|
+
effects.push({
|
|
45489
|
+
kind: "emit-frame",
|
|
45490
|
+
frame: { type: "session:status", sessionId, status: "running" }
|
|
45491
|
+
});
|
|
45492
|
+
}
|
|
45493
|
+
}
|
|
45494
|
+
if (next.procAlive && next.stdinClosed) {
|
|
45495
|
+
effects.push({ kind: "kill", signal: "SIGKILL" });
|
|
45496
|
+
next.procAlive = false;
|
|
45497
|
+
next.stdinClosed = false;
|
|
45498
|
+
next.pendingBgTasks = [];
|
|
45499
|
+
}
|
|
45500
|
+
if (!next.procAlive) {
|
|
45501
|
+
next.procAlive = true;
|
|
45502
|
+
next.freshSpawn = true;
|
|
45503
|
+
next.stdinClosed = false;
|
|
45504
|
+
next.buffer = [];
|
|
45505
|
+
next.turnOpen = false;
|
|
45506
|
+
next.turnStartedAt = null;
|
|
45507
|
+
next.status = "running";
|
|
45508
|
+
if (deps.mode === "tui" && (next.file.tool ?? "claude") === "claude") {
|
|
45509
|
+
next.readyForSend = false;
|
|
45510
|
+
}
|
|
45511
|
+
effects.push({ kind: "spawn", ctx: buildSpawnContext(next, deps) });
|
|
45512
|
+
effects.push({
|
|
45513
|
+
kind: "emit-frame",
|
|
45514
|
+
frame: { type: "session:status", sessionId, status: "running" }
|
|
45515
|
+
});
|
|
45516
|
+
}
|
|
45517
|
+
return effects;
|
|
45518
|
+
}
|
|
45481
45519
|
function deliverUserText(next, args, deps) {
|
|
45482
45520
|
const effects = [];
|
|
45483
45521
|
next.currentTurnSender = args.sender;
|
|
@@ -45809,6 +45847,7 @@ function pushEventToBufferInPlace(next, event, deps) {
|
|
|
45809
45847
|
next.queuedSends = [];
|
|
45810
45848
|
const merged = items.map((q) => q.text).join("\n\n");
|
|
45811
45849
|
effects.push(queueFrame(next));
|
|
45850
|
+
effects.push(...ensureDeliverable(next, deps));
|
|
45812
45851
|
effects.push(...deliverUserText(next, { text: merged, sender: items[0].sender }, deps));
|
|
45813
45852
|
return effects;
|
|
45814
45853
|
}
|
|
@@ -45875,42 +45914,7 @@ function applyCommand(state, command, deps) {
|
|
|
45875
45914
|
effects.push(queueFrame(next));
|
|
45876
45915
|
return { state: next, effects };
|
|
45877
45916
|
}
|
|
45878
|
-
|
|
45879
|
-
effects.push({ kind: "cancel-idle-kill", sessionId });
|
|
45880
|
-
next.status = next.procAlive ? "running" : "idle";
|
|
45881
|
-
if (next.procAlive) {
|
|
45882
|
-
effects.push({
|
|
45883
|
-
kind: "emit-frame",
|
|
45884
|
-
frame: { type: "session:status", sessionId, status: "running" }
|
|
45885
|
-
});
|
|
45886
|
-
}
|
|
45887
|
-
}
|
|
45888
|
-
if (next.procAlive && next.stdinClosed) {
|
|
45889
|
-
effects.push({ kind: "kill", signal: "SIGKILL" });
|
|
45890
|
-
next.procAlive = false;
|
|
45891
|
-
next.stdinClosed = false;
|
|
45892
|
-
}
|
|
45893
|
-
if (!next.procAlive) {
|
|
45894
|
-
next.procAlive = true;
|
|
45895
|
-
next.freshSpawn = true;
|
|
45896
|
-
next.stdinClosed = false;
|
|
45897
|
-
next.buffer = [];
|
|
45898
|
-
next.turnOpen = false;
|
|
45899
|
-
next.turnStartedAt = null;
|
|
45900
|
-
next.status = "running";
|
|
45901
|
-
if (deps.mode === "tui" && (next.file.tool ?? "claude") === "claude") {
|
|
45902
|
-
next.readyForSend = false;
|
|
45903
|
-
}
|
|
45904
|
-
effects.push({ kind: "spawn", ctx: buildSpawnContext(next, deps) });
|
|
45905
|
-
effects.push({
|
|
45906
|
-
kind: "emit-frame",
|
|
45907
|
-
frame: {
|
|
45908
|
-
type: "session:status",
|
|
45909
|
-
sessionId,
|
|
45910
|
-
status: "running"
|
|
45911
|
-
}
|
|
45912
|
-
});
|
|
45913
|
-
}
|
|
45917
|
+
effects.push(...ensureDeliverable(next, deps));
|
|
45914
45918
|
const procAliveBefore = state.procAlive;
|
|
45915
45919
|
const readyBefore = state.readyForSend;
|
|
45916
45920
|
const queueBefore = state.pendingSend.length;
|
|
@@ -63666,7 +63670,7 @@ function computeMethodAccess(args) {
|
|
|
63666
63670
|
}
|
|
63667
63671
|
|
|
63668
63672
|
// src/version.ts
|
|
63669
|
-
var version = "0.2.
|
|
63673
|
+
var version = "0.2.451".length > 0 ? "0.2.451" : "dev";
|
|
63670
63674
|
|
|
63671
63675
|
// src/cli-probe/probe.ts
|
|
63672
63676
|
var fs68 = __toESM(require("fs"), 1);
|