pi-better-harness 0.49.0 → 0.50.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 (181) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +19 -11
  3. package/extensions/settings/copy.ts +69 -0
  4. package/extensions/settings/index.ts +8 -2
  5. package/extensions/settings/page.ts +74 -29
  6. package/extensions/settings/registry.ts +2 -0
  7. package/extensions/shared-navigator-panels.ts +26 -4
  8. package/extensions/task-context/compact-task-header.ts +11 -6
  9. package/extensions/task-context/index.ts +7 -7
  10. package/extensions/task-context/plan-presentation.ts +8 -4
  11. package/extensions/task-context/work-ledger-actions.ts +1 -1
  12. package/extensions/task-context/workflow-plan.ts +84 -10
  13. package/extensions/tool-call-guard/waits.ts +1 -1
  14. package/node_modules/pi-better-background-tasks/README.md +25 -13
  15. package/node_modules/pi-better-background-tasks/package.json +1 -1
  16. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-arm64.gz +0 -0
  17. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-arm64.json +1 -1
  18. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-x64.gz +0 -0
  19. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-x64.json +1 -1
  20. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-arm64.gz +0 -0
  21. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-arm64.json +1 -1
  22. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-x64.gz +0 -0
  23. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-x64.json +1 -1
  24. package/node_modules/pi-better-background-tasks/runtime-client/src/runtime/client.mjs +30 -3
  25. package/node_modules/pi-better-background-tasks/runtime-client/src/runtime/root.mjs +5 -2
  26. package/node_modules/pi-better-background-tasks/runtime-client/src/runtime/work-client.mjs +150 -7
  27. package/node_modules/pi-better-background-tasks/src/adapter-contract.ts +1 -1
  28. package/node_modules/pi-better-background-tasks/src/goal-provider.ts +31 -16
  29. package/node_modules/pi-better-background-tasks/src/index.ts +25 -9
  30. package/node_modules/pi-better-background-tasks/src/managed-authority.ts +5 -3
  31. package/node_modules/pi-better-background-tasks/src/managed-client.ts +20 -7
  32. package/node_modules/pi-better-background-tasks/src/managed-frontend.ts +135 -19
  33. package/node_modules/pi-better-background-tasks/src/navigator-provider.ts +19 -5
  34. package/node_modules/pi-better-background-tasks/src/observed-wait-client.ts +10 -0
  35. package/node_modules/pi-better-background-tasks/src/observed-waits.ts +321 -53
  36. package/node_modules/pi-better-background-tasks/src/process-identity.ts +18 -2
  37. package/node_modules/pi-better-background-tasks/src/process.ts +48 -14
  38. package/node_modules/pi-better-background-tasks/src/registry.ts +53 -5
  39. package/node_modules/pi-better-background-tasks/src/review-settings.ts +18 -0
  40. package/node_modules/pi-better-background-tasks/src/runtime.ts +27 -82
  41. package/node_modules/pi-better-background-tasks/src/sandbox.ts +14 -11
  42. package/node_modules/pi-better-background-tasks/src/shared-callback-batcher.ts +11 -2
  43. package/node_modules/pi-better-background-tasks/src/shared-navigator-panels.ts +26 -4
  44. package/node_modules/pi-better-background-tasks/src/shared-navigator.ts +244 -40
  45. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/assignment-observation.mjs +43 -35
  46. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/assignment-changes.ts +73 -0
  47. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/assignment-outcomes.ts +2 -0
  48. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/background-requests.ts +14 -3
  49. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/discovery.ts +5 -3
  50. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/operations.ts +50 -2
  51. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/outbox.ts +9 -0
  52. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/result-supervision.ts +12 -0
  53. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/rows.ts +2 -0
  54. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/schema.ts +40 -24
  55. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/store.ts +40 -8
  56. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/subagent-launch.ts +24 -1
  57. package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/types.ts +5 -1
  58. package/node_modules/pi-better-background-tasks/src/shared-sandbox-core.ts +1 -1
  59. package/node_modules/pi-better-background-tasks/src/shared-work-client.mjs +150 -7
  60. package/node_modules/pi-better-background-tasks/src/stall.ts +7 -4
  61. package/node_modules/pi-better-background-tasks/src/supervised-progress.ts +43 -0
  62. package/node_modules/pi-better-background-tasks/src/supervisor/emit-runner.mjs +1 -0
  63. package/node_modules/pi-better-background-tasks/src/supervisor/generated/process-identity.mjs +20 -2
  64. package/node_modules/pi-better-background-tasks/src/supervisor/generated/process.mjs +52 -14
  65. package/node_modules/pi-better-background-tasks/src/supervisor/generated/runner.mjs +47 -4
  66. package/node_modules/pi-better-background-tasks/src/supervisor/generated/store.mjs +3 -3
  67. package/node_modules/pi-better-background-tasks/src/supervisor/generated/watch-fingerprint.mjs +69 -0
  68. package/node_modules/pi-better-background-tasks/src/supervisor/runner.ts +38 -3
  69. package/node_modules/pi-better-background-tasks/src/supervisor/store.ts +3 -3
  70. package/node_modules/pi-better-background-tasks/src/supervisor/supervisor.ts +6 -3
  71. package/node_modules/pi-better-background-tasks/src/task-diagnostics.ts +1 -1
  72. package/node_modules/pi-better-background-tasks/src/tools.ts +67 -54
  73. package/node_modules/pi-better-background-tasks/src/types.ts +7 -3
  74. package/node_modules/pi-better-background-tasks/src/watch-fingerprint.ts +70 -0
  75. package/node_modules/pi-better-background-tasks/src/work-observation.ts +46 -19
  76. package/node_modules/pi-better-goal/README.md +18 -0
  77. package/node_modules/pi-better-goal/package.json +1 -1
  78. package/node_modules/pi-better-goal/src/activity.ts +16 -1
  79. package/node_modules/pi-better-goal/src/assignment-inbox.mjs +118 -0
  80. package/node_modules/pi-better-goal/src/index.ts +134 -17
  81. package/node_modules/pi-better-goal/src/operation-admission.ts +1 -1
  82. package/node_modules/pi-better-goal/src/shared-assignment-observation.mjs +43 -35
  83. package/node_modules/pi-better-goal/src/shared-navigator-panels.ts +26 -4
  84. package/node_modules/pi-better-goal/src/types.ts +13 -2
  85. package/node_modules/pi-better-sandbox/README.md +61 -63
  86. package/node_modules/pi-better-sandbox/commands.ts +12 -7
  87. package/node_modules/pi-better-sandbox/index.ts +52 -9
  88. package/node_modules/pi-better-sandbox/package.json +1 -1
  89. package/node_modules/pi-better-sandbox/permission-settings.ts +9 -2
  90. package/node_modules/pi-better-sandbox/permissions-page.ts +52 -130
  91. package/node_modules/pi-better-sandbox/permissions.ts +1 -6
  92. package/node_modules/pi-better-sandbox/shared-sandbox-core.ts +1 -1
  93. package/node_modules/pi-better-sandbox/shared-task-exec.ts +12 -1
  94. package/node_modules/pi-better-sandbox/shared-task-process-identity.ts +126 -0
  95. package/node_modules/pi-better-sandbox/shared-task-process-list.ts +8 -2
  96. package/node_modules/pi-better-sandbox/shared-task-sandbox.ts +5 -3
  97. package/node_modules/pi-better-sandbox/shared-task-tools.ts +8 -5
  98. package/node_modules/pi-better-ssh/README.md +5 -11
  99. package/node_modules/pi-better-ssh/package.json +1 -1
  100. package/node_modules/pi-better-subagents/README.md +1 -1
  101. package/node_modules/pi-better-subagents/assignment-outcomes.ts +9 -6
  102. package/node_modules/pi-better-subagents/assignment-report.ts +103 -19
  103. package/node_modules/pi-better-subagents/batch.mjs +12 -5
  104. package/node_modules/pi-better-subagents/catalog-host-admission.ts +19 -3
  105. package/node_modules/pi-better-subagents/catalog-preferences.ts +1 -1
  106. package/node_modules/pi-better-subagents/catalog-resolver.ts +35 -1
  107. package/node_modules/pi-better-subagents/catalog-store.ts +27 -20
  108. package/node_modules/pi-better-subagents/child-apply-patch.ts +13 -0
  109. package/node_modules/pi-better-subagents/child-dependencies.mjs +25 -12
  110. package/node_modules/pi-better-subagents/child-operations.ts +80 -1
  111. package/node_modules/pi-better-subagents/child-preflight.mjs +8 -2
  112. package/node_modules/pi-better-subagents/child-process-list.ts +8 -0
  113. package/node_modules/pi-better-subagents/config.ts +46 -2
  114. package/node_modules/pi-better-subagents/continuation-authority.ts +3 -1
  115. package/node_modules/pi-better-subagents/continuation-runtime.ts +88 -0
  116. package/node_modules/pi-better-subagents/docs/usage.md +53 -28
  117. package/node_modules/pi-better-subagents/extensions.mjs +11 -13
  118. package/node_modules/pi-better-subagents/finalization.ts +21 -1
  119. package/node_modules/pi-better-subagents/goal-provider.ts +44 -2
  120. package/node_modules/pi-better-subagents/health-observation.ts +43 -48
  121. package/node_modules/pi-better-subagents/index.ts +298 -115
  122. package/node_modules/pi-better-subagents/launch-context.ts +23 -0
  123. package/node_modules/pi-better-subagents/launch-digest.mjs +6 -0
  124. package/node_modules/pi-better-subagents/log-cursor.ts +91 -15
  125. package/node_modules/pi-better-subagents/managed-launch-bootstrap.mjs +2 -2
  126. package/node_modules/pi-better-subagents/managed-launch-client.ts +6 -3
  127. package/node_modules/pi-better-subagents/managed-launch-host.ts +168 -15
  128. package/node_modules/pi-better-subagents/managed-launch-journal.mjs +1 -5
  129. package/node_modules/pi-better-subagents/managed-launch-port.ts +4 -0
  130. package/node_modules/pi-better-subagents/operation-bridge-types.ts +27 -2
  131. package/node_modules/pi-better-subagents/owned-exit.ts +12 -0
  132. package/node_modules/pi-better-subagents/package.json +1 -1
  133. package/node_modules/pi-better-subagents/parse.ts +48 -6
  134. package/node_modules/pi-better-subagents/permission-policy.ts +41 -8
  135. package/node_modules/pi-better-subagents/process-identity.d.mts +1 -0
  136. package/node_modules/pi-better-subagents/process-identity.mjs +29 -0
  137. package/node_modules/pi-better-subagents/registry.ts +54 -33
  138. package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-arm64.gz +0 -0
  139. package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-arm64.json +1 -1
  140. package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-x64.gz +0 -0
  141. package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-x64.json +1 -1
  142. package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-arm64.gz +0 -0
  143. package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-arm64.json +1 -1
  144. package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-x64.gz +0 -0
  145. package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-x64.json +1 -1
  146. package/node_modules/pi-better-subagents/runtime-client/src/runtime/client.mjs +30 -3
  147. package/node_modules/pi-better-subagents/runtime-client/src/runtime/root.mjs +5 -2
  148. package/node_modules/pi-better-subagents/runtime-client/src/runtime/work-client.mjs +150 -7
  149. package/node_modules/pi-better-subagents/shared-callback-batcher.ts +11 -2
  150. package/node_modules/pi-better-subagents/shared-catalog.ts +6 -14
  151. package/node_modules/pi-better-subagents/shared-navigator-panels.ts +26 -4
  152. package/node_modules/pi-better-subagents/shared-navigator.ts +244 -40
  153. package/node_modules/pi-better-subagents/shared-operation-coordinator/assignment-inbox.mjs +118 -0
  154. package/node_modules/pi-better-subagents/shared-operation-coordinator/assignment-observation.mjs +43 -35
  155. package/node_modules/pi-better-subagents/shared-operation-coordinator/src/assignment-changes.ts +73 -0
  156. package/node_modules/pi-better-subagents/shared-operation-coordinator/src/assignment-outcomes.ts +2 -0
  157. package/node_modules/pi-better-subagents/shared-operation-coordinator/src/background-requests.ts +14 -3
  158. package/node_modules/pi-better-subagents/shared-operation-coordinator/src/discovery.ts +5 -3
  159. package/node_modules/pi-better-subagents/shared-operation-coordinator/src/operations.ts +50 -2
  160. package/node_modules/pi-better-subagents/shared-operation-coordinator/src/outbox.ts +9 -0
  161. package/node_modules/pi-better-subagents/shared-operation-coordinator/src/result-supervision.ts +12 -0
  162. package/node_modules/pi-better-subagents/shared-operation-coordinator/src/rows.ts +2 -0
  163. package/node_modules/pi-better-subagents/shared-operation-coordinator/src/schema.ts +40 -24
  164. package/node_modules/pi-better-subagents/shared-operation-coordinator/src/store.ts +40 -8
  165. package/node_modules/pi-better-subagents/shared-operation-coordinator/src/subagent-launch.ts +24 -1
  166. package/node_modules/pi-better-subagents/shared-operation-coordinator/src/types.ts +5 -1
  167. package/node_modules/pi-better-subagents/shared-sandbox-core.ts +1 -1
  168. package/node_modules/pi-better-subagents/shared-task-exec.ts +12 -1
  169. package/node_modules/pi-better-subagents/shared-task-process-identity.ts +126 -0
  170. package/node_modules/pi-better-subagents/shared-task-process-list.ts +8 -2
  171. package/node_modules/pi-better-subagents/shared-task-sandbox.ts +5 -3
  172. package/node_modules/pi-better-subagents/shared-task-tools.ts +8 -5
  173. package/node_modules/pi-better-subagents/shared-work-client.d.mts +10 -0
  174. package/node_modules/pi-better-subagents/shared-work-client.mjs +150 -7
  175. package/node_modules/pi-better-subagents/subagent-tools.ts +28 -34
  176. package/node_modules/pi-better-subagents/task-policy.ts +3 -1
  177. package/node_modules/pi-better-subagents/timing.ts +10 -1
  178. package/node_modules/pi-better-subagents/work-observation.ts +91 -17
  179. package/node_modules/pi-better-subagents/worker-operations-host.ts +12 -4
  180. package/node_modules/pi-better-subagents/worker-waits.ts +93 -34
  181. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.50.1] - 2026-11-22
4
+
5
+ ### Changed
6
+
7
+ - Clarify the labels and descriptions in `/harness-settings` so the display, tools, and project work ledger are easier to distinguish. (#868)
8
+
9
+ ### Fixed
10
+
11
+ - Summarize Rush Todo stages from every issue in the saved plan, including folded rows. Show an in-progress dot alongside a blocker when other issues are still moving through that stage. (#870)
12
+
13
+ ## [0.50.0] - 2026-11-20
14
+
15
+ ### Changed
16
+
17
+ - Start a fresh Pi session and submit ordinary prompts while the shared runtime is offline. Opening the work navigator or using a work tool starts the connection. Resumed sessions with pending work still receive results automatically. (#858, #859, #860)
18
+ - The sandbox page shows which worker tools load and which resources they may use. Selecting a tool makes it available under the applicable resource rules. (#855)
19
+ - Bundle Subagents 0.36.0, Background Tasks 0.19.0, Goal 0.15.0, Sandbox 0.15.0 and SSH 0.1.6. Background Tasks and Subagents carry the Server 0.6.0 runtime.
20
+
3
21
  ## [0.49.0] - 2026-11-16
4
22
 
5
23
  ### Added
package/README.md CHANGED
@@ -20,9 +20,9 @@ Use `pi-better-harness` when you want the full working set for Pi. It manages:
20
20
 
21
21
  ## Outcome & Todo
22
22
 
23
- In `/harness-settings`, **Outcome & Todo display** (`outcome-todo-display`)
24
- defaults to **On**, and **Outcome & Todo hooks** (`outcome-todo`) defaults to
25
- **Off**. **Long-term work ledger** (`outcome-todo-ledger`) is a third independent
23
+ In `/harness-settings`, **Outcome and Todo panel** (`outcome-todo-display`)
24
+ defaults to **On**, and **Outcome and Todo tools** (`outcome-todo`) defaults to
25
+ **Off**. **Project work ledger** (`outcome-todo-ledger`) is a third independent
26
26
  control and defaults to **Off**. Saved outcomes and checklists display even when
27
27
  hooks are off; missing state creates no placeholder, state, or settings. Turning
28
28
  display off does not disable hooks. Saved v1 `enabled` remains the hooks
@@ -66,7 +66,7 @@ Existing Plan session histories restore as Todo. Workflow task-plan files and
66
66
  revision checks stay unchanged; skills continue using their own records when the
67
67
  optional interface is off. See the [usage guide](docs/usage.md#outcome--todo).
68
68
 
69
- The separate **Long-term work ledger** setting enables a durable project-scoped
69
+ The separate **Project work ledger** setting enables a durable project-scoped
70
70
  record of the overall outcome, boundaries, and high-level items. It stays off by
71
71
  default; turning it off removes ledger views and hints without deleting records.
72
72
  The same `update_todo` / `get_todo` interface carries optional ledger payloads and
@@ -150,14 +150,14 @@ need interactive confirmation. Full policy: [pi-better-sandbox](https://github.c
150
150
 
151
151
  ## Minimal Tool Output
152
152
 
153
- The bundled harness provides **Tool output: Normal / Minimal** in
153
+ The bundled harness provides **Tool output** with **Normal** and **Compact** in
154
154
  `/harness-settings`. `/tool-output minimal`, `/tool-output normal`, and
155
155
  `/tool-output` (toggle) remain compatibility shortcuts to the same preference.
156
156
  Minimal mode folds each tool call into a single-line header, including running
157
157
  calls. The tool-specific icon and tool name share a state color: accent while
158
158
  running, muted when completed, and error-colored when failed. In fullscreen Pi, a soft highlight travels through the entire visible running tool name and its
159
159
  inline command/path details; details stay dim between highlight passes. Scrollback terminals keep static state colors.
160
- Choose **Tool animation: Off** in `/harness-settings` for static running headers.
160
+ Choose **Tool progress animation** set to **Off** in `/harness-settings` for static running headers.
161
161
  Running and failed calls retain text labels so state never depends on color or
162
162
  motion alone. Tool rows are indented two columns past
163
163
  the assistant text padding. Long
@@ -211,24 +211,32 @@ pi -e ./packages/pi-better-harness/extensions/minimal-output/index.ts
211
211
 
212
212
  The bundled harness provides `/harness-settings`, using Pi's native settings
213
213
  list. It opens the settings screens of loaded Sandbox, Subagents, and Goal
214
- packages without duplicating their configuration, plus the **Agents** shortcut
214
+ packages without duplicating their configuration, plus the **Agent catalog** shortcut
215
215
  to the `/agents` catalog. `/sandbox`, `/subagents settings`, `/agents`, and
216
216
  `/goal settings` remain available in standalone installations.
217
217
  Packages without a settings screen are not listed. Pi's `/settings` is unchanged.
218
218
 
219
- **Sticky navigator** controls the shared navigator used by Goal, Outcome & Todo,
219
+ **Navigator layout** selects **Flat list** (the default) or **Tree**. Flatten keeps the Subagents
220
+ and Background Tasks groups and includes tasks launched by subagents. Tree puts
221
+ Main and subagents at the same level, with each agent's background tasks indented
222
+ beneath it. Switching applies immediately and saves `piBetterHarness.navigatorView`.
223
+ Worker-owned tasks expose status and logs; their execution remains managed by the
224
+ owning agent. Older worker tasks appear when a retained assignment wait proves
225
+ their parent, so unrelated sessions are never inferred from a reused conversation.
226
+
227
+ **Pin work panels** controls the shared navigator used by Goal, Outcome & Todo,
220
228
  Subagents, and Background Tasks. **On** (the default) keeps it above the input;
221
229
  **Off** places it in the conversation so it scrolls with chat. Changes apply
222
230
  immediately and save under `piBetterHarness.navigator` for future sessions.
223
231
  Package controls and detail views remain available in either mode. Standalone
224
232
  packages use the same shared navigator and saved preference.
225
233
 
226
- The hub includes **Tool output** and **Tool animation** when the bundled renderer
234
+ The hub includes **Tool output** and **Tool progress animation** when the bundled renderer
227
235
  extension is loaded. Changes apply immediately and save the default for future
228
236
  sessions. The animation preference is stored in `piBetterHarness.toolAnimation`;
229
237
  normal output and expanded tool details are never animated.
230
- The hub also owns **Completions while busy**, shared by Subagents and Background
231
- Tasks. Choose **Wait until idle** (the default) or **Steer active run**. Changes
238
+ The hub also owns **Completion delivery**, shared by Subagents and Background
239
+ Tasks. Choose **When idle** (the default) or **During run**. Changes
232
240
  apply immediately and autosave to the current session branch, including across
233
241
  reloads. Press **Ctrl+S** to save the current choice as your default for future
234
242
  Pi sessions; changing a session afterward does not change that saved default.
@@ -0,0 +1,69 @@
1
+ interface SettingCopy {
2
+ label?: string;
3
+ description: string;
4
+ values?: Readonly<Record<string, string>>;
5
+ }
6
+
7
+ // Use stable contribution IDs so existing versions of the extensions get the same help.
8
+ export const controlCopy = new Map<string, SettingCopy>([
9
+ ["background-review-interval", {
10
+ label: "Background wait reviews",
11
+ description: "When the session is waiting for a local task with callbacks on, Pi asks the main agent to review it after this long without progress. Each review shows elapsed time and the last check or output.",
12
+ }],
13
+ ["goal-auto-start", {
14
+ description: "Start a Goal automatically when Pi accepts an Outcome with work to do and there is no unfinished Goal.",
15
+ }],
16
+ ["tool-call-guard", {
17
+ label: "Foreground wait guard",
18
+ description: "Blocks recognized shell waits, such as watching CI or following logs. Pi gets a prompt to run them in the background so the session stays responsive.",
19
+ }],
20
+ ["outcome-todo", {
21
+ label: "Outcome and Todo tools",
22
+ description: "Lets Pi record what the session should deliver and track its progress as a checklist.",
23
+ }],
24
+ ["outcome-todo-ledger", {
25
+ label: "Project work ledger",
26
+ description: "Lets sessions attach a saved project checklist and carry its progress across sessions. Use /ledger to list or attach a ledger.",
27
+ }],
28
+ ["outcome-todo-display", {
29
+ label: "Outcome and Todo panel",
30
+ description: "Shows the session objective and checklist in the TUI when Outcome and Todo tools are on.",
31
+ }],
32
+ ["navigator-sticky", {
33
+ label: "Pin work panels",
34
+ description: "Keeps the work panels above the editor as the conversation scrolls. Off lets them scroll with the conversation on supported Pi versions.",
35
+ }],
36
+ ["navigator-view", {
37
+ label: "Navigator layout",
38
+ description: "Tree nests tasks under their agent. Flat list groups rows by work type.",
39
+ values: { tree: "Tree", flatten: "Flat list" },
40
+ }],
41
+ ["tool-output", {
42
+ description: "Normal shows the usual tool transcript. Compact groups completed calls and hides their details until you expand the group.",
43
+ values: { Minimal: "Compact" },
44
+ }],
45
+ ["tool-animation", {
46
+ label: "Tool progress animation",
47
+ description: "Shows an animated shimmer on active tool calls. Turn it off to remove that animation.",
48
+ values: { Shimmer: "On" },
49
+ }],
50
+ ]);
51
+
52
+ export const linkCopy = new Map<string, SettingCopy>([
53
+ ["agents", {
54
+ label: "Agent catalog",
55
+ description: "Browse the agents Pi can delegate to and manage their profiles.",
56
+ }],
57
+ ["goal", {
58
+ label: "Goal settings",
59
+ description: "Choose when Goals continue automatically, resume from conversation, or pause on Escape.",
60
+ }],
61
+ ["sandbox", {
62
+ label: "Sandbox settings",
63
+ description: "Review sandbox permissions for what tools can access and where they can run.",
64
+ }],
65
+ ["subagents", {
66
+ label: "Subagent settings",
67
+ description: "Choose how Pi delegates work and set limits for concurrent subagents, timeouts, and progress alerts.",
68
+ }],
69
+ ]);
@@ -3,8 +3,13 @@ import { chooseHarnessSetting } from "./page.ts";
3
3
  import { createSettingsRegistry } from "./registry.ts";
4
4
  import { changeCallbackSetting, getCallbackSettings, saveCallbackDefault } from "pi-better-background-tasks/src/shared-callback-batcher.ts";
5
5
 
6
+ import { getNavigatorView, loadNavigatorView, setNavigatorView } from "pi-better-background-tasks/src/shared-navigator.ts";
7
+
6
8
  export default function harnessSettingsExtension(pi: ExtensionAPI): void {
7
9
  const registry = createSettingsRegistry(pi);
10
+ const view = { id: "navigator-view", label: "View", values: ["tree", "flatten"],
11
+ get: getNavigatorView, change: (value: string) => setNavigatorView(value) };
12
+ pi.on("session_start", () => { try { loadNavigatorView(); } catch { /* settings command reports read errors */ } });
8
13
  pi.on("session_start", () => registry.refresh());
9
14
  pi.on("session_shutdown", () => registry.dispose());
10
15
 
@@ -12,13 +17,14 @@ export default function harnessSettingsExtension(pi: ExtensionAPI): void {
12
17
  description: "Open loaded package settings",
13
18
  handler: async (_args, ctx) => {
14
19
  if (ctx.mode !== "tui") { ctx.ui.notify("Harness settings requires the interactive TUI.", "warning"); return; }
20
+ loadNavigatorView();
15
21
  registry.refresh();
16
22
  let selected: string | undefined;
17
23
  const reported = new Set<string>();
18
24
  const readSettings = (): ReturnType<typeof getCallbackSettings> => {
19
25
  try { return getCallbackSettings(ctx); }
20
26
  catch (error) {
21
- const message = `Callback default unavailable; using Wait until idle: ${error instanceof Error ? error.message : String(error)}`;
27
+ const message = `Callback default unavailable. Using When idle. ${error instanceof Error ? error.message : String(error)}`;
22
28
  if (!reported.has(message)) { ctx.ui.notify(message, "error"); reported.add(message); }
23
29
  return { mode: "hold", source: "default" };
24
30
  }
@@ -30,7 +36,7 @@ export default function harnessSettingsExtension(pi: ExtensionAPI): void {
30
36
  get: readSettings,
31
37
  change: mode => changeCallbackSetting(pi, ctx, mode),
32
38
  save: () => saveCallbackDefault(readSettings().mode),
33
- }, registry.controls());
39
+ }, registry.controls(), view);
34
40
  } catch (error) {
35
41
  ctx.ui.notify(`Settings unavailable: ${error instanceof Error ? error.message : String(error)}`, "error");
36
42
  return;
@@ -1,5 +1,6 @@
1
- import type { Theme } from "@earendil-works/pi-coding-agent";
2
- import { Container, SettingsList, Text, getKeybindings, setKeybindings, KeybindingsManager, TUI_KEYBINDINGS, matchesKey, type SettingItem } from "@earendil-works/pi-tui";
1
+ import type { ExtensionCommandContext, Theme } from "@earendil-works/pi-coding-agent";
2
+ import { Container, SettingsList, Spacer, Text, getKeybindings, setKeybindings, KeybindingsManager, TUI_KEYBINDINGS, matchesKey, type SettingItem } from "@earendil-works/pi-tui";
3
+ import { controlCopy, linkCopy } from "./copy.ts";
3
4
  import type { SettingsControl, SettingsLink } from "./registry.ts";
4
5
 
5
6
  export interface CallbackSettingsControl {
@@ -9,41 +10,85 @@ export interface CallbackSettingsControl {
9
10
  }
10
11
 
11
12
  const CALLBACK_SETTING_ID = "callbacks:while-busy";
12
- const callbackLabel = (mode: "hold" | "steer") => mode === "steer" ? "Steer active run" : "Wait until idle";
13
+ const callbackLabels = { hold: "When idle", steer: "During run" };
14
+ const callbackDescription = (source: "session" | "default") => [
15
+ "When idle holds background and subagent results until the run ends. During run can deliver them between tool calls.",
16
+ source === "session" ? "Using this session’s setting." : "Using the default.",
17
+ "Changes apply to this session. Ctrl+S saves your default.",
18
+ ].join("\n");
13
19
 
14
- export async function chooseHarnessSetting(ctx: any, links: SettingsLink[], selected?: string, callbacks?: CallbackSettingsControl, controls: SettingsControl[] = []): Promise<string | undefined> {
15
- return ctx.ui.custom((tui: any, theme: Theme, _kb: unknown, done: (id?: string) => void) => {
16
- let callbackMode = callbacks?.get().mode ?? "hold";
17
- const callbackSetting: SettingItem | undefined = callbacks ? {
20
+ const controlOrder = new Map([...controlCopy.keys()].map((id, index) => [id, index]));
21
+
22
+ function presentControl(control: SettingsControl) {
23
+ const copy = controlCopy.get(control.id);
24
+ const valueLabels = copy?.values;
25
+ const display = (raw: string) => valueLabels && Object.hasOwn(valueLabels, raw) ? valueLabels[raw]! : raw;
26
+ const values = control.values.map(display);
27
+ const description = typeof control.description === "string" && control.description.trim()
28
+ ? control.description : copy?.description;
29
+ const item: SettingItem = {
30
+ id: `setting:${control.id}`,
31
+ label: copy?.label ?? control.label,
32
+ currentValue: display(control.get()),
33
+ description: [description ?? `Available values are ${values.join(", ")}.`, copy && "Saved as a user default."].filter(Boolean).join("\n"),
34
+ values,
35
+ };
36
+ return { control, item, display, values };
37
+ }
38
+
39
+ function presentLink(link: SettingsLink): SettingItem {
40
+ const copy = linkCopy.get(link.id);
41
+ const description = typeof link.description === "string" && link.description.trim()
42
+ ? link.description : copy?.description;
43
+ const action = "Open";
44
+ return {
45
+ id: `link:${link.id}`,
46
+ label: copy?.label ?? link.label,
47
+ currentValue: action,
48
+ description: [description, `You can also run ${link.command}.`].filter(Boolean).join("\n"),
49
+ values: [action],
50
+ };
51
+ }
52
+
53
+ export async function chooseHarnessSetting(ctx: ExtensionCommandContext, links: SettingsLink[], selected?: string, callbacks?: CallbackSettingsControl, controls: SettingsControl[] = [], navigatorView?: SettingsControl): Promise<string | undefined> {
54
+ return ctx.ui.custom((tui, theme: Theme, _kb, done: (id?: string) => void) => {
55
+ const currentCallback = callbacks?.get();
56
+ let callbackMode = currentCallback?.mode ?? "hold";
57
+ const callbackSetting: SettingItem | undefined = currentCallback && {
18
58
  id: CALLBACK_SETTING_ID,
19
- label: "Completions while busy",
20
- currentValue: callbackLabel(callbackMode),
21
- description: callbacks.get().source === "session" ? "Session setting" : "User default",
22
- values: ["Wait until idle", "Steer active run"],
23
- } : undefined;
24
- const items: SettingItem[] = [
59
+ label: "Completion delivery",
60
+ currentValue: callbackLabels[callbackMode],
61
+ description: callbackDescription(currentCallback.source),
62
+ values: Object.values(callbackLabels),
63
+ };
64
+ const allControls = navigatorView ? [...controls, navigatorView] : [...controls];
65
+ const orderedControls = allControls.sort((a, b) =>
66
+ (controlOrder.get(a.id) ?? controlOrder.size) - (controlOrder.get(b.id) ?? controlOrder.size)
67
+ ).map(presentControl);
68
+ const items = [
25
69
  ...(callbackSetting ? [callbackSetting] : []),
26
- ...controls.map(control => ({ id: `setting:${control.id}`, label: control.label, currentValue: control.get(), description: "User default", values: control.values })),
27
- ...links.map(link => ({ id: `link:${link.id}`, label: link.label, currentValue: link.command, description: "Open package settings", values: [link.command] })),
70
+ ...orderedControls.map(({ item }) => item),
71
+ ...links.map(presentLink),
28
72
  ];
29
- const feedback = new Text("", 0, 0);
73
+ const feedback = new Text("", 2, 0);
30
74
  let changing = false;
31
75
  const report = (message: string, error = false) => {
32
- feedback.setText(theme.fg(error ? "error" : "muted", message));
76
+ feedback.setText(theme.fg(error ? "error" : "text", message));
33
77
  tui.requestRender?.();
34
78
  };
35
79
  const list = new SettingsList(items, 10, {
36
80
  label: (text, active) => theme.fg(active ? "accent" : "text", text),
37
81
  value: (text, active) => active ? theme.inverse(text) : theme.fg("muted", text),
38
- description: text => theme.fg("muted", text), cursor: "> ", hint: text => theme.fg("dim", text),
82
+ description: text => theme.fg("text", text), cursor: "> ", hint: text => theme.fg("dim", text),
39
83
  }, (id, value) => {
40
- const control = controls.find(item => `setting:${item.id}` === id);
41
- if (control) {
42
- const previous = control.get();
84
+ const entry = orderedControls.find(({ item }) => item.id === id);
85
+ if (entry) {
86
+ const previous = entry.display(entry.control.get());
87
+ const next = entry.control.values[entry.values.indexOf(value)]!;
43
88
  changing = true;
44
89
  report("Saving setting...");
45
- Promise.resolve().then(() => control.change(value, ctx)).then(() => {
46
- list.updateValue(id, control.get());
90
+ Promise.resolve().then(() => entry.control.change(next, ctx)).then(() => {
91
+ list.updateValue(id, entry.display(entry.control.get()));
47
92
  report("Setting saved.");
48
93
  }).catch(error => {
49
94
  list.updateValue(id, previous);
@@ -53,13 +98,13 @@ export async function chooseHarnessSetting(ctx: any, links: SettingsLink[], sele
53
98
  }
54
99
  if (id !== CALLBACK_SETTING_ID || !callbacks || !callbackSetting) { done(id); return; }
55
100
  try {
56
- const nextMode = value === "Steer active run" ? "steer" : "hold";
101
+ const nextMode = value === callbackLabels.steer ? "steer" : "hold";
57
102
  callbacks.change(nextMode);
58
103
  callbackMode = nextMode;
59
- callbackSetting.description = "Session setting";
104
+ callbackSetting.description = callbackDescription("session");
60
105
  report("Session setting saved.");
61
106
  } catch (error) {
62
- list.updateValue(CALLBACK_SETTING_ID, callbackLabel(callbackMode));
107
+ list.updateValue(CALLBACK_SETTING_ID, callbackLabels[callbackMode]);
63
108
  report(error instanceof Error ? error.message : String(error), true);
64
109
  }
65
110
  }, () => done(), { enableSearch: false });
@@ -75,9 +120,9 @@ export async function chooseHarnessSetting(ctx: any, links: SettingsLink[], sele
75
120
  } finally { setKeybindings(bindings); }
76
121
  }
77
122
  const page = new Container();
78
- page.addChild(new Text(theme.fg("accent", theme.bold("Harness settings")), 0, 0));
123
+ page.addChild(new Text(theme.bold(theme.fg("text", "Harness settings")), 0, 0));
124
+ page.addChild(new Spacer(1));
79
125
  page.addChild(list);
80
- if (callbacks) page.addChild(new Text(theme.fg("dim", "Callbacks autosave to this session. Ctrl+S saves the default for future sessions."), 0, 0));
81
126
  page.addChild(feedback);
82
127
  return {
83
128
  render: (width: number) => page.render(width),
@@ -93,4 +138,4 @@ export async function chooseHarnessSetting(ctx: any, links: SettingsLink[], sele
93
138
  },
94
139
  };
95
140
  });
96
- }
141
+ }
@@ -3,6 +3,7 @@ import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-c
3
3
  export interface SettingsLink {
4
4
  id: string;
5
5
  label: string;
6
+ description?: string;
6
7
  command: string;
7
8
  open(ctx: ExtensionCommandContext): Promise<void> | void;
8
9
  }
@@ -10,6 +11,7 @@ export interface SettingsLink {
10
11
  export interface SettingsControl {
11
12
  id: string;
12
13
  label: string;
14
+ description?: string;
13
15
  values: string[];
14
16
  get(): string;
15
17
  change(value: string, ctx: ExtensionCommandContext): Promise<void> | void;
@@ -9,7 +9,8 @@ export const NAVIGATOR_ENTRY_TYPE = "pi-better-harness-navigator-panels";
9
9
  export const NAVIGATOR_STICKY_SETTING_ID = "navigator-sticky";
10
10
  type MouseEvent = { type: string; button: string; x: number; y: number; width: number; shift?: boolean; alt?: boolean; ctrl?: boolean };
11
11
  type PanelComponent = Component & { dispose?(): void; handleMouse?(event: MouseEvent): { handled: true; render: boolean } | undefined };
12
- export type NavigatorPanelFactory = (tui: TUI, theme: Theme) => PanelComponent;
12
+ export type NavigatorPanelLayout = { availableRows(): number };
13
+ export type NavigatorPanelFactory = (tui: TUI, theme: Theme, layout: NavigatorPanelLayout) => PanelComponent;
13
14
  type Panel = { factory: NavigatorPanelFactory; component?: PanelComponent | undefined };
14
15
  type Preference = { version: 1; sticky: boolean };
15
16
  type Owner = { pi: ExtensionAPI; stop?: (() => void) | undefined };
@@ -23,6 +24,8 @@ type State = {
23
24
  mounted: boolean;
24
25
  tui?: TUI | undefined;
25
26
  theme?: Theme | undefined;
27
+ host?: Component | undefined;
28
+ availableRows?: number | undefined;
26
29
  anchor?: string | undefined;
27
30
  pendingAnchor: boolean;
28
31
  generation: number;
@@ -61,14 +64,30 @@ function orderedPanels(s: State): Panel[] {
61
64
  }
62
65
  function buildPanels(s: State): void {
63
66
  if (!s.tui || !s.theme) return;
64
- for (const panel of orderedPanels(s)) panel.component ??= panel.factory(s.tui, s.theme);
67
+ for (const panel of orderedPanels(s)) panel.component ??= panel.factory(s.tui, s.theme, { availableRows: () => s.availableRows ?? Infinity });
68
+ }
69
+ // Count the editor, footer and other siblings following the host in regular mode.
70
+ // Never render ancestors here: they contain this host and would recurse.
71
+ function rowsAfter(root: object, target: Component, width: number): number | undefined {
72
+ if (root === target) return 0;
73
+ const children = (root as Component & { children?: Component[] }).children;
74
+ if (!children) return undefined;
75
+ for (let i = children.length - 1; i >= 0; i--) {
76
+ const after = rowsAfter(children[i]!, target, width);
77
+ if (after !== undefined) return after + children.slice(i + 1).reduce((sum, child) => sum + child.render(width).length, 0);
78
+ }
79
+ return undefined;
65
80
  }
66
81
  function renderPanels(s: State, width: number): string[] {
67
82
  buildPanels(s);
68
83
  const lines: string[] = [];
69
84
  s.ranges = [];
85
+ const after = s.sticky && s.tui && s.host ? rowsAfter(s.tui, s.host, width) : undefined;
86
+ const height = s.tui?.terminal?.rows;
87
+ const budget = after !== undefined && height ? Math.max(0, height - after) : Infinity;
70
88
  for (const panel of orderedPanels(s)) {
71
89
  if (!panel.component) continue;
90
+ s.availableRows = Math.max(0, budget - lines.length);
72
91
  const rendered = panel.component.render(width);
73
92
  s.ranges.push({ start: lines.length, end: lines.length + rendered.length, component: panel.component });
74
93
  lines.push(...rendered);
@@ -115,6 +134,7 @@ function clearHost(s: State): void {
115
134
  disposePanels(s);
116
135
  s.mounted = false;
117
136
  s.tui = undefined;
137
+ s.host = undefined;
118
138
  s.theme = undefined;
119
139
  }
120
140
  function adoptContext(s: State, ctx: ExtensionContext): void {
@@ -134,7 +154,7 @@ function mountHost(s: State): void {
134
154
  s.tui = tui;
135
155
  s.theme = theme;
136
156
  buildPanels(s);
137
- return {
157
+ const host: PanelComponent = {
138
158
  render(width: number) {
139
159
  const lines = renderPanels(s, width);
140
160
  if (s.sticky) return lines;
@@ -147,6 +167,8 @@ function mountHost(s: State): void {
147
167
  },
148
168
  dispose() { disposePanels(s); s.mounted = false; },
149
169
  };
170
+ s.host = host;
171
+ return host;
150
172
  }, { placement: "aboveEditor" });
151
173
  }
152
174
  function changeSticky(value: string, ctx: ExtensionContext): void {
@@ -247,4 +269,4 @@ export function __resetNavigatorPanelsForTests(): void {
247
269
  s.anchor = undefined;
248
270
  s.sticky = true;
249
271
  s.control = undefined;
250
- }
272
+ }
@@ -14,19 +14,24 @@ export function canRenderTaskRuntime(width: number, runtime: CompactTaskHeader["
14
14
  return visibleWidth(runtime.status + (runtime.clock ? ` ${runtime.clock}` : "")) + 6 <= Math.floor(width);
15
15
  }
16
16
 
17
- export function renderCompactTaskHeader(summary: string | undefined, width: number, theme: PlanRenderTheme, header: CompactTaskHeader): string[] {
17
+ export function renderCompactTaskHeader(summary: string | undefined, width: number, theme: PlanRenderTheme, header: CompactTaskHeader, inProgress = false): string[] {
18
18
  const size = Math.max(1, Math.floor(width));
19
- const left = theme.fg("warning", "todo") + (header.disclosure ? theme.fg("accent", ` ${header.disclosure}`) : "") +
19
+ let left = theme.fg("warning", "todo") + (header.disclosure ? theme.fg("accent", ` ${header.disclosure}`) : "") +
20
20
  (summary ? theme.fg("dim", ` ${summary}`) : "");
21
21
  const runtime = header.runtime;
22
22
  const tone = runtime?.status === "complete" ? "success" : runtime?.status === "active" ? "accent" : "warning";
23
23
  const right = runtime ? theme.fg(tone, runtime.status) + (runtime.clock ? theme.fg("dim", ` ${runtime.clock}`) : "") : "";
24
24
  const rightWidth = visibleWidth(right);
25
- const leftWidth = Math.max(4, size - rightWidth - 2);
25
+ const showRuntime = right && canRenderTaskRuntime(size, runtime);
26
+ const leftWidth = showRuntime ? Math.max(4, size - rightWidth - 2) : size;
27
+ const progressMark = " · ●";
28
+ if (inProgress && visibleWidth(left) + visibleWidth(progressMark) <= leftWidth) {
29
+ left += theme.fg("accent", progressMark);
30
+ }
26
31
  const title = truncateToWidth(left, leftWidth);
27
- const heading = right && canRenderTaskRuntime(size, runtime)
32
+ const heading = showRuntime
28
33
  ? title + " ".repeat(Math.max(2, size - visibleWidth(title) - rightWidth)) + right
29
- : truncateToWidth(left, size);
34
+ : title;
30
35
  const lines = [truncateToWidth(heading, size)];
31
36
  const indent = Math.min(2, size - 1);
32
37
  const details: string[] = [];
@@ -40,4 +45,4 @@ export function renderCompactTaskHeader(summary: string | undefined, width: numb
40
45
  }
41
46
  if (details.length > 0) lines.push(...details, "");
42
47
  return lines;
43
- }
48
+ }
@@ -303,7 +303,7 @@ export default function taskContextExtension(pi: ExtensionAPI): void {
303
303
  };
304
304
 
305
305
  const attachLedger = (ctx: ExtensionContext, id: string): WorkLedger => {
306
- if (!ledgerEnabled) throw new Error("Long-term work ledger is off. Enable it in /harness-settings first.");
306
+ if (!ledgerEnabled) throw new Error("Project work ledger is off. Enable it in /harness-settings first.");
307
307
  const candidate = readAssociatedWorkLedger(ctx.cwd, id);
308
308
  if (ledgerId !== id) pi.appendEntry(WORK_LEDGER_ASSOCIATION_ENTRY, workLedgerAssociationEntry(id));
309
309
  ledgerId = id;
@@ -549,7 +549,7 @@ export default function taskContextExtension(pi: ExtensionAPI): void {
549
549
  ],
550
550
  parameters: UpdatePlanSchema,
551
551
  async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
552
- if (!enabled) throw new Error("Outcome & Todo hooks are off. Enable them in /harness-settings.");
552
+ if (!enabled) throw new Error("Outcome and Todo tools are off. Enable them in /harness-settings.");
553
553
  const owner = workflowPlanOwner(ctx);
554
554
  const input = params as {
555
555
  explanation?: string; newTask?: boolean; todo?: PlanStepInput[]; outcome?: OutcomeInput;
@@ -560,7 +560,7 @@ export default function taskContextExtension(pi: ExtensionAPI): void {
560
560
  input.newTask !== undefined || input.explanation !== undefined) {
561
561
  throw new Error("Send update_todo ledger alone; ledger changes are not combined with outcome, Todo, or workflow changes.");
562
562
  }
563
- if (!ledgerEnabled) throw new Error("Long-term work ledger is off. Enable it in /harness-settings first.");
563
+ if (!ledgerEnabled) throw new Error("Project work ledger is off. Enable it in /harness-settings first.");
564
564
  const result = executeLedgerMutation(input.ledger, ctx.cwd, ledgerSessionBinding(ctx));
565
565
  if (result.details.ledger && result.details.ledger.id === ledgerId) {
566
566
  ledger = result.details.ledger;
@@ -694,10 +694,10 @@ export default function taskContextExtension(pi: ExtensionAPI): void {
694
694
  promptSnippet: "Inspect the common work plan: outcome, Todo or workflow rows, and the associated durable ledger",
695
695
  parameters: getTodoParameters,
696
696
  async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
697
- if (!enabled) throw new Error("Outcome & Todo hooks are off. Enable them in /harness-settings.");
697
+ if (!enabled) throw new Error("Outcome and Todo tools are off. Enable them in /harness-settings.");
698
698
  const input = params as { ledger?: GetTodoLedgerInput };
699
699
  if (input.ledger !== undefined && !ledgerEnabled) {
700
- throw new Error("Long-term work ledger is off. Enable it in /harness-settings first.");
700
+ throw new Error("Project work ledger is off. Enable it in /harness-settings first.");
701
701
  }
702
702
  refreshAssociatedLedger(ctx);
703
703
  const ledgerText = ledgerTodoText();
@@ -785,7 +785,7 @@ export default function taskContextExtension(pi: ExtensionAPI): void {
785
785
  handler: async (args, ctx) => {
786
786
  const [action = "", value = ""] = args.trim().split(/\s+/, 2);
787
787
  if (!ledgerEnabled && (action === "" || action === "list" || action === "show")) {
788
- ctx.ui.notify("Long-term work ledger is off. Enable it in /harness-settings to view ledgers.", "warning");
788
+ ctx.ui.notify("Project work ledger is off. Enable it in /harness-settings to view ledgers.", "warning");
789
789
  return;
790
790
  }
791
791
  const store = openWorkLedgerStore({ cwd: ctx.cwd });
@@ -813,7 +813,7 @@ export default function taskContextExtension(pi: ExtensionAPI): void {
813
813
  return;
814
814
  }
815
815
  if (!ledgerEnabled) {
816
- ctx.ui.notify("Long-term work ledger is off. Enable it in /harness-settings before associating a ledger.", "warning");
816
+ ctx.ui.notify("Project work ledger is off. Enable it in /harness-settings before associating a ledger.", "warning");
817
817
  return;
818
818
  }
819
819
  if (!value) {
@@ -26,10 +26,13 @@ export const plainPlanTheme: PlanRenderTheme = { fg: (_color, value) => value };
26
26
 
27
27
  export const COMPACT_PLAN_ROWS = 5;
28
28
 
29
+ function isInProgress(status: DisplayStatus): boolean {
30
+ return status === "in_progress" || status === "implemented" || status === "reviewed";
31
+ }
32
+
29
33
  function compactRowIndices(rows: PlanRow[]): number[] {
30
34
  if (rows.length <= COMPACT_PLAN_ROWS) return rows.map((_, index) => index);
31
- let active = rows.flatMap((row, index) =>
32
- ["in_progress", "implemented", "reviewed"].includes(row.status) ? [index] : []);
35
+ let active = rows.flatMap((row, index) => isInProgress(row.status) ? [index] : []);
33
36
  if (!active.length) active = rows.flatMap((row, index) =>
34
37
  row.status === "blocked" || row.status === "failed" ? [index] : []);
35
38
  const firstPending = rows.findIndex((row) => row.status === "pending");
@@ -78,7 +81,8 @@ export function renderPlanPresentation(
78
81
  if (count(status)) summary.push(`${count(status)} ${label}`);
79
82
  }
80
83
  if (count("pending") && summary.length === 1) summary.push(`${count("pending")} pending`);
81
- const lines = !full && header ? renderCompactTaskHeader(summary[0], size, theme, header)
84
+ const lines = !full && header
85
+ ? renderCompactTaskHeader(summary[0], size, theme, header, plan.rows.some((row) => isInProgress(row.status)))
82
86
  : [theme.fg("warning", "todo") + theme.fg("dim", ` ${summary.join(" · ")}`)];
83
87
  for (const metadata of plan.metadata ?? []) {
84
88
  const content = metadata.map((part) => theme.fg(part.color, planText(part.text))).join("");
@@ -103,7 +107,7 @@ export function renderPlanPresentation(
103
107
  theme.fg(style.color, style.glyph) + " " + theme.fg("dim", label) +
104
108
  " ".repeat(Math.max(0, labelWidth - visibleWidth(label)) + 1);
105
109
  const titleColor = row.status === "blocked" ? "warning" : row.status === "failed" ? "error" :
106
- row.status === "in_progress" || row.status === "implemented" || row.status === "reviewed" ? "text" : "muted";
110
+ isInProgress(row.status) ? "text" : "muted";
107
111
  const badge = planText(row.statusLabel ?? style.label);
108
112
  const available = size - visibleWidth(prefix);
109
113
  // At narrow widths use an inline status so it survives title truncation.
@@ -119,7 +119,7 @@ export interface WorkLedgerSessionBinding {
119
119
  }
120
120
 
121
121
  export const WORK_LEDGER_PROMPT_GUIDELINES = [
122
- "When Long-term work ledger is on, use update_todo with ledger for a durable high-level outcome and stable items. It is the same interface as Todo, not a separate execution plan or public tool.",
122
+ "When Project work ledger is on, use update_todo with ledger for a durable high-level outcome and stable items. It is the same interface as Todo, not a separate execution plan or public tool.",
123
123
  "Only use update_todo ledger attach when the user explicitly names an existing ledger or asks to continue it. Never infer association from the working directory, project files, or a similar outcome, and never attach while starting unrelated work.",
124
124
  "Read the ledger with get_todo {ledger:{action:'read'}} before updating it, then send its current revision. Never silently retry a stale revision or overwrite newer progress. Use get_todo {ledger:{action:'list'}} to discover records.",
125
125
  "In an update_todo ledger update, send only the items that changed. Omitted items and fields keep their stored progress.",