pi-daddy 0.51.0 → 0.53.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 (105) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +33 -42
  3. package/dist/governance/approval-prompt.d.ts +4 -0
  4. package/dist/governance/approval-prompt.d.ts.map +1 -1
  5. package/dist/governance/approval-prompt.js +4 -5
  6. package/dist/governance/approval-prompt.js.map +1 -1
  7. package/dist/governance/permission-question.d.ts +4 -0
  8. package/dist/governance/permission-question.d.ts.map +1 -0
  9. package/dist/governance/permission-question.js +102 -0
  10. package/dist/governance/permission-question.js.map +1 -0
  11. package/dist/kernel/chain.d.ts +1 -0
  12. package/dist/kernel/chain.d.ts.map +1 -1
  13. package/dist/kernel/chain.js.map +1 -1
  14. package/dist/kernel/dashboard-observation.d.ts +15 -5
  15. package/dist/kernel/dashboard-observation.d.ts.map +1 -1
  16. package/dist/kernel/dashboard-observation.js.map +1 -1
  17. package/dist/products/activity-summary.d.ts +8 -0
  18. package/dist/products/activity-summary.d.ts.map +1 -0
  19. package/dist/products/activity-summary.js +101 -0
  20. package/dist/products/activity-summary.js.map +1 -0
  21. package/dist/products/activity-timeline.d.ts +4 -1
  22. package/dist/products/activity-timeline.d.ts.map +1 -1
  23. package/dist/products/activity-timeline.js +9 -1
  24. package/dist/products/activity-timeline.js.map +1 -1
  25. package/dist/products/dashboard-activity.d.ts +9 -0
  26. package/dist/products/dashboard-activity.d.ts.map +1 -0
  27. package/dist/products/dashboard-activity.js +119 -0
  28. package/dist/products/dashboard-activity.js.map +1 -0
  29. package/dist/products/dashboard-cli.d.ts +2 -1
  30. package/dist/products/dashboard-cli.d.ts.map +1 -1
  31. package/dist/products/dashboard-cli.js +28 -6
  32. package/dist/products/dashboard-cli.js.map +1 -1
  33. package/dist/products/dashboard-components.d.ts +10 -0
  34. package/dist/products/dashboard-components.d.ts.map +1 -0
  35. package/dist/products/dashboard-components.js +196 -0
  36. package/dist/products/dashboard-components.js.map +1 -0
  37. package/dist/products/dashboard-display-controls.js +3 -3
  38. package/dist/products/dashboard-display-controls.js.map +1 -1
  39. package/dist/products/dashboard-handshake.d.ts +2 -0
  40. package/dist/products/dashboard-handshake.d.ts.map +1 -1
  41. package/dist/products/dashboard-handshake.js +39 -43
  42. package/dist/products/dashboard-handshake.js.map +1 -1
  43. package/dist/products/dashboard-herdr.d.ts.map +1 -1
  44. package/dist/products/dashboard-herdr.js +7 -1
  45. package/dist/products/dashboard-herdr.js.map +1 -1
  46. package/dist/products/dashboard-layout.js +20 -4
  47. package/dist/products/dashboard-layout.js.map +1 -1
  48. package/dist/products/dashboard-panels.d.ts.map +1 -1
  49. package/dist/products/dashboard-panels.js +128 -67
  50. package/dist/products/dashboard-panels.js.map +1 -1
  51. package/dist/products/dashboard-recap.d.ts +1 -1
  52. package/dist/products/dashboard-recap.d.ts.map +1 -1
  53. package/dist/products/dashboard-recap.js +12 -16
  54. package/dist/products/dashboard-recap.js.map +1 -1
  55. package/dist/products/dashboard-screen.d.ts +6 -2
  56. package/dist/products/dashboard-screen.d.ts.map +1 -1
  57. package/dist/products/dashboard-screen.js +104 -37
  58. package/dist/products/dashboard-screen.js.map +1 -1
  59. package/dist/products/dashboard-session-client.d.ts +10 -6
  60. package/dist/products/dashboard-session-client.d.ts.map +1 -1
  61. package/dist/products/dashboard-session-client.js +14 -10
  62. package/dist/products/dashboard-session-client.js.map +1 -1
  63. package/dist/products/dashboard-settings.d.ts +10 -1
  64. package/dist/products/dashboard-settings.d.ts.map +1 -1
  65. package/dist/products/dashboard-settings.js +26 -1
  66. package/dist/products/dashboard-settings.js.map +1 -1
  67. package/dist/products/ecosystem-versions.d.ts +2 -0
  68. package/dist/products/ecosystem-versions.d.ts.map +1 -1
  69. package/extensions/activity-timeline.ts +7 -1
  70. package/extensions/approvals.ts +7 -0
  71. package/extensions/dashboard-live.ts +45 -5
  72. package/extensions/dashboard-observation.ts +1 -3
  73. package/extensions/dashboard-session-server.ts +6 -1
  74. package/extensions/dashboard-settings.ts +15 -1
  75. package/extensions/delegate-chain.ts +2 -0
  76. package/extensions/delegation-artifacts.ts +26 -4
  77. package/extensions/delegation-operations.ts +12 -4
  78. package/extensions/delegation.ts +4 -0
  79. package/extensions/ecosystem-versions.ts +25 -3
  80. package/extensions/execute-child.ts +4 -0
  81. package/extensions/grants.ts +10 -4
  82. package/extensions/run-delegation.ts +2 -0
  83. package/extensions/runtime-snapshot.ts +8 -4
  84. package/extensions/session-report.ts +4 -0
  85. package/extensions/session.ts +4 -3
  86. package/package.json +2 -2
  87. package/src/governance/approval-prompt.ts +7 -6
  88. package/src/governance/permission-question.ts +108 -0
  89. package/src/kernel/chain.ts +1 -0
  90. package/src/kernel/dashboard-observation.ts +15 -1
  91. package/src/products/activity-summary.ts +101 -0
  92. package/src/products/activity-timeline.ts +11 -0
  93. package/src/products/dashboard-activity.ts +136 -0
  94. package/src/products/dashboard-cli.ts +37 -8
  95. package/src/products/dashboard-components.ts +219 -0
  96. package/src/products/dashboard-display-controls.ts +3 -3
  97. package/src/products/dashboard-handshake.ts +45 -49
  98. package/src/products/dashboard-herdr.ts +9 -1
  99. package/src/products/dashboard-layout.ts +27 -6
  100. package/src/products/dashboard-panels.ts +128 -76
  101. package/src/products/dashboard-recap.ts +15 -15
  102. package/src/products/dashboard-screen.ts +115 -39
  103. package/src/products/dashboard-session-client.ts +23 -12
  104. package/src/products/dashboard-settings.ts +36 -2
  105. package/src/products/ecosystem-versions.ts +2 -0
@@ -2,6 +2,13 @@
2
2
  import type { DashboardContribution, DashboardSourceSnapshot } from "../kernel/dashboard-observation.ts";
3
3
  import type { DashboardItem, DashboardScreenOptions } from "./dashboard-screen.ts";
4
4
  import { dashboardText, friendlyStatus } from "./dashboard-screen.ts";
5
+ import { activityStoryItems } from "./dashboard-activity.ts";
6
+ import {
7
+ componentItems,
8
+ isComponentObservation,
9
+ publishedEvidenceItem,
10
+ savedEvidenceItem,
11
+ } from "./dashboard-components.ts";
5
12
  import { previewWidth, sectionHeading } from "./dashboard-layout.ts";
6
13
  import { activityTaskKey } from "./activity-timeline.ts";
7
14
  export type DashboardDestination = "now" | "work" | "reviews" | "activity" | "evidence" | "settings";
@@ -191,8 +198,10 @@ function bookieLabel(item: DashboardContribution, source: DashboardSourceSnapsho
191
198
  function rowText(item: DashboardItem, destination: DashboardDestination, selected: boolean): string {
192
199
  const label = clean(item.label);
193
200
  const marker = selected ? "> " : " ";
201
+ if (item.key.startsWith("component:")) return marker + label;
194
202
  if (item.status === "last-observed") return `${marker}Last seen · ${label}`;
195
203
  if (item.reviewSummary) return marker + label;
204
+ if (item.key.startsWith("activity:") && item.status === "observed") return marker + label;
196
205
  const waitingForReview = destination === "reviews" && item.status === "approval-wait";
197
206
  const described = waitingForReview && /^ready for review[:\s]/i.test(label);
198
207
  const status = described ? "" : ` · ${waitingForReview ? "Awaiting review" : friendlyStatus(clean(item.status))}`;
@@ -211,12 +220,13 @@ export function sessionDashboardItems(options: DashboardScreenOptions): Dashboar
211
220
  ? ["evidence"]
212
221
  : destination === "activity"
213
222
  ? ["status"]
214
- : ["work", "status"];
223
+ : ["work"];
215
224
  const published = observed.sources.flatMap((source) =>
216
225
  source.items
217
226
  .filter(
218
227
  (item) =>
219
228
  wanted.includes(item.kind) &&
229
+ !isComponentObservation(source, item) &&
220
230
  !(
221
231
  destination === "reviews" &&
222
232
  !options.screen.expanded &&
@@ -228,14 +238,17 @@ export function sessionDashboardItems(options: DashboardScreenOptions): Dashboar
228
238
  )
229
239
  .map((item) => {
230
240
  const stale = staleSource(source, options);
231
- return row(
241
+ const linked = reviewForTask(item, source, stale);
242
+ const display = row(
232
243
  item,
233
244
  sourceKey(source, item),
234
245
  `${source.producer}@${source.producerVersion} · seq ${source.sequence} · ${source.observedAt}`,
235
246
  stale,
236
247
  source.producer === "bookie" ? bookieLabel(item, source) : item.label,
237
- reviewForTask(item, source, stale),
248
+ linked,
238
249
  );
250
+ if (linked) display.relatedReviewKey = sourceKey(source, linked);
251
+ return item.kind === "evidence" ? publishedEvidenceItem(source, item, display) : display;
239
252
  }),
240
253
  );
241
254
  if (destination === "reviews") {
@@ -244,33 +257,9 @@ export function sessionDashboardItems(options: DashboardScreenOptions): Dashboar
244
257
  item.key === first ? 2 : Number(item.status === "approval-wait" && !item.reviewSummary);
245
258
  return published.sort((a, b) => priority(b) - priority(a));
246
259
  }
247
- if (destination === "evidence")
248
- return [
249
- ...(observed.artifacts ?? []).map((a) => ({
250
- key: `artifact:${a.executionId}`,
251
- label: a.operationId,
252
- status: "retained",
253
- elapsed: "",
254
- details: [
255
- `Producer: pi-daddy`,
256
- `Execution: ${a.executionId}`,
257
- `Manifest SHA-256: ${a.sha256}`,
258
- "Producer reference observed in this session; payload not loaded by the dashboard.",
259
- "Retained is not reviewed, applicable or approved. Use the authorized artifact resolver for content.",
260
- ],
261
- })),
262
- ...published,
263
- ];
260
+ if (destination === "evidence") return [...(observed.artifacts ?? []).map(savedEvidenceItem), ...published];
264
261
  if (destination === "activity")
265
- return [
266
- ...(observed.activity ?? [])
267
- .slice()
268
- .reverse()
269
- .map((item) =>
270
- row(item, `activity:${observed.generation}:${item.id}`, `Pi owner · ${observed.sessionId}`, staleOwner),
271
- ),
272
- ...published,
273
- ];
262
+ return [...activityStoryItems(observed.activity ?? [], observed.generation, staleOwner), ...published];
274
263
  const native = options.items.map((item) =>
275
264
  staleOwner
276
265
  ? {
@@ -283,34 +272,98 @@ export function sessionDashboardItems(options: DashboardScreenOptions): Dashboar
283
272
  const activity = options.session?.activity;
284
273
  const parentShown =
285
274
  activity && native.some((item) => item.taskKey === activityTaskKey(activity.rootId, activity.taskId));
275
+ const ownerTurn = observed.turn;
276
+ const tasks = native.map((item) => {
277
+ // A running parent can supply a more recent public tool purpose than its persisted start record.
278
+ if (
279
+ activity &&
280
+ item.taskKey === activityTaskKey(activity.rootId, activity.taskId) &&
281
+ ownerTurn?.state === "running" &&
282
+ !staleOwner &&
283
+ ["running", "active"].includes(item.status)
284
+ )
285
+ return { ...item, label: ownerTurn.label };
286
+ return item;
287
+ });
286
288
  const items = [
287
- ...(observed.turn && !parentShown
288
- ? [row(observed.turn, `owner:${observed.generation}:${observed.turn.id}`, "Pi owner", staleOwner)]
289
+ ...(ownerTurn && !parentShown
290
+ ? [row(ownerTurn, `owner:${observed.generation}:${ownerTurn.id}`, "Pi owner", staleOwner)]
289
291
  : []),
290
- ...native,
292
+ ...tasks,
291
293
  ...published,
292
294
  ];
293
- items.sort((a, b) => workGroups.indexOf(workGroup(a)) - workGroups.indexOf(workGroup(b)));
294
- return items;
295
+ items.sort((a, b) => {
296
+ const rank = workGroups.indexOf(workGroup(a)) - workGroups.indexOf(workGroup(b));
297
+ return rank || (workGroup(a) === "Recently finished" ? (b.updatedAt ?? "").localeCompare(a.updatedAt ?? "") : 0);
298
+ });
299
+ if (destination !== "now") return items;
300
+ // Tasks has the complete queue. Keep the overview navigable even after a long session.
301
+ // A producer may publish a review without a matching task or a recommended next action.
302
+ const represented = new Set(items.map((i) => i.relatedReviewKey).filter(Boolean));
303
+ for (const source of observed.sources) {
304
+ if (staleSource(source, options)) continue;
305
+ for (const review of source.items) {
306
+ const key = sourceKey(source, review);
307
+ if (
308
+ review.kind === "review" &&
309
+ review.state === "approval-wait" &&
310
+ review.reference &&
311
+ !reviewTotals(review) &&
312
+ !represented.has(key)
313
+ )
314
+ items.push(row(review, key, `${source.producer}@${source.producerVersion}`));
315
+ }
316
+ }
317
+ const nextReview = sessionNext(options)?.reviewKey;
318
+ if (nextReview) {
319
+ const index = items.findIndex((i) => i.relatedReviewKey === nextReview || i.key === nextReview);
320
+ // Keep task rows ahead of independent review rows; Reviews opens the exact recommended output.
321
+ if (index > 0 && items[index]?.relatedReviewKey === nextReview) items.unshift(items.splice(index, 1)[0]!);
322
+ }
323
+ const shown = workGroups.flatMap((group) => {
324
+ const matches = items.filter((item) => workGroup(item) === group);
325
+ return matches.slice(0, group === "Recently finished" ? 2 : 3);
326
+ });
327
+ const recent = shown.some((i) => workGroup(i) === "Recently finished")
328
+ ? []
329
+ : activityStoryItems(observed.activity ?? [], observed.generation, staleOwner).slice(0, 2);
330
+ return [...shown, ...recent, ...componentItems(options)];
295
331
  }
296
332
 
297
- const workGroups = ["PERMISSION REQUESTS", "YOUR DECISIONS", "NEEDS ATTENTION", "IN PROGRESS", "OTHER WORK", "HISTORY"];
333
+ const workGroups = [
334
+ "Needs your permission",
335
+ "Needs your decision",
336
+ "Needs attention",
337
+ "In progress",
338
+ "Other tasks",
339
+ "Recently finished",
340
+ "Last known",
341
+ "Tools",
342
+ ];
298
343
  function workGroup(item: DashboardItem): string {
299
- if (item.approval) return "PERMISSION REQUESTS";
300
- if (item.status === "approval-wait") return "YOUR DECISIONS";
344
+ if (item.key.startsWith("component:")) return "Tools";
345
+ if (item.key.startsWith("activity:")) return "Latest activity";
346
+ if (["last-observed", "historical"].includes(item.status)) return "Last known";
347
+ if (item.approval) return "Needs your permission";
348
+ if (item.status === "approval-wait") return "Needs your decision";
301
349
  if (["needs-you", "failed", "refused", "incomplete", "dependency-wait"].includes(item.status))
302
- return "NEEDS ATTENTION";
303
- if (["running", "active", "starting", "authorised", "cancel-requested"].includes(item.status)) return "IN PROGRESS";
350
+ return "Needs attention";
351
+ if (["running", "active", "starting", "authorised", "cancel-requested"].includes(item.status)) return "In progress";
304
352
  if (["settled", "completed", "finished", "cancelled", "historical", "last-observed"].includes(item.status))
305
- return "HISTORY";
306
- return "OTHER WORK";
353
+ return "Recently finished";
354
+ return "Other tasks";
307
355
  }
308
356
 
309
357
  function listHeading(item: DashboardItem, destination: DashboardDestination) {
310
- if (destination === "now" || destination === "work") return workGroup(item);
358
+ if (destination === "now" || destination === "work")
359
+ return destination === "work" && workGroup(item) === "Recently finished" ? "Finished" : workGroup(item);
311
360
  if (destination === "reviews")
312
- return item.status === "approval-wait" && !item.reviewSummary ? "AWAITING REVIEW" : "REVIEW RECORDS";
313
- return destination === "evidence" ? "SAVED REFERENCES" : "SESSION ACTIVITY";
361
+ return item.status === "approval-wait" && !item.reviewSummary ? "Waiting for your review" : "Review records";
362
+ return destination === "evidence"
363
+ ? "Saved results"
364
+ : item.key.startsWith("source:")
365
+ ? "Current reports"
366
+ : "What happened";
314
367
  }
315
368
  export function sessionPanelLines(options: DashboardScreenOptions, items: DashboardItem[], width: number): string[] {
316
369
  const observation = options.session!.observation!,
@@ -320,58 +373,57 @@ export function sessionPanelLines(options: DashboardScreenOptions, items: Dashbo
320
373
  const lines: string[] = [];
321
374
  const initiative = observation.sources.find((source) => source.producer === "daddy-initiative");
322
375
  const scope = initiative?.items.find((item) => item.id === "scope");
323
- if (scope && (destination === "now" || destination === "work")) {
324
- lines.push(`SELECTED ${scope.label}${staleSource(initiative!, options) ? " (last observed)" : ""}`);
325
- if (destination === "work" && scope.details?.[1]) lines.push(scope.details[1]);
376
+ const roomy = options.height >= 22;
377
+ if (destination === "work") {
378
+ lines.push("All session tasks, grouped by status.");
379
+ if (scope) {
380
+ lines.push(`Selected ${clean(scope.label)}${staleSource(initiative!, options) ? " (last known)" : ""}`);
381
+ if (scope.details?.[1]) lines.push(scope.details[1]);
382
+ }
326
383
  }
327
384
  if (destination === "now") {
328
385
  const goals = sourceRows.filter((x) => x.item.kind === "goal");
329
386
  const goal = goals.find((x) => !staleSource(x.source, options)) ?? goals[0];
330
387
  if (goal) {
331
- const name =
332
- !screen.expanded && goal.source.producer === "bookie"
333
- ? goal.item.label.replace(/^\/projects\/([^/]+)\/project\.md$/, "$1")
334
- : goal.item.label;
335
- lines.push(
336
- `Goal · ${clean(name)} (${goal.source.producer}${staleSource(goal.source, options) ? "; stale" : ""})`,
337
- );
338
- } else if (options.current) lines.push(`Goal · ${clean(options.current)}`);
388
+ const project = goal.source.producer === "bookie" && /^\/projects\/([^/]+)\/project\.md$/.exec(goal.item.label);
389
+ lines.push(project ? `Project · ${clean(project[1]!)}` : `Goal · ${clean(goal.item.label)}`);
390
+ if (staleSource(goal.source, options)) lines[lines.length - 1] += " (last known)";
391
+ }
339
392
  }
340
-
341
- if (!items.length)
342
- lines.push(
393
+ if (!items.length) {
394
+ const fallback =
343
395
  destination === "reviews"
344
396
  ? options.connected === false || observation.sources.some((s) => staleSource(s, options))
345
- ? "Current reviews unknown. Check the parent Pi session."
346
- : "No reviews reported. [2] Work shows task progress."
397
+ ? "Current reviews unknown. Check the main Pi chat."
398
+ : "No reviews waiting. Open [2] Tasks to see progress."
347
399
  : destination === "evidence"
348
- ? "No current-session result references observed."
349
- : "No observations for this view.",
350
- );
400
+ ? "No saved results reported to this dashboard."
401
+ : destination === "activity"
402
+ ? "No activity has been recorded in this session yet."
403
+ : "No tasks reported for this session yet.";
404
+ lines.push(fallback);
405
+ }
351
406
  const left = previewWidth(destination, Boolean(screen.expanded), width);
352
407
  const rows: string[] = [];
353
408
  for (let start = 0; start < items.length;) {
354
409
  const group = listHeading(items[start]!, destination);
355
410
  let end = start + 1;
356
411
  while (end < items.length && listHeading(items[end]!, destination) === group) end++;
357
- rows.push(sectionHeading(`${group} · ${end - start}`, left ?? width));
412
+ if (roomy && (rows.length || lines.length)) rows.push("");
413
+ const count = destination === "now" ? "" : ` · ${end - start}`;
414
+ rows.push(sectionHeading(group + count, left ?? width));
358
415
  for (const item of items.slice(start, end)) rows.push(rowText(item, destination, item.key === screen.selectedKey));
359
416
  start = end;
360
417
  }
361
418
  lines.push(...rows);
362
- if (screen.expanded && left === undefined) lines.push("Expanded layout needs 96 columns; same selection retained.");
419
+ if (destination === "now" && options.height >= 18 && items.some((i) => !i.key.startsWith("component:"))) {
420
+ if (roomy) lines.push("");
421
+ lines.push("[2] Tasks · See the full task list");
422
+ }
423
+ if (screen.expanded && left === undefined)
424
+ lines.push("Side-by-side layout needs 82 columns; same selection retained.");
363
425
  if (destination === "now" && screen.expanded) {
364
- lines.push(sectionHeading("COMPONENTS", width));
365
- for (const producer of ["principal", "bookie", "scout", "skill-harness"]) {
366
- const streams = observation.sources.filter(
367
- (x) => x.producer === producer || (producer === "scout" && x.producer.startsWith("scout-")),
368
- );
369
- const stale = streams.filter((s) => staleSource(s, options)).length;
370
- const status = !streams.length
371
- ? "status adapter unavailable"
372
- : `${streams.length - stale} observed${stale ? `; ${stale} last observed / stale` : ""}`;
373
- lines.push(`${producer}: ${status}`);
374
- }
426
+ lines.push(sectionHeading("Resource details", width));
375
427
  const resource = observation.resources;
376
428
  lines.push(`Parent RSS: ${(resource.rssBytes / 1024 / 1024).toFixed(1)} MiB`, "Host and child memory: unknown");
377
429
  }
@@ -1,17 +1,6 @@
1
- import type { DashboardContribution } from "../kernel/dashboard-observation.ts";
1
+ import { activityStoryItems } from "./dashboard-activity.ts";
2
2
  import { staleSource } from "./dashboard-panels.ts";
3
- import { truncate } from "./dashboard-render.ts";
4
- import { dashboardText, type DashboardScreenOptions } from "./dashboard-screen.ts";
5
-
6
- function eventLine(event: DashboardContribution): string {
7
- const label = dashboardText(event.label).replace(/\s+/g, " ").trim();
8
- if (label === "agent_start") return "Parent turn started";
9
- if (label === "agent_end") return "Parent turn ended";
10
- const tool = /^(.*): tool (start|end)$/.exec(label);
11
- const name = truncate(tool?.[1] || label || "Event", 80);
12
- if (event.state === "failed") return `${name} failed`;
13
- return tool ? `${name} ${tool[2] === "start" ? "started" : "finished"}` : name;
14
- }
3
+ import type { DashboardScreenOptions } from "./dashboard-screen.ts";
15
4
 
16
5
  /** Current owner hook events, newest first. Producer snapshots can describe current state only. */
17
6
  export function sessionRecapLines(options: DashboardScreenOptions): string[] {
@@ -38,10 +27,21 @@ export function sessionRecapLines(options: DashboardScreenOptions): string[] {
38
27
  if (waiting) lines.push(`Waiting on a dependency · ${waiting} shown by Bookie`);
39
28
  }
40
29
 
41
- const recent = (observed.activity ?? []).slice(-5).reverse();
30
+ const recent = activityStoryItems(observed.activity ?? [], observed.generation, false).slice(0, 5);
42
31
  lines.push(
43
32
  ...(recent.length
44
- ? ["Recent activity · newest first", ...recent.map(eventLine)]
33
+ ? [
34
+ "Recent activity · newest first",
35
+ ...recent.map((item) =>
36
+ item.status === "failed"
37
+ ? `Failed · ${item.label}`
38
+ : item.status === "finished"
39
+ ? `Finished · ${item.label}`
40
+ : item.status === "Started"
41
+ ? `Started · ${item.label}`
42
+ : item.label,
43
+ ),
44
+ ]
45
45
  : ["No recent session events recorded."]),
46
46
  );
47
47
  return lines;