@clawos-dev/clawd 0.2.334 → 0.2.335
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 +12 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -44407,6 +44407,14 @@ function idleKillDelayOf(state) {
|
|
|
44407
44407
|
const ms = state.subSessionMeta?.idleKillDelayMs;
|
|
44408
44408
|
return ms !== void 0 && ms > 0 ? ms : void 0;
|
|
44409
44409
|
}
|
|
44410
|
+
var STALE_TURN_END_TOLERANCE_MS = 2e3;
|
|
44411
|
+
function isLateTurnEnd(event, turnStartedAt, now) {
|
|
44412
|
+
if (event.kind !== "turn_end") return false;
|
|
44413
|
+
const durationMs = event.durationMs;
|
|
44414
|
+
if (typeof durationMs !== "number" || typeof turnStartedAt !== "number") return false;
|
|
44415
|
+
const elapsed = now - turnStartedAt;
|
|
44416
|
+
return durationMs > elapsed + STALE_TURN_END_TOLERANCE_MS;
|
|
44417
|
+
}
|
|
44410
44418
|
function tryFlushPending(state, deps) {
|
|
44411
44419
|
if (!state.readyForSend || state.pendingSend.length === 0) return [];
|
|
44412
44420
|
const text = state.pendingSend.shift();
|
|
@@ -44660,6 +44668,9 @@ function pushEventToBufferInPlace(next, event, deps) {
|
|
|
44660
44668
|
if (newBuffer.length === 1) next.bufferStartSeq = seq;
|
|
44661
44669
|
const isTurnEnd = withSeq.kind === "turn_end";
|
|
44662
44670
|
const isUserText = withSeq.kind === "user_text";
|
|
44671
|
+
if (isTurnEnd && next.turnOpen && isLateTurnEnd(withSeq, next.turnStartedAt, deps.now())) {
|
|
44672
|
+
return [emitSessionEvent(next.file.sessionId, withSeq)];
|
|
44673
|
+
}
|
|
44663
44674
|
if (isTurnEnd) {
|
|
44664
44675
|
const te = withSeq;
|
|
44665
44676
|
if (te.durationMs === void 0 && typeof next.turnStartedAt === "number") {
|
|
@@ -60123,7 +60134,7 @@ function computeMethodAccess(args) {
|
|
|
60123
60134
|
}
|
|
60124
60135
|
|
|
60125
60136
|
// src/version.ts
|
|
60126
|
-
var version = "0.2.
|
|
60137
|
+
var version = "0.2.335".length > 0 ? "0.2.335" : "dev";
|
|
60127
60138
|
|
|
60128
60139
|
// src/cli-probe/probe.ts
|
|
60129
60140
|
var fs59 = __toESM(require("fs"), 1);
|