@clawos-dev/clawd 0.2.31 → 0.2.32

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.
Files changed (2) hide show
  1. package/dist/cli.cjs +19 -8
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -15658,7 +15658,7 @@ function applyMetaUpdate(state, patch, deps) {
15658
15658
  if (shallowEqMeta(next.file, merged)) {
15659
15659
  return { state: next, effects: [] };
15660
15660
  }
15661
- next.file = { ...merged, updatedAt: nowIso(deps) };
15661
+ next.file = merged;
15662
15662
  return {
15663
15663
  state: next,
15664
15664
  effects: [
@@ -15760,6 +15760,7 @@ function pushEventToBuffer(state, event, deps) {
15760
15760
  next.nextSeq = seq + 1;
15761
15761
  if (newBuffer.length === 1) next.bufferStartSeq = seq;
15762
15762
  const isTurnEnd = withSeq.kind === "turn_end";
15763
+ const isUserText = withSeq.kind === "user_text";
15763
15764
  if (isTurnEnd) next.turnOpen = false;
15764
15765
  else if (!next.turnOpen) next.turnOpen = true;
15765
15766
  if (!next.turnOpen && next.buffer.length > deps.bufferCap) {
@@ -15770,6 +15771,11 @@ function pushEventToBuffer(state, event, deps) {
15770
15771
  }
15771
15772
  if (next.freshSpawn) next.freshSpawn = false;
15772
15773
  const effects = [emitSessionEvent(next.file.sessionId, withSeq)];
15774
+ if (isUserText || isTurnEnd) {
15775
+ next.file = { ...next.file, updatedAt: nowIso(deps) };
15776
+ effects.push({ kind: "persist-file", file: next.file });
15777
+ effects.push(sessionInfoFrame(next.file));
15778
+ }
15773
15779
  if (isTurnEnd && next.subSessionMeta?.idleKillEnabled && next.procAlive && (next.status === "running" || next.status === "spawning")) {
15774
15780
  next.status = "running-idle";
15775
15781
  effects.push({
@@ -15786,6 +15792,14 @@ var RUNTIME_PATCH_KEYS = [
15786
15792
  "effort",
15787
15793
  "cwd"
15788
15794
  ];
15795
+ var MARKER_PATCH_KEYS = ["pinnedAt", "pinSortOrder"];
15796
+ function isMarkerOnlyPatch(patch) {
15797
+ const keys = Object.keys(patch).filter(
15798
+ (k) => patch[k] !== void 0
15799
+ );
15800
+ if (keys.length === 0) return false;
15801
+ return keys.every((k) => MARKER_PATCH_KEYS.includes(k));
15802
+ }
15789
15803
  function applyCommand(state, command, deps) {
15790
15804
  const next = cloneState(state);
15791
15805
  const effects = [];
@@ -15892,7 +15906,8 @@ function applyCommand(state, command, deps) {
15892
15906
  const runtimePatch = RUNTIME_PATCH_KEYS.some(
15893
15907
  (k) => patch[k] !== void 0
15894
15908
  );
15895
- next.file = { ...next.file, ...patch, updatedAt: nowIso(deps) };
15909
+ const markerOnly = isMarkerOnlyPatch(patch);
15910
+ next.file = markerOnly ? { ...next.file, ...patch } : { ...next.file, ...patch, updatedAt: nowIso(deps) };
15896
15911
  effects.push({ kind: "persist-file", file: next.file });
15897
15912
  effects.push(sessionInfoFrame(next.file));
15898
15913
  if (runtimePatch && next.procAlive) {
@@ -16713,7 +16728,7 @@ var SessionManager = class {
16713
16728
  });
16714
16729
  return { response: value, broadcast };
16715
16730
  }
16716
- const updated = { ...existing, pinnedAt, updatedAt: nowIso2(this.deps) };
16731
+ const updated = { ...existing, pinnedAt };
16717
16732
  this.deps.store.write(updated);
16718
16733
  return { response: updated, broadcast: [] };
16719
16734
  }
@@ -16749,11 +16764,7 @@ var SessionManager = class {
16749
16764
  broadcast.push(...b);
16750
16765
  } else {
16751
16766
  const existing = this.getFile(sessionId);
16752
- const updated = {
16753
- ...existing,
16754
- pinSortOrder: index,
16755
- updatedAt: nowIso2(this.deps)
16756
- };
16767
+ const updated = { ...existing, pinSortOrder: index };
16757
16768
  this.deps.store.write(updated);
16758
16769
  updatedFiles.push(updated);
16759
16770
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",