@astralyn/pi 1.5.0 → 1.5.1

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 (54) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/bundle/chunks/{chunk-IRUUTK4W.js → chunk-3YGNXVKM.js} +1 -1
  3. package/dist/bundle/chunks/{chunk-THAJ4BZF.js → chunk-HLVMLRZJ.js} +3 -3
  4. package/dist/bundle/chunks/{chunk-R3YHAMWH.js → chunk-M3D4ADUT.js} +17 -17
  5. package/dist/bundle/chunks/{execute-ACWDKC3C.js → execute-SSRW6NGS.js} +1 -1
  6. package/dist/bundle/chunks/{virtual-modules-T2KLVAFL.js → virtual-modules-NFDW2JKH.js} +1 -1
  7. package/dist/bundle/cli.js +1 -1
  8. package/dist/bundle/index.js +1 -1
  9. package/dist/bundle/rpc-entry.js +1 -1
  10. package/dist/core/tasks/activity.d.ts +14 -0
  11. package/dist/core/tasks/activity.d.ts.map +1 -0
  12. package/dist/core/tasks/activity.js +58 -0
  13. package/dist/core/tasks/activity.js.map +1 -0
  14. package/dist/core/tasks/execution.d.ts.map +1 -1
  15. package/dist/core/tasks/execution.js +2 -2
  16. package/dist/core/tasks/execution.js.map +1 -1
  17. package/dist/core/tasks/output.d.ts +4 -1
  18. package/dist/core/tasks/output.d.ts.map +1 -1
  19. package/dist/core/tasks/output.js +33 -0
  20. package/dist/core/tasks/output.js.map +1 -1
  21. package/dist/core/tasks/types.d.ts +19 -2
  22. package/dist/core/tasks/types.d.ts.map +1 -1
  23. package/dist/core/tasks/types.js.map +1 -1
  24. package/dist/extensions/agent/activity-lines.d.ts +1 -5
  25. package/dist/extensions/agent/activity-lines.d.ts.map +1 -1
  26. package/dist/extensions/agent/activity-lines.js +5 -69
  27. package/dist/extensions/agent/activity-lines.js.map +1 -1
  28. package/dist/extensions/agent/activity.d.ts +0 -19
  29. package/dist/extensions/agent/activity.d.ts.map +1 -1
  30. package/dist/extensions/agent/activity.js +0 -63
  31. package/dist/extensions/agent/activity.js.map +1 -1
  32. package/dist/extensions/agent/progress.d.ts.map +1 -1
  33. package/dist/extensions/agent/progress.js +9 -2
  34. package/dist/extensions/agent/progress.js.map +1 -1
  35. package/dist/extensions/agent/types.d.ts +3 -11
  36. package/dist/extensions/agent/types.d.ts.map +1 -1
  37. package/dist/extensions/agent/types.js.map +1 -1
  38. package/dist/extensions/tasks/ui/inspector.d.ts.map +1 -1
  39. package/dist/extensions/tasks/ui/inspector.js +3 -1
  40. package/dist/extensions/tasks/ui/inspector.js.map +1 -1
  41. package/dist/extensions/tasks/ui/views.d.ts +2 -1
  42. package/dist/extensions/tasks/ui/views.d.ts.map +1 -1
  43. package/dist/extensions/tasks/ui/views.js +13 -8
  44. package/dist/extensions/tasks/ui/views.js.map +1 -1
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js.map +1 -1
  48. package/dist/modes/interactive/components/task-activity-list.d.ts +5 -0
  49. package/dist/modes/interactive/components/task-activity-list.d.ts.map +1 -0
  50. package/dist/modes/interactive/components/task-activity-list.js +68 -0
  51. package/dist/modes/interactive/components/task-activity-list.js.map +1 -0
  52. package/docs/bundled/extensions/agent.md +1 -1
  53. package/docs/extensions.md +2 -0
  54. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"inspector.js","sourceRoot":"","sources":["../../../../src/extensions/tasks/ui/inspector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAelE,2GAA2G;AAC3G,SAAS,WAAW,CAAC,IAAkB;IACtC,OAAO,IAAI,CAAC,MAAM,KAAK,KAAK,IAAI,CAAC,cAA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ACzB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;CACD","sourcesContent":["import type { TaskRead, TaskSnapshot, TasksContext } from \"../../../core/tasks/types.ts\";\nimport { isTaskTerminal } from \"../../../core/tasks/types.ts\";\nimport type { Theme } from \"../../../modes/interactive/theme/theme.ts\";\nimport { cleanTaskText } from \"./text.ts\";\nimport { TaskViewport } from \"./viewport.ts\";\nimport { detailLines, outputLines, streamsLog } from \"./views.ts\";\n\ninterface ReadingPosition {\n\tinfo: TaskViewport;\n\toutput: TaskViewport;\n\t/** Whether Output last followed the tail; a change of kind restarts its viewport. */\n\ttails?: boolean;\n\tread?: TaskRead;\n}\ninterface InspectorOptions {\n\thost: Pick<TasksContext, \"read\" | \"retain\">;\n\ttheme: Theme;\n\trequestRender(): void;\n}\n\n/** Output follows the tail while it is a log or still live; a settled report reads from its first line. */\nfunction tailsOutput(task: TaskSnapshot): boolean {\n\treturn task.output === \"log\" || !isTaskTerminal(task.status);\n}\n\n/** Owns the selected task's bounded reads. Reading never acknowledges completion delivery. */\nexport class TaskInspector {\n\ttask?: TaskSnapshot;\n\tprivate readonly options: InspectorOptions;\n\tprivate readonly positions = new Map<string, ReadingPosition>();\n\tprivate release?: () => void;\n\tprivate reading = false;\n\tprivate disposed = false;\n\t/** Snapshots are immutable, so identity tells when the lines must be rebuilt. */\n\tprivate outputCache?: { task: TaskSnapshot; read?: TaskRead; width: number; lines: string[] };\n\tprivate detailCache?: { task: TaskSnapshot; width: number; lines: string[] };\n\tconstructor(options: InspectorOptions) {\n\t\tthis.options = options;\n\t}\n\tget position(): ReadingPosition {\n\t\tconst id = this.task?.id;\n\t\tlet position = id ? this.positions.get(id) : undefined;\n\t\tif (!position) {\n\t\t\tposition = { info: new TaskViewport(), output: new TaskViewport(true) };\n\t\t\tif (id) this.positions.set(id, position);\n\t\t}\n\t\treturn position;\n\t}\n\tselect(task: TaskSnapshot | undefined): void {\n\t\tif (this.disposed) return;\n\t\tif (this.task?.id !== task?.id) {\n\t\t\tconst release = task ? this.options.host.retain(task.id) : undefined;\n\t\t\tconst previous = this.release;\n\t\t\tthis.release = release;\n\t\t\tprevious?.();\n\t\t}\n\t\tthis.task = task;\n\t\tif (!task) return;\n\t\tconst position = this.position;\n\t\tconst tails = tailsOutput(task);\n\t\tif (position.tails !== tails) {\n\t\t\tposition.tails = tails;\n\t\t\tposition.output.retarget(tails);\n\t\t}\n\t}\n\tprune(ids: ReadonlySet<string>): void {\n\t\tfor (const id of this.positions.keys()) if (!ids.has(id)) this.positions.delete(id);\n\t}\n\tinvalidate(): void {\n\t\tthis.outputCache = undefined;\n\t\tthis.detailCache = undefined;\n\t}\n\tasync refresh(): Promise<void> {\n\t\tconst task = this.task;\n\t\t// Only an attached log streams. A terminal file-less log is read once for its expiry diagnostic.\n\t\tconst terminalFallback = task?.output === \"log\" && isTaskTerminal(task.status);\n\t\tif (this.disposed || !task || (!streamsLog(task) && !terminalFallback) || this.reading) return;\n\t\tconst position = this.position;\n\t\tif (position.read && (!position.output.follow || isTaskTerminal(position.read.task.status))) return;\n\t\tthis.reading = true;\n\t\ttry {\n\t\t\tconst read = await this.options.host.read(task.id, { mode: \"tail\", bytes: 48 * 1024 });\n\t\t\tif (this.disposed || this.task?.id !== task.id || (!position.output.follow && position.read)) return;\n\t\t\tposition.read = read;\n\t\t} catch (error) {\n\t\t\tif (!this.disposed && this.task?.id === task.id && (position.output.follow || !position.read)) {\n\t\t\t\tposition.read = {\n\t\t\t\t\ttask,\n\t\t\t\t\ttext: \"\",\n\t\t\t\t\treadError: `Cannot read output: ${cleanTaskText(String(error))}`,\n\t\t\t\t\ttotalBytes: 0,\n\t\t\t\t\ttruncated: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.reading = false;\n\t\t\tif (!this.disposed) this.options.requestRender();\n\t\t\tif (!this.disposed && this.task?.id !== task.id) await this.refresh();\n\t\t}\n\t}\n\toutput(width: number): string[] {\n\t\tconst task = this.task;\n\t\tif (!task) return [];\n\t\tconst read = this.position.read;\n\t\tconst cache = this.outputCache;\n\t\tif (cache?.task !== task || cache.read !== read || cache.width !== width)\n\t\t\tthis.outputCache = { task, read, width, lines: outputLines(task, read, this.options.theme, width) };\n\t\treturn this.outputCache!.lines;\n\t}\n\tdetails(width: number): string[] {\n\t\tconst task = this.task;\n\t\tif (!task) return [];\n\t\tconst cache = this.detailCache;\n\t\tif (cache?.task !== task || cache.width !== width)\n\t\t\tthis.detailCache = { task, width, lines: detailLines(task, this.options.theme, width) };\n\t\treturn this.detailCache!.lines;\n\t}\n\tdispose(): void {\n\t\tif (this.disposed) return;\n\t\tthis.disposed = true;\n\t\tthis.release?.();\n\t\tthis.release = undefined;\n\t\tthis.positions.clear();\n\t}\n}\n"]}
1
+ {"version":3,"file":"inspector.js","sourceRoot":"","sources":["../../../../src/extensions/tasks/ui/inspector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAelE,2GAA2G;AAC3G,SAAS,WAAW,CAAC,IAAkB;IACtC,OAAO,IAAI,CAAC,MAAM,KAAK,KAAK,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC9D,CAAC;AAED,8FAA8F;AAC9F,MAAM,OAAO,aAAa;IAUzB,YAAY,OAAyB;QAPpB,cAAS,GAAG,IAAI,GAAG,EAA2B,CAAC;QAExD,YAAO,GAAG,KAAK,CAAC;QAChB,aAAQ,GAAG,KAAK,CAAC;QAKxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;IACD,IAAI,QAAQ;QACX,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,CA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O,EAAE,UAAU,EAAE,MAAM,CAAC;QAChF,IAAI,IAAI,IAAI,KAAK,EAAE,IAAI,KAAK,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK;YAC/E,IAAI,CAAC,WAAW,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;QACrG,OAAO,IAAI,CAAC,WAAY,CAAC,KAAK,CAAC;IAChC,CAAC;IACD,OAAO,CAAC,KAAa;QACpB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC;QAC/B,IAAI,KAAK,EAAE,IAAI,KAAK,IAAI,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK;YAChD,IAAI,CAAC,WAAW,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;QACzF,OAAO,IAAI,CAAC,WAAY,CAAC,KAAK,CAAC;IAChC,CAAC;IACD,OAAO;QACN,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;CACD","sourcesContent":["import type { TaskRead, TaskSnapshot, TasksContext } from \"../../../core/tasks/types.ts\";\nimport { isTaskTerminal } from \"../../../core/tasks/types.ts\";\nimport type { Theme } from \"../../../modes/interactive/theme/theme.ts\";\nimport { cleanTaskText } from \"./text.ts\";\nimport { TaskViewport } from \"./viewport.ts\";\nimport { detailLines, outputLines, streamsLog } from \"./views.ts\";\n\ninterface ReadingPosition {\n\tinfo: TaskViewport;\n\toutput: TaskViewport;\n\t/** Whether Output last followed the tail; a change of kind restarts its viewport. */\n\ttails?: boolean;\n\tread?: TaskRead;\n}\ninterface InspectorOptions {\n\thost: Pick<TasksContext, \"read\" | \"retain\">;\n\ttheme: Theme;\n\trequestRender(): void;\n}\n\n/** Output follows the tail while it is a log or still live; a settled report reads from its first line. */\nfunction tailsOutput(task: TaskSnapshot): boolean {\n\treturn task.output === \"log\" || !isTaskTerminal(task.status);\n}\n\n/** Owns the selected task's bounded reads. Reading never acknowledges completion delivery. */\nexport class TaskInspector {\n\ttask?: TaskSnapshot;\n\tprivate readonly options: InspectorOptions;\n\tprivate readonly positions = new Map<string, ReadingPosition>();\n\tprivate release?: () => void;\n\tprivate reading = false;\n\tprivate disposed = false;\n\t/** Snapshots are immutable, so identity tells when the lines must be rebuilt. */\n\tprivate outputCache?: { task: TaskSnapshot; read?: TaskRead; width: number; lines: string[] };\n\tprivate detailCache?: { task: TaskSnapshot; width: number; lines: string[] };\n\tconstructor(options: InspectorOptions) {\n\t\tthis.options = options;\n\t}\n\tget position(): ReadingPosition {\n\t\tconst id = this.task?.id;\n\t\tlet position = id ? this.positions.get(id) : undefined;\n\t\tif (!position) {\n\t\t\tposition = { info: new TaskViewport(), output: new TaskViewport(true) };\n\t\t\tif (id) this.positions.set(id, position);\n\t\t}\n\t\treturn position;\n\t}\n\tselect(task: TaskSnapshot | undefined): void {\n\t\tif (this.disposed) return;\n\t\tif (this.task?.id !== task?.id) {\n\t\t\tconst release = task ? this.options.host.retain(task.id) : undefined;\n\t\t\tconst previous = this.release;\n\t\t\tthis.release = release;\n\t\t\tprevious?.();\n\t\t}\n\t\tthis.task = task;\n\t\tif (!task) return;\n\t\tconst position = this.position;\n\t\tconst tails = tailsOutput(task);\n\t\tif (position.tails !== tails) {\n\t\t\tposition.tails = tails;\n\t\t\tposition.output.retarget(tails);\n\t\t}\n\t}\n\tprune(ids: ReadonlySet<string>): void {\n\t\tfor (const id of this.positions.keys()) if (!ids.has(id)) this.positions.delete(id);\n\t}\n\tinvalidate(): void {\n\t\tthis.outputCache = undefined;\n\t\tthis.detailCache = undefined;\n\t}\n\tasync refresh(): Promise<void> {\n\t\tconst task = this.task;\n\t\t// Only an attached log streams. A terminal file-less log is read once for its expiry diagnostic.\n\t\tconst terminalFallback = task?.output === \"log\" && isTaskTerminal(task.status);\n\t\tif (this.disposed || !task || (!streamsLog(task) && !terminalFallback) || this.reading) return;\n\t\tconst position = this.position;\n\t\tif (position.read && (!position.output.follow || isTaskTerminal(position.read.task.status))) return;\n\t\tthis.reading = true;\n\t\ttry {\n\t\t\tconst read = await this.options.host.read(task.id, { mode: \"tail\", bytes: 48 * 1024 });\n\t\t\tif (this.disposed || this.task?.id !== task.id || (!position.output.follow && position.read)) return;\n\t\t\tposition.read = read;\n\t\t} catch (error) {\n\t\t\tif (!this.disposed && this.task?.id === task.id && (position.output.follow || !position.read)) {\n\t\t\t\tposition.read = {\n\t\t\t\t\ttask,\n\t\t\t\t\ttext: \"\",\n\t\t\t\t\treadError: `Cannot read output: ${cleanTaskText(String(error))}`,\n\t\t\t\t\ttotalBytes: 0,\n\t\t\t\t\ttruncated: false,\n\t\t\t\t};\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.reading = false;\n\t\t\tif (!this.disposed) this.options.requestRender();\n\t\t\tif (!this.disposed && this.task?.id !== task.id) await this.refresh();\n\t\t}\n\t}\n\toutput(width: number): string[] {\n\t\tconst task = this.task;\n\t\tif (!task) return [];\n\t\tconst read = this.position.read;\n\t\tconst cache = this.outputCache;\n\t\t// Activity markers and elapsed time advance between snapshot updates, so live rows repaint uncached.\n\t\tconst live = !isTaskTerminal(task.status) && !!task.display?.activities?.length;\n\t\tif (live || cache?.task !== task || cache.read !== read || cache.width !== width)\n\t\t\tthis.outputCache = { task, read, width, lines: outputLines(task, read, this.options.theme, width) };\n\t\treturn this.outputCache!.lines;\n\t}\n\tdetails(width: number): string[] {\n\t\tconst task = this.task;\n\t\tif (!task) return [];\n\t\tconst cache = this.detailCache;\n\t\tif (cache?.task !== task || cache.width !== width)\n\t\t\tthis.detailCache = { task, width, lines: detailLines(task, this.options.theme, width) };\n\t\treturn this.detailCache!.lines;\n\t}\n\tdispose(): void {\n\t\tif (this.disposed) return;\n\t\tthis.disposed = true;\n\t\tthis.release?.();\n\t\tthis.release = undefined;\n\t\tthis.positions.clear();\n\t}\n}\n"]}
@@ -11,7 +11,8 @@ export declare function streamsLog(task: TaskSnapshot): boolean;
11
11
  /**
12
12
  * Output: a log streams from its file through bounded reads. Any other task shows what its
13
13
  * executor published, current with every snapshot: the human `display` when there is one,
14
- * otherwise the model-facing result.
14
+ * otherwise the model-facing result. Structured live activities share the interactive renderer;
15
+ * their bounded text remains the fallback for other hosts and settled snapshots.
15
16
  */
16
17
  export declare function outputLines(task: TaskSnapshot, read: TaskRead | undefined, theme: Theme, width: number): string[];
17
18
  //# sourceMappingURL=views.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../../../src/extensions/tasks/ui/views.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAChG,OAAO,EAAmC,KAAK,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAKxG;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAiCrF;AAED,4FAA4F;AAC5F,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAsBjH"}
1
+ {"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../../../src/extensions/tasks/ui/views.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEhG,OAAO,EAAmC,KAAK,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAKxG;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAiCrF;AAED,4FAA4F;AAC5F,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAEtD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA0BjH"}
@@ -1,6 +1,7 @@
1
1
  /** The inspector's Details and Output content, computed once per task snapshot and output read. */
2
2
  import { Markdown, visibleWidth, wrapTextWithAnsi } from "@earendil-works/pi-tui";
3
3
  import { isTaskTerminal } from "../../../core/tasks/types.js";
4
+ import { taskActivityLines } from "../../../modes/interactive/components/task-activity-list.js";
4
5
  import { getMarkdownTheme, highlightCode } from "../../../modes/interactive/theme/theme.js";
5
6
  import { cleanTaskText } from "./text.js";
6
7
  /**
@@ -53,7 +54,8 @@ export function streamsLog(task) {
53
54
  /**
54
55
  * Output: a log streams from its file through bounded reads. Any other task shows what its
55
56
  * executor published, current with every snapshot: the human `display` when there is one,
56
- * otherwise the model-facing result.
57
+ * otherwise the model-facing result. Structured live activities share the interactive renderer;
58
+ * their bounded text remains the fallback for other hosts and settled snapshots.
57
59
  */
58
60
  export function outputLines(task, read, theme, width) {
59
61
  const empty = task.status === "completed"
@@ -62,16 +64,19 @@ export function outputLines(task, read, theme, width) {
62
64
  ? "No saved output."
63
65
  : "No output yet.";
64
66
  const fromLog = streamsLog(task) && read !== undefined && !read.readError;
65
- const human = task.display?.text ? task.display : undefined;
67
+ const human = task.display?.text || task.display?.activities?.length ? task.display : undefined;
66
68
  const published = human ?? task.result;
67
69
  const text = cleanTaskText((fromLog ? read.text : published?.text) || empty);
68
- // Logs and live progress keep their plain rendering; only a settled report's result is Markdown.
70
+ const activities = !fromLog && !isTaskTerminal(task.status) && human?.activities?.length ? human.activities : undefined;
71
+ // Logs and plain live progress keep their plain rendering; only a settled report's result is Markdown.
69
72
  const markdown = !fromLog && !human && task.output === "report" && task.status === "completed";
70
- const output = markdown
71
- ? new Markdown(text, 0, 0, getMarkdownTheme(), {
72
- color: (line) => theme.fg("toolOutput", line),
73
- }).render(Math.max(1, width))
74
- : text.split("\n").map((line) => theme.fg("toolOutput", line));
73
+ const output = activities
74
+ ? taskActivityLines(activities, Math.max(1, width), theme, human?.earlierActivities ?? 0)
75
+ : markdown
76
+ ? new Markdown(text, 0, 0, getMarkdownTheme(), {
77
+ color: (line) => theme.fg("toolOutput", line),
78
+ }).render(Math.max(1, width))
79
+ : text.split("\n").map((line) => theme.fg("toolOutput", line));
75
80
  if (read?.readError)
76
81
  output.unshift(theme.fg("warning", "Log unavailable; showing saved result."));
77
82
  if (!fromLog && published?.truncated)
@@ -1 +1 @@
1
- {"version":3,"file":"views.js","sourceRoot":"","sources":["../../../../src/extensions/tasks/ui/views.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,cAAc,EAAoC,MAAM,8BAA8B,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAc,MAAM,2CAA2C,CAAC;AACxG,OAAO,EAAE,aAAa,EAAE,MAAM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,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC;IAC7E,iGAAiG;IACjG,MAAM,QAAQ,GAAG,CAAC,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,WAAW,CAAC;IAC/F,MAAM,MAAM,GAAG,QAAQ;QACtB,CAAC,CAAC,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,gBAAgB,EAAE,EAAE;YAC7C,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC;SAC7C,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAC9B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;IAChE,IAAI,IAAI,EAAE,SAAS;QAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,wCAAwC,CAAC,CAAC,CAAC;IACnG,IAAI,CAAC,OAAO,IAAI,SAAS,EAAE,SAAS;QACnC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC;IAC3F,OAAO,MAAM,CAAC;AACf,CAAC","sourcesContent":["/** The inspector's Details and Output content, computed once per task snapshot and output read. */\nimport { Markdown, visibleWidth, wrapTextWithAnsi } from \"@earendil-works/pi-tui\";\nimport { isTaskTerminal, type TaskRead, type TaskSnapshot } from \"../../../core/tasks/types.ts\";\nimport { getMarkdownTheme, highlightCode, type Theme } from \"../../../modes/interactive/theme/theme.ts\";\nimport { cleanTaskText } from \"./text.ts\";\n\ntype DetailRow = [label: string, value: string, tone?: \"warning\"];\n\n/**\n * Details: identity first, then the executor's input and facts as aligned rows whose values wrap\n * within their own column to `width`, then a multi-line input block. The source, status and\n * runtime are in the inspector header.\n */\nexport function detailLines(task: TaskSnapshot, theme: Theme, width: number): string[] {\n\tconst input = task.input && {\n\t\t...task.input,\n\t\tlabel: cleanTaskText(task.input.label),\n\t\ttext: cleanTaskText(task.input.text),\n\t};\n\tconst inputLines = input\n\t\t? input.language\n\t\t\t? highlightCode(input.text, input.language)\n\t\t\t: input.text.split(\"\\n\")\n\t\t: [];\n\tconst rows: DetailRow[] = [[\"Task ID\", task.id]];\n\tif (task.error) rows.push([\"Error\", cleanTaskText(task.error).replace(/\\n/g, \" \"), \"warning\"]);\n\t// Without an input, the title is the only complete description of the work.\n\tif (!input) rows.push([\"Title\", cleanTaskText(task.title)]);\n\telse if (inputLines.length <= 1) rows.push([input.label, inputLines[0] ?? \"\"]);\n\tfor (const [label, value] of task.facts ?? []) rows.push([cleanTaskText(label), cleanTaskText(value)]);\n\t// A fact that already names the output file would repeat it.\n\tconst shownAsFact = task.facts?.some(([, value]) => value === task.outputPath);\n\tif (task.outputPath && !shownAsFact)\n\t\trows.push([task.output === \"log\" ? \"Log\" : \"Full report\", cleanTaskText(task.outputPath)]);\n\tconst labelWidth = Math.max(9, ...rows.map(([label]) => visibleWidth(label))) + 1;\n\t// Values wrap inside their own column, so continuation lines hang under the first value line.\n\tconst valueWidth = Math.max(1, width - labelWidth);\n\tconst lines = rows.flatMap(([label, value, tone]) =>\n\t\twrapTextWithAnsi(value, valueWidth).map((line, index) => {\n\t\t\tconst lead = index ? \" \".repeat(labelWidth) : label + \" \".repeat(labelWidth - visibleWidth(label));\n\t\t\treturn lead + (tone ? theme.fg(tone, line) : line);\n\t\t}),\n\t);\n\tif (input && inputLines.length > 1) lines.push(\"\", theme.fg(\"accent\", input.label), ...inputLines);\n\tif (input?.truncated) lines.push(theme.fg(\"warning\", `[Saved ${input.label.toLowerCase()} truncated.]`));\n\treturn lines;\n}\n\n/** Whether Output streams from a file; any other task shows what its executor published. */\nexport function streamsLog(task: TaskSnapshot): boolean {\n\treturn task.output === \"log\" && task.outputPath !== undefined;\n}\n\n/**\n * Output: a log streams from its file through bounded reads. Any other task shows what its\n * executor published, current with every snapshot: the human `display` when there is one,\n * otherwise the model-facing result.\n */\nexport function outputLines(task: TaskSnapshot, read: TaskRead | undefined, theme: Theme, width: number): string[] {\n\tconst empty =\n\t\ttask.status === \"completed\"\n\t\t\t? \"Completed with no output.\"\n\t\t\t: isTaskTerminal(task.status)\n\t\t\t\t? \"No saved output.\"\n\t\t\t\t: \"No output yet.\";\n\tconst fromLog = streamsLog(task) && read !== undefined && !read.readError;\n\tconst human = task.display?.text ? task.display : undefined;\n\tconst published = human ?? task.result;\n\tconst text = cleanTaskText((fromLog ? read.text : published?.text) || empty);\n\t// Logs and live progress keep their plain rendering; only a settled report's result is Markdown.\n\tconst markdown = !fromLog && !human && task.output === \"report\" && task.status === \"completed\";\n\tconst output = markdown\n\t\t? new Markdown(text, 0, 0, getMarkdownTheme(), {\n\t\t\t\tcolor: (line) => theme.fg(\"toolOutput\", line),\n\t\t\t}).render(Math.max(1, width))\n\t\t: text.split(\"\\n\").map((line) => theme.fg(\"toolOutput\", line));\n\tif (read?.readError) output.unshift(theme.fg(\"warning\", \"Log unavailable; showing saved result.\"));\n\tif (!fromLog && published?.truncated)\n\t\toutput.push(theme.fg(\"warning\", human ? \"Output truncated.\" : \"Saved result truncated.\"));\n\treturn output;\n}\n"]}
1
+ {"version":3,"file":"views.js","sourceRoot":"","sources":["../../../../src/extensions/tasks/ui/views.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBA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I,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;IACjE,IAAI,IAAI,EAAE,SAAS;QAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,wCAAwC,CAAC,CAAC,CAAC;IACnG,IAAI,CAAC,OAAO,IAAI,SAAS,EAAE,SAAS;QACnC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC;IAC3F,OAAO,MAAM,CAAC;AACf,CAAC","sourcesContent":["/** The inspector's Details and Output content, computed once per task snapshot and output read. */\nimport { Markdown, visibleWidth, wrapTextWithAnsi } from \"@earendil-works/pi-tui\";\nimport { isTaskTerminal, type TaskRead, type TaskSnapshot } from \"../../../core/tasks/types.ts\";\nimport { taskActivityLines } from \"../../../modes/interactive/components/task-activity-list.ts\";\nimport { getMarkdownTheme, highlightCode, type Theme } from \"../../../modes/interactive/theme/theme.ts\";\nimport { cleanTaskText } from \"./text.ts\";\n\ntype DetailRow = [label: string, value: string, tone?: \"warning\"];\n\n/**\n * Details: identity first, then the executor's input and facts as aligned rows whose values wrap\n * within their own column to `width`, then a multi-line input block. The source, status and\n * runtime are in the inspector header.\n */\nexport function detailLines(task: TaskSnapshot, theme: Theme, width: number): string[] {\n\tconst input = task.input && {\n\t\t...task.input,\n\t\tlabel: cleanTaskText(task.input.label),\n\t\ttext: cleanTaskText(task.input.text),\n\t};\n\tconst inputLines = input\n\t\t? input.language\n\t\t\t? highlightCode(input.text, input.language)\n\t\t\t: input.text.split(\"\\n\")\n\t\t: [];\n\tconst rows: DetailRow[] = [[\"Task ID\", task.id]];\n\tif (task.error) rows.push([\"Error\", cleanTaskText(task.error).replace(/\\n/g, \" \"), \"warning\"]);\n\t// Without an input, the title is the only complete description of the work.\n\tif (!input) rows.push([\"Title\", cleanTaskText(task.title)]);\n\telse if (inputLines.length <= 1) rows.push([input.label, inputLines[0] ?? \"\"]);\n\tfor (const [label, value] of task.facts ?? []) rows.push([cleanTaskText(label), cleanTaskText(value)]);\n\t// A fact that already names the output file would repeat it.\n\tconst shownAsFact = task.facts?.some(([, value]) => value === task.outputPath);\n\tif (task.outputPath && !shownAsFact)\n\t\trows.push([task.output === \"log\" ? \"Log\" : \"Full report\", cleanTaskText(task.outputPath)]);\n\tconst labelWidth = Math.max(9, ...rows.map(([label]) => visibleWidth(label))) + 1;\n\t// Values wrap inside their own column, so continuation lines hang under the first value line.\n\tconst valueWidth = Math.max(1, width - labelWidth);\n\tconst lines = rows.flatMap(([label, value, tone]) =>\n\t\twrapTextWithAnsi(value, valueWidth).map((line, index) => {\n\t\t\tconst lead = index ? \" \".repeat(labelWidth) : label + \" \".repeat(labelWidth - visibleWidth(label));\n\t\t\treturn lead + (tone ? theme.fg(tone, line) : line);\n\t\t}),\n\t);\n\tif (input && inputLines.length > 1) lines.push(\"\", theme.fg(\"accent\", input.label), ...inputLines);\n\tif (input?.truncated) lines.push(theme.fg(\"warning\", `[Saved ${input.label.toLowerCase()} truncated.]`));\n\treturn lines;\n}\n\n/** Whether Output streams from a file; any other task shows what its executor published. */\nexport function streamsLog(task: TaskSnapshot): boolean {\n\treturn task.output === \"log\" && task.outputPath !== undefined;\n}\n\n/**\n * Output: a log streams from its file through bounded reads. Any other task shows what its\n * executor published, current with every snapshot: the human `display` when there is one,\n * otherwise the model-facing result. Structured live activities share the interactive renderer;\n * their bounded text remains the fallback for other hosts and settled snapshots.\n */\nexport function outputLines(task: TaskSnapshot, read: TaskRead | undefined, theme: Theme, width: number): string[] {\n\tconst empty =\n\t\ttask.status === \"completed\"\n\t\t\t? \"Completed with no output.\"\n\t\t\t: isTaskTerminal(task.status)\n\t\t\t\t? \"No saved output.\"\n\t\t\t\t: \"No output yet.\";\n\tconst fromLog = streamsLog(task) && read !== undefined && !read.readError;\n\tconst human = task.display?.text || task.display?.activities?.length ? task.display : undefined;\n\tconst published = human ?? task.result;\n\tconst text = cleanTaskText((fromLog ? read.text : published?.text) || empty);\n\tconst activities =\n\t\t!fromLog && !isTaskTerminal(task.status) && human?.activities?.length ? human.activities : undefined;\n\t// Logs and plain live progress keep their plain rendering; only a settled report's result is Markdown.\n\tconst markdown = !fromLog && !human && task.output === \"report\" && task.status === \"completed\";\n\tconst output = activities\n\t\t? taskActivityLines(activities, Math.max(1, width), theme, human?.earlierActivities ?? 0)\n\t\t: markdown\n\t\t\t? new Markdown(text, 0, 0, getMarkdownTheme(), {\n\t\t\t\t\tcolor: (line) => theme.fg(\"toolOutput\", line),\n\t\t\t\t}).render(Math.max(1, width))\n\t\t\t: text.split(\"\\n\").map((line) => theme.fg(\"toolOutput\", line));\n\tif (read?.readError) output.unshift(theme.fg(\"warning\", \"Log unavailable; showing saved result.\"));\n\tif (!fromLog && published?.truncated)\n\t\toutput.push(theme.fg(\"warning\", human ? \"Output truncated.\" : \"Saved result truncated.\"));\n\treturn output;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -24,7 +24,7 @@ export { formatSkillsForPrompt, type LoadSkillsFromDirOptions, type LoadSkillsRe
24
24
  export { createSyntheticSourceInfo } from "./core/source-info.ts";
25
25
  export type { TaskCompletionDetails } from "./core/tasks/presentation.ts";
26
26
  export { TaskRuntime } from "./core/tasks/runtime.ts";
27
- export type { TaskCompletion, TaskControl, TaskExecution, TaskFact, TaskInput, TaskKind, TaskMode, TaskOutputKind, TaskRead, TaskReadOptions, TaskRuntimeOptions, TaskSnapshot, TaskStatus, TasksContext, TasksSessionContext, TaskTerminalStatus, TaskText, TaskToolOutcome, TaskUpdate, } from "./core/tasks/types.ts";
27
+ export type { TaskActivity, TaskCompletion, TaskControl, TaskDisplay, TaskExecution, TaskFact, TaskInput, TaskKind, TaskMode, TaskOutputKind, TaskRead, TaskReadOptions, TaskRuntimeOptions, TaskSnapshot, TaskStatus, TasksContext, TasksSessionContext, TaskTerminalStatus, TaskText, TaskToolOutcome, TaskUpdate, } from "./core/tasks/types.ts";
28
28
  export { type EditDiffResult, generateDiffString, generateUnifiedPatch } from "./core/tools/edit-diff.ts";
29
29
  export { type BashOperations, type BashSpawnContext, type BashSpawnHook, type BashToolDetails, type BashToolInput, type BashToolOptions, createBashToolDefinition, createEditToolDefinition, createFindToolDefinition, createGrepToolDefinition, createLocalBashOperations, createLocalPowerShellOperations, createLsToolDefinition, createPowerShellToolDefinition, createReadToolDefinition, createWriteToolDefinition, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, type EditOperations, type EditToolDetails, type EditToolInput, type EditToolOptions, type FindOperations, type FindToolDetails, type FindToolInput, type FindToolOptions, formatSize, type GrepOperations, type GrepToolDetails, type GrepToolInput, type GrepToolOptions, type LsOperations, type LsToolDetails, type LsToolInput, type LsToolOptions, type PowerShellOperations, type PowerShellSpawnContext, type PowerShellSpawnHook, type PowerShellToolDetails, type PowerShellToolInput, type PowerShellToolOptions, type ReadOperations, type ReadToolDetails, type ReadToolInput, type ReadToolOptions, type ToolsOptions, type TruncationOptions, type TruncationResult, truncateHead, truncateLine, truncateTail, type WriteOperations, type WriteToolInput, type WriteToolOptions, withFileMutationQueue, } from "./core/tools/index.ts";
30
30
  export { formatReadLineRange } from "./core/tools/render-utils.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,EACN,eAAe,EACf,WAAW,EACX,WAAW,EACX,eAAe,EACf,aAAa,EACb,aAAa,EACb,OAAO,GACP,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,iBA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C,YAAY,EACZ,KAAK,mBAAmB,EACxB,sBAAsB,EACtB,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,OAAO,EACP,OAAO,EACP,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,iBAAiB,EACtB,UAAU,EACV,UAAU,EACV,wBAAwB,EACxB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,EAC/B,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,KAAK,oBAAoB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,4BAA4B,EAC5B,KAAK,oBAAoB,GACzB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,SAAS,EACT,KAAK,EACL,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,UAAU,GACf,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,oCAAoC,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,OAAO,EAAa,SAAS,EAAE,MAAM,eAAe,CAA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BAAkB,CAAC","sourcesContent":["// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n\n// Config paths\nexport {\n\tCONFIG_DIR_NAME,\n\tgetAgentDir,\n\tgetDocsPath,\n\tgetExamplesPath,\n\tgetPackageDir,\n\tgetReadmePath,\n\tVERSION,\n} from \"./config.ts\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ExtensionBindings,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.ts\";\nexport { readStoredCredential } from \"./core/auth-storage.ts\";\nexport type { CacheWarmingDecision, CacheWarmingStatus } from \"./core/cache-warmer.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionResult,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgenerateSummaryWithUsage,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n} from \"./core/compaction/index.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.ts\";\n// Extension system\nexport type {\n\tAfterProviderResponseEvent,\n\tAgentActivityOutcome,\n\tAgentBeforeSettleEvent,\n\tAgentBeforeSettleEventResult,\n\tAgentEndEvent,\n\tAgentSettledEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppKeybinding,\n\tAutocompleteProviderFactory,\n\tBashToolCallEvent,\n\tBeforeAgentStartCustomEvent,\n\tBeforeAgentStartEvent,\n\tBeforeAgentStartEventResult,\n\tBeforeAgentStartUserEvent,\n\tBeforeProviderHeadersEvent,\n\tBeforeProviderRequestEvent,\n\tBeforeProviderRequestEventResult,\n\tBoundaryContextPreview,\n\tBoundaryResult,\n\tBoundaryState,\n\tBuildSystemPromptOptions,\n\tCacheWarmingDecisionEvent,\n\tCacheWarmingDecisionEventResult,\n\tCompactionEntryDraft,\n\tCompactOptions,\n\tContextEditEntryDraft,\n\tContextEvent,\n\tContextEventResult,\n\tContextSnapshot,\n\tContextUsage,\n\tContextWithSystemEvent,\n\tCustomEntryDraft,\n\tCustomMessageEntryDraft,\n\tCustomToolCallEvent,\n\tEditorHost,\n\tEditorSubmitEvent,\n\tEditorSubmitHandler,\n\tEditToolCallEvent,\n\tEntryRenderer,\n\tEntryRenderOptions,\n\tExecOptions,\n\tExecResult,\n\tExecuteToolOptions,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionToolContext,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionVirtualModel,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInlineExtension,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingHints,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMarkdownTransformContext,\n\tMarkdownTransformer,\n\tMcpServersChangeEvent,\n\tMessageEndEvent,\n\tMessageEndEventResult,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tMessageStartEvent,\n\tMessageUpdateEvent,\n\tModelSelectEvent,\n\tModelSelectSource,\n\tNormalizedBuildSystemPromptOptions,\n\tPowerShellToolCallEvent,\n\tProjectTrustContext,\n\tProjectTrustEvent,\n\tProjectTrustEventDecision,\n\tProjectTrustEventResult,\n\tProjectTrustHandler,\n\tProviderConfig,\n\tProviderModelConfig,\n\tProviderStreamEvent,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tResolvedCommand,\n\tResourcesDiscoverEvent,\n\tResourcesDiscoverResult,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeCompactResult,\n\tSessionBeforeForkEvent,\n\tSessionBeforeForkResult,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeSwitchResult,\n\tSessionBeforeTreeEvent,\n\tSessionBeforeTreeResult,\n\tSessionBoundaryDraft,\n\tSessionCompactEvent,\n\tSessionCompactFailedEvent,\n\tSessionInfoChangedEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandSource,\n\tSourceInfo,\n\tTerminalInputHandler,\n\tThinkingLevelSelectEvent,\n\tToolAnnotations,\n\tToolCallEvent,\n\tToolCallEventResult,\n\tToolDefinition,\n\tToolExecutionEndEvent,\n\tToolExecutionMode,\n\tToolExecutionShell,\n\tToolExecutionStartEvent,\n\tToolExecutionUpdateEvent,\n\tToolExposure,\n\tToolInfo,\n\tToolLoadout,\n\tToolLoadoutChanges,\n\tToolNamespace,\n\tToolRendererResolver,\n\tToolRenderers,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tToolResultEventResult,\n\tToolRowGap,\n\tTurnEndEvent,\n\tTurnEndEventResult,\n\tTurnStartEvent,\n\tUIPromptEndEvent,\n\tUIPromptKind,\n\tUIPromptStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tWidgetPlacement,\n\tWorkingIndicatorOptions,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.ts\";\nexport {\n\tcreateExtensionRuntime,\n\tdefineTool,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\tisBashToolResult,\n\tisEditToolResult,\n\tisFindToolResult,\n\tisGrepToolResult,\n\tisLsToolResult,\n\tisPowerShellToolResult,\n\tisReadToolResult,\n\tisToolCallEventType,\n\tisWriteToolResult,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n} from \"./core/extensions/index.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport type { RegisteredMcpServer } from \"./core/mcp-servers.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\ttype ModelScopeDiagnostic,\n\ttype ResolveCliModelResult,\n\ttype ResolveModelScopeResult,\n\tresolveCliModel,\n\tresolveModelScopeWithDiagnostics,\n\ttype ScopedModel,\n} from \"./core/model-resolver.ts\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tCredentialSynchronizationError,\n\ttype CredentialSynchronizationOperation,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.ts\";\nexport type {\n\tPackageInstallFailure,\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.ts\";\nexport { DefaultResourceLoader, loadProjectContextFiles } from \"./core/resource-loader.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreatePowerShellTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\tbuildSessionProjection,\n\ttype CompactionEntry,\n\ttype ContextEditableContent,\n\ttype ContextEditEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\ttype ProjectedSessionEntry,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionProjection,\n\ttype SessionTreeNode,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\ttype CacheWarmingMode,\n\ttype CompactionModelOverride,\n\ttype CompactionSettings,\n\ttype DefaultProjectTrust,\n\ttype FullscreenExitOutput,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype QuietStartup,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n\ttype TuiMode,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport type { TaskCompletionDetails } from \"./core/tasks/presentation.ts\";\nexport { TaskRuntime } from \"./core/tasks/runtime.ts\";\nexport type {\n\tTaskCompletion,\n\tTaskControl,\n\tTaskExecution,\n\tTaskFact,\n\tTaskInput,\n\tTaskKind,\n\tTaskMode,\n\tTaskOutputKind,\n\tTaskRead,\n\tTaskReadOptions,\n\tTaskRuntimeOptions,\n\tTaskSnapshot,\n\tTaskStatus,\n\tTasksContext,\n\tTasksSessionContext,\n\tTaskTerminalStatus,\n\tTaskText,\n\tTaskToolOutcome,\n\tTaskUpdate,\n} from \"./core/tasks/types.ts\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Tools\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateGrepToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLocalPowerShellOperations,\n\tcreateLsToolDefinition,\n\tcreatePowerShellToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n} from \"./core/tools/index.ts\";\nexport { formatReadLineRange } from \"./core/tools/render-utils.ts\";\nexport {\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n} from \"./core/trust-manager.ts\";\nexport {\n\ttype ModelRoute,\n\ttype ModelRouteReason,\n\ttype ModelRouteRequest,\n\tVIRTUAL_MODEL_STATE_ENTRY,\n\ttype VirtualModelDefinition,\n\ttype VirtualModelStateData,\n} from \"./core/virtual-models.ts\";\n// Built-in extensions. The CLI loads them; SDK sessions add them to their extension factories.\nexport { type CodemodeExtensionOptions, createCodemodeExtension } from \"./extensions/codemode/index.ts\";\nexport type { CodemodeStoreEntryData, CodemodeToolDetails } from \"./extensions/codemode/tool.ts\";\nexport type { LoadedMcpConfig, McpExposure, McpServerConfig, McpServerEntry } from \"./extensions/mcp/config.ts\";\nexport { createMcpExtension, type McpExtensionOptions, type McpTransportFactory } from \"./extensions/mcp/index.ts\";\nexport { createToolSearchExtension } from \"./extensions/tool-search/index.ts\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype JsonAgentSessionEvent,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\ttype CustomEditorOptions,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyText,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeAppearance,\n\ttype ThemeBg,\n\ttype ThemeColor,\n\ttype ThemeStyle,\n\ttype ThemeToken,\n} from \"./modes/interactive/theme/theme.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\nexport { detectSupportedImageMimeTypeFromFile } from \"./utils/mime.ts\";\n// Shell utilities\nexport { getPowerShellConfig, getShellConfig } from \"./utils/shell.ts\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,OAAO,EAAa,SAAS,EAAE,MA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EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n\n// Config paths\nexport {\n\tCONFIG_DIR_NAME,\n\tgetAgentDir,\n\tgetDocsPath,\n\tgetExamplesPath,\n\tgetPackageDir,\n\tgetReadmePath,\n\tVERSION,\n} from \"./config.ts\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ExtensionBindings,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.ts\";\nexport { readStoredCredential } from \"./core/auth-storage.ts\";\nexport type { CacheWarmingDecision, CacheWarmingStatus } from \"./core/cache-warmer.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionResult,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgenerateSummaryWithUsage,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n} from \"./core/compaction/index.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.ts\";\n// Extension system\nexport type {\n\tAfterProviderResponseEvent,\n\tAgentActivityOutcome,\n\tAgentBeforeSettleEvent,\n\tAgentBeforeSettleEventResult,\n\tAgentEndEvent,\n\tAgentSettledEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppKeybinding,\n\tAutocompleteProviderFactory,\n\tBashToolCallEvent,\n\tBeforeAgentStartCustomEvent,\n\tBeforeAgentStartEvent,\n\tBeforeAgentStartEventResult,\n\tBeforeAgentStartUserEvent,\n\tBeforeProviderHeadersEvent,\n\tBeforeProviderRequestEvent,\n\tBeforeProviderRequestEventResult,\n\tBoundaryContextPreview,\n\tBoundaryResult,\n\tBoundaryState,\n\tBuildSystemPromptOptions,\n\tCacheWarmingDecisionEvent,\n\tCacheWarmingDecisionEventResult,\n\tCompactionEntryDraft,\n\tCompactOptions,\n\tContextEditEntryDraft,\n\tContextEvent,\n\tContextEventResult,\n\tContextSnapshot,\n\tContextUsage,\n\tContextWithSystemEvent,\n\tCustomEntryDraft,\n\tCustomMessageEntryDraft,\n\tCustomToolCallEvent,\n\tEditorHost,\n\tEditorSubmitEvent,\n\tEditorSubmitHandler,\n\tEditToolCallEvent,\n\tEntryRenderer,\n\tEntryRenderOptions,\n\tExecOptions,\n\tExecResult,\n\tExecuteToolOptions,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionToolContext,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionVirtualModel,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInlineExtension,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingHints,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMarkdownTransformContext,\n\tMarkdownTransformer,\n\tMcpServersChangeEvent,\n\tMessageEndEvent,\n\tMessageEndEventResult,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tMessageStartEvent,\n\tMessageUpdateEvent,\n\tModelSelectEvent,\n\tModelSelectSource,\n\tNormalizedBuildSystemPromptOptions,\n\tPowerShellToolCallEvent,\n\tProjectTrustContext,\n\tProjectTrustEvent,\n\tProjectTrustEventDecision,\n\tProjectTrustEventResult,\n\tProjectTrustHandler,\n\tProviderConfig,\n\tProviderModelConfig,\n\tProviderStreamEvent,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tResolvedCommand,\n\tResourcesDiscoverEvent,\n\tResourcesDiscoverResult,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeCompactResult,\n\tSessionBeforeForkEvent,\n\tSessionBeforeForkResult,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeSwitchResult,\n\tSessionBeforeTreeEvent,\n\tSessionBeforeTreeResult,\n\tSessionBoundaryDraft,\n\tSessionCompactEvent,\n\tSessionCompactFailedEvent,\n\tSessionInfoChangedEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandSource,\n\tSourceInfo,\n\tTerminalInputHandler,\n\tThinkingLevelSelectEvent,\n\tToolAnnotations,\n\tToolCallEvent,\n\tToolCallEventResult,\n\tToolDefinition,\n\tToolExecutionEndEvent,\n\tToolExecutionMode,\n\tToolExecutionShell,\n\tToolExecutionStartEvent,\n\tToolExecutionUpdateEvent,\n\tToolExposure,\n\tToolInfo,\n\tToolLoadout,\n\tToolLoadoutChanges,\n\tToolNamespace,\n\tToolRendererResolver,\n\tToolRenderers,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tToolResultEventResult,\n\tToolRowGap,\n\tTurnEndEvent,\n\tTurnEndEventResult,\n\tTurnStartEvent,\n\tUIPromptEndEvent,\n\tUIPromptKind,\n\tUIPromptStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tWidgetPlacement,\n\tWorkingIndicatorOptions,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.ts\";\nexport {\n\tcreateExtensionRuntime,\n\tdefineTool,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\tisBashToolResult,\n\tisEditToolResult,\n\tisFindToolResult,\n\tisGrepToolResult,\n\tisLsToolResult,\n\tisPowerShellToolResult,\n\tisReadToolResult,\n\tisToolCallEventType,\n\tisWriteToolResult,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n} from \"./core/extensions/index.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport type { RegisteredMcpServer } from \"./core/mcp-servers.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\ttype ModelScopeDiagnostic,\n\ttype ResolveCliModelResult,\n\ttype ResolveModelScopeResult,\n\tresolveCliModel,\n\tresolveModelScopeWithDiagnostics,\n\ttype ScopedModel,\n} from \"./core/model-resolver.ts\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tCredentialSynchronizationError,\n\ttype CredentialSynchronizationOperation,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.ts\";\nexport type {\n\tPackageInstallFailure,\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.ts\";\nexport { DefaultResourceLoader, loadProjectContextFiles } from \"./core/resource-loader.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreatePowerShellTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\tbuildSessionProjection,\n\ttype CompactionEntry,\n\ttype ContextEditableContent,\n\ttype ContextEditEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\ttype ProjectedSessionEntry,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionProjection,\n\ttype SessionTreeNode,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\ttype CacheWarmingMode,\n\ttype CompactionModelOverride,\n\ttype CompactionSettings,\n\ttype DefaultProjectTrust,\n\ttype FullscreenExitOutput,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype QuietStartup,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n\ttype TuiMode,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport type { TaskCompletionDetails } from \"./core/tasks/presentation.ts\";\nexport { TaskRuntime } from \"./core/tasks/runtime.ts\";\nexport type {\n\tTaskActivity,\n\tTaskCompletion,\n\tTaskControl,\n\tTaskDisplay,\n\tTaskExecution,\n\tTaskFact,\n\tTaskInput,\n\tTaskKind,\n\tTaskMode,\n\tTaskOutputKind,\n\tTaskRead,\n\tTaskReadOptions,\n\tTaskRuntimeOptions,\n\tTaskSnapshot,\n\tTaskStatus,\n\tTasksContext,\n\tTasksSessionContext,\n\tTaskTerminalStatus,\n\tTaskText,\n\tTaskToolOutcome,\n\tTaskUpdate,\n} from \"./core/tasks/types.ts\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Tools\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateGrepToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLocalPowerShellOperations,\n\tcreateLsToolDefinition,\n\tcreatePowerShellToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n} from \"./core/tools/index.ts\";\nexport { formatReadLineRange } from \"./core/tools/render-utils.ts\";\nexport {\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n} from \"./core/trust-manager.ts\";\nexport {\n\ttype ModelRoute,\n\ttype ModelRouteReason,\n\ttype ModelRouteRequest,\n\tVIRTUAL_MODEL_STATE_ENTRY,\n\ttype VirtualModelDefinition,\n\ttype VirtualModelStateData,\n} from \"./core/virtual-models.ts\";\n// Built-in extensions. The CLI loads them; SDK sessions add them to their extension factories.\nexport { type CodemodeExtensionOptions, createCodemodeExtension } from \"./extensions/codemode/index.ts\";\nexport type { CodemodeStoreEntryData, CodemodeToolDetails } from \"./extensions/codemode/tool.ts\";\nexport type { LoadedMcpConfig, McpExposure, McpServerConfig, McpServerEntry } from \"./extensions/mcp/config.ts\";\nexport { createMcpExtension, type McpExtensionOptions, type McpTransportFactory } from \"./extensions/mcp/index.ts\";\nexport { createToolSearchExtension } from \"./extensions/tool-search/index.ts\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype JsonAgentSessionEvent,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\ttype CustomEditorOptions,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyText,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeAppearance,\n\ttype ThemeBg,\n\ttype ThemeColor,\n\ttype ThemeStyle,\n\ttype ThemeToken,\n} from \"./modes/interactive/theme/theme.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\nexport { detectSupportedImageMimeTypeFromFile } from \"./utils/mime.ts\";\n// Shell utilities\nexport { getPowerShellConfig, getShellConfig } from \"./utils/shell.ts\";\n"]}
@@ -0,0 +1,5 @@
1
+ import type { TaskActivity } from "../../../core/tasks/types.ts";
2
+ import type { Theme } from "../theme/theme.ts";
3
+ /** Fit the retained calls and their omitted-count line to `width`; running timing is measured at repaint. */
4
+ export declare function taskActivityLines(activities: readonly TaskActivity[], width: number, theme: Theme, earlier?: number, now?: number): string[];
5
+ //# sourceMappingURL=task-activity-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-activity-list.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/task-activity-list.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAqD/C,6GAA6G;AAC7G,wBAAgB,iBAAiB,CAChC,UAAU,EAAE,SAAS,YAAY,EAAE,EACnC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,KAAK,EACZ,OAAO,SAAI,EACX,GAAG,SAAa,GACd,MAAM,EAAE,CA4BV"}
@@ -0,0 +1,68 @@
1
+ /** Shared themed rendering for structured live task activities; executors publish data, never this UI. */
2
+ import { stripTerminalSequences, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
3
+ import { activityStatusAsTaskStatus, earlierTaskActivitiesLabel, formatTaskActivityDuration, taskActivityErrorLine, taskActivityNameWidth, } from "../../../core/tasks/activity.js";
4
+ import { sanitizeBinaryOutput } from "../../../utils/shell.js";
5
+ import { statusMarker } from "./status-marker.js";
6
+ /** ` · ` before the duration column. */
7
+ const SEPARATOR_WIDTH = 3;
8
+ function oneLine(text) {
9
+ return sanitizeBinaryOutput(stripTerminalSequences(text)).replace(/\s+/gu, " ").trim();
10
+ }
11
+ function marker(status, now) {
12
+ return statusMarker(activityStatusAsTaskStatus(status), { now });
13
+ }
14
+ function shownDuration(activity, now) {
15
+ if (activity.status === "running")
16
+ return activity.startedAt === undefined ? "" : formatTaskActivityDuration(Math.max(0, now - activity.startedAt));
17
+ return formatTaskActivityDuration(activity.durationMs);
18
+ }
19
+ function headWidth(row, nameWidth) {
20
+ return visibleWidth(row.marker.glyph) + 1 + Math.max(nameWidth, visibleWidth(row.name)) + 1;
21
+ }
22
+ /** A long target gives way before the duration; durations end in one shared column. */
23
+ function activityRow(row, nameWidth, durationWidth, tableWidth, theme) {
24
+ const { marker, name, target, duration } = row;
25
+ const padding = " ".repeat(Math.max(0, nameWidth - visibleWidth(name)));
26
+ const head = `${theme.fg(marker.color, marker.glyph)} ${theme.fg("toolTitle", name)}${padding}`;
27
+ const durationPad = " ".repeat(Math.max(0, durationWidth - visibleWidth(duration)));
28
+ const tail = duration ? `${theme.fg("dim", " · ")}${durationPad}${theme.fg("dim", duration)}` : "";
29
+ if (!target && !tail)
30
+ return truncateToWidth(head.trimEnd(), tableWidth, "…");
31
+ const room = tableWidth - headWidth(row, nameWidth) - (tail ? SEPARATOR_WIDTH + durationWidth : 0);
32
+ if (room < 2)
33
+ return truncateToWidth(`${head} ${theme.fg("muted", target)}${tail}`, tableWidth, "…");
34
+ const clipped = truncateToWidth(target, room, "…");
35
+ if (!tail)
36
+ return `${head} ${theme.fg("muted", clipped)}`;
37
+ return `${head} ${theme.fg("muted", clipped)}${" ".repeat(room - visibleWidth(clipped))}${tail}`;
38
+ }
39
+ /** Fit the retained calls and their omitted-count line to `width`; running timing is measured at repaint. */
40
+ export function taskActivityLines(activities, width, theme, earlier = 0, now = Date.now()) {
41
+ if (width <= 0)
42
+ return [];
43
+ const nameWidth = taskActivityNameWidth(activities);
44
+ const rows = activities.map((activity) => ({
45
+ activity,
46
+ marker: marker(activity.status, now),
47
+ name: oneLine(activity.name),
48
+ target: oneLine(activity.target ?? ""),
49
+ duration: shownDuration(activity, now),
50
+ }));
51
+ const durationWidth = Math.max(0, ...rows.map((row) => visibleWidth(row.duration)));
52
+ const tailWidth = durationWidth ? SEPARATOR_WIDTH + durationWidth : 0;
53
+ const naturalWidth = Math.max(0, ...rows.map((row) => headWidth(row, nameWidth) + visibleWidth(row.target) + tailWidth));
54
+ const tableWidth = Math.min(width, naturalWidth);
55
+ const lines = [];
56
+ if (earlier > 0) {
57
+ const label = earlierTaskActivitiesLabel(earlier);
58
+ lines.push(truncateToWidth(theme.fg("dim", label), width, "…"));
59
+ }
60
+ for (const row of rows) {
61
+ lines.push(activityRow(row, nameWidth, durationWidth, tableWidth, theme));
62
+ const error = row.activity.error ? oneLine(taskActivityErrorLine(row.activity.error)) : "";
63
+ if (error)
64
+ lines.push(truncateToWidth(`${" ".repeat(3 + nameWidth)}${theme.fg("error", error)}`, width, "…"));
65
+ }
66
+ return lines;
67
+ }
68
+ //# sourceMappingURL=task-activity-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-activity-list.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/task-activity-list.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAC1G,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EACN,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,qBAAqB,GACrB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAqB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAErE,wCAAwC;AACxC,MAAM,eAAe,GAAG,CAAC,CAAC;AAU1B,SAAS,OAAO,CAAC,IAAY;IAC5B,OAAO,oBAAoB,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACxF,CAAC;AAED,SAAS,MAAM,CAAC,MAA8B,EAAE,GAAW;IAC1D,OAAO,YAAY,CAAC,0BAA0B,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,aAAa,CAAC,QAAsB,EAAE,GAAW;IACzD,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS;QAChC,OAAO,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xB,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;QAC1E,MAAM,KAAK,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3F,IAAI,KAAK;YAAE,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;IAC/G,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC","sourcesContent":["/** Shared themed rendering for structured live task activities; executors publish data, never this UI. */\nimport { stripTerminalSequences, truncateToWidth, visibleWidth } from \"@earendil-works/pi-tui\";\nimport {\n\tactivityStatusAsTaskStatus,\n\tearlierTaskActivitiesLabel,\n\tformatTaskActivityDuration,\n\ttaskActivityErrorLine,\n\ttaskActivityNameWidth,\n} from \"../../../core/tasks/activity.ts\";\nimport type { TaskActivity } from \"../../../core/tasks/types.ts\";\nimport { sanitizeBinaryOutput } from \"../../../utils/shell.ts\";\nimport type { Theme } from \"../theme/theme.ts\";\nimport { type StatusMarker, statusMarker } from \"./status-marker.ts\";\n\n/** ` · ` before the duration column. */\nconst SEPARATOR_WIDTH = 3;\n\ninterface RowParts {\n\tactivity: TaskActivity;\n\tmarker: StatusMarker;\n\tname: string;\n\ttarget: string;\n\tduration: string;\n}\n\nfunction oneLine(text: string): string {\n\treturn sanitizeBinaryOutput(stripTerminalSequences(text)).replace(/\\s+/gu, \" \").trim();\n}\n\nfunction marker(status: TaskActivity[\"status\"], now: number): StatusMarker {\n\treturn statusMarker(activityStatusAsTaskStatus(status), { now });\n}\n\nfunction shownDuration(activity: TaskActivity, now: number): string {\n\tif (activity.status === \"running\")\n\t\treturn activity.startedAt === undefined ? \"\" : formatTaskActivityDuration(Math.max(0, now - activity.startedAt));\n\treturn formatTaskActivityDuration(activity.durationMs);\n}\n\nfunction headWidth(row: RowParts, nameWidth: number): number {\n\treturn visibleWidth(row.marker.glyph) + 1 + Math.max(nameWidth, visibleWidth(row.name)) + 1;\n}\n\n/** A long target gives way before the duration; durations end in one shared column. */\nfunction activityRow(\n\trow: RowParts,\n\tnameWidth: number,\n\tdurationWidth: number,\n\ttableWidth: number,\n\ttheme: Theme,\n): string {\n\tconst { marker, name, target, duration } = row;\n\tconst padding = \" \".repeat(Math.max(0, nameWidth - visibleWidth(name)));\n\tconst head = `${theme.fg(marker.color, marker.glyph)} ${theme.fg(\"toolTitle\", name)}${padding}`;\n\tconst durationPad = \" \".repeat(Math.max(0, durationWidth - visibleWidth(duration)));\n\tconst tail = duration ? `${theme.fg(\"dim\", \" · \")}${durationPad}${theme.fg(\"dim\", duration)}` : \"\";\n\tif (!target && !tail) return truncateToWidth(head.trimEnd(), tableWidth, \"…\");\n\tconst room = tableWidth - headWidth(row, nameWidth) - (tail ? SEPARATOR_WIDTH + durationWidth : 0);\n\tif (room < 2) return truncateToWidth(`${head} ${theme.fg(\"muted\", target)}${tail}`, tableWidth, \"…\");\n\tconst clipped = truncateToWidth(target, room, \"…\");\n\tif (!tail) return `${head} ${theme.fg(\"muted\", clipped)}`;\n\treturn `${head} ${theme.fg(\"muted\", clipped)}${\" \".repeat(room - visibleWidth(clipped))}${tail}`;\n}\n\n/** Fit the retained calls and their omitted-count line to `width`; running timing is measured at repaint. */\nexport function taskActivityLines(\n\tactivities: readonly TaskActivity[],\n\twidth: number,\n\ttheme: Theme,\n\tearlier = 0,\n\tnow = Date.now(),\n): string[] {\n\tif (width <= 0) return [];\n\tconst nameWidth = taskActivityNameWidth(activities);\n\tconst rows: RowParts[] = activities.map((activity) => ({\n\t\tactivity,\n\t\tmarker: marker(activity.status, now),\n\t\tname: oneLine(activity.name),\n\t\ttarget: oneLine(activity.target ?? \"\"),\n\t\tduration: shownDuration(activity, now),\n\t}));\n\tconst durationWidth = Math.max(0, ...rows.map((row) => visibleWidth(row.duration)));\n\tconst tailWidth = durationWidth ? SEPARATOR_WIDTH + durationWidth : 0;\n\tconst naturalWidth = Math.max(\n\t\t0,\n\t\t...rows.map((row) => headWidth(row, nameWidth) + visibleWidth(row.target) + tailWidth),\n\t);\n\tconst tableWidth = Math.min(width, naturalWidth);\n\tconst lines: string[] = [];\n\tif (earlier > 0) {\n\t\tconst label = earlierTaskActivitiesLabel(earlier);\n\t\tlines.push(truncateToWidth(theme.fg(\"dim\", label), width, \"…\"));\n\t}\n\tfor (const row of rows) {\n\t\tlines.push(activityRow(row, nameWidth, durationWidth, tableWidth, theme));\n\t\tconst error = row.activity.error ? oneLine(taskActivityErrorLine(row.activity.error)) : \"\";\n\t\tif (error) lines.push(truncateToWidth(`${\" \".repeat(3 + nameWidth)}${theme.fg(\"error\", error)}`, width, \"…\"));\n\t}\n\treturn lines;\n}\n"]}
@@ -73,7 +73,7 @@ In `/tasks`, each Agent remains an independent row:
73
73
  › read README.md
74
74
  ```
75
75
 
76
- Each call is `glyph tool target · duration`, with the tool-name column padded to the longest shown name (at most 8 characters) so targets line up. The glyphs are `✓` for success, `×` for failure, `○` for cancellation and `›` for a running call. When more than the latest 50 calls happened, the first line counts the earlier ones. A failed call adds one line under its target holding the first non-empty line of its error, clipped to about 160 characters. Durations read `42ms` under a second, `6.2s` under a minute, then `1m 5s`. The Transcript's expanded row shows the latest calls of the same list styled with the theme, with durations right-aligned in one column and a running call's elapsed time. The model never sees this list; `tasks read` still returns the one-line status. Once the Agent finishes, whatever its outcome, Output shows only its final report (Markdown for a completed report) or, for a failed or cancelled Agent, its report so far and diagnostic. Oversized reports remain available through their managed output file.
76
+ Each call is `glyph tool target · duration`, with the tool-name column padded to the longest shown name (at most 8 characters) so targets line up. The glyphs are `✓` for success, `×` for failure, `○` for cancellation and `›` for a running call. When more than the latest 50 calls happened, the first line counts the earlier ones. A failed call adds one line under its target holding the first non-empty line of its error, clipped to about 160 characters. Durations read `42ms` under a second, `6.2s` under a minute, then `1m 5s`. Both `/tasks` and the Transcript's expanded row render the same structured activity data with the theme: status-colored glyphs, tool-title names, muted targets, dim right-aligned durations and error lines, plus a running call's animated marker and elapsed time. The plain display uses `›` for a running call and remains the fallback outside these live views. The model never sees this list; `tasks read` still returns the one-line status. Once the Agent finishes, whatever its outcome, Output shows only its final report (Markdown for a completed report) or, for a failed or cancelled Agent, its report so far and diagnostic. Oversized reports remain available through their managed output file.
77
77
  - **Details** shows the full Prompt, working directory, model, and thinking level. Once the Agent settles, it also shows `Tool calls` (every call, for example `23 · 2 failed`), `Edited` (see below) and, in a saved session, the `Report` and `Transcript` paths.
78
78
 
79
79
  Use `tasks read` or `tasks kill` with the Task ID; the report arrives automatically when the Agent finishes. Reading requires no view options: the status line or report is the model projection, while the `/tasks` panel adds the human-only tool-call list while the Agent runs. Selection, scrolling, cancellation, foreground detach, history, and completion delivery are owned by the shared Tasks implementation. Parent cancellation stops foreground-owned work, including cancellation received during startup; detached work continues until it finishes or is killed. Reload, session replacement, and shutdown cancel active Agents.
@@ -1299,6 +1299,8 @@ Background work is admitted, submitted or detached, only while the host can supe
1299
1299
 
1300
1300
  `TaskControl<T>` exposes `id`, `signal`, `mode`, `onModeChange(listener)`, `accept()`, `publish(update)`, `attachOutput(path, cleanup?)`, and `cancel()`. `publish({ result, display?, usage? })` replaces the bounded model-readable result and optionally the live human-only display and cumulative usage; while it runs `/tasks` shows the display in place of the result, while model reads and completion notifications use only the result. A task with an attached output file is read from that file instead. Call `accept()` after whole-invocation preflight, before allowing a background handoff; `onModeChange` listeners run when the mode becomes `background`. Use the control's signal throughout execution. Parent-call cancellation is disconnected after handoff, while runtime shutdown still cancels the task. Mode subscriptions concern only this task; executors do not need the global registry to observe their own handoff or cancel themselves.
1301
1301
 
1302
+ A live `display` can be a string or a `TaskDisplay`: `{ text, truncated, activities?, earlierActivities? }`. The text is always the portable fallback. Each optional `TaskActivity` is `{ name, target?, status, startedAt?, durationMs?, error? }`, where `status` is `running`, `ok`, `error`, or `cancelled`; times are epoch/elapsed milliseconds. `/tasks` renders retained activities with the shared themed status markers, fitted columns, failure excerpts, and repaint-time running durations, using `earlierActivities` for the omitted-count line. The runtime bounds and freezes this data just like text; it stores no renderer or Theme dependency. Structured activities are live-only: settlement replaces or clears the progress display exactly as for a string display, and persisted terminal displays remain `{ text, truncated }`.
1303
+
1302
1304
  Completion messages store `{ version: 3, task }` in `details`, a bounded terminal `TaskSnapshot`; only their bounded `content` enters model context. Reads do not acknowledge delivery, and arbitrary tool-result detail fields cannot acknowledge a task. An undelivered completion is a retention lease the session holds on its task: the record and its output stay available until the model has it, and a runtime embedded without a session never holds one, so its settled records are ordinary bounded history.
1303
1305
 
1304
1306
  ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astralyn/pi",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "piConfig": {