claudish 11.0.0 → 11.1.0

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/index.js +82 -8
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -901,7 +901,7 @@ var init_onepassword_config = __esm(() => {
901
901
  });
902
902
 
903
903
  // src/version.ts
904
- var VERSION = "11.0.0";
904
+ var VERSION = "11.1.0";
905
905
 
906
906
  // src/logger.ts
907
907
  import { appendFile, existsSync as existsSync2, mkdirSync, readdirSync, unlinkSync, writeFileSync as writeFileSync2 } from "fs";
@@ -44202,7 +44202,8 @@ function toSlotRow(id, snap, acct, now = Date.now(), upstreamRecords = []) {
44202
44202
  last_activity_at: snap.lastActivityAt,
44203
44203
  idle_seconds: idle,
44204
44204
  activity: terminal ? null : snap.turnEndRecordMissing && snap.activity ? `${snap.activity}: turn_end_record_missing` : snap.agentCountMismatch && snap.activity ? `${snap.activity}: agent_count_mismatch` : snap.activity,
44205
- pane: snap.paneId || null
44205
+ pane: snap.paneId || null,
44206
+ recent: snap.recent
44206
44207
  };
44207
44208
  }
44208
44209
  var init_slot_row = __esm(() => {
@@ -64100,6 +64101,61 @@ var init_slot_state = __esm(() => {
64100
64101
  };
64101
64102
  });
64102
64103
 
64104
+ // src/pane/slot-steps.ts
64105
+ function oneLine6(text) {
64106
+ if (typeof text !== "string")
64107
+ return "";
64108
+ const line = text.split(/\r?\n/).map((l) => l.trim()).find((l) => l.length > 0) ?? "";
64109
+ const masked = redactSecrets2(line);
64110
+ return masked.length > STEP_SUMMARY_MAX ? `${masked.slice(0, STEP_SUMMARY_MAX - 1)}\u2026` : masked;
64111
+ }
64112
+ function firstQuestion(input) {
64113
+ const qs = input?.questions;
64114
+ if (!Array.isArray(qs))
64115
+ return "";
64116
+ for (const q of qs) {
64117
+ const line = oneLine6(q?.question);
64118
+ if (line)
64119
+ return line;
64120
+ }
64121
+ return "";
64122
+ }
64123
+ function stepOf(block, at) {
64124
+ if (!block || typeof block !== "object")
64125
+ return null;
64126
+ if (block.type === "text") {
64127
+ const summary = oneLine6(block.text);
64128
+ return summary ? { at, kind: "text", tool: null, summary } : null;
64129
+ }
64130
+ if (block.type === "thinking") {
64131
+ const summary = oneLine6(block.thinking);
64132
+ return summary ? { at, kind: "thinking", tool: null, summary } : null;
64133
+ }
64134
+ if (block.type !== "tool_use" || typeof block.name !== "string" || !block.name)
64135
+ return null;
64136
+ if (block.name === "AskUserQuestion")
64137
+ return { at, kind: "ask", tool: block.name, summary: firstQuestion(block.input) };
64138
+ const field = TARGET_FIELD[block.name];
64139
+ const summary = field ? oneLine6(block.input?.[field]) : "";
64140
+ return { at, kind: "tool", tool: block.name, summary };
64141
+ }
64142
+ var RECENT_STEP_LIMIT = 20, STEP_SUMMARY_MAX = 100, TARGET_FIELD;
64143
+ var init_slot_steps = __esm(() => {
64144
+ init_redact();
64145
+ TARGET_FIELD = {
64146
+ Read: "file_path",
64147
+ Edit: "file_path",
64148
+ Write: "file_path",
64149
+ Bash: "command",
64150
+ Grep: "pattern",
64151
+ Glob: "pattern",
64152
+ WebSearch: "query",
64153
+ WebFetch: "url",
64154
+ Task: "description",
64155
+ Agent: "description"
64156
+ };
64157
+ });
64158
+
64103
64159
  // src/pane/transcript-follower.ts
64104
64160
  import {
64105
64161
  closeSync as closeSync8,
@@ -64309,8 +64365,16 @@ function applyAssistant(state, t, r, offset) {
64309
64365
  t.apiError = isApiError ? apiErrorOf(r) : null;
64310
64366
  if (isApiError)
64311
64367
  return;
64312
- for (const b of m.content ?? [])
64368
+ const at = typeof r.timestamp === "string" ? r.timestamp : new Date().toISOString();
64369
+ for (const b of m.content ?? []) {
64313
64370
  applyAssistantBlock(state, t, b, offset);
64371
+ const step = stepOf(b, at);
64372
+ if (step) {
64373
+ t.steps.push(step);
64374
+ if (t.steps.length > RECENT_STEP_LIMIT)
64375
+ t.steps.shift();
64376
+ }
64377
+ }
64314
64378
  }
64315
64379
  function apiErrorOf(r) {
64316
64380
  const text = (r.message?.content ?? []).filter((b) => b?.type === "text").map((b) => b.text).join("");
@@ -64493,7 +64557,8 @@ function openTurnState(state, t) {
64493
64557
  compactions: 0,
64494
64558
  read: t.delivery ? newReadState(t.delivery) : null,
64495
64559
  lastChatOffset: null,
64496
- localOutput: null
64560
+ localOutput: null,
64561
+ steps: []
64497
64562
  });
64498
64563
  return state;
64499
64564
  }
@@ -64539,7 +64604,8 @@ function turnView(t) {
64539
64604
  } : { linesReturned: 0, complete: true, reads: 0, completedAtOffset: null },
64540
64605
  preambleBytes,
64541
64606
  lastChatOffset: t.lastChatOffset,
64542
- localCommandOutput: t.localOutput?.text ?? null
64607
+ localCommandOutput: t.localOutput?.text ?? null,
64608
+ recent: [...t.steps]
64543
64609
  };
64544
64610
  }
64545
64611
 
@@ -64705,6 +64771,7 @@ function parse7(line) {
64705
64771
  }
64706
64772
  var LOCAL_COMMAND_RE, STDOUT_RE, ANSI_RE3;
64707
64773
  var init_transcript_follower = __esm(() => {
64774
+ init_slot_steps();
64708
64775
  LOCAL_COMMAND_RE = /^\s*<(local-command-caveat|command-name|local-command-stdout|local-command-stderr)>/;
64709
64776
  STDOUT_RE = /^\s*<local-command-(stdout|stderr)>([\s\S]*?)<\/local-command-\1>/;
64710
64777
  ANSI_RE3 = /\x1b\[[0-?]*[ -/]*[@-~]/g;
@@ -65852,7 +65919,8 @@ ${screenTailOf(this.screen)}`
65852
65919
  claudeCodeVersion: this.claudeCodeVersion,
65853
65920
  shape: this.shape,
65854
65921
  turnEndRecordMissing: !terminal && this.phase === "RUNNING" && this.activity === "finishing" && this.turnEndMissing,
65855
- agentCountMismatch: !terminal && this.phase === "RUNNING" && this.agentMismatch !== null
65922
+ agentCountMismatch: !terminal && this.phase === "RUNNING" && this.agentMismatch !== null,
65923
+ recent: cur && cur.recent.length > 0 ? cur.recent : null
65856
65924
  };
65857
65925
  }
65858
65926
  phaseActivity() {
@@ -66792,7 +66860,8 @@ function neverSpawnedRow(e, m) {
66792
66860
  last_activity_at: null,
66793
66861
  idle_seconds: null,
66794
66862
  activity: null,
66795
- pane: null
66863
+ pane: null,
66864
+ recent: null
66796
66865
  };
66797
66866
  }
66798
66867
  function liveSlotRow(run, e) {
@@ -66855,7 +66924,8 @@ function teamRunRowFromDisk(path, status) {
66855
66924
  last_activity_at: m?.lastActivityAt ?? null,
66856
66925
  idle_seconds: null,
66857
66926
  activity: null,
66858
- pane: m?.pane ?? null
66927
+ pane: m?.pane ?? null,
66928
+ recent: null
66859
66929
  };
66860
66930
  });
66861
66931
  const settled = slots.length > 0 && slots.every((s) => isTerminalState(s.state));
@@ -67864,6 +67934,7 @@ function sessionRowOf(info, upstreamRecords = []) {
67864
67934
  idle_seconds: terminal ? null : info.idleSeconds,
67865
67935
  activity: terminal ? null : info.activity,
67866
67936
  pane: info.pane,
67937
+ recent: info.recent,
67867
67938
  session_id: info.sessionId,
67868
67939
  started_at: info.startedAt,
67869
67940
  completed_at: info.completedAt,
@@ -68217,6 +68288,7 @@ class SessionManager {
68217
68288
  elapsedSeconds: 0,
68218
68289
  idleSeconds: null,
68219
68290
  activity: null,
68291
+ recent: null,
68220
68292
  reason: null,
68221
68293
  detail: null,
68222
68294
  pendingInputs: opts.prompt ? 1 : 0,
@@ -68415,6 +68487,7 @@ class SessionManager {
68415
68487
  info.lastActivityAt = snap.lastActivityAt;
68416
68488
  info.idleSeconds = snap.idleSeconds;
68417
68489
  info.activity = snap.activity;
68490
+ info.recent = snap.recent;
68418
68491
  info.reason = snap.reason;
68419
68492
  info.detail = snap.detail;
68420
68493
  info.pendingInputs = snap.pendingInputs;
@@ -68907,6 +68980,7 @@ function diskInfo(d) {
68907
68980
  elapsedSeconds: elapsedSecondsBetween(startedAt, completedAt ? Date.parse(completedAt) : d.dirMtimeMs),
68908
68981
  idleSeconds: null,
68909
68982
  activity: null,
68983
+ recent: null,
68910
68984
  reason,
68911
68985
  detail: meta === null ? NO_TERMINAL_RECORD : metaString(meta.detail),
68912
68986
  pendingInputs: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudish",
3
- "version": "11.0.0",
3
+ "version": "11.1.0",
4
4
  "description": "Run Claude Code with any model - OpenRouter, Ollama, LM Studio & local models",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -60,10 +60,10 @@
60
60
  "ai"
61
61
  ],
62
62
  "optionalDependencies": {
63
- "@claudish/magmux-darwin-arm64": "11.0.0",
64
- "@claudish/magmux-darwin-x64": "11.0.0",
65
- "@claudish/magmux-linux-arm64": "11.0.0",
66
- "@claudish/magmux-linux-x64": "11.0.0"
63
+ "@claudish/magmux-darwin-arm64": "11.1.0",
64
+ "@claudish/magmux-darwin-x64": "11.1.0",
65
+ "@claudish/magmux-linux-arm64": "11.1.0",
66
+ "@claudish/magmux-linux-x64": "11.1.0"
67
67
  },
68
68
  "author": "Jack Rudenko <i@madappgang.com>",
69
69
  "license": "MIT",