@clawos-dev/clawd 0.2.14 → 0.2.15

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 +16 -1
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -13122,6 +13122,7 @@ function applyCommand(state, command, deps) {
13122
13122
  return { state: next, effects };
13123
13123
  }
13124
13124
  case "resume": {
13125
+ const sameToolSession = next.file.toolSessionId === command.toolSessionId;
13125
13126
  const nextFile = {
13126
13127
  ...next.file,
13127
13128
  toolSessionId: command.toolSessionId,
@@ -13130,6 +13131,19 @@ function applyCommand(state, command, deps) {
13130
13131
  next.file = nextFile;
13131
13132
  effects.push({ kind: "persist-file", file: nextFile });
13132
13133
  effects.push(sessionInfoFrame(nextFile));
13134
+ if (!sameToolSession) {
13135
+ next.buffer = [];
13136
+ next.nextSeq = 0;
13137
+ next.bufferStartSeq = 0;
13138
+ next.turnOpen = false;
13139
+ next.pendingPermissions = {};
13140
+ next.freshSpawn = false;
13141
+ next.seenUuids = [];
13142
+ effects.push({
13143
+ kind: "emit-frame",
13144
+ frame: { type: "session:cleared", sessionId }
13145
+ });
13146
+ }
13133
13147
  if (next.procAlive) {
13134
13148
  effects.push({ kind: "kill", signal: "SIGKILL" });
13135
13149
  }
@@ -14896,7 +14910,8 @@ function classifyUserMessage(input) {
14896
14910
  return { meta: "system-reminder" };
14897
14911
  }
14898
14912
  if (SKILL_HINT_RE.test(text)) return { meta: "skill-hint" };
14899
- if (raw.isMeta === true) return { meta: "meta-text" };
14913
+ const flags = raw;
14914
+ if (flags.isMeta === true || flags.isSynthetic === true) return { meta: "meta-text" };
14900
14915
  return null;
14901
14916
  }
14902
14917
  function withCommonFields(msg, o) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",