claudish 10.7.1 → 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.
- package/dist/index.js +123 -12
- 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 = "
|
|
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";
|
|
@@ -44201,8 +44201,9 @@ function toSlotRow(id, snap, acct, now = Date.now(), upstreamRecords = []) {
|
|
|
44201
44201
|
turns_completed: snap.turnsCompleted,
|
|
44202
44202
|
last_activity_at: snap.lastActivityAt,
|
|
44203
44203
|
idle_seconds: idle,
|
|
44204
|
-
activity: terminal ? null : snap.turnEndRecordMissing && snap.activity ? `${snap.activity}: turn_end_record_missing` : snap.activity,
|
|
44205
|
-
pane: snap.paneId || null
|
|
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,
|
|
44206
|
+
recent: snap.recent
|
|
44206
44207
|
};
|
|
44207
44208
|
}
|
|
44208
44209
|
var init_slot_row = __esm(() => {
|
|
@@ -63994,6 +63995,13 @@ function pathSecondary(t, input) {
|
|
|
63994
63995
|
const c = corroborated(input);
|
|
63995
63996
|
return c.ok ? settledAs("quiet", t.lastAssistant?.stopReason ?? null, c, ["settled_without_turn_duration"]) : null;
|
|
63996
63997
|
}
|
|
63998
|
+
function agentCountMismatch(t) {
|
|
63999
|
+
if (!t || !t.turnDurationAfterLast || t.wakingAfterLast)
|
|
64000
|
+
return null;
|
|
64001
|
+
const counted = t.agentsLaunched - t.agentsCompleted;
|
|
64002
|
+
const reported = t.turnDurationAfterLast.pendingBackgroundAgentCount ?? 0;
|
|
64003
|
+
return counted === reported ? null : { counted, reported };
|
|
64004
|
+
}
|
|
63997
64005
|
function decideSettle(input) {
|
|
63998
64006
|
const t = input.turn;
|
|
63999
64007
|
const notYet = { settled: false, activity: activityOf(t) };
|
|
@@ -64093,6 +64101,61 @@ var init_slot_state = __esm(() => {
|
|
|
64093
64101
|
};
|
|
64094
64102
|
});
|
|
64095
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
|
+
|
|
64096
64159
|
// src/pane/transcript-follower.ts
|
|
64097
64160
|
import {
|
|
64098
64161
|
closeSync as closeSync8,
|
|
@@ -64148,6 +64211,12 @@ function isLocalCommandText(text) {
|
|
|
64148
64211
|
function isTaskNotification(r) {
|
|
64149
64212
|
return r.origin?.kind === "task-notification" || userText(r).includes("<task-notification>");
|
|
64150
64213
|
}
|
|
64214
|
+
function queuedTaskNotification(r) {
|
|
64215
|
+
const a = r.type === "attachment" ? r.attachment : null;
|
|
64216
|
+
if (a?.type !== "queued_command" || typeof a.prompt !== "string")
|
|
64217
|
+
return null;
|
|
64218
|
+
return a.prompt.startsWith("<task-notification>") ? a.prompt : null;
|
|
64219
|
+
}
|
|
64151
64220
|
function taskIdOf(text) {
|
|
64152
64221
|
const m = text.match(/<task-id>([^<]+)<\/task-id>/);
|
|
64153
64222
|
return m ? (m[1] ?? "").trim() : null;
|
|
@@ -64296,8 +64365,16 @@ function applyAssistant(state, t, r, offset) {
|
|
|
64296
64365
|
t.apiError = isApiError ? apiErrorOf(r) : null;
|
|
64297
64366
|
if (isApiError)
|
|
64298
64367
|
return;
|
|
64299
|
-
|
|
64368
|
+
const at = typeof r.timestamp === "string" ? r.timestamp : new Date().toISOString();
|
|
64369
|
+
for (const b of m.content ?? []) {
|
|
64300
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
|
+
}
|
|
64301
64378
|
}
|
|
64302
64379
|
function apiErrorOf(r) {
|
|
64303
64380
|
const text = (r.message?.content ?? []).filter((b) => b?.type === "text").map((b) => b.text).join("");
|
|
@@ -64351,6 +64428,11 @@ function applyNotification(t, text) {
|
|
|
64351
64428
|
t.agentsDone.add(id);
|
|
64352
64429
|
t.shells.delete(id);
|
|
64353
64430
|
}
|
|
64431
|
+
function applyQueuedNotification(t, r) {
|
|
64432
|
+
const text = queuedTaskNotification(r);
|
|
64433
|
+
if (text)
|
|
64434
|
+
applyNotification(t, text);
|
|
64435
|
+
}
|
|
64354
64436
|
function applyUser(t, r, offset) {
|
|
64355
64437
|
const c = contentOf(r);
|
|
64356
64438
|
if (Array.isArray(c) && c.some((b) => b?.type === "tool_result")) {
|
|
@@ -64424,6 +64506,7 @@ function applyRecord(state, record, offset) {
|
|
|
64424
64506
|
t.stopHookAfterLast = true;
|
|
64425
64507
|
} else if (r.type === "system" && r.subtype === "turn_duration")
|
|
64426
64508
|
applyTurnDuration(state, t, r);
|
|
64509
|
+
applyQueuedNotification(t, r);
|
|
64427
64510
|
return state;
|
|
64428
64511
|
}
|
|
64429
64512
|
function applyTurnDuration(state, t, r) {
|
|
@@ -64474,7 +64557,8 @@ function openTurnState(state, t) {
|
|
|
64474
64557
|
compactions: 0,
|
|
64475
64558
|
read: t.delivery ? newReadState(t.delivery) : null,
|
|
64476
64559
|
lastChatOffset: null,
|
|
64477
|
-
localOutput: null
|
|
64560
|
+
localOutput: null,
|
|
64561
|
+
steps: []
|
|
64478
64562
|
});
|
|
64479
64563
|
return state;
|
|
64480
64564
|
}
|
|
@@ -64520,7 +64604,8 @@ function turnView(t) {
|
|
|
64520
64604
|
} : { linesReturned: 0, complete: true, reads: 0, completedAtOffset: null },
|
|
64521
64605
|
preambleBytes,
|
|
64522
64606
|
lastChatOffset: t.lastChatOffset,
|
|
64523
|
-
localCommandOutput: t.localOutput?.text ?? null
|
|
64607
|
+
localCommandOutput: t.localOutput?.text ?? null,
|
|
64608
|
+
recent: [...t.steps]
|
|
64524
64609
|
};
|
|
64525
64610
|
}
|
|
64526
64611
|
|
|
@@ -64686,6 +64771,7 @@ function parse7(line) {
|
|
|
64686
64771
|
}
|
|
64687
64772
|
var LOCAL_COMMAND_RE, STDOUT_RE, ANSI_RE3;
|
|
64688
64773
|
var init_transcript_follower = __esm(() => {
|
|
64774
|
+
init_slot_steps();
|
|
64689
64775
|
LOCAL_COMMAND_RE = /^\s*<(local-command-caveat|command-name|local-command-stdout|local-command-stderr)>/;
|
|
64690
64776
|
STDOUT_RE = /^\s*<local-command-(stdout|stderr)>([\s\S]*?)<\/local-command-\1>/;
|
|
64691
64777
|
ANSI_RE3 = /\x1b\[[0-?]*[ -/]*[@-~]/g;
|
|
@@ -64756,6 +64842,7 @@ class PaneSessionImpl {
|
|
|
64756
64842
|
claudeCodeVersion = null;
|
|
64757
64843
|
anomalies = new Map;
|
|
64758
64844
|
turnEndMissing = false;
|
|
64845
|
+
agentMismatch = null;
|
|
64759
64846
|
registry;
|
|
64760
64847
|
registryRec = null;
|
|
64761
64848
|
registryEverSeen = false;
|
|
@@ -65532,6 +65619,7 @@ class PaneSessionImpl {
|
|
|
65532
65619
|
}
|
|
65533
65620
|
this.activity = decision.activity;
|
|
65534
65621
|
this.checkTurnEndMissing();
|
|
65622
|
+
this.checkAgentCountMismatch(t);
|
|
65535
65623
|
}
|
|
65536
65624
|
checkEscape() {
|
|
65537
65625
|
if (this.escapeSentAt === null)
|
|
@@ -65554,6 +65642,13 @@ class PaneSessionImpl {
|
|
|
65554
65642
|
this.anomaly("turn_end_record_missing");
|
|
65555
65643
|
this.turnEndMissing = missing;
|
|
65556
65644
|
}
|
|
65645
|
+
checkAgentCountMismatch(t) {
|
|
65646
|
+
const m = agentCountMismatch(t);
|
|
65647
|
+
const key = m ? `${m.counted}/${m.reported}` : null;
|
|
65648
|
+
if (m && key !== this.agentMismatch)
|
|
65649
|
+
this.anomaly(`agent_count_mismatch: claudish ${m.counted} pending, Claude Code ${m.reported}`);
|
|
65650
|
+
this.agentMismatch = key;
|
|
65651
|
+
}
|
|
65557
65652
|
detectBlocked(t) {
|
|
65558
65653
|
const pending = t.pendingTool;
|
|
65559
65654
|
if (!pending || this.phase !== "RUNNING")
|
|
@@ -65622,6 +65717,7 @@ class PaneSessionImpl {
|
|
|
65622
65717
|
}
|
|
65623
65718
|
finishTurn(turn, chatOffset, exitCode) {
|
|
65624
65719
|
this.turnEndMissing = false;
|
|
65720
|
+
this.agentMismatch = null;
|
|
65625
65721
|
this.answers.set(turn.index, turn.answer);
|
|
65626
65722
|
for (const k of this.answers.keys())
|
|
65627
65723
|
if (k <= turn.index - KEPT_ANSWERS)
|
|
@@ -65822,7 +65918,9 @@ ${screenTailOf(this.screen)}`
|
|
|
65822
65918
|
anomalies: [...this.anomalies].map(([k, n]) => n > 1 ? `${k} \xD7${n}` : k),
|
|
65823
65919
|
claudeCodeVersion: this.claudeCodeVersion,
|
|
65824
65920
|
shape: this.shape,
|
|
65825
|
-
turnEndRecordMissing: !terminal && this.phase === "RUNNING" && this.activity === "finishing" && this.turnEndMissing
|
|
65921
|
+
turnEndRecordMissing: !terminal && this.phase === "RUNNING" && this.activity === "finishing" && this.turnEndMissing,
|
|
65922
|
+
agentCountMismatch: !terminal && this.phase === "RUNNING" && this.agentMismatch !== null,
|
|
65923
|
+
recent: cur && cur.recent.length > 0 ? cur.recent : null
|
|
65826
65924
|
};
|
|
65827
65925
|
}
|
|
65828
65926
|
phaseActivity() {
|
|
@@ -66737,7 +66835,7 @@ function refreshAccounting(e, snap) {
|
|
|
66737
66835
|
return e.acct;
|
|
66738
66836
|
}
|
|
66739
66837
|
function notableAnomalies(snap) {
|
|
66740
|
-
return snap.anomalies.filter((a) => a.startsWith("background_shell_open") || a.startsWith("turn_end_record_missing") || a.startsWith("prompt_not_read"));
|
|
66838
|
+
return snap.anomalies.filter((a) => a.startsWith("background_shell_open") || a.startsWith("turn_end_record_missing") || a.startsWith("agent_count_mismatch") || a.startsWith("prompt_not_read"));
|
|
66741
66839
|
}
|
|
66742
66840
|
function upstreamLogPath(path, id) {
|
|
66743
66841
|
return join47(path, "errors", `${id}-upstream.jsonl`);
|
|
@@ -66762,7 +66860,8 @@ function neverSpawnedRow(e, m) {
|
|
|
66762
66860
|
last_activity_at: null,
|
|
66763
66861
|
idle_seconds: null,
|
|
66764
66862
|
activity: null,
|
|
66765
|
-
pane: null
|
|
66863
|
+
pane: null,
|
|
66864
|
+
recent: null
|
|
66766
66865
|
};
|
|
66767
66866
|
}
|
|
66768
66867
|
function liveSlotRow(run, e) {
|
|
@@ -66825,7 +66924,8 @@ function teamRunRowFromDisk(path, status) {
|
|
|
66825
66924
|
last_activity_at: m?.lastActivityAt ?? null,
|
|
66826
66925
|
idle_seconds: null,
|
|
66827
66926
|
activity: null,
|
|
66828
|
-
pane: m?.pane ?? null
|
|
66927
|
+
pane: m?.pane ?? null,
|
|
66928
|
+
recent: null
|
|
66829
66929
|
};
|
|
66830
66930
|
});
|
|
66831
66931
|
const settled = slots.length > 0 && slots.every((s) => isTerminalState(s.state));
|
|
@@ -67834,6 +67934,7 @@ function sessionRowOf(info, upstreamRecords = []) {
|
|
|
67834
67934
|
idle_seconds: terminal ? null : info.idleSeconds,
|
|
67835
67935
|
activity: terminal ? null : info.activity,
|
|
67836
67936
|
pane: info.pane,
|
|
67937
|
+
recent: info.recent,
|
|
67837
67938
|
session_id: info.sessionId,
|
|
67838
67939
|
started_at: info.startedAt,
|
|
67839
67940
|
completed_at: info.completedAt,
|
|
@@ -68187,6 +68288,7 @@ class SessionManager {
|
|
|
68187
68288
|
elapsedSeconds: 0,
|
|
68188
68289
|
idleSeconds: null,
|
|
68189
68290
|
activity: null,
|
|
68291
|
+
recent: null,
|
|
68190
68292
|
reason: null,
|
|
68191
68293
|
detail: null,
|
|
68192
68294
|
pendingInputs: opts.prompt ? 1 : 0,
|
|
@@ -68385,6 +68487,7 @@ class SessionManager {
|
|
|
68385
68487
|
info.lastActivityAt = snap.lastActivityAt;
|
|
68386
68488
|
info.idleSeconds = snap.idleSeconds;
|
|
68387
68489
|
info.activity = snap.activity;
|
|
68490
|
+
info.recent = snap.recent;
|
|
68388
68491
|
info.reason = snap.reason;
|
|
68389
68492
|
info.detail = snap.detail;
|
|
68390
68493
|
info.pendingInputs = snap.pendingInputs;
|
|
@@ -68877,6 +68980,7 @@ function diskInfo(d) {
|
|
|
68877
68980
|
elapsedSeconds: elapsedSecondsBetween(startedAt, completedAt ? Date.parse(completedAt) : d.dirMtimeMs),
|
|
68878
68981
|
idleSeconds: null,
|
|
68879
68982
|
activity: null,
|
|
68983
|
+
recent: null,
|
|
68880
68984
|
reason,
|
|
68881
68985
|
detail: meta === null ? NO_TERMINAL_RECORD : metaString(meta.detail),
|
|
68882
68986
|
pendingInputs: 0,
|
|
@@ -71348,6 +71452,8 @@ Options (run / run-and-judge):
|
|
|
71348
71452
|
json mode runs each model as an interactive pane in a headless
|
|
71349
71453
|
magmux (>= 0.14.0; darwin and linux).
|
|
71350
71454
|
--grid Show all models in a magmux grid with live output + status bar
|
|
71455
|
+
--mode <m> run only: json (default, panes), default (the grid, as --grid)
|
|
71456
|
+
or interactive (as --interactive)
|
|
71351
71457
|
|
|
71352
71458
|
Options (judge / run-and-judge):
|
|
71353
71459
|
--judges <a,b,...> Comma-separated judge model IDs (default: same as runners)
|
|
@@ -71383,7 +71489,12 @@ async function teamCommand(args) {
|
|
|
71383
71489
|
}
|
|
71384
71490
|
const modelsRaw = getFlag(args, "--models");
|
|
71385
71491
|
const judgesRaw = getFlag(args, "--judges");
|
|
71386
|
-
const
|
|
71492
|
+
const modeRaw = getFlag(args, "--mode") ?? "json";
|
|
71493
|
+
if (modeRaw !== "default" && modeRaw !== "interactive" && modeRaw !== "json") {
|
|
71494
|
+
console.error(`Error: invalid --mode "${modeRaw}" (expected default, interactive or json)`);
|
|
71495
|
+
process.exit(2);
|
|
71496
|
+
}
|
|
71497
|
+
const mode = modeRaw;
|
|
71387
71498
|
const timeoutStr = getFlag(args, "--timeout");
|
|
71388
71499
|
const timeout = timeoutStr ? Number.parseInt(timeoutStr, 10) : 300;
|
|
71389
71500
|
let input = getFlag(args, "--input");
|
|
@@ -71422,7 +71533,7 @@ async function teamCommand(args) {
|
|
|
71422
71533
|
printStatus(runStatus);
|
|
71423
71534
|
} else {
|
|
71424
71535
|
await Promise.resolve().then(() => init_team_grid());
|
|
71425
|
-
const gridStatus = await runWithGrid(sessionPath, models, input
|
|
71536
|
+
const gridStatus = await runWithGrid(sessionPath, models, input, {
|
|
71426
71537
|
timeout,
|
|
71427
71538
|
mode: effectiveMode === "interactive" ? "interactive" : "default"
|
|
71428
71539
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudish",
|
|
3
|
-
"version": "
|
|
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": "
|
|
64
|
-
"@claudish/magmux-darwin-x64": "
|
|
65
|
-
"@claudish/magmux-linux-arm64": "
|
|
66
|
-
"@claudish/magmux-linux-x64": "
|
|
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",
|