@abhishek944/pi-tasks 0.8.3 → 0.10.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 +15 -5
- package/dist/agents/herdr.d.ts +4 -0
- package/dist/agents/herdr.js +23 -0
- package/dist/agents/links.d.ts +7 -0
- package/dist/agents/links.js +30 -0
- package/dist/agents/tools.d.ts +3 -0
- package/dist/agents/tools.js +140 -0
- package/dist/auto-continue.js +7 -5
- package/dist/index.js +30 -6
- package/dist/open-repository.d.ts +2 -0
- package/dist/open-repository.js +22 -0
- package/dist/ownership.d.ts +1 -0
- package/dist/ownership.js +9 -0
- package/dist/state.js +23 -14
- package/dist/tools.js +15 -13
- package/dist/tracking.js +14 -3
- package/dist/types.d.ts +2 -2
- package/dist/ui/panel.d.ts +13 -2
- package/dist/ui/panel.js +110 -35
- package/dist/ui/works-dashboard.d.ts +3 -0
- package/dist/ui/works-dashboard.js +85 -13
- package/docs/REFERENCE.md +40 -8
- package/docs/USAGE_GUIDE.md +106 -4
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { copyToClipboard } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { matchesKey, truncateToWidth, visibleWidth, wrapTextWithAnsi, } from "@earendil-works/pi-tui";
|
|
3
|
+
import { delegateLink, focusPane } from "../agents/links.js";
|
|
3
4
|
import { formatWorksMarkdown } from "../markdown.js";
|
|
4
5
|
import { openRepository } from "../open-repository.js";
|
|
5
6
|
import { formatCompletion, taskCompletion, workCompletion } from "../progress.js";
|
|
6
7
|
import { safeMultiline, safeSingleLine } from "../text.js";
|
|
7
|
-
import { border, frame, gitBorder, progressName, rule, todoIcon, workIcon } from "./panel.js";
|
|
8
|
+
import { border, delegateHitRegion, frame, gitBorder, ownerBadge, progressName, recordId, rule, todoIcon, workIcon } from "./panel.js";
|
|
8
9
|
const CHROME_LINES = 8;
|
|
9
10
|
export class WorksDashboard {
|
|
10
11
|
tui;
|
|
@@ -25,6 +26,8 @@ export class WorksDashboard {
|
|
|
25
26
|
messageColor = "warning";
|
|
26
27
|
copying = false;
|
|
27
28
|
opening = false;
|
|
29
|
+
openingDelegate = false;
|
|
30
|
+
delegateHits = [];
|
|
28
31
|
minimized = false;
|
|
29
32
|
unsubscribeGit;
|
|
30
33
|
openHitRegion;
|
|
@@ -49,6 +52,7 @@ export class WorksDashboard {
|
|
|
49
52
|
this.refreshTimer.unref?.();
|
|
50
53
|
}
|
|
51
54
|
render(width) {
|
|
55
|
+
this.delegateHits = [];
|
|
52
56
|
const dialogWidth = Math.max(1, width);
|
|
53
57
|
const innerWidth = Math.max(1, dialogWidth - 2);
|
|
54
58
|
const works = this.state.listWorks();
|
|
@@ -74,9 +78,16 @@ export class WorksDashboard {
|
|
|
74
78
|
const listHeight = Math.max(0, bodyHeight - details.length);
|
|
75
79
|
if (listHeight > 0)
|
|
76
80
|
this.keepSelectionVisible(items, listHeight);
|
|
77
|
-
const rows = items.slice(this.scrollOffset, this.scrollOffset + listHeight).map((item) => this.renderRow(item, innerWidth));
|
|
81
|
+
const rows = items.slice(this.scrollOffset, this.scrollOffset + listHeight).map((item, index) => this.renderRow(item, innerWidth, 4 + index));
|
|
78
82
|
while (rows.length < listHeight)
|
|
79
83
|
rows.push("");
|
|
84
|
+
const selected = items.find((item) => item.key === this.selectedKey);
|
|
85
|
+
if (selected?.kind === "todo" && details[1] !== undefined) {
|
|
86
|
+
const start = visibleWidth(`${recordId(selected.todo.taskId, this.theme)} `);
|
|
87
|
+
const hit = delegateHitRegion(delegateLink(selected.todo.taskInfo), start, details[1], 5 + listHeight);
|
|
88
|
+
if (hit)
|
|
89
|
+
this.delegateHits.push(hit);
|
|
90
|
+
}
|
|
80
91
|
return [
|
|
81
92
|
gitBorder(innerWidth, this.theme, this.git.getSnapshot()),
|
|
82
93
|
frame(header, innerWidth, this.theme),
|
|
@@ -113,6 +124,18 @@ export class WorksDashboard {
|
|
|
113
124
|
}
|
|
114
125
|
if (this.minimized)
|
|
115
126
|
return;
|
|
127
|
+
if (matchesKey(data, "d")) {
|
|
128
|
+
const selected = items.find((item) => item.key === this.selectedKey);
|
|
129
|
+
const link = selected?.kind === "todo" ? delegateLink(selected.todo.taskInfo) : undefined;
|
|
130
|
+
if (link)
|
|
131
|
+
void this.openLinkedDelegate(link);
|
|
132
|
+
else {
|
|
133
|
+
this.message = "Select a delegated task with a Herdr pane link. Navigation requires Herdr.";
|
|
134
|
+
this.messageColor = "warning";
|
|
135
|
+
this.tui.requestRender();
|
|
136
|
+
}
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
116
139
|
this.messageColor = "warning";
|
|
117
140
|
if (this.keybindings.matches(data, "tui.select.up")) {
|
|
118
141
|
this.select(items, index - 1);
|
|
@@ -136,7 +159,24 @@ export class WorksDashboard {
|
|
|
136
159
|
this.tui.requestRender();
|
|
137
160
|
}
|
|
138
161
|
handleMouse(event) {
|
|
139
|
-
if (this.disposed
|
|
162
|
+
if (this.disposed)
|
|
163
|
+
return undefined;
|
|
164
|
+
if (event.type === "press" && event.button === "left") {
|
|
165
|
+
const delegateHit = this.delegateHits.some((region) => event.y === region.y && this.isHit(event.x, region));
|
|
166
|
+
const headerHit = event.y === 1 && [this.copyHitRegion, this.openHitRegion, this.toggleHitRegion].some((region) => this.isHit(event.x, region));
|
|
167
|
+
// Own the gesture so Pi does not turn repeated control clicks into text selection.
|
|
168
|
+
if (delegateHit || headerHit)
|
|
169
|
+
return { handled: true };
|
|
170
|
+
}
|
|
171
|
+
// Legacy mouse releases omit the button; Pi still normalizes the gesture as a click.
|
|
172
|
+
if (event.type !== "click" || (event.button !== "left" && event.button !== "none"))
|
|
173
|
+
return undefined;
|
|
174
|
+
const hit = this.delegateHits.find((region) => event.y === region.y && this.isHit(event.x, region));
|
|
175
|
+
if (hit) {
|
|
176
|
+
void this.openLinkedDelegate(hit.link);
|
|
177
|
+
return { handled: true, focus: true, render: true };
|
|
178
|
+
}
|
|
179
|
+
if (event.y !== 1)
|
|
140
180
|
return undefined;
|
|
141
181
|
if (this.isHit(event.x, this.toggleHitRegion)) {
|
|
142
182
|
this.toggleMinimized();
|
|
@@ -189,18 +229,23 @@ export class WorksDashboard {
|
|
|
189
229
|
this.scrollOffset = index - height + 1;
|
|
190
230
|
this.scrollOffset = Math.max(0, Math.min(this.scrollOffset, Math.max(0, items.length - height)));
|
|
191
231
|
}
|
|
192
|
-
renderRow(item, width) {
|
|
232
|
+
renderRow(item, width, y) {
|
|
193
233
|
const selected = item.key === this.selectedKey;
|
|
194
234
|
const prefix = selected ? this.theme.fg("accent", "▶ ") : " ";
|
|
195
235
|
if (item.kind === "work") {
|
|
196
236
|
const done = item.work.tasks.filter((todo) => todo.status === "completed").length;
|
|
197
|
-
const metadata = this.theme.fg("dim", `${item.work.
|
|
237
|
+
const metadata = this.theme.fg("dim", `${item.work.status} · ${done}/${item.work.tasks.length}`);
|
|
198
238
|
const nameWidth = width - visibleWidth(prefix) - 3 - visibleWidth(metadata);
|
|
199
|
-
return truncateToWidth(`${prefix}${workIcon(item.work.status, this.theme)} ${this.theme.bold(progressName(item.work.workName, workCompletion(item.work), nameWidth))} ${metadata}`, width, "");
|
|
239
|
+
return truncateToWidth(`${prefix}${workIcon(item.work.status, this.theme)} ${this.theme.bold(progressName(item.work.workName, workCompletion(item.work), nameWidth, `${recordId(item.work.workId, this.theme)} `))} ${metadata}`, width, "");
|
|
200
240
|
}
|
|
201
|
-
const metadata = this.theme.fg("dim",
|
|
241
|
+
const metadata = this.theme.fg("dim", item.todo.status);
|
|
202
242
|
const nameWidth = width - visibleWidth(prefix) - 5 - visibleWidth(metadata);
|
|
203
|
-
|
|
243
|
+
const line = truncateToWidth(`${prefix} ${todoIcon(item.todo.status, this.theme)} ${progressName(item.todo.taskName, taskCompletion(item.todo), nameWidth, `${recordId(item.todo.taskId, this.theme)} ${ownerBadge(item.todo.taskInfo, this.theme, Boolean(delegateLink(item.todo.taskInfo)))} `)} ${metadata}`, width, "");
|
|
244
|
+
const start = visibleWidth(`${prefix} ${todoIcon(item.todo.status, this.theme)} ${recordId(item.todo.taskId, this.theme)} `);
|
|
245
|
+
const hit = delegateHitRegion(delegateLink(item.todo.taskInfo), start, line, y);
|
|
246
|
+
if (hit)
|
|
247
|
+
this.delegateHits.push(hit);
|
|
248
|
+
return line;
|
|
204
249
|
}
|
|
205
250
|
renderDetails(items, width, budget) {
|
|
206
251
|
if (!this.detailsVisible || budget === 0)
|
|
@@ -210,21 +255,23 @@ export class WorksDashboard {
|
|
|
210
255
|
return [this.theme.fg("muted", "No works or todos in this session.")].slice(0, budget);
|
|
211
256
|
let heading;
|
|
212
257
|
if (item.kind === "work") {
|
|
213
|
-
const lead = `${item.work.workId}
|
|
258
|
+
const lead = `${recordId(item.work.workId, this.theme)} `;
|
|
214
259
|
const tail = ` · ${item.work.status}`;
|
|
215
260
|
heading = `${lead}${progressName(item.work.workName, workCompletion(item.work), width - visibleWidth(lead + tail))}${tail}`;
|
|
216
261
|
}
|
|
217
262
|
else {
|
|
218
263
|
const taskName = safeSingleLine(item.todo.taskName);
|
|
264
|
+
const taskLead = `${recordId(item.todo.taskId, this.theme)} ${ownerBadge(item.todo.taskInfo, this.theme, Boolean(delegateLink(item.todo.taskInfo)))} `;
|
|
219
265
|
const workName = safeSingleLine(item.work.workName);
|
|
220
266
|
const taskProgress = formatCompletion(taskCompletion(item.todo));
|
|
221
267
|
const workProgress = formatCompletion(workCompletion(item.work));
|
|
222
|
-
const
|
|
268
|
+
const workId = recordId(item.todo.workId, this.theme);
|
|
269
|
+
const fixed = `${taskLead} · ${taskProgress} · ${item.todo.status} · ${workId} · ${workProgress}`;
|
|
223
270
|
const available = Math.max(0, width - visibleWidth(fixed));
|
|
224
271
|
const taskWidth = Math.min(visibleWidth(taskName), available - Math.min(visibleWidth(workName), Math.floor(available / 2)));
|
|
225
272
|
const shownTask = truncateToWidth(taskName, taskWidth, "…");
|
|
226
273
|
const shownWork = truncateToWidth(workName, available - taskWidth, "…");
|
|
227
|
-
heading = `${
|
|
274
|
+
heading = `${taskLead}${shownTask} · ${taskProgress} · ${item.todo.status} · ${workId} ${shownWork} · ${workProgress}`;
|
|
228
275
|
}
|
|
229
276
|
const info = item.kind === "work" ? item.work.workInfo : item.todo.taskInfo;
|
|
230
277
|
const infoLines = safeMultiline(info).flatMap((line) => wrapTextWithAnsi(this.theme.fg("dim", line || " "), width));
|
|
@@ -248,7 +295,7 @@ export class WorksDashboard {
|
|
|
248
295
|
const copyAction = this.copying
|
|
249
296
|
? this.theme.fg("dim", "[Copying…]")
|
|
250
297
|
: this.theme.fg("accent", this.theme.bold("[C Copy]"));
|
|
251
|
-
const openAction = this.theme.fg(this.opening ? "dim" : "accent", this.theme.bold("[O Open]"));
|
|
298
|
+
const openAction = this.theme.fg(this.opening ? "dim" : "accent", this.theme.underline(this.theme.bold("[O Open]")));
|
|
252
299
|
const toggleLabel = this.minimized ? "[M Maximize]" : "[M Minimize]";
|
|
253
300
|
const toggleAction = this.theme.fg("accent", this.theme.bold(toggleLabel));
|
|
254
301
|
const actionsWidth = visibleWidth(copyAction) + 1 + visibleWidth(openAction) + 1 + visibleWidth(toggleAction);
|
|
@@ -274,6 +321,31 @@ export class WorksDashboard {
|
|
|
274
321
|
isHit(x, region) {
|
|
275
322
|
return region !== undefined && x >= region.start && x < region.end;
|
|
276
323
|
}
|
|
324
|
+
async openLinkedDelegate(link) {
|
|
325
|
+
if (this.openingDelegate)
|
|
326
|
+
return;
|
|
327
|
+
this.openingDelegate = true;
|
|
328
|
+
this.message = "Opening delegated agent in Herdr…";
|
|
329
|
+
this.messageColor = "warning";
|
|
330
|
+
this.tui.requestRender();
|
|
331
|
+
try {
|
|
332
|
+
await focusPane(link.paneId, this.cwd);
|
|
333
|
+
this.message = "Opened delegated agent in Herdr.";
|
|
334
|
+
this.messageColor = "success";
|
|
335
|
+
}
|
|
336
|
+
catch (error) {
|
|
337
|
+
const reason = error instanceof Error ? safeSingleLine(error.message) : "Unknown error.";
|
|
338
|
+
this.message = `Could not open delegate. ${reason}`;
|
|
339
|
+
this.messageColor = "error";
|
|
340
|
+
if (!this.disposed)
|
|
341
|
+
this.notify(this.message, "error");
|
|
342
|
+
}
|
|
343
|
+
finally {
|
|
344
|
+
this.openingDelegate = false;
|
|
345
|
+
if (!this.disposed)
|
|
346
|
+
this.tui.requestRender();
|
|
347
|
+
}
|
|
348
|
+
}
|
|
277
349
|
async openInCursor() {
|
|
278
350
|
if (this.opening)
|
|
279
351
|
return;
|
|
@@ -325,7 +397,7 @@ export class WorksDashboard {
|
|
|
325
397
|
}
|
|
326
398
|
}
|
|
327
399
|
renderFooter(width) {
|
|
328
|
-
const text = "C copy all · O open Cursor · M minimize · configured ↑/↓ select · PgUp/PgDn scroll details · confirm toggles · cancel closes";
|
|
400
|
+
const text = "C copy all · O open Cursor · D open delegate · M minimize · configured ↑/↓ select · PgUp/PgDn scroll details · confirm toggles · cancel closes";
|
|
329
401
|
return truncateToWidth(this.theme.fg("muted", text), width, "");
|
|
330
402
|
}
|
|
331
403
|
}
|
package/docs/REFERENCE.md
CHANGED
|
@@ -18,12 +18,16 @@ Limits:
|
|
|
18
18
|
|
|
19
19
|
## Data
|
|
20
20
|
|
|
21
|
-
A work contains `workId`, `workName`, `workInfo`, `status`, `createdAt`, and `updatedAt`. Work status is `
|
|
21
|
+
A work contains `workId`, `workName`, `workInfo`, `status`, `createdAt`, and `updatedAt`. Work status is `active`, `blocked`, `completed`, or `cancelled`; new works default to `active`.
|
|
22
22
|
|
|
23
|
-
A todo contains `taskId`, `workId`, `taskName`, `taskInfo`, `status`, optional `completionPercent`, `createdAt`, and `updatedAt`. Todo status
|
|
23
|
+
A todo contains `taskId`, `workId`, `taskName`, `taskInfo`, `status`, optional `completionPercent`, `createdAt`, and `updatedAt`. Todo status uses the same four values; new todos default to `active`.
|
|
24
24
|
|
|
25
25
|
The public list shape assembles each work with `tasks: Todo[]`; tasks are stored separately to avoid duplicate state. Work progress is derived, not independently stored or editable.
|
|
26
26
|
|
|
27
|
+
`Blocked` includes waiting for another agent’s output, review, an external response, user input, permission, or a genuine obstacle. Mark dependent tasks blocked immediately, with the dependency and resume condition in their information field. Actual delegated execution can remain active. Keep the parent active only while some required work can proceed; otherwise mark it blocked too. Resume affected records as active when the dependency resolves and work resumes. These are agent instructions, not automatic dependency detection or a wake mechanism.
|
|
28
|
+
|
|
29
|
+
Replay normalizes legacy `planned` and `pending` statuses to `active` in both creation and update events without rewriting history. Tools accept only the four current statuses. Existing IDs, details, and progress are preserved.
|
|
30
|
+
|
|
27
31
|
### Completion progress
|
|
28
32
|
|
|
29
33
|
`TodoCreate` and `TodoUpdate` accept optional `completionPercent`: an integer from 0 through 100, or `null` to clear an obsolete estimate. Omission preserves an existing estimate on updates. For longer tasks, the guidance asks the AI to include interim estimates in `TodoUpdate` after roughly 5–10 meaningful working steps or a milestone, not just at completion or in status-only updates. The AI reports approximate progress based on completed effort and verification, explaining the evidence and remaining scope in `taskInfo`; status alone never implies an arbitrary partial percentage. Estimates remain optional; use `null` when unknown and do not increase a percentage without new evidence. This cadence is guidance, not a runtime timer or enforced tool-call count. No new tool or extra model call is added.
|
|
@@ -40,19 +44,31 @@ The public list shape assembles each work with `tasks: Todo[]`; tasks are stored
|
|
|
40
44
|
|
|
41
45
|
When all tracking tools are active, the extension adds hidden per-turn guidance for every normal request that starts or continues work. Pi finds or creates work, synchronizes todos, marks the current todo active before the attempt, and updates statuses afterward. Tracking is not skipped merely because the request looks small.
|
|
42
46
|
|
|
47
|
+
The guidance also requires every delegated subagent, at every depth, to create or resume its own session-local Work and Todos before assigned work, maintain a real `workId` and an active `taskId`, and return its IDs with results. Parent assignment IDs are recorded as context, not used to mutate another session's records. Worker prompts must carry this requirement, including stopping delegated execution if tracking tools or IDs are unavailable. This is instruction-only, not a tool-call gate or automatic tracking repair.
|
|
48
|
+
|
|
43
49
|
The guidance is not added when the tracking tools have been removed from the active tool set. Pi Ask removes them during `/ask`. Pi BTW executes its side conversation outside the main conversation. The guidance also explicitly forbids changing works, todos, loops, or monitors during either mode.
|
|
44
50
|
|
|
51
|
+
### Shared workflow contract
|
|
52
|
+
|
|
53
|
+
The guidance directs every tracked Work, including worker-local Works, through the globally installed `implement` skill. Reuse an active skill rather than recursively invoking it. Specialized skill permissions remain authoritative; planning, research, and review do not gain implementation authority. Missing `implement`, tracking tools, valid session identity, or real IDs blocks execution. Reading instructions, obtaining identity, and establishing records are startup steps, not assigned execution. Plain conversation and side-thread exceptions remain unchanged.
|
|
54
|
+
|
|
55
|
+
The agent obtains its full session identity from `PI_SESSION_ID` in its own shell-tool command, not from a parent prompt or Herdr pane/name. Require `[A-Za-z0-9][A-Za-z0-9_-]*` and actual Work/Task IDs. Hosts without session-environment support must report the identity blocker rather than guess. Root artifacts use repository-relative `var/<sessionId>/<workId>/<taskId>/`; delegated artifacts append `<childSessionId>/<childWorkId>/<childTaskId>/` beneath the exact canonical parent task directory, recursively. Resolved destinations, including symlinks, must remain inside repository `var/`. Paths and parent IDs go in existing `taskInfo` and handoff context; each worker returns its own IDs and canonical path. Do not migrate legacy artifacts implicitly or overwrite files after branch navigation solely because numeric IDs match. `implement` owns the detailed path/ownership contract, including incompatible specialized helper handling.
|
|
56
|
+
|
|
57
|
+
Each task starts its existing `taskInfo` with `owner: self` or `owner: delegate` plus a reason, preserving that declaration in later updates. Delegation requires a bounded outcome, isolated ownership, ready inputs and verified prerequisites, useful parallelism or expertise that exceeds coordination costs, owning-skill permission, and available tracking/monitoring. Small or tightly coupled changes stay with one owner by default. Reassess on scope changes and apply the rule at every permitted delegation depth; parents retain integration and verification responsibility. Herdr retains lifecycle and monitor ownership. Worker root panes use only the parent's delegated Task ID as their name (`T34`, without brackets or descriptions), updated when a different parent Todo is assigned. This label is distinct from worker-local IDs and may repeat across parent sessions; returned resource IDs remain authoritative for lifecycle commands. No file-count, agent-count, or depth threshold is imposed.
|
|
58
|
+
|
|
59
|
+
This is model guidance only. No new schema fields, path-creation code, tool-call gate, cross-session mutation, session-ID API dependency, or automatic skill installer is added. Guidance still depends on all tracking tools being active as described above.
|
|
60
|
+
|
|
45
61
|
## Auto-continuation
|
|
46
62
|
|
|
47
63
|
Auto-continuation is optional and requires Pi 1.2.0 or newer. Configure `pi-tasks.autoContinue` in Pi's `settings.json`; the extension reads `pi.getSettings()` so trusted project settings override global settings. `enabled` defaults to `false`; `maxContinuations` is optional. Omission means no continuation limit; if supplied, it must be a positive safe integer. Explicit `null` is invalid. Invalid configuration disables the flow and reports a warning. Hosts without the new settings API keep normal task tracking with no automatic continuation.
|
|
48
64
|
|
|
49
|
-
A fresh accepted main interactive/RPC run arms a new continuation epoch. Input is provisional until the run starts, so handled/rejected prompts cannot arm it. Extension/custom starts do not arm or reset it. Steering/follow-up messages queued inside an already-running activity do not themselves reset the cap. Session start/reload, tree navigation, and shutdown disarm it until fresh user input.
|
|
65
|
+
A fresh accepted main interactive/RPC run arms a new continuation epoch. Input is provisional until the run starts, so handled/rejected prompts cannot arm it. Extension/custom starts do not arm or reset it. Steering/follow-up messages queued inside an already-running activity do not themselves reset the cap. Session start/reload, tree navigation, and shutdown disarm it until fresh user input. Explicitly aborted activity also suspends it; failed activity does not. `agent_settled.aborted` covers aborts that skip the actionable boundary. Tracking tools must be active; side conversations must not start continuation.
|
|
50
66
|
|
|
51
|
-
The synchronous `agent_before_settle` handler runs after native retries, compaction, and queued work. It
|
|
67
|
+
The synchronous `agent_before_settle` handler runs after native retries, compaction, and queued work. It accepts completed or error outcomes and requires a non-aborted signal, no pending messages in either the boundary preview or runtime queue, and no continuation already requested by an earlier handler. Pi is still busy at this actionable boundary, so it does not require `ctx.isIdle()`. Instead it appends one custom-message draft and requests one native continuation; Pi owns committing it and honoring cancellation. No detached prompt, timer, background worker, or polling loop is created.
|
|
52
68
|
|
|
53
|
-
|
|
69
|
+
Any work or todo on the current branch whose status is not blocked, completed, or cancelled requires continuation. This includes active records and legacy planned/pending records, which replay normalizes to active. Completed, blocked, and cancelled records are settled. A settled parent does not hide an unfinished child. The prompt includes a bounded preview of IDs, names and statuses, and directs the agent to list tools for full details. No records means no continuation. The extension never mutates statuses, verifies work independently, or treats a blocker label as proof of an actual dependency.
|
|
54
70
|
|
|
55
|
-
When `maxContinuations` is supplied, at most that many extra continuations are requested per fresh accepted main user run. The next unfinished boundary warns once and suspends continuation; a fresh user prompt resets the cap. With no limit supplied, continuation can consume tokens indefinitely while unfinished records remain, until interrupted,
|
|
71
|
+
When `maxContinuations` is supplied, at most that many extra continuations are requested per fresh accepted main user run. The next unfinished boundary warns once and suspends continuation; a fresh user prompt resets the cap. With no limit supplied, continuation can consume tokens indefinitely while unfinished records remain, until explicitly interrupted, disabled or otherwise suspended, including during repeated provider failures. This is not a cost cap or a cap on native tool/retry requests, and another extension may independently request work. Settings changes take effect when Pi reloads effective settings, normally through `/reload`.
|
|
56
72
|
|
|
57
73
|
## Repository status and Cursor
|
|
58
74
|
|
|
@@ -62,8 +78,24 @@ The implementation is informed by [pi-powerline-footer's cache behavior](https:/
|
|
|
62
78
|
|
|
63
79
|
Open appears between Copy and Minimize/Maximize. It executes `cursor` with the separate argument `.` in the active session working directory, without a shell. The executable must be on PATH; errors are shown instead of silently failing. `/works-panel open` supplies a command path, and `/works` uses `o`. Open is also available outside Git repositories.
|
|
64
80
|
|
|
81
|
+
### Ownership display
|
|
82
|
+
|
|
83
|
+
`taskOwner(taskInfo)` interprets explicit line-start `owner: self` or `owner: delegate` declarations case-insensitively. A trailing sentence/reason is allowed, but incidental prose and longer enum-like tokens such as `self-managed` do not count. Missing/invalid decisions or conflicting valid declarations return `unassigned`; repeated identical declarations remain unambiguous. Compact floating/widget panel rows, dashboard rows, and todo detail headings share this interpretation and show `[taskId] [self/delegate] Task name` (or `[unassigned]`). The existing `taskInfo` is the sole source; no persistence fields, tool parameters, migrations, or task-name edits are introduced. Progress reservations, status/count logic, and full details remain unchanged.
|
|
84
|
+
|
|
85
|
+
### Delegate navigation
|
|
86
|
+
|
|
87
|
+
Agent tools are thin, bounded, shell-free Herdr CLI wrappers using actual paneId values. No separate agent handle, private registry, process/session validation, startup receipt, recovery/reconnection or acquisition framework is implemented. Panes are assumed not to be repurposed. Structured CLI errors are reported even with exit code zero, and partial creation failures report the handles already obtained without automatic retry/cleanup.
|
|
88
|
+
|
|
89
|
+
AgentCreate creates a dedicated unfocused tab, starts Pi with the supplied model flags and calls the existing MonitorCreate through ctx.executeTool with onSignal and optional onDone unchanged. It returns paneId/tabId/monitorId, assignmentSent:false and the prepared assignment. The AI must confirm MonitorList shows subscription ready before explicit AgentSend. Follow-up sends do not replace the monitor. AgentClose calls MonitorStop with the supplied monitorId, then closes the supplied pane; callers must use only resources they created. AgentList returns the CLI inventory, including unrelated agents. No subprocess runs during rendering.
|
|
90
|
+
|
|
91
|
+
AgentCreate stores herdr-pane and herdr-monitor lines in existing taskInfo; task tools persist and restore these details. TodoUpdate preserves existing link lines for delegate-to-delegate detail edits unless explicit replacement metadata is supplied, so ordinary progress/status descriptions do not silently disable navigation. Changing ownership, explicit `herdr-pane: none`, or AgentClose can unlink. delegateLink interprets an unambiguous valid pane ID for owner:delegate inside Herdr. AgentClose removes matching delegate links. No task schema change or automatic task completion is introduced. The onSignal/onDone callbacks remain entirely owned by pi-loop-monitor; onDone means its process ended, not that worker work is complete.
|
|
92
|
+
|
|
93
|
+
Delegate navigation and AgentFocus first focus the pane, then explicitly activate the tab returned by Herdr; pane-focus success alone does not guarantee that the visible client switched tabs.
|
|
94
|
+
|
|
95
|
+
Linked `[delegate]` badges and Cursor Open controls are underlined. Fullscreen mouse regions use ANSI-aware visible columns and only include complete visible badges after clipping and scrolling. Floating/widget rows, dashboard rows and todo detail headings support clicks; hidden/minimized/offscreen badges have no regions. In `/works`, `d` opens the selected task's delegate, and `/works-panel delegate T<number>` provides a command path in regular mode. Outside Herdr or without a pane link, ownership stays informational and is not underlined. Unavailable CLI, stale/closed targets and other navigation failures produce visible errors.
|
|
96
|
+
|
|
65
97
|
## Interfaces
|
|
66
98
|
|
|
67
|
-
The compact panel defaults to a non-capturing floating overlay anchored at the top-right. It
|
|
99
|
+
The compact panel defaults to a non-capturing floating overlay anchored at the top-right. Its header hides the session ID and places an underlined Open session action immediately after Copy, including minimized/widget layouts. The action uses the Pi session-context identity to locate the matching direct/nested artifact directory under repository var and opens it via the existing shell-free Cursor launcher. If absent, the standard var/sessionId directory is created on activation; ambiguous matches or unsafe identity fail visibly. No lookup or process launch occurs during rendering. /works-panel open-session supplies a keyboard-command path. Existing repository Open remains separate. On narrow headers, Minimize/Maximize shorten to [-]/[+] to preserve every action and its hit region; overflow hints use remaining space. It prefixes work and todo names with bracketed IDs (`[W1] Name`, `[T1] [self] Name`), alongside status icons, completion counts, and a visible row range when content exceeds the terminal-aware viewport. It hides on terminals narrower than 90 columns or shorter than 18 rows. In fullscreen TUI mode, its title-bar Copy action exports every work and nested todo as Markdown, while Minimize collapses the panel to a restorable title bar that keeps Copy, Open, and Maximize available. `/works-panel minimize` and `/works-panel maximize` provide a keyboard-command path and preserve the collapsed state when switching between floating and widget layouts. Overflow starts at the newest rows and follows newly added tail rows until the user scrolls upward. Mouse-wheel events over the expanded floating panel scroll it directly without taking keyboard focus; regular terminal mode shows the newest rows and uses `/works` for complete browsing and copying. Because Pi treats any persistent overlay as active, the floating mode can block display-mode changes. `/works-panel widget` switches to a right-aligned widget above the editor, renders all rows, and retains the title actions, while `/works-panel off` hides it.
|
|
68
100
|
|
|
69
|
-
`/works` opens a top-centered detailed overlay. Its top-right Copy action uses `c` to copy every work and nested todo to the system clipboard as Markdown. Its Open action uses `o` to open the current directory in Cursor. Its Minimize action uses `m` to collapse the overlay to a framed top bar containing live total work and todo counts, Copy, Open, and a Maximize action; activating Maximize restores the full dashboard. In fullscreen TUI mode, Copy, Open, and Minimize/Maximize also respond to left clicks. Configured selection keys choose records, configured Page Up and Page Down keys scroll long details, the configured confirmation key toggles details, and the configured cancel key closes it.
|
|
101
|
+
`/works` opens a top-centered detailed overlay. List rows and detail headings use the same bracketed ID and ownership prefixes; list metadata no longer repeats the ID after the name. The dashboard title remains unchanged. Stored names remain unchanged. Its top-right Copy action uses `c` to copy every work and nested todo to the system clipboard as Markdown. Its Open action uses `o` to open the current directory in Cursor. Its Minimize action uses `m` to collapse the overlay to a framed top bar containing live total work and todo counts, Copy, Open, and a Maximize action; activating Maximize restores the full dashboard. In fullscreen TUI mode, Copy, Open, and Minimize/Maximize also respond to left clicks. Configured selection keys choose records, configured Page Up and Page Down keys scroll long details, the configured confirmation key toggles details, and the configured cancel key closes it.
|
package/docs/USAGE_GUIDE.md
CHANGED
|
@@ -9,13 +9,56 @@ For every normal request that starts or continues work, Pi should:
|
|
|
9
9
|
3. Create or update detailed todos for the requested scope.
|
|
10
10
|
4. Mark the current todo active before starting it.
|
|
11
11
|
5. During longer tasks, report interim progress after roughly 5–10 meaningful working steps or a milestone, when an estimate is possible.
|
|
12
|
-
6. Mark the todo
|
|
12
|
+
6. Mark the todo blocked immediately if its next step must wait on a dependency; otherwise update it after the attempt as active, completed, or cancelled.
|
|
13
13
|
7. Complete the work only when its required todos are complete.
|
|
14
14
|
|
|
15
15
|
The extension applies this guidance across all loaded skills and does not skip work merely because it looks small. It does not update tracking during `/ask`, `/btw`, or BTW side threads.
|
|
16
16
|
|
|
17
17
|
Write `workInfo` and `taskInfo` in normal prose with full sentences and spaces between words. Conversational brevity modes do not apply to stored records; do not concatenate words to shorten them. This is model-facing guidance, not automatic repair of existing text.
|
|
18
18
|
|
|
19
|
+
## Shared workflow and artifacts
|
|
20
|
+
|
|
21
|
+
Every tracked Work, including each worker's local Work, uses the globally installed `implement` skill for coordination. Read it once before execution, or reuse it if active. Specialized skills retain their scope: research and review remain read-only, and planning does not authorize implementation. Plain conversation, `/ask`, and `/btw` remain outside this workflow. Pi-tasks owns records and progress; `implement` owns coordination, artifact paths, and integration; `herdr` owns delegated-agent lifecycle and monitors. This instruction does not install those skills or add runtime enforcement. If `implement`, tracking tools, or required IDs are unavailable, report the blocker rather than executing without them.
|
|
22
|
+
|
|
23
|
+
Read the full current session ID through the agent's own shell tool:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
printf '%s\n' "$PI_SESSION_ID"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Startup includes reading instructions, obtaining identity, and creating/resuming tracking. Before execution, require a nonempty session ID matching `[A-Za-z0-9][A-Za-z0-9_-]*`, a real tool-returned Work ID, and an active Task ID. Do not invent IDs, use a Herdr pane/name as identity, or substitute the parent's session ID. Hosts/custom shell tools that do not expose session identity must report that blocker.
|
|
30
|
+
|
|
31
|
+
Root task artifacts use repository-relative `var/<sessionId>/<workId>/<taskId>/`, never the system `/var/`. A delegated worker appends its own `<childSessionId>/<childWorkId>/<childTaskId>/` below the exact `parentTaskDir` from its assignment, recursively. For example:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
var/<rootSessionId>/W1/T2/
|
|
35
|
+
plan.md
|
|
36
|
+
<childSessionId>/W1/T1/
|
|
37
|
+
report.md
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Record the canonical artifact directory and parent session/Work/Task IDs in `taskInfo`, pass them unchanged in handoffs, and return them with results. Keep resolved destinations inside the repository's `var/`, including symlinks. Create folders only for useful artifacts; feature names remain descriptions rather than path keys. Each task owns its files and links to shared coordinating-task plans rather than copying them. Reuse recorded paths only after verifying current ownership, especially after session-branch navigation; matching numeric IDs alone do not authorize overwriting artifacts. Preserve existing artifacts unless an explicit migration is approved. Follow `implement` for detailed path handling and report incompatible legacy helper paths rather than inventing unsupported arguments or silently falling back to feature-named directories.
|
|
41
|
+
|
|
42
|
+
### Choose self or delegate
|
|
43
|
+
|
|
44
|
+
Before each task, start `taskInfo` with `owner: self` or `owner: delegate` and a short reason. Preserve this declaration when updating the details. Delegate only when scope and acceptance criteria are clear, ownership can be isolated, required inputs and verified prerequisites are ready, and useful parallelism or expertise outweighs startup, context transfer, monitoring, and integration costs. The owning skill must permit delegation and required tracking and monitoring must be available. Small straightforward changes, tightly coupled edits, shared-interface design, and expensive-to-explain work normally stay with one owner. Risk alone is not a reason for parallel coding; independent review may still help. Do not use arbitrary file-count, agent-count, or depth thresholds. Reassess if scope changes; each allowed delegating child applies the same rule, and parents retain responsibility for monitoring, integration, verification, and cleanup.
|
|
45
|
+
|
|
46
|
+
Name each Herdr subagent root pane exactly with the parent's delegated Todo ID, for example `T34`, without brackets, descriptions, Work IDs, or other prefixes. The worker creates its own session-local tracking after startup; those IDs do not replace this pane label. Rename an owned worker pane if a follow-up assigns a different parent Todo. Names may repeat across parent sessions, so use returned resource IDs for lifecycle commands, never pane names.
|
|
47
|
+
|
|
48
|
+
These are instructions using existing details fields, not a new schema, shared cross-session task tree, automatic directory creator, or enforcement hook.
|
|
49
|
+
|
|
50
|
+
## Delegated agents
|
|
51
|
+
|
|
52
|
+
Every subagent must create or resume its own session-local Work and Todos before starting its assignment, at every delegation depth. It must have a real `workId` and an active `taskId` for the current step, keep its records current, and return the IDs with results, checks, and blockers. Include this requirement, the `implement`/specialized skill handoff, parent session/Work/Task IDs, and the canonical parent task directory in every worker prompt. Require the worker to return its own session/Work/Task IDs and canonical nested artifact directory. Record parent assignment IDs as context, not as shared records: each Pi session has its own IDs. If tracking tools or IDs are unavailable, the worker must report the blocker and not begin assigned work; a parent-owned Todo or Markdown checklist is not a substitute. Never invent IDs or claim tracking existed before it did. This is model-facing guidance, not a runtime enforcement hook; `/ask` and `/btw` remain outside tracking.
|
|
53
|
+
|
|
54
|
+
## Statuses and dependencies
|
|
55
|
+
|
|
56
|
+
Works and todos use only `active`, `blocked`, `completed`, and `cancelled`. New records default to `active`; saved legacy `planned` and `pending` statuses restore as active but are no longer accepted by tools.
|
|
57
|
+
|
|
58
|
+
Use `blocked` immediately when a task cannot proceed until another agent produces output, a review finishes, an external response arrives, the user responds, permission is granted, or another obstacle is resolved. Record which dependency it awaits and what will unblock it in `taskInfo`; retain its current completion estimate. Work actually executing in another agent may remain active, but downstream tasks waiting for that output are blocked.
|
|
59
|
+
|
|
60
|
+
Keep the parent work active while some required work can proceed. When all remaining work must wait, mark the parent blocked too and record the reason and resume condition in `workInfo`. When the dependency resolves and work resumes, mark the affected records active. Neither blocked status nor changing it schedules a wake automatically; use the appropriate monitor or event when an automatic notification is needed.
|
|
61
|
+
|
|
19
62
|
## Continue unfinished work automatically
|
|
20
63
|
|
|
21
64
|
This is off by default and requires Pi 1.2.0+. Add the following to global `~/.pi/agent/settings.json` (or your custom agent directory) or a trusted project's `.pi/settings.json`, then run `/reload`:
|
|
@@ -30,9 +73,9 @@ This is off by default and requires Pi 1.2.0+. Add the following to global `~/.p
|
|
|
30
73
|
}
|
|
31
74
|
```
|
|
32
75
|
|
|
33
|
-
Send a normal prompt to start.
|
|
76
|
+
Send a normal prompt to start. After success or failure, if any work or todo is not blocked, completed, or cancelled, the agent receives a message to continue and verify it. Children count independently of their parent; legacy planned/pending records restore as active. Blocked, completed, and cancelled records do not cause another continuation. Keep the parent work synchronized too, and record a genuine blocker reason in its information field before handing off.
|
|
34
77
|
|
|
35
|
-
Press Escape/abort to stop. The extension will not restart from a monitor wake or another extension's message; send a new main prompt when you want it to resume. Failed runs
|
|
78
|
+
Press Escape/abort to stop. The extension will not restart from a monitor wake or another extension's message; send a new main prompt when you want it to resume. Failed runs do not disarm continuation: after native retries, unfinished records request another run. Repeated provider failures can therefore keep consuming tokens with no configured limit. Reloading or navigating session branches does not silently resume unfinished work.
|
|
36
79
|
|
|
37
80
|
Omitting `maxContinuations` means no continuation limit: it can keep consuming tokens while unfinished records remain. Manual abort and all other stopping conditions still apply. To cap it, add a positive integer such as `"maxContinuations": 10`. After the configured number of extra continuations, the extension warns and hands control back without changing records. A fresh accepted main user run resets the limit; a rejected prompt or steering/follow-up input queued inside a running activity does not. Set `enabled` to `false` and reload to disable the feature. It checks recorded states, not whether every user requirement was captured or genuinely verified.
|
|
38
81
|
|
|
@@ -73,18 +116,77 @@ Work progress averages all non-cancelled tasks equally and rounds down. Tasks at
|
|
|
73
116
|
|
|
74
117
|
## TUI
|
|
75
118
|
|
|
119
|
+
Both the compact panel (floating or widget) and `/works` prefix work names with their IDs, such as `[W1] Locate subagent restrictions`. Task rows and dashboard detail headings also include ownership: `[T1] [self] Inspect the implement skill` or `[T2] [delegate] Implement storage`. These are display labels only; stored names and IDs are unchanged. Work IDs use the theme's accent color, task IDs use its type-highlight color, `[self]` uses success, `[delegate]` uses warning, and `[unassigned]` stays muted. Exact hues follow the selected theme; labels remain readable without relying on color.
|
|
120
|
+
|
|
121
|
+
Ownership is read case-insensitively from explicit line-start `owner: self` or `owner: delegate` declarations in `taskInfo`, optionally followed by a reason or sentence. Incidental prose does not assign ownership. Missing, invalid, or conflicting declarations show `[unassigned]`; repeated declarations with the same valid value are unambiguous. No old records are rewritten and no new tool parameter is required. For example:
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
owner: self. This is a small, tightly coupled change.
|
|
125
|
+
The task covers the panel label and its documentation.
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Delegate pane links
|
|
129
|
+
|
|
130
|
+
`[delegate]` describes the ownership decision; it does not launch an agent. AgentCreate automatically adds `herdr-pane: <paneId>` and `herdr-monitor: <monitorId>` lines to the parent task's existing details. TodoUpdate keeps those lines when both old and new ownership stay delegate and the new details do not supply replacement link metadata. Explicit metadata takes precedence; changing ownership or AgentClose can clear the link. Set `herdr-pane: none` to explicitly unlink without changing ownership. No new task schema or private agent registry is added. AgentClose clears matching links without changing ownership or completion.
|
|
131
|
+
|
|
132
|
+
## Agent tools
|
|
133
|
+
|
|
134
|
+
These are simple Herdr CLI wrappers in pi-tasks, with no pi-herdr-agents dependency. AgentCreate also calls the existing MonitorCreate tool; AgentClose calls MonitorStop. Those two need modern Pi nested calls and the updated pi-loop-monitor result metadata. Base Work/Todo tracking and ordinary CLI wrappers do not depend on a private monitoring runtime.
|
|
135
|
+
|
|
136
|
+
| Tool | Purpose |
|
|
137
|
+
| --- | --- |
|
|
138
|
+
| `AgentCreate` | Create an unfocused tab, start Pi and register monitoring; return paneId/tabId/monitorId plus a prepared assignment. No prompt is sent. |
|
|
139
|
+
| `AgentList` | `herdr agent list` (includes unrelated agents). |
|
|
140
|
+
| `AgentStatus` | `herdr agent get <paneId>`. |
|
|
141
|
+
| `AgentOutput` | `herdr pane read`; 50 trailing lines by default, up to 200. |
|
|
142
|
+
| `AgentSend` | `herdr agent prompt <paneId> <message>` without waiting. |
|
|
143
|
+
| `AgentInterrupt` | `herdr agent send-keys <paneId> esc`. |
|
|
144
|
+
| `AgentClose` | MonitorStop for the supplied monitorId, then `herdr pane close <paneId>`. |
|
|
145
|
+
| `AgentFocus` | `herdr agent focus <paneId>`; also used by delegate links. |
|
|
146
|
+
|
|
147
|
+
For an existing active Work/Todo whose `taskInfo` starts with `owner: delegate`, call:
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
AgentCreate({
|
|
151
|
+
workId: "W1",
|
|
152
|
+
taskId: "T2",
|
|
153
|
+
taskDir: "var/<full-current-sessionId>/W1/T2",
|
|
154
|
+
assignment: "Review the approved change. Do not edit files or run tests.",
|
|
155
|
+
provider: "<chosen-provider>",
|
|
156
|
+
model: "<chosen-model-id>",
|
|
157
|
+
thinking: "high",
|
|
158
|
+
onSignal: "Inspect worker output. Help with blockers; review the actual changes before completing the task.",
|
|
159
|
+
onDone: "The monitor stopped. Inspect its status and recover monitoring if still needed."
|
|
160
|
+
})
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Replace placeholders using the existing implement path convention and model-routing-policy. The wrapper passes taskDir to the prepared worker assignment; it does not create folders or verify the running model. It adds parent context and worker-local tracking instructions without granting extra permissions.
|
|
164
|
+
|
|
165
|
+
AgentCreate returns `assignmentSent: false`. Confirm MonitorList shows `Herdr signal subscription ready for <paneId>`, then call `AgentSend({ paneId, message: assignment })` using the returned assignment. Do not add a second monitor. Follow-up messages use that same paneId and existing subscription.
|
|
166
|
+
|
|
167
|
+
`onSignal` is a wake instruction for worker state changes, including blocked, idle and done. The monitor keeps watching. `onDone` is a wake instruction if the monitor process terminates, not a worker-completion callback; when omitted, pi-loop-monitor supplies its recovery instruction. Neither returns the worker's complete answer automatically. The parent uses `AgentOutput` and inspects actual files before marking tasks complete. Do not add a duplicate monitor or close a worker merely because it reports done.
|
|
168
|
+
|
|
169
|
+
Use actual paneId values, not pane names or a separate agent handle. These wrappers assume an agent pane is not repurposed. There are no process/session checks, startup receipts, registry, automatic reconnection, retry or rollback framework. Ordinary CLI errors are returned with any handles already obtained so the caller can inspect and decide what to do. Close only resources you created; a done signal does not automatically close anything or complete a task. If monitoring stops, use the existing monitor tools to inspect/reconnect explicitly.
|
|
170
|
+
|
|
171
|
+
Inside Herdr (`HERDR_ENV=1`), a linked `[delegate]` is underlined. In fullscreen mode, click that badge in compact/widget rows, dashboard rows, or task detail headings to focus its agent pane. Only fully visible badges are clickable. In `/works`, select the task and press `d`; `/works-panel delegate T<number>` provides a command path, including regular terminal mode. `[Open]` / `[O Open]` are also underlined and still open Cursor. Unlinked badges are not underlined, because they are not navigation actions.
|
|
172
|
+
|
|
173
|
+
Navigation directly focuses the linked paneId through Herdr. Closed panes, missing Herdr CLI and command errors are reported. No subprocess runs during rendering. Agent tools coordinate Herdr resources; pi-loop-monitor remains the sole monitoring runtime. Outside Herdr, badges remain informational.
|
|
174
|
+
|
|
175
|
+
The compact panel no longer displays the session ID. Its underlined `[Open session]` action sits immediately after Copy in floating, widget and minimized layouts. It opens this agent's existing artifact directory under repository `var/` in Cursor, including a nested delegated session folder. If no folder exists, it creates `var/<full-sessionId>/`; multiple matching folders report an ambiguity rather than guessing. Session identity comes from Pi's context, not a pane name. Folder resolution and Cursor launch happen only on activation, never during rendering. `/works-panel open-session` is the keyboard-command alternative. The existing Open action still opens the repository. Narrow compact headers use `[-]`/`[+]` for Minimize/Maximize so all actions fit. The `/works` dashboard retains its existing title and controls.
|
|
176
|
+
|
|
76
177
|
The panel defaults to a floating top-right layout and does not take keyboard focus. A slim, separated right-hand column keeps work and task percentages aligned and visible even when names are long; the left side retains names, status icons and work task-counts. It hides on small terminals. The top border centers repository-wide Git status: `git main · S2 U3 ?1` means two staged files, three unstaged files, and one untracked file; a file with both staged and unstaged edits counts in both. A clean repository shows `git main · clean`. Long branches shorten before counts. Detached HEAD shows `@` plus the short commit. Git remains visible while minimized and adds no content row.
|
|
77
178
|
|
|
78
179
|
The asynchronous Git cache refreshes every second while a view is attached; file-changing tool results expire it sooner without blanking the last snapshot. Initial reads show `git loading…`; outside Git the border is plain, and initial failures show `git unavailable`. Later refresh failures retain the last snapshot until a successful read. Polling is read-only and stops when both the panel and dashboard are closed/off.
|
|
79
180
|
|
|
80
181
|
In fullscreen TUI mode, click Copy in its title bar to copy every work and todo as Markdown, Open to run `cursor .` in the current session directory, or Minimize to collapse the panel to a small title bar. Copy and Open remain available while minimized, and Maximize restores the rows. Cursor's command-line launcher must be on PATH; launch failures produce visible error feedback. When more rows exist than fit, the floating panel starts at the newest rows; move the mouse over it and use the wheel to scroll older or newer rows without taking focus from the editor. In regular terminal mode, open `/works` to browse and copy the complete list.
|
|
81
182
|
|
|
82
|
-
Use `/works-panel minimize`, `/works-panel maximize`, or `/works-panel open` when mouse input is unavailable. Use `/works-panel widget` for a right-aligned layout above the editor that renders every row and retains the clickable title actions, `/works-panel floating` to return to the floating layout, or `/works-panel off` to hide it.
|
|
183
|
+
Use `/works-panel minimize`, `/works-panel maximize`, `/works-panel open`, or `/works-panel open-session` when mouse input is unavailable. Use `/works-panel widget` for a right-aligned layout above the editor that renders every row and retains the clickable title actions, `/works-panel floating` to return to the floating layout, or `/works-panel off` to hide it.
|
|
83
184
|
|
|
84
185
|
Run `/works` for full details. Its top border mirrors repository-wide Git status, and its top bar includes Copy, Open, and Minimize actions. In fullscreen TUI mode, click Minimize to collapse the dashboard to a top bar showing the current work and todo totals; click Maximize to restore it. The actions also have keyboard shortcuts that work in regular terminal mode.
|
|
85
186
|
|
|
86
187
|
- `c`: copy all works and todos as Markdown
|
|
87
188
|
- `o`: open the current repository/session directory in Cursor
|
|
189
|
+
- `d`: open the selected task's linked delegated agent
|
|
88
190
|
- `m`: minimize or maximize the dashboard
|
|
89
191
|
- Fullscreen left click: activate Copy, Open, Minimize, or Maximize
|
|
90
192
|
- Configured Up/Down keys: select
|