pi-better-harness 0.41.2 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -9
- package/extensions/task-context/compact-task-header.ts +10 -2
- package/extensions/task-context/index.ts +353 -104
- package/extensions/task-context/plan-presentation.ts +3 -28
- package/extensions/task-context/plan-render.ts +5 -18
- package/extensions/task-context/preferences.ts +8 -5
- package/extensions/task-context/work-ledger-actions.ts +307 -0
- package/extensions/task-context/work-ledger-session.ts +186 -0
- package/extensions/task-context/work-ledger.ts +683 -0
- package/extensions/task-context/workflow-plan.ts +2 -14
- package/node_modules/pi-better-background-tasks/package.json +1 -1
- package/node_modules/pi-better-background-tasks/src/batch.ts +5 -2
- package/node_modules/pi-better-background-tasks/src/failures.ts +14 -6
- package/node_modules/pi-better-background-tasks/src/index.ts +14 -13
- package/node_modules/pi-better-background-tasks/src/navigator-provider.ts +37 -10
- package/node_modules/pi-better-background-tasks/src/runtime.ts +99 -89
- package/node_modules/pi-better-background-tasks/src/shared-navigator.ts +24 -3
- package/node_modules/pi-better-background-tasks/src/shared-operation-coordinator/src/validate.ts +3 -1
- package/node_modules/pi-better-background-tasks/src/shared-ssh-core/index.ts +30 -1
- package/node_modules/pi-better-background-tasks/src/supervisor/generated/store.mjs +4 -2
- package/node_modules/pi-better-background-tasks/src/supervisor/store.ts +4 -2
- package/node_modules/pi-better-background-tasks/src/tools.ts +32 -24
- package/node_modules/pi-better-ssh/README.md +2 -0
- package/node_modules/pi-better-ssh/package.json +1 -1
- package/node_modules/pi-better-ssh/src/index.ts +4 -1
- package/node_modules/pi-better-ssh/src/mux-registry.ts +3 -1
- package/node_modules/pi-better-ssh/src/remote-bash.ts +4 -2
- package/node_modules/pi-better-ssh/src/shared-ssh-core/index.ts +30 -1
- package/node_modules/pi-better-subagents/README.md +16 -12
- package/node_modules/pi-better-subagents/batch.mjs +1 -0
- package/node_modules/pi-better-subagents/config.ts +15 -2
- package/node_modules/pi-better-subagents/docs/usage.md +32 -20
- package/node_modules/pi-better-subagents/effective-settings.ts +51 -4
- package/node_modules/pi-better-subagents/index.ts +225 -44
- package/node_modules/pi-better-subagents/package.json +1 -1
- package/node_modules/pi-better-subagents/registry.ts +2 -1
- package/node_modules/pi-better-subagents/settings-page.ts +43 -6
- package/node_modules/pi-better-subagents/shared-navigator.ts +24 -3
- package/node_modules/pi-better-subagents/shared-operation-coordinator/src/validate.ts +3 -1
- package/node_modules/pi-better-subagents/timing.ts +172 -22
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -22,18 +22,22 @@ Use `pi-better-harness` when you want the full working set for Pi. It manages:
|
|
|
22
22
|
|
|
23
23
|
In `/harness-settings`, **Outcome & Todo display** (`outcome-todo-display`)
|
|
24
24
|
defaults to **On**, and **Outcome & Todo hooks** (`outcome-todo`) defaults to
|
|
25
|
-
**Off**.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
display
|
|
25
|
+
**Off**. **Long-term work ledger** (`outcome-todo-ledger`) is a third independent
|
|
26
|
+
control and defaults to **Off**. Saved outcomes and checklists display even when
|
|
27
|
+
hooks are off; missing state creates no placeholder, state, or settings. Turning
|
|
28
|
+
display off does not disable hooks. Saved v1 `enabled` remains the hooks
|
|
29
|
+
authority; the optional display and ledger preferences default to their existing
|
|
30
|
+
or conservative values.
|
|
29
31
|
|
|
30
32
|
The compact widget has one Todo heading, with a caret after Todo and the completion
|
|
31
33
|
count on the left. A matching Goal's status and existing active-time clock appear
|
|
32
34
|
on the right. The outcome is one muted, truncated subtitle. The collapsed view
|
|
33
35
|
shows up to five relevant rows; the expanded view shows all rows. Click to toggle.
|
|
34
|
-
`/todo`
|
|
35
|
-
`/todo expand` and `/todo collapse`
|
|
36
|
-
|
|
36
|
+
`/todo` reveals the compact Overview (when display is on) and returns it to automatic display;
|
|
37
|
+
`/todo expand` and `/todo collapse` control which rows it shows. The full
|
|
38
|
+
objective, acceptance criteria, boundaries, and plan remain available through
|
|
39
|
+
`get_todo` when hooks are enabled. Todo commands remain available with hooks off
|
|
40
|
+
for explicit user control.
|
|
37
41
|
|
|
38
42
|
An accepted outcome can be saved without a checklist. Completing or clearing its
|
|
39
43
|
Todo does not complete or remove the outcome. Write labels as short, plain actions,
|
|
@@ -45,8 +49,9 @@ existing saved labels remain unchanged until deliberately updated.
|
|
|
45
49
|
Use `newTask: true` with a new
|
|
46
50
|
outcome for unrelated work; a correction to the current task keeps its binding.
|
|
47
51
|
Hooks enable `update_todo`, `get_todo`, capture, matching Goal lifecycle bridge
|
|
48
|
-
writes,
|
|
49
|
-
|
|
52
|
+
writes, outcome updates, and automated cleanup. With hooks enabled, Harness records
|
|
53
|
+
a hidden, persistent outcome update at the next agent start only when its content
|
|
54
|
+
changes. It does not rebuild reminders before each model call. Turning hooks off stops those
|
|
50
55
|
hooks without deleting saved state or starting a turn. `/goal` and skills never
|
|
51
56
|
enable them.
|
|
52
57
|
|
|
@@ -54,6 +59,21 @@ Existing Plan session histories restore as Todo. Workflow task-plan files and
|
|
|
54
59
|
revision checks stay unchanged; skills continue using their own records when the
|
|
55
60
|
optional interface is off. See the [usage guide](docs/usage.md#outcome--todo).
|
|
56
61
|
|
|
62
|
+
The separate **Long-term work ledger** setting enables a durable project-scoped
|
|
63
|
+
record of the overall outcome, boundaries, and high-level items. It stays off by
|
|
64
|
+
default; turning it off removes ledger views and hints without deleting records.
|
|
65
|
+
The same `update_todo` / `get_todo` interface carries optional ledger payloads and
|
|
66
|
+
selectors for create, update, attach, detach, list, and read. Updates require the
|
|
67
|
+
current revision, preserve completed evidence and history, and never associate old
|
|
68
|
+
work with a new session automatically. Use `/ledger attach <id>` (or an explicit
|
|
69
|
+
`update_todo` ledger attach) to continue the same record; `/ledger list`,
|
|
70
|
+
`/ledger switch`, and `/ledger detach` manage the reference without copying it. A
|
|
71
|
+
resumed session keeps its reference, a fresh session stays unassociated, and
|
|
72
|
+
bounded recovery reminders after compaction or resume are rebuilt from durable
|
|
73
|
+
state. Workflow-owned rows keep their canonical stage/status rendering; the
|
|
74
|
+
ledger adds context, not a second execution model. See
|
|
75
|
+
[usage](docs/usage.md#associate-a-ledger-with-a-session).
|
|
76
|
+
|
|
57
77
|
Subagent and background-task rows can be clicked to open their existing navigator
|
|
58
78
|
details. Enter and keyboard controls remain available, and editor input stays
|
|
59
79
|
passive. Harness packages do not write to Pi's status bar. Goal holds and resume
|
|
@@ -5,6 +5,8 @@ export interface CompactTaskHeader {
|
|
|
5
5
|
subtitle?: string;
|
|
6
6
|
disclosure?: string;
|
|
7
7
|
runtime?: { status: string; clock?: string };
|
|
8
|
+
/** Preformatted high-level ledger counts shown in the existing Todo surface. */
|
|
9
|
+
ledger?: string;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
export function canRenderTaskRuntime(width: number, runtime: CompactTaskHeader["runtime"]): boolean {
|
|
@@ -26,10 +28,16 @@ export function renderCompactTaskHeader(summary: string | undefined, width: numb
|
|
|
26
28
|
? title + " ".repeat(Math.max(2, size - visibleWidth(title) - rightWidth)) + right
|
|
27
29
|
: truncateToWidth(left, size);
|
|
28
30
|
const lines = [truncateToWidth(heading, size)];
|
|
31
|
+
const indent = Math.min(2, size - 1);
|
|
32
|
+
const details: string[] = [];
|
|
29
33
|
if (header.subtitle) {
|
|
30
|
-
const indent = Math.min(2, size - 1);
|
|
31
34
|
const text = header.subtitle.replace(/[\r\n\t]+/g, " ").replace(/ {2,}/g, " ").trim();
|
|
32
|
-
|
|
35
|
+
details.push(" ".repeat(indent) + theme.fg("muted", truncateToWidth(text, size - indent)));
|
|
33
36
|
}
|
|
37
|
+
if (header.ledger) {
|
|
38
|
+
const text = header.ledger.replace(/[\r\n\t]+/g, " ").replace(/ {2,}/g, " ").trim();
|
|
39
|
+
details.push(" ".repeat(indent) + theme.fg("dim", truncateToWidth(text, size - indent)));
|
|
40
|
+
}
|
|
41
|
+
if (details.length > 0) lines.push(...details, "");
|
|
34
42
|
return lines;
|
|
35
43
|
}
|