@clawos-dev/clawd 0.2.33-beta.48.5d86147 → 0.2.33
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 +19 -8
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -15686,7 +15686,7 @@ function applyMetaUpdate(state, patch, deps) {
|
|
|
15686
15686
|
if (shallowEqMeta(next.file, merged)) {
|
|
15687
15687
|
return { state: next, effects: [] };
|
|
15688
15688
|
}
|
|
15689
|
-
next.file =
|
|
15689
|
+
next.file = merged;
|
|
15690
15690
|
return {
|
|
15691
15691
|
state: next,
|
|
15692
15692
|
effects: [
|
|
@@ -15788,6 +15788,7 @@ function pushEventToBuffer(state, event, deps) {
|
|
|
15788
15788
|
next.nextSeq = seq + 1;
|
|
15789
15789
|
if (newBuffer.length === 1) next.bufferStartSeq = seq;
|
|
15790
15790
|
const isTurnEnd = withSeq.kind === "turn_end";
|
|
15791
|
+
const isUserText = withSeq.kind === "user_text";
|
|
15791
15792
|
if (isTurnEnd) next.turnOpen = false;
|
|
15792
15793
|
else if (!next.turnOpen) next.turnOpen = true;
|
|
15793
15794
|
if (!next.turnOpen && next.buffer.length > deps.bufferCap) {
|
|
@@ -15798,6 +15799,11 @@ function pushEventToBuffer(state, event, deps) {
|
|
|
15798
15799
|
}
|
|
15799
15800
|
if (next.freshSpawn) next.freshSpawn = false;
|
|
15800
15801
|
const effects = [emitSessionEvent(next.file.sessionId, withSeq)];
|
|
15802
|
+
if (isUserText || isTurnEnd) {
|
|
15803
|
+
next.file = { ...next.file, updatedAt: nowIso(deps) };
|
|
15804
|
+
effects.push({ kind: "persist-file", file: next.file });
|
|
15805
|
+
effects.push(sessionInfoFrame(next.file));
|
|
15806
|
+
}
|
|
15801
15807
|
if (isTurnEnd && next.subSessionMeta?.idleKillEnabled && next.procAlive && (next.status === "running" || next.status === "spawning")) {
|
|
15802
15808
|
next.status = "running-idle";
|
|
15803
15809
|
effects.push({
|
|
@@ -15814,6 +15820,14 @@ var RUNTIME_PATCH_KEYS = [
|
|
|
15814
15820
|
"effort",
|
|
15815
15821
|
"cwd"
|
|
15816
15822
|
];
|
|
15823
|
+
var MARKER_PATCH_KEYS = ["pinnedAt", "pinSortOrder"];
|
|
15824
|
+
function isMarkerOnlyPatch(patch) {
|
|
15825
|
+
const keys = Object.keys(patch).filter(
|
|
15826
|
+
(k) => patch[k] !== void 0
|
|
15827
|
+
);
|
|
15828
|
+
if (keys.length === 0) return false;
|
|
15829
|
+
return keys.every((k) => MARKER_PATCH_KEYS.includes(k));
|
|
15830
|
+
}
|
|
15817
15831
|
function applyCommand(state, command, deps) {
|
|
15818
15832
|
const next = cloneState(state);
|
|
15819
15833
|
const effects = [];
|
|
@@ -15920,7 +15934,8 @@ function applyCommand(state, command, deps) {
|
|
|
15920
15934
|
const runtimePatch = RUNTIME_PATCH_KEYS.some(
|
|
15921
15935
|
(k) => patch[k] !== void 0
|
|
15922
15936
|
);
|
|
15923
|
-
|
|
15937
|
+
const markerOnly = isMarkerOnlyPatch(patch);
|
|
15938
|
+
next.file = markerOnly ? { ...next.file, ...patch } : { ...next.file, ...patch, updatedAt: nowIso(deps) };
|
|
15924
15939
|
effects.push({ kind: "persist-file", file: next.file });
|
|
15925
15940
|
effects.push(sessionInfoFrame(next.file));
|
|
15926
15941
|
if (runtimePatch && next.procAlive) {
|
|
@@ -16741,7 +16756,7 @@ var SessionManager = class {
|
|
|
16741
16756
|
});
|
|
16742
16757
|
return { response: value, broadcast };
|
|
16743
16758
|
}
|
|
16744
|
-
const updated = { ...existing, pinnedAt
|
|
16759
|
+
const updated = { ...existing, pinnedAt };
|
|
16745
16760
|
this.deps.store.write(updated);
|
|
16746
16761
|
return { response: updated, broadcast: [] };
|
|
16747
16762
|
}
|
|
@@ -16777,11 +16792,7 @@ var SessionManager = class {
|
|
|
16777
16792
|
broadcast.push(...b);
|
|
16778
16793
|
} else {
|
|
16779
16794
|
const existing = this.getFile(sessionId);
|
|
16780
|
-
const updated = {
|
|
16781
|
-
...existing,
|
|
16782
|
-
pinSortOrder: index,
|
|
16783
|
-
updatedAt: nowIso2(this.deps)
|
|
16784
|
-
};
|
|
16795
|
+
const updated = { ...existing, pinSortOrder: index };
|
|
16785
16796
|
this.deps.store.write(updated);
|
|
16786
16797
|
updatedFiles.push(updated);
|
|
16787
16798
|
}
|
package/package.json
CHANGED