@clawos-dev/clawd 0.2.92 → 0.2.93-beta.173.df765cf

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 -0
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -10554,6 +10554,20 @@ function withCommonFields(msg, o) {
10554
10554
  if (typeof o.uuid === "string" && o.uuid.length > 0) msg.uuid = o.uuid;
10555
10555
  return msg;
10556
10556
  }
10557
+ function isRejectSentinelLine(obj) {
10558
+ if (!obj || typeof obj !== "object") return false;
10559
+ return typeof obj.toolUseResult === "string";
10560
+ }
10561
+ function isUserPlainTextLine(obj) {
10562
+ if (!obj || typeof obj !== "object") return false;
10563
+ const o = obj;
10564
+ if (o.type !== "user") return false;
10565
+ const message = o.message;
10566
+ const content = message?.content;
10567
+ if (!Array.isArray(content) || content.length !== 1) return false;
10568
+ const part = content[0];
10569
+ return part?.type === "text";
10570
+ }
10557
10571
  function messageFromJsonl(obj) {
10558
10572
  if (!obj || typeof obj !== "object") return null;
10559
10573
  const o = obj;
@@ -10561,6 +10575,7 @@ function messageFromJsonl(obj) {
10561
10575
  const ts = o.timestamp ?? o.ts;
10562
10576
  if (type === "user" || type === "assistant") {
10563
10577
  const message = o.message;
10578
+ if (type === "assistant" && message?.model === "<synthetic>") return null;
10564
10579
  const content = message?.content;
10565
10580
  const toolResultExtra = type === "user" ? extractToolResultExtraFromRaw(o.toolUseResult) : void 0;
10566
10581
  const sourceToolAssistantUUID = type === "user" && typeof o.sourceToolAssistantUUID === "string" ? o.sourceToolAssistantUUID : void 0;
@@ -10874,7 +10889,11 @@ var init_claude_history = __esm({
10874
10889
  );
10875
10890
  const lines = readJsonlLines(file);
10876
10891
  const messages = [];
10892
+ let prevIsRejectSentinel = false;
10877
10893
  for (const line of lines) {
10894
+ const skipInterruptedMarker = prevIsRejectSentinel && isUserPlainTextLine(line);
10895
+ prevIsRejectSentinel = isRejectSentinelLine(line);
10896
+ if (skipInterruptedMarker) continue;
10878
10897
  const msg = messageFromJsonl(line);
10879
10898
  if (msg) messages.push(msg);
10880
10899
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.92",
3
+ "version": "0.2.93-beta.173.df765cf",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",