@rucher/carnet 0.2.0-beta.7 → 0.2.0-beta.8

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.
@@ -69,8 +69,6 @@ const AGENT_STATUSES = [
69
69
  "review",
70
70
  "apply",
71
71
  "test",
72
- "commit",
73
- "branch",
74
72
  "closed"
75
73
  ];
76
74
  const USER_ACTION_STATUSES = [
@@ -78,9 +76,7 @@ const USER_ACTION_STATUSES = [
78
76
  "answer",
79
77
  "review",
80
78
  "apply",
81
- "test",
82
- "commit",
83
- "branch"
79
+ "test"
84
80
  ];
85
81
  const EMOJI = {
86
82
  running: "⏳",
@@ -88,21 +84,23 @@ const EMOJI = {
88
84
  answer: "❓",
89
85
  review: "👀",
90
86
  apply: "📥",
91
- test: "🧪",
92
- commit: "✅",
93
- branch: "🌿"
87
+ test: "🧪"
94
88
  };
95
89
  const MAIN_WORKING_EMOJI = "⚙️";
96
90
  const MAIN_WAITING_EMOJI = "⏸";
97
91
  const MAIN_FAILED_EMOJI = "⚠";
98
- const LEGEND = "⚙️ main working · ⏸ waiting on you · ⚠ turn failed · 💬 discussing · ❓ answer · 👀 review · 📥 apply · 🧪 test · ✅ commit · 🌿 branch · ⏳ running";
92
+ const LEGEND = "⚙️ main working · ⏸ waiting on you · ⚠ turn failed · 💬 discussing · ❓ answer · 👀 review · 📥 apply · 🧪 test · ⏳ running";
99
93
  const KIND_ABBREVIATIONS = {
100
94
  research: "rs",
101
95
  analyze: "an",
102
96
  implement: "im",
103
97
  review: "rv"
104
98
  };
105
- const KIND_LEGEND = "rs research · an analyze · im implement · rv review";
99
+ function kindTag(kind) {
100
+ return `[${KIND_ABBREVIATIONS[kind]}]`;
101
+ }
102
+ const KIND_TAG_PATTERN = /\[(?:rs|an|im|rv)\]/;
103
+ const KIND_LEGEND = "[rs] research · [an] analyze · [im] implement · [rv] review";
106
104
  function isAgentStatus(value) {
107
105
  return typeof value === "string" && AGENT_STATUSES.includes(value);
108
106
  }
@@ -153,6 +151,7 @@ function toAgent(row) {
153
151
  kind: row.kind,
154
152
  promotedFrom: row.promoted_from,
155
153
  target: row.target,
154
+ blockedOn: row.blocked_on,
156
155
  task: row.task,
157
156
  status: row.status,
158
157
  note: row.note,
@@ -222,14 +221,30 @@ function startAgent(ctx, session, input) {
222
221
  });
223
222
  return requireAgent(ctx, session, name);
224
223
  }
224
+ function checkBlocker(ctx, session, name, blocker) {
225
+ if (blocker === name) throw new CarnetError("INVALID_BLOCKER", `Agent "${name}" can't wait on itself`);
226
+ const seen = /* @__PURE__ */ new Set([name]);
227
+ let current = getAgent(ctx, session, blocker);
228
+ if (!current || current.status === "closed") throw new CarnetError("INVALID_BLOCKER", `"${blocker}" is not an open agent of this session`);
229
+ while (current?.blockedOn && current.status !== "closed") {
230
+ if (seen.has(current.blockedOn)) throw new CarnetError("INVALID_BLOCKER", `"${blocker}" already waits on "${name}", directly or through another agent`);
231
+ seen.add(current.name);
232
+ current = getAgent(ctx, session, current.blockedOn);
233
+ }
234
+ }
225
235
  function updateAgent(ctx, session, name, input) {
226
236
  const current = requireAgent(ctx, session, name);
227
237
  if (!isAgentStatus(input.status) || input.status === "closed") throw new CarnetError("INVALID_STATUS", `Invalid agent status "${input.status}"; use agent_drop to close`);
228
238
  let note;
229
239
  if (input.note !== void 0) note = input.note === null ? null : sanitizeNote(input.note);
230
240
  else note = current.status === "running" && input.status !== "running" ? null : current.note;
241
+ let blockedOn = current.blockedOn;
242
+ if (input.blockedOn !== void 0) {
243
+ blockedOn = input.blockedOn === null ? null : sanitizeNote(input.blockedOn);
244
+ if (blockedOn) checkBlocker(ctx, session, name, blockedOn);
245
+ }
231
246
  if (current.pendingStatus) publishPending(ctx, session, name);
232
- ctx.db.prepare("UPDATE agents SET note = ?, status = ?, report_path = COALESCE(?, report_path), updated_at = ? WHERE session = ? AND name = ?").run(note, input.status, input.reportPath ?? null, nowIso(ctx), session, name);
247
+ ctx.db.prepare("UPDATE agents SET note = ?, status = ?, report_path = COALESCE(?, report_path), blocked_on = ?, updated_at = ? WHERE session = ? AND name = ?").run(note, input.status, input.reportPath ?? null, blockedOn, nowIso(ctx), session, name);
233
248
  return requireAgent(ctx, session, name);
234
249
  }
235
250
  function statusWhenDone(kind, hasQuestions) {
@@ -249,7 +264,7 @@ function statusAfterAnswers(kind) {
249
264
  }
250
265
  function closeAgent(ctx, session, name, event) {
251
266
  requireAgent(ctx, session, name);
252
- ctx.db.prepare("UPDATE agents SET status = 'closed', pending_status = NULL, queue_order = NULL, updated_at = ? WHERE session = ? AND name = ?").run(nowIso(ctx), session, name);
267
+ ctx.db.prepare("UPDATE agents SET status = 'closed', pending_status = NULL, queue_order = NULL, blocked_on = NULL, updated_at = ? WHERE session = ? AND name = ?").run(nowIso(ctx), session, name);
253
268
  logEvent(ctx, session, {
254
269
  ...event,
255
270
  agent: name
@@ -266,7 +281,7 @@ function promoteAgent(ctx, session, name, input) {
266
281
  const agent = requireAgent(ctx, session, name);
267
282
  if (agent.kind !== "analyze") throw new CarnetError("INVALID_KIND", `Only an analyze agent is promoted; ${name} is ${agent.kind}`);
268
283
  ctx.db.prepare(`UPDATE agents SET kind = 'implement', promoted_from = 'analyze', status = 'running',
269
- pending_status = NULL, note = NULL, worktree = COALESCE(?, worktree),
284
+ pending_status = NULL, note = NULL, blocked_on = NULL, worktree = COALESCE(?, worktree),
270
285
  base_commit = COALESCE(?, base_commit), updated_at = ?
271
286
  WHERE session = ? AND name = ?`).run(input.worktree ?? null, input.baseCommit ?? null, nowIso(ctx), session, name);
272
287
  logEvent(ctx, session, {
@@ -632,6 +647,45 @@ INSERT INTO events_new SELECT id, session, at, type, agent, commit_sha, link, no
632
647
  DROP TABLE events;
633
648
  ALTER TABLE events_new RENAME TO events;
634
649
  CREATE INDEX events_session_at ON events(session, at);
650
+ `,
651
+ `
652
+ -- Testing and committing are one human step, and no step ever led to branch.
653
+ UPDATE agents SET status = 'test' WHERE status IN ('commit', 'branch');
654
+ UPDATE agents SET pending_status = 'test' WHERE pending_status IN ('commit', 'branch');
655
+ UPDATE table_items SET status = 'test' WHERE status IN ('commit', 'branch');
656
+ CREATE TABLE agents_new (
657
+ session TEXT NOT NULL REFERENCES sessions(id),
658
+ name TEXT NOT NULL,
659
+ task TEXT,
660
+ status TEXT NOT NULL
661
+ CHECK (status IN ('running', 'discussing', 'answer', 'review', 'apply', 'test', 'closed')),
662
+ note TEXT,
663
+ report_path TEXT,
664
+ base_commit TEXT,
665
+ worktree TEXT,
666
+ queue_order INTEGER,
667
+ started_at TEXT NOT NULL,
668
+ updated_at TEXT NOT NULL,
669
+ host_agent_id TEXT,
670
+ pending_status TEXT,
671
+ done_at TEXT,
672
+ kind TEXT NOT NULL DEFAULT 'analyze'
673
+ CHECK (kind IN ('research', 'analyze', 'implement', 'review')),
674
+ promoted_from TEXT CHECK (promoted_from IN ('research', 'analyze', 'implement', 'review')),
675
+ target TEXT,
676
+ blocked_on TEXT,
677
+ PRIMARY KEY (session, name)
678
+ );
679
+ INSERT INTO agents_new (session, name, task, status, note, report_path, base_commit, worktree,
680
+ queue_order, started_at, updated_at, host_agent_id, pending_status, done_at, kind, promoted_from, target)
681
+ SELECT session, name, task, status, note, report_path, base_commit, worktree,
682
+ queue_order, started_at, updated_at, host_agent_id, pending_status, done_at, kind, promoted_from, target
683
+ FROM agents;
684
+ DROP TABLE agents;
685
+ ALTER TABLE agents_new RENAME TO agents;
686
+ CREATE INDEX agents_session_status ON agents(session, status);
687
+ -- The CLI and the plugin update separately; the pane warns when the hooks lag behind.
688
+ ALTER TABLE sessions ADD COLUMN plugin_version TEXT;
635
689
  `
636
690
  ];
637
691
  const preconditions = { 11: (db) => {
@@ -956,7 +1010,7 @@ function dropWorkspace(name, options = {}) {
956
1010
  }
957
1011
  // src/sessions.ts
958
1012
  const COLUMNS = `id, workspace, name, purpose, kind, status, cwd, repo, host, host_pid, hooked_at, last_title,
959
- parent_id, prompt_version, created_at, last_active_at, ended_at`;
1013
+ parent_id, prompt_version, plugin_version, created_at, last_active_at, ended_at`;
960
1014
  function toSession(row) {
961
1015
  return {
962
1016
  id: row.id,
@@ -973,6 +1027,7 @@ function toSession(row) {
973
1027
  lastTitle: row.last_title,
974
1028
  parentId: row.parent_id,
975
1029
  promptVersion: row.prompt_version,
1030
+ pluginVersion: row.plugin_version,
976
1031
  createdAt: row.created_at,
977
1032
  lastActiveAt: row.last_active_at,
978
1033
  endedAt: row.ended_at
@@ -1124,6 +1179,9 @@ function sessionByHostProcess(ctx, host, processId) {
1124
1179
  ORDER BY hooked_at DESC LIMIT 1`).get(host, processId);
1125
1180
  return row && toSession(row);
1126
1181
  }
1182
+ function recordPluginVersion(ctx, id, version) {
1183
+ ctx.db.prepare("UPDATE sessions SET plugin_version = ? WHERE id = ?").run(version, id);
1184
+ }
1127
1185
  function recordPromptVersion(ctx, id, version) {
1128
1186
  requireSession(ctx, id);
1129
1187
  ctx.db.prepare("UPDATE sessions SET prompt_version = ? WHERE id = ?").run(version, id);
@@ -1300,6 +1358,7 @@ function mergeSettings(base, extra) {
1300
1358
  }
1301
1359
  // src/hosts/claude-code.ts
1302
1360
  const TRANSCRIPT_TAIL_BYTES = 262144;
1361
+ const TRANSCRIPT_HEAD_BYTES = 65536;
1303
1362
  const TITLE_PATTERN = /"type":"custom-title","customTitle":("(?:[^"\\]|\\.)*")/g;
1304
1363
  const FORK_NAME_PATTERN = /You are (?:agent|fork) `([^`]+)`/;
1305
1364
  function payloadObject(json) {
@@ -1338,22 +1397,41 @@ function subagentPromptName(transcriptPath) {
1338
1397
  return;
1339
1398
  }
1340
1399
  }
1341
- function transcriptTitle(path) {
1400
+ function readSlice(path, from, bytes) {
1342
1401
  let descriptor;
1343
1402
  try {
1344
1403
  descriptor = openSync(path, "r");
1345
1404
  const size = fstatSync(descriptor).size;
1346
- const length = Math.min(size, TRANSCRIPT_TAIL_BYTES);
1405
+ const length = Math.min(size, bytes);
1347
1406
  const buffer = Buffer.alloc(length);
1348
- readSync(descriptor, buffer, 0, length, size - length);
1349
- const last = [...buffer.toString("utf8").matchAll(TITLE_PATTERN)].at(-1)?.[1];
1350
- return last === void 0 ? void 0 : JSON.parse(last);
1407
+ readSync(descriptor, buffer, 0, length, from === "end" ? size - length : 0);
1408
+ return buffer.toString("utf8");
1351
1409
  } catch {
1352
1410
  return;
1353
1411
  } finally {
1354
1412
  if (descriptor !== void 0) closeSync(descriptor);
1355
1413
  }
1356
1414
  }
1415
+ function transcriptTitle(path) {
1416
+ const tail = readSlice(path, "end", TRANSCRIPT_TAIL_BYTES);
1417
+ if (tail === void 0) return void 0;
1418
+ const last = [...tail.matchAll(TITLE_PATTERN)].at(-1)?.[1];
1419
+ return last === void 0 ? void 0 : JSON.parse(last);
1420
+ }
1421
+ function records(text) {
1422
+ return (text ?? "").split("\n").flatMap((line) => {
1423
+ try {
1424
+ const value = JSON.parse(line);
1425
+ return value && typeof value === "object" ? [value] : [];
1426
+ } catch {
1427
+ return [];
1428
+ }
1429
+ });
1430
+ }
1431
+ function continuesConversation(parentFile, childFile, parentId, childId) {
1432
+ if (records(readSlice(parentFile, "end", TRANSCRIPT_TAIL_BYTES)).some((record) => record.type === "continued-in" && record.continuedInSessionId === childId)) return true;
1433
+ return records(readSlice(childFile, "start", TRANSCRIPT_HEAD_BYTES)).some((record) => record.type === "derived-from" && Array.isArray(record.sessions) && record.sessions.some((source) => !!source && typeof source === "object" && source.id === parentId && source.via === "resume"));
1434
+ }
1357
1435
  const SETTINGS_FILE = join(".claude", "settings.json");
1358
1436
  const BACKEND_NOTES = "backends/claude.md";
1359
1437
  function instructionFiles(workspace) {
@@ -1561,6 +1639,11 @@ const claudeCode = {
1561
1639
  if (!existsSync(projects)) return false;
1562
1640
  return readdirSync(projects).some((project) => existsSync(join(projects, project, `${session.id}.jsonl`)));
1563
1641
  },
1642
+ continues(parent, childId, env = process.env) {
1643
+ if (!parent.cwd) return false;
1644
+ const project = join(projectsDirectory(env), parent.cwd.replace(/[^a-zA-Z0-9]/g, "-"));
1645
+ return continuesConversation(join(project, `${parent.id}.jsonl`), join(project, `${childId}.jsonl`), parent.id, childId);
1646
+ },
1564
1647
  renameInstruction(name) {
1565
1648
  return `Ask the human to run /rename ${name} in Claude Code so the titles match.`;
1566
1649
  },
@@ -2073,7 +2156,7 @@ function mergeSessions(ctx, fromId, intoId) {
2073
2156
  const movedTable = !(ctx.db.prepare("SELECT 1 FROM table_items WHERE session = ?").get(intoId) !== void 0) && Number(ctx.db.prepare("UPDATE table_items SET session = ? WHERE session = ?").run(intoId, fromId).changes) > 0;
2074
2157
  ctx.db.prepare("DELETE FROM table_items WHERE session = ?").run(fromId);
2075
2158
  const keepName = into.name === null && from.name !== null;
2076
- ctx.db.prepare("UPDATE sessions SET status = 'archived', kind = 'temp', name = NULL, last_active_at = ? WHERE id = ?").run(at, fromId);
2159
+ ctx.db.prepare("UPDATE sessions SET status = 'archived', kind = 'temp', name = NULL, turn = NULL, turn_started_at = NULL, last_active_at = ? WHERE id = ?").run(at, fromId);
2077
2160
  ctx.db.prepare(`UPDATE sessions
2078
2161
  SET name = COALESCE(?, name), purpose = COALESCE(purpose, ?), last_active_at = ?,
2079
2162
  kind = CASE WHEN ? THEN ? ELSE kind END
@@ -2132,6 +2215,7 @@ function purgeSessions(ctx, keepId, days) {
2132
2215
  // src/status/render.ts
2133
2216
  const MAIN_HEADER = "Main";
2134
2217
  const MAIN_WORKING_SUFFIX = "(main working)";
2218
+ const BLOCKED_HEADER = "Waiting on agents";
2135
2219
  const MAIN_WAITING_SUFFIX = "(waiting on you)";
2136
2220
  const MAIN_FAILED_SUFFIX = "(turn failed)";
2137
2221
  function renderTableLine(item) {
@@ -2154,13 +2238,14 @@ const TURN_MARKS = {
2154
2238
  alone: "turn failed"
2155
2239
  }
2156
2240
  };
2241
+ const MAIN_IDLE = "idle";
2157
2242
  function renderMainLine(item, turn) {
2158
- if (!turn) return item ? renderTableLine(item) : null;
2243
+ if (!turn) return item ? renderTableLine(item) : MAIN_IDLE;
2159
2244
  const mark = TURN_MARKS[turn];
2160
2245
  return item ? `${mark.emoji} ${item.text} ${mark.suffix}` : `${mark.emoji} ${mark.alone}`;
2161
2246
  }
2162
2247
  function renderAgentLine(line, nameWidth = 0) {
2163
- const head = `${line.emoji} ${KIND_ABBREVIATIONS[line.kind]} ${line.name}`;
2248
+ const head = `${line.emoji} ${kindTag(line.kind)} ${line.name}`;
2164
2249
  const action = line.action ? ` ${" ".repeat(Math.max(nameWidth - line.name.length, 0))} ${line.action}` : "";
2165
2250
  return line.note ? `${head}${action} — ${line.note}` : `${head}${action}`;
2166
2251
  }
@@ -2206,14 +2291,18 @@ function renderNotes(notes, mode = "full") {
2206
2291
  }
2207
2292
  function renderSections(view, options = {}) {
2208
2293
  const out = [];
2209
- const main = renderMainLine(view.table, view.turn);
2210
- if (main) out.push(MAIN_HEADER, ` ${main}`, "");
2294
+ out.push(MAIN_HEADER, ` ${renderMainLine(view.table, view.turn)}`, "");
2211
2295
  out.push("Waiting on you");
2212
2296
  if (view.waiting.length === 0) out.push(" nothing");
2213
2297
  const waitingWidth = nameWidth(view.waiting);
2214
2298
  view.waiting.forEach((line, index) => {
2215
2299
  out.push(` ${index + 1}. ${renderAgentLine(line, waitingWidth)}`);
2216
2300
  });
2301
+ if (view.blocked.length > 0) {
2302
+ out.push("", BLOCKED_HEADER);
2303
+ const blockedWidth = nameWidth(view.blocked);
2304
+ for (const line of view.blocked) out.push(` ${renderAgentLine(line, blockedWidth)}`);
2305
+ }
2217
2306
  out.push("", "Running");
2218
2307
  if (view.running.length === 0) out.push(" nothing");
2219
2308
  const runningWidth = nameWidth(view.running);
@@ -2294,8 +2383,7 @@ const ACTION_RANK = {
2294
2383
  triage: 2,
2295
2384
  inject: 3,
2296
2385
  apply: 4,
2297
- test: 5,
2298
- commit: 6
2386
+ test: 5
2299
2387
  };
2300
2388
  function plural(count, word) {
2301
2389
  return `${count} ${word}${count === 1 ? "" : "s"}`;
@@ -2305,7 +2393,7 @@ function actionWord(agent) {
2305
2393
  if (status === "answer") return kind === "analyze" ? "validate" : "answer";
2306
2394
  if (status === "review" && kind !== "implement") return FINAL_ACTIONS[kind];
2307
2395
  if (status === "apply" && kind === "implement") return "apply";
2308
- if (status === "test" || status === "commit" || status === "branch") return status;
2396
+ if (status === "test") return status;
2309
2397
  return status === "discussing" ? "discuss" : status;
2310
2398
  }
2311
2399
  function actionDetail(ctx, agent, word) {
@@ -2361,9 +2449,14 @@ function formatClock(date) {
2361
2449
  return `${String(date.getHours()).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}`;
2362
2450
  }
2363
2451
  function buildStatusView(ctx, session, options = {}) {
2364
- const agents = listAgents(ctx, session.id).filter((agent) => !options.kind || agent.kind === options.kind);
2452
+ const all = listAgents(ctx, session.id);
2453
+ const open = new Set(all.map((agent) => agent.name));
2454
+ const isBlocked = (agent) => agent.blockedOn !== null && open.has(agent.blockedOn);
2455
+ const agents = all.filter((agent) => !options.kind || agent.kind === options.kind);
2365
2456
  const table = getTable(ctx, session.id) ?? null;
2366
- const waiting = agents.filter((agent) => isUserActionStatus(agent.status) && !tableIsAbout(table, agent.name)).sort(compareWaiting).map((agent) => toLine(agent, waitingAction(ctx, agent)));
2457
+ const handed = agents.filter((agent) => isUserActionStatus(agent.status));
2458
+ const waiting = handed.filter((agent) => !isBlocked(agent) && !tableIsAbout(table, agent.name)).sort(compareWaiting).map((agent) => toLine(agent, waitingAction(ctx, agent)));
2459
+ const blocked = handed.filter(isBlocked).map((agent) => toLine(agent, `→ ${agent.blockedOn}`));
2367
2460
  const running = agents.filter((agent) => agent.status === "running").map((agent) => toLine(agent, runningAction(agent)));
2368
2461
  return {
2369
2462
  time: formatClock(ctx.now()),
@@ -2371,6 +2464,7 @@ function buildStatusView(ctx, session, options = {}) {
2371
2464
  table,
2372
2465
  turn: getTurn(ctx, session.id),
2373
2466
  waiting,
2467
+ blocked,
2374
2468
  running,
2375
2469
  notes: sessionNoteActivity(ctx, session.id)
2376
2470
  };
@@ -2459,6 +2553,7 @@ var Carnet = class {
2459
2553
  default: () => defaultSession(this.ctx),
2460
2554
  byName: (name) => sessionByName(this.ctx, name),
2461
2555
  byHostProcess: (host, processId) => sessionByHostProcess(this.ctx, host, processId),
2556
+ recordPluginVersion: (id, version) => recordPluginVersion(this.ctx, id, version),
2462
2557
  recordPromptVersion: (id, version) => recordPromptVersion(this.ctx, id, version),
2463
2558
  setParent: (id, parentId) => setParent(this.ctx, id, parentId),
2464
2559
  setStatus: (id, status) => setSessionStatus(this.ctx, id, status),
@@ -2607,7 +2702,7 @@ const AGENT_STEPS = [
2607
2702
  ];
2608
2703
  const DEFAULT_NEXT = {
2609
2704
  applied: "test",
2610
- tested: "commit"
2705
+ tested: "test"
2611
2706
  };
2612
2707
  function clearTableOf(carnet, session, name) {
2613
2708
  if (tableIsAbout(carnet.table.get(session), name)) carnet.table.clear(session);
@@ -2622,7 +2717,8 @@ function stepAgent(carnet, session, input) {
2622
2717
  carnet.table.set(session, { text: `${name} applying` });
2623
2718
  carnet.agents.update(session, name, {
2624
2719
  status: agent.status,
2625
- note: note ?? null
2720
+ note: note ?? null,
2721
+ blockedOn: null
2626
2722
  });
2627
2723
  const reviews = carnet.agents.list(session).filter((other) => other.kind === "review" && other.target === name);
2628
2724
  return `⚙️ ${name} applying${reviews.length ? `\nwarning: review ${reviews.map((review) => review.name).join(", ")} not triaged yet` : ""}`;
@@ -2637,7 +2733,7 @@ function stepAgent(carnet, session, input) {
2637
2733
  });
2638
2734
  carnet.agents.drop(session, name, `committed ${commit}`);
2639
2735
  clearTableOf(carnet, session, name);
2640
- return `${EMOJI.commit} ${name} committed ${commit}, closed`;
2736
+ return `✅ ${name} committed ${commit}, closed`;
2641
2737
  case "dropped":
2642
2738
  carnet.agents.drop(session, name, note);
2643
2739
  clearTableOf(carnet, session, name);
@@ -2651,17 +2747,21 @@ function stepAgent(carnet, session, input) {
2651
2747
  });
2652
2748
  carnet.agents.update(session, name, {
2653
2749
  status: next,
2654
- note: note ?? null
2750
+ note: note ?? null,
2751
+ blockedOn: null
2655
2752
  });
2656
2753
  if (next === "running") clearTableOf(carnet, session, name);
2657
- else if (step !== "answered") carnet.table.set(session, {
2658
- text: `${name} ${step}, ${next} next`,
2659
- status: next
2660
- });
2754
+ else if (step !== "answered") {
2755
+ const left = step === "tested" ? "commit" : next;
2756
+ carnet.table.set(session, {
2757
+ text: `${name} ${step}, ${left} next`,
2758
+ status: next
2759
+ });
2760
+ }
2661
2761
  return `logged ${step} · ${EMOJI[next]} ${name} ${next}`;
2662
2762
  }
2663
2763
  }
2664
2764
  }
2665
- export { workspaceLabel as $, defaultRunDirectory as $t, renderStatus as A, OPEN_AGENT_STATUSES as An, MINIMUM_ID_PREFIX as At, NOTE_TEXT_LIMIT as B, isWorkspaceName as Bt, SIMILAR_PREFIX as C, EMOJI as Cn, baseRules as Ct, renderNotes as D, MAIN_FAILED_EMOJI as Dn, rulesVersion as Dt, renderNoteLine as E, LEGEND as En, rulesText as Et, memoryMaxCharacters as F, SESSION_EVENT_TYPES as Fn, addWorkspaceRepo as Ft, sessionNoteActivity as G, workspaceHosts as Gt, isNoteKind as H, loadWorkspace as Ht, renderMemory as I, isEventType as In, createWorkspace as It, isInside as J, FINDING_SEVERITIES as Jt, similarity as K, renderQuestions as Kt, DEFAULT_HALF_LIFE_DAYS as L, CarnetError as Ln, definitionInstructions as Lt, DEFAULT_PURGE_DAYS as M, isAgentStatus as Mn, AGENTS_FILE as Mt, purgeDays as N, isUserActionStatus as Nn, INSTRUCTIONS_FILE as Nt, renderNotesSummary as O, MAIN_WAITING_EMOJI as On, workspaceRules as Ot, MEMORY_MAX_CHARACTERS as P, EVENT_TYPES as Pn, WORKSPACE_FILE as Pt, resolveWorkspace as Q, databasePath as Qt, DUPLICATE_SIMILARITY as R, dropWorkspace as Rt, NOTES_HEADER as S, AGENT_STATUSES as Sn, assemblePrompt as St, renderMainLine as T, KIND_LEGEND as Tn, outsideRucherContext as Tt, localDay as U, removeWorkspaceRepo as Ut, STALE_AFTER_ACTIVE_DAYS as V, listWorkspaces as Vt, memoryHalfLife as W, workspaceExists as Wt, repoPathFor as X, renderFindings as Xt, repoNameFor as Y, formatFinding as Yt, requireWorkspace as Z, corePromptPath as Zt, MAIN_FAILED_SUFFIX as _, mainTargetRange as _n, OUTSIDE_RUCHER_NOTICE as _t, formatEventLine as a, workspacesDirectory as an, DEFAULT_HOST as at, MAIN_WORKING_SUFFIX as b, NOTE_MAX as bn, SUBAGENT_RULES as bt, Carnet as c, migrate as cn, claudeCode as ct, openWorkspaceCarnet as d, AGENT_KINDS as dn, GENERATED_MARKER as dt, promptsDirectory as en, archiveWorkspaceSessions as et, PAIRING_WINDOW_MILLISECONDS as f, DEFAULT_AGENT_KIND as fn, MARKDOWN_MARKER as ft, TURNS as g, isAgentKind as gn, writeGenerated as gt, formatClock as h, REPORTING_NOTE as hn, removeStaleCopies as ht, RESUME_MAX_CHARACTERS as i, workspaceDefinition as in, workspaceSessionCounts as it, renderTableLine as j, USER_ACTION_STATUSES as jn, shortId as jt, renderSections as k, MAIN_WORKING_EMOJI as kn, CORE_RULES as kt, openCarnet as l, migrations as ln, transcriptTitle as lt, buildStatusView as m, PUBLISH_FALLBACK_MILLISECONDS as mn, mergeSettings as mt, stepAgent as n, reportsDirectory as nn, sessionWorkspaceName as nt, resumeContext as o, MEMORY_DB as on, allHosts as ot, STOPPED_NOTE as p, FINAL_ACTIONS as pn, markdownCopy as pt, workspaceRepoNames as q, FINDING_DECISIONS as qt, RESUME_EVENTS as r, rucherPaths as rn, workspaceLastActive as rt, sessionLabel as s, openDatabase as sn, hostById as st, AGENT_STEPS as t, reportPath as tn, deleteWorkspaceNotes as tt, openResolvedCarnet as u, schemaVersion as un, workspaceSettings as ut, MAIN_HEADER as v, statusAfterAnswers as vn, PROMPT_FILE as vt, renderAgentLine as w, KIND_ABBREVIATIONS as wn, compactReminder as wt, NOTES_FOLD_LINES as x, sanitizeNote as xn, appendPromptFile as xt, MAIN_WAITING_SUFFIX as y, statusWhenDone as yn, RULES_UPDATED_NOTICE as yt, NOTE_KINDS as z, expandHome as zt };
2765
+ export { requireWorkspace as $, corePromptPath as $t, renderNotesSummary as A, MAIN_FAILED_EMOJI as An, workspaceRules as At, DUPLICATE_SIMILARITY as B, isEventType as Bn, dropWorkspace as Bt, NOTES_FOLD_LINES as C, sanitizeNote as Cn, appendPromptFile as Ct, renderMainLine as D, KIND_LEGEND as Dn, outsideRucherContext as Dt, renderAgentLine as E, KIND_ABBREVIATIONS as En, compactReminder as Et, purgeDays as F, isAgentStatus as Fn, INSTRUCTIONS_FILE as Ft, localDay as G, removeWorkspaceRepo as Gt, NOTE_TEXT_LIMIT as H, isWorkspaceName as Ht, MEMORY_MAX_CHARACTERS as I, isUserActionStatus as In, WORKSPACE_FILE as It, similarity as J, renderQuestions as Jt, memoryHalfLife as K, workspaceExists as Kt, memoryMaxCharacters as L, kindTag as Ln, addWorkspaceRepo as Lt, renderStatus as M, MAIN_WORKING_EMOJI as Mn, MINIMUM_ID_PREFIX as Mt, renderTableLine as N, OPEN_AGENT_STATUSES as Nn, shortId as Nt, renderNoteLine as O, KIND_TAG_PATTERN as On, rulesText as Ot, DEFAULT_PURGE_DAYS as P, USER_ACTION_STATUSES as Pn, AGENTS_FILE as Pt, repoPathFor as Q, renderFindings as Qt, renderMemory as R, EVENT_TYPES as Rn, createWorkspace as Rt, MAIN_WORKING_SUFFIX as S, NOTE_MAX as Sn, SUBAGENT_RULES as St, SIMILAR_PREFIX as T, EMOJI as Tn, baseRules as Tt, STALE_AFTER_ACTIVE_DAYS as U, listWorkspaces as Ut, NOTE_KINDS as V, CarnetError as Vn, expandHome as Vt, isNoteKind as W, loadWorkspace as Wt, isInside as X, FINDING_SEVERITIES as Xt, workspaceRepoNames as Y, FINDING_DECISIONS as Yt, repoNameFor as Z, formatFinding as Zt, BLOCKED_HEADER as _, REPORTING_NOTE as _n, removeStaleCopies as _t, formatEventLine as a, rucherPaths as an, workspaceLastActive as at, MAIN_IDLE as b, statusAfterAnswers as bn, PROMPT_FILE as bt, Carnet as c, MEMORY_DB as cn, allHosts as ct, openWorkspaceCarnet as d, migrations as dn, transcriptTitle as dt, databasePath as en, resolveWorkspace as et, PAIRING_WINDOW_MILLISECONDS as f, schemaVersion as fn, workspaceSettings as ft, TURNS as g, PUBLISH_FALLBACK_MILLISECONDS as gn, mergeSettings as gt, formatClock as h, FINAL_ACTIONS as hn, markdownCopy as ht, RESUME_MAX_CHARACTERS as i, reportsDirectory as in, sessionWorkspaceName as it, renderSections as j, MAIN_WAITING_EMOJI as jn, CORE_RULES as jt, renderNotes as k, LEGEND as kn, rulesVersion as kt, openCarnet as l, openDatabase as ln, hostById as lt, buildStatusView as m, DEFAULT_AGENT_KIND as mn, MARKDOWN_MARKER as mt, stepAgent as n, promptsDirectory as nn, archiveWorkspaceSessions as nt, resumeContext as o, workspaceDefinition as on, workspaceSessionCounts as ot, STOPPED_NOTE as p, AGENT_KINDS as pn, GENERATED_MARKER as pt, sessionNoteActivity as q, workspaceHosts as qt, RESUME_EVENTS as r, reportPath as rn, deleteWorkspaceNotes as rt, sessionLabel as s, workspacesDirectory as sn, DEFAULT_HOST as st, AGENT_STEPS as t, defaultRunDirectory as tn, workspaceLabel as tt, openResolvedCarnet as u, migrate as un, claudeCode as ut, MAIN_FAILED_SUFFIX as v, isAgentKind as vn, writeGenerated as vt, NOTES_HEADER as w, AGENT_STATUSES as wn, assemblePrompt as wt, MAIN_WAITING_SUFFIX as x, statusWhenDone as xn, RULES_UPDATED_NOTICE as xt, MAIN_HEADER as y, mainTargetRange as yn, OUTSIDE_RUCHER_NOTICE as yt, DEFAULT_HALF_LIFE_DAYS as z, SESSION_EVENT_TYPES as zn, definitionInstructions as zt };
2666
2766
 
2667
- //# sourceMappingURL=steps-Bd8FlgLs.mjs.map
2767
+ //# sourceMappingURL=steps-xzr8iVWn.mjs.map