tickmarkr 1.72.0 → 1.74.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/cli/commands/approve.js +21 -3
- package/dist/cli/commands/resume.js +10 -2
- package/dist/cli/commands/status.d.ts +2 -0
- package/dist/cli/commands/status.js +260 -41
- package/dist/cli/commands/ui.d.ts +6 -2
- package/dist/cli/commands/ui.js +2 -4
- package/dist/config/config.d.ts +4 -0
- package/dist/config/config.js +6 -1
- package/dist/drivers/herdr.d.ts +5 -0
- package/dist/drivers/herdr.js +100 -10
- package/dist/drivers/subprocess.d.ts +3 -3
- package/dist/drivers/subprocess.js +10 -5
- package/dist/gates/acceptance.js +19 -1
- package/dist/gates/llm.d.ts +4 -0
- package/dist/gates/llm.js +16 -3
- package/dist/gates/run-gates.d.ts +1 -1
- package/dist/gates/run-gates.js +25 -3
- package/dist/route/preference.d.ts +2 -1
- package/dist/route/preference.js +8 -2
- package/dist/run/daemon.d.ts +1 -0
- package/dist/run/daemon.js +139 -4
- package/dist/run/git.d.ts +2 -0
- package/dist/run/git.js +55 -0
- package/dist/run/journal.d.ts +21 -1
- package/dist/run/journal.js +83 -5
- package/dist/tui/ink/components.d.ts +18 -0
- package/dist/tui/ink/components.js +30 -2
- package/dist/tui/ink/studio-app.d.ts +59 -0
- package/dist/tui/ink/studio-app.js +320 -0
- package/package.json +1 -1
- package/dist/tui/app.d.ts +0 -72
- package/dist/tui/app.js +0 -334
- package/dist/tui/engine.d.ts +0 -52
- package/dist/tui/engine.js +0 -92
- package/dist/tui/frame.d.ts +0 -22
- package/dist/tui/frame.js +0 -56
- package/dist/tui/input.d.ts +0 -41
- package/dist/tui/input.js +0 -100
- package/dist/tui/views/consult-dossier.d.ts +0 -49
- package/dist/tui/views/consult-dossier.js +0 -169
- package/dist/tui/views/diff-modal.d.ts +0 -9
- package/dist/tui/views/diff-modal.js +0 -19
- package/dist/tui/views/fleet-view.d.ts +0 -91
- package/dist/tui/views/fleet-view.js +0 -337
- package/dist/tui/views/preview-view.d.ts +0 -7
- package/dist/tui/views/preview-view.js +0 -80
- package/dist/tui/views/profile-view.d.ts +0 -15
- package/dist/tui/views/profile-view.js +0 -93
- package/dist/tui/views/routing-view.d.ts +0 -48
- package/dist/tui/views/routing-view.js +0 -234
- package/dist/tui/views/runs-view.d.ts +0 -70
- package/dist/tui/views/runs-view.js +0 -387
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
// T1 (v1.68): Runs cockpit — journal timeline, per-task gate ladder, attempt history.
|
|
2
|
-
// Pure render over INJECTED data: this module never touches the filesystem. The caller hands in
|
|
3
|
-
// a journal event list and a compiled graph; the view folds them into task cards and a dispatch-
|
|
4
|
-
// ordered attempt history itself. The task card language and gate ladder reuse the existing status
|
|
5
|
-
// command helpers verbatim rather than reimplementing them.
|
|
6
|
-
import { GLYPHS, dim, fail, legend, ok, statusRow, warn } from "../../brand.js";
|
|
7
|
-
import { channelKey } from "../../adapters/types.js";
|
|
8
|
-
import { GATE_NAMES, } from "../../graph/schema.js";
|
|
9
|
-
import { foldActivity } from "../../run/activity.js";
|
|
10
|
-
import { formatJournalNarration } from "../../run/journal.js";
|
|
11
|
-
import { costSignal } from "../../cli/commands/fleet-picker.js";
|
|
12
|
-
import { approve } from "../../cli/commands/approve.js";
|
|
13
|
-
import { gateChain, gateStates, defaultGateStates, humanGateSuffix, shortGoal, failedGates, } from "../../cli/commands/status.js";
|
|
14
|
-
import { renderDossierPlaceholder } from "./consult-dossier.js";
|
|
15
|
-
const channelOf = (assignment) => {
|
|
16
|
-
const a = assignment;
|
|
17
|
-
return typeof a?.adapter === "string" && typeof a.model === "string" ? `${a.adapter}:${a.model}` : "unknown channel";
|
|
18
|
-
};
|
|
19
|
-
const taskVerdict = (st) => st === "done" ? "pass" : st === "failed" ? "fail" : st === "human" ? "warn" : "neutral";
|
|
20
|
-
/** Local replay of task statuses from events only — mirrors Journal.replayStatuses but keeps the
|
|
21
|
-
* view filesystem-free. */
|
|
22
|
-
function replayStatuses(events) {
|
|
23
|
-
const s = new Map();
|
|
24
|
-
for (const e of events) {
|
|
25
|
-
if (!e.taskId)
|
|
26
|
-
continue;
|
|
27
|
-
if (e.event === "task-dispatch")
|
|
28
|
-
s.set(e.taskId, "running");
|
|
29
|
-
else if (e.event === "task-done")
|
|
30
|
-
s.set(e.taskId, "done");
|
|
31
|
-
else if (e.event === "task-failed")
|
|
32
|
-
s.set(e.taskId, "failed");
|
|
33
|
-
else if (e.event === "task-human")
|
|
34
|
-
s.set(e.taskId, "human");
|
|
35
|
-
else if (e.event === "task-approved")
|
|
36
|
-
s.set(e.taskId, "pending");
|
|
37
|
-
}
|
|
38
|
-
for (const [id, st] of s)
|
|
39
|
-
if (st === "running")
|
|
40
|
-
s.set(id, "pending");
|
|
41
|
-
return s;
|
|
42
|
-
}
|
|
43
|
-
/** Fold one task's dispatch-ordered attempt history. Each task-dispatch opens an attempt; a
|
|
44
|
-
* worker-result sets the attempt's outcome; task-done/task-failed/task-approved finish it. A new
|
|
45
|
-
* dispatch while the previous attempt is still in-flight marks it aborted. */
|
|
46
|
-
function foldAttempts(events, taskId) {
|
|
47
|
-
const attempts = [];
|
|
48
|
-
let open;
|
|
49
|
-
const finish = () => {
|
|
50
|
-
if (open) {
|
|
51
|
-
attempts.push(open);
|
|
52
|
-
open = undefined;
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
for (const e of events) {
|
|
56
|
-
if (e.taskId !== taskId)
|
|
57
|
-
continue;
|
|
58
|
-
if (e.event === "task-dispatch" || e.event === "escalation") {
|
|
59
|
-
if (open) {
|
|
60
|
-
if (open.outcome === "in-flight")
|
|
61
|
-
open.outcome = "aborted";
|
|
62
|
-
finish();
|
|
63
|
-
}
|
|
64
|
-
const attempt = (Number.isInteger(e.data.attempt) ? e.data.attempt : 0) + 1;
|
|
65
|
-
open = { attempt, channel: channelOf(e.data.assignment), outcome: "in-flight" };
|
|
66
|
-
}
|
|
67
|
-
else if (e.event === "worker-result" && open) {
|
|
68
|
-
const ok = e.data.ok === true;
|
|
69
|
-
const finished = e.data.finished === true;
|
|
70
|
-
if (ok && finished) {
|
|
71
|
-
open.outcome = "clean";
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
open.outcome = "failed";
|
|
75
|
-
open.cause = e.data.cause ?? undefined;
|
|
76
|
-
open.note = typeof e.data.summary === "string" ? e.data.summary : undefined;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
else if (e.event === "task-done" || e.event === "task-approved") {
|
|
80
|
-
if (open && open.outcome === "in-flight")
|
|
81
|
-
open.outcome = "clean";
|
|
82
|
-
finish();
|
|
83
|
-
}
|
|
84
|
-
else if (e.event === "task-failed") {
|
|
85
|
-
if (open && open.outcome === "in-flight")
|
|
86
|
-
open.outcome = "failed";
|
|
87
|
-
finish();
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
finish();
|
|
91
|
-
return attempts;
|
|
92
|
-
}
|
|
93
|
-
/** Build the injected raw data into task rows. Pure function, no filesystem access. */
|
|
94
|
-
export function foldRunsTasks(data) {
|
|
95
|
-
const { events, graph, comparable = true } = data;
|
|
96
|
-
const statuses = replayStatuses(events);
|
|
97
|
-
const assignments = new Map();
|
|
98
|
-
const contexts = new Map();
|
|
99
|
-
for (const e of events) {
|
|
100
|
-
if (e.event === "task-dispatch" && e.taskId) {
|
|
101
|
-
assignments.set(e.taskId, channelOf(e.data.assignment));
|
|
102
|
-
}
|
|
103
|
-
if (e.event === "context-sample" && e.taskId && typeof e.data.tokens === "number" && Number.isFinite(e.data.tokens)) {
|
|
104
|
-
contexts.set(e.taskId, e.data.tokens);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
const activityTasks = graph.tasks.map((t) => ({
|
|
108
|
-
id: t.id,
|
|
109
|
-
gates: t.gates,
|
|
110
|
-
deps: t.deps,
|
|
111
|
-
status: statuses.get(t.id) ?? t.status,
|
|
112
|
-
}));
|
|
113
|
-
const activity = foldActivity(comparable ? events : [], activityTasks);
|
|
114
|
-
return graph.tasks.map((t) => {
|
|
115
|
-
const status = statuses.get(t.id) ?? t.status;
|
|
116
|
-
const states = comparable ? gateStates(t, events) : defaultGateStates(t);
|
|
117
|
-
const channel = assignments.get(t.id) ?? "-";
|
|
118
|
-
return {
|
|
119
|
-
task: t,
|
|
120
|
-
status,
|
|
121
|
-
states,
|
|
122
|
-
channel,
|
|
123
|
-
ctx: contexts.get(t.id),
|
|
124
|
-
activity: activity.cells.get(t.id),
|
|
125
|
-
attempts: foldAttempts(events, t.id),
|
|
126
|
-
};
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
const CARD_LINES = 3; // 2 content lines + 1 blank separator
|
|
130
|
-
const usageTotal = (u) => u.input + u.output + (u.cacheRead ?? 0) + (u.cacheWrite ?? 0) + (u.reasoning ?? 0);
|
|
131
|
-
/** Sum observed token usage per channel for the loaded run. Dispatch events name the channel's
|
|
132
|
-
* full assignment (billing channel + tier); telemetry rows contribute the metered tokens. A
|
|
133
|
-
* telemetry-only channel degrades costSignal to "api metered" — never an invented price. */
|
|
134
|
-
export function foldCostTicker(data) {
|
|
135
|
-
const pricing = data.pricing ?? {};
|
|
136
|
-
const rows = new Map();
|
|
137
|
-
const rowFor = (key) => {
|
|
138
|
-
let r = rows.get(key);
|
|
139
|
-
if (!r) {
|
|
140
|
-
r = { tasks: new Set(), tokens: 0, metered: false };
|
|
141
|
-
rows.set(key, r);
|
|
142
|
-
}
|
|
143
|
-
return r;
|
|
144
|
-
};
|
|
145
|
-
for (const e of data.events) {
|
|
146
|
-
if (e.event !== "task-dispatch" || !e.taskId)
|
|
147
|
-
continue;
|
|
148
|
-
const a = e.data.assignment;
|
|
149
|
-
if (!a || typeof a.adapter !== "string" || typeof a.model !== "string")
|
|
150
|
-
continue;
|
|
151
|
-
const r = rowFor(channelKey(a));
|
|
152
|
-
r.tasks.add(e.taskId);
|
|
153
|
-
if ((a.channel === "sub" || a.channel === "api") && typeof a.tier === "string")
|
|
154
|
-
r.assignment = a;
|
|
155
|
-
}
|
|
156
|
-
for (const t of data.telemetry ?? []) {
|
|
157
|
-
const r = rowFor(channelKey(t));
|
|
158
|
-
if (t.tokens) {
|
|
159
|
-
r.tokens += usageTotal(t.tokens);
|
|
160
|
-
r.metered = true;
|
|
161
|
-
}
|
|
162
|
-
if (!r.assignment && (t.channel === "sub" || t.channel === "api")) {
|
|
163
|
-
r.assignment = { adapter: t.adapter, model: t.model, channel: t.channel, tier: "" };
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return [...rows.entries()].map(([key, r]) => ({
|
|
167
|
-
key,
|
|
168
|
-
signal: r.assignment ? costSignal(r.assignment, pricing) : "channel unknown",
|
|
169
|
-
tasks: r.tasks.size,
|
|
170
|
-
tokens: r.metered ? r.tokens : undefined,
|
|
171
|
-
}));
|
|
172
|
-
}
|
|
173
|
-
/** Last tip-verify event wins; none recorded yet ⇒ pending — never a false pass or fail. */
|
|
174
|
-
function tipVerifyState(events) {
|
|
175
|
-
for (let i = events.length - 1; i >= 0; i--) {
|
|
176
|
-
const e = events[i];
|
|
177
|
-
if (e.event === "tip-verify" || e.event === "tip-verify-failed") {
|
|
178
|
-
return {
|
|
179
|
-
state: e.event === "tip-verify" ? "passed" : "failed",
|
|
180
|
-
gate: typeof e.data.gate === "string" ? e.data.gate : undefined,
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return { state: "pending" };
|
|
185
|
-
}
|
|
186
|
-
function tipVerifyLine(events) {
|
|
187
|
-
const tip = tipVerifyState(events);
|
|
188
|
-
const word = tip.state === "passed" ? ok("passed") : tip.state === "failed" ? fail("failed") : dim("pending");
|
|
189
|
-
return legend(` tip-verify: ${tip.gate ? `${tip.gate} ` : ""}`) + word;
|
|
190
|
-
}
|
|
191
|
-
/** Cost values stay plain (CLI-DESIGN "data plain"): costSignal's output verbatim, never colorized. */
|
|
192
|
-
function costTickerPanel(data) {
|
|
193
|
-
const rows = foldCostTicker(data);
|
|
194
|
-
const lines = ["", dim("── cost ticker ──")];
|
|
195
|
-
if (rows.length === 0) {
|
|
196
|
-
lines.push(" no channel usage observed yet");
|
|
197
|
-
return lines;
|
|
198
|
-
}
|
|
199
|
-
const keyW = Math.max(...rows.map((r) => r.key.length));
|
|
200
|
-
for (const r of rows) {
|
|
201
|
-
const parts = [r.signal, `${r.tasks} task${r.tasks === 1 ? "" : "s"}`];
|
|
202
|
-
if (r.tokens !== undefined)
|
|
203
|
-
parts.push(`${r.tokens} tokens`);
|
|
204
|
-
lines.push(` ${r.key.padEnd(keyW)} ${parts.join(" · ")}`);
|
|
205
|
-
}
|
|
206
|
-
return lines;
|
|
207
|
-
}
|
|
208
|
-
export function createRunsView(data, opts) {
|
|
209
|
-
let currentData = data;
|
|
210
|
-
let tasks = currentData ? foldRunsTasks(currentData) : [];
|
|
211
|
-
let cursor = 0;
|
|
212
|
-
let confirming = null;
|
|
213
|
-
let notice = null;
|
|
214
|
-
let busy = false;
|
|
215
|
-
let approvalPromise;
|
|
216
|
-
const repoRoot = opts?.repoRoot;
|
|
217
|
-
const onNotice = opts?.onNotice ?? (() => { });
|
|
218
|
-
const reload = opts?.reload;
|
|
219
|
-
const setNotice = (message) => {
|
|
220
|
-
notice = message;
|
|
221
|
-
onNotice(message);
|
|
222
|
-
};
|
|
223
|
-
const refresh = async () => {
|
|
224
|
-
if (!reload)
|
|
225
|
-
return;
|
|
226
|
-
currentData = await reload();
|
|
227
|
-
tasks = currentData ? foldRunsTasks(currentData) : [];
|
|
228
|
-
};
|
|
229
|
-
const runApprove = async (taskId) => {
|
|
230
|
-
if (!repoRoot || !currentData?.runId) {
|
|
231
|
-
setNotice("approval not available — no run loaded");
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
|
-
busy = true;
|
|
235
|
-
setNotice("approving…");
|
|
236
|
-
try {
|
|
237
|
-
const message = await approve([currentData.runId, taskId], repoRoot);
|
|
238
|
-
await refresh();
|
|
239
|
-
setNotice(message);
|
|
240
|
-
}
|
|
241
|
-
catch (e) {
|
|
242
|
-
setNotice(e instanceof Error ? e.message : String(e));
|
|
243
|
-
}
|
|
244
|
-
finally {
|
|
245
|
-
busy = false;
|
|
246
|
-
approvalPromise = undefined;
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
const view = {
|
|
250
|
-
id: "runs",
|
|
251
|
-
label: "Runs",
|
|
252
|
-
cursor: 0,
|
|
253
|
-
key(name) {
|
|
254
|
-
if (busy)
|
|
255
|
-
return;
|
|
256
|
-
if (confirming) {
|
|
257
|
-
const taskId = confirming.taskId;
|
|
258
|
-
confirming = null;
|
|
259
|
-
if (name === "y") {
|
|
260
|
-
approvalPromise = runApprove(taskId);
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
setNotice("approval cancelled");
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
if (!tasks.length)
|
|
267
|
-
return;
|
|
268
|
-
if (name === "up")
|
|
269
|
-
cursor = Math.max(cursor - 1, 0);
|
|
270
|
-
else if (name === "down")
|
|
271
|
-
cursor = Math.min(cursor + 1, tasks.length - 1);
|
|
272
|
-
else if (name === "a") {
|
|
273
|
-
if (!repoRoot || !currentData?.runId) {
|
|
274
|
-
setNotice("approval not available — no run loaded");
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
const task = tasks[cursor];
|
|
278
|
-
if (!task)
|
|
279
|
-
return;
|
|
280
|
-
if (task.status === "human") {
|
|
281
|
-
confirming = { taskId: task.task.id };
|
|
282
|
-
setNotice(`approve ${task.task.id}? releases the parked human gate and resumes the run. [y] confirm [any key] cancel`);
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
approvalPromise = runApprove(task.task.id);
|
|
286
|
-
}
|
|
287
|
-
this.cursor = cursor;
|
|
288
|
-
},
|
|
289
|
-
selectedTask() {
|
|
290
|
-
return tasks[cursor];
|
|
291
|
-
},
|
|
292
|
-
render(props) {
|
|
293
|
-
if (!currentData || !currentData.runId) {
|
|
294
|
-
return emptyState();
|
|
295
|
-
}
|
|
296
|
-
const last = currentData.events.at(-1);
|
|
297
|
-
const now = last ? formatJournalNarration(last) : undefined;
|
|
298
|
-
const lines = [];
|
|
299
|
-
if (now)
|
|
300
|
-
lines.push(legend(` now: ${now}`));
|
|
301
|
-
else
|
|
302
|
-
lines.push(legend(" now: —"));
|
|
303
|
-
lines.push(tipVerifyLine(currentData.events));
|
|
304
|
-
lines.push(legend(` gates: ${GATE_NAMES.join(" · ")}`));
|
|
305
|
-
lines.push("");
|
|
306
|
-
const { rows } = props;
|
|
307
|
-
const ticker = costTickerPanel(currentData);
|
|
308
|
-
// Reserve space for: now, tip-verify, gates legend, blank, detail panel (blank + divider +
|
|
309
|
-
// content + attempts), cost ticker panel, optional notice line, trailing blank
|
|
310
|
-
const detailReserve = 6 + ticker.length + (notice ? 1 : 0);
|
|
311
|
-
const cardBudget = Math.max(0, rows - lines.length - detailReserve);
|
|
312
|
-
const visibleCount = Math.max(1, Math.floor(cardBudget / CARD_LINES));
|
|
313
|
-
const maxStart = Math.max(0, tasks.length - visibleCount);
|
|
314
|
-
let start = cursor - Math.floor(visibleCount / 2);
|
|
315
|
-
if (start < 0)
|
|
316
|
-
start = 0;
|
|
317
|
-
if (start > maxStart)
|
|
318
|
-
start = maxStart;
|
|
319
|
-
const end = Math.min(tasks.length, start + visibleCount);
|
|
320
|
-
const width = Math.min(props.cols, 100);
|
|
321
|
-
const idW = Math.max(2, ...tasks.map((c) => c.task.id.length));
|
|
322
|
-
const goalAvail = Math.max(8, width - (idW + 12));
|
|
323
|
-
const goals = tasks.map((c) => shortGoal(c.task.goal, goalAvail));
|
|
324
|
-
const goalW = Math.max(8, ...goals.map((s) => s.length));
|
|
325
|
-
const indent = " ".repeat(idW + 5);
|
|
326
|
-
for (let i = start; i < end; i++) {
|
|
327
|
-
const t = tasks[i];
|
|
328
|
-
const goal = goals[i];
|
|
329
|
-
const pointer = i === cursor ? `${GLYPHS.pointer} ` : " ";
|
|
330
|
-
const f = failedGates(t.states);
|
|
331
|
-
const human = humanGateSuffix(t.task, t.status, t.states);
|
|
332
|
-
const statusCell = renderStatusCell(t.status, f, human);
|
|
333
|
-
const line1 = ` ${pointer}${statusRow(taskVerdict(t.status), `${t.task.id.padEnd(idW)} ${goal.padEnd(goalW)} ${statusCell}`)}`;
|
|
334
|
-
const detailParts = [t.activity ?? t.channel];
|
|
335
|
-
if (t.ctx !== undefined)
|
|
336
|
-
detailParts.push(`ctx ${t.ctx}`);
|
|
337
|
-
const line2 = `${indent}${gateChain(t.states, true)} ${dim(detailParts.join(" · "))}`;
|
|
338
|
-
lines.push(line1, line2, "");
|
|
339
|
-
}
|
|
340
|
-
lines.push(...detailPanel(tasks[cursor]));
|
|
341
|
-
lines.push(...ticker);
|
|
342
|
-
if (notice)
|
|
343
|
-
lines.push(legend(` ${notice}`));
|
|
344
|
-
return lines;
|
|
345
|
-
},
|
|
346
|
-
};
|
|
347
|
-
Object.defineProperty(view, "approval", {
|
|
348
|
-
get: () => approvalPromise,
|
|
349
|
-
configurable: true,
|
|
350
|
-
});
|
|
351
|
-
return view;
|
|
352
|
-
}
|
|
353
|
-
function renderStatusCell(status, failed, human) {
|
|
354
|
-
const stWord = status === "done" ? ok(String(status))
|
|
355
|
-
: status === "failed" ? fail(String(status))
|
|
356
|
-
: status === "human" ? warn(String(status))
|
|
357
|
-
: String(status);
|
|
358
|
-
const dot = dim(" · ");
|
|
359
|
-
return stWord +
|
|
360
|
-
(failed.length ? dot + fail(failed.join(", ")) : "") +
|
|
361
|
-
(human ? dot + warn("awaiting approval") : "");
|
|
362
|
-
}
|
|
363
|
-
function detailPanel(task) {
|
|
364
|
-
if (!task)
|
|
365
|
-
return [];
|
|
366
|
-
const lines = ["", dim(`── ${task.task.id} — attempts & consult dossier ──`)];
|
|
367
|
-
if (task.attempts.length === 0) {
|
|
368
|
-
lines.push(` no attempts recorded for ${task.task.id}`);
|
|
369
|
-
return lines;
|
|
370
|
-
}
|
|
371
|
-
for (const a of task.attempts) {
|
|
372
|
-
const reason = a.cause ? ` — ${a.cause}` : a.note ? ` — ${a.note}` : "";
|
|
373
|
-
const statusWord = a.outcome === "clean" ? "done" : a.outcome === "failed" ? "failed" : "in flight";
|
|
374
|
-
lines.push(` attempt ${a.attempt} ${a.channel} ${statusWord}${reason}`);
|
|
375
|
-
}
|
|
376
|
-
lines.push("");
|
|
377
|
-
lines.push(dim(renderDossierPlaceholder()));
|
|
378
|
-
return lines;
|
|
379
|
-
}
|
|
380
|
-
function emptyState() {
|
|
381
|
-
return [
|
|
382
|
-
"",
|
|
383
|
-
" no run loaded — run `tickmarkr run` or `tickmarkr resume <runId>` to start one.",
|
|
384
|
-
" the Runs cockpit reads the active or most recent run's journal; nothing to show yet.",
|
|
385
|
-
"",
|
|
386
|
-
];
|
|
387
|
-
}
|