@zhuxixi/pi-agent-board 0.5.2 → 0.6.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.
- package/CHANGELOG.md +44 -0
- package/README.md +43 -5
- package/docs/superpowers/plans/2026-09-03-code-refs-pr-backlink-narrow.md +551 -0
- package/docs/superpowers/plans/2026-09-04-evidence-outputpreview.md +209 -0
- package/docs/superpowers/plans/2026-09-04-warm-host-reclaim.md +796 -0
- package/docs/superpowers/plans/2026-09-05-issue-13-drainnextfollowup-pty-probe.md +114 -0
- package/docs/superpowers/plans/2026-09-05-issue-38-windows-wezterm-ime-cursor.md +73 -0
- package/docs/superpowers/plans/2026-09-05-issue-39-truncate-codepoint-boundary.md +143 -0
- package/docs/superpowers/plans/2026-09-05-issue-61-mention-fallback-guards.md +226 -0
- package/docs/superpowers/plans/2026-09-05-issue-63-flaky-manual-completion.md +87 -0
- package/docs/superpowers/plans/2026-09-05-issue-64-changelog-release-helper.md +53 -0
- package/docs/superpowers/plans/2026-09-05-pty-host-stacking-sock-race.md +731 -0
- package/docs/superpowers/plans/2026-09-08-attach-ctrl-left-detach.md +30 -0
- package/docs/superpowers/plans/2026-09-08-dashboard-shrink-repaint.md +68 -0
- package/docs/superpowers/plans/2026-09-08-legacy-stale-host-recovery.md +125 -0
- package/docs/superpowers/plans/2026-09-08-spawn-async-error-swallow.md +56 -0
- package/docs/superpowers/plans/2026-09-08-stale-model-attach-guard.md +96 -0
- package/docs/superpowers/specs/2026-08-29-code-refs-badges-design.md +1 -1
- package/docs/superpowers/specs/2026-09-03-code-refs-pr-backlink-narrow-design.md +92 -0
- package/docs/superpowers/specs/2026-09-04-evidence-outputpreview-design.md +50 -0
- package/docs/superpowers/specs/2026-09-04-warm-host-reclaim-design.md +106 -0
- package/docs/superpowers/specs/2026-09-05-issue-13-drainnextfollowup-pty-probe-design.md +64 -0
- package/docs/superpowers/specs/2026-09-05-issue-38-windows-wezterm-ime-design.md +48 -0
- package/docs/superpowers/specs/2026-09-05-issue-39-truncate-codepoint-boundary-design.md +64 -0
- package/docs/superpowers/specs/2026-09-05-issue-61-mention-fallback-design.md +71 -0
- package/docs/superpowers/specs/2026-09-05-issue-63-flaky-manual-completion-design.md +49 -0
- package/docs/superpowers/specs/2026-09-05-issue-64-changelog-helper-design.md +76 -0
- package/docs/superpowers/specs/2026-09-05-pty-host-stacking-sock-race-design.md +510 -0
- package/docs/superpowers/specs/2026-09-08-attach-ctrl-left-detach-design.md +58 -0
- package/docs/superpowers/specs/2026-09-08-dashboard-shrink-repaint-design.md +52 -0
- package/docs/superpowers/specs/2026-09-08-legacy-stale-host-recovery-design.md +87 -0
- package/docs/superpowers/specs/2026-09-08-spawn-async-error-swallow-design.md +56 -0
- package/docs/superpowers/specs/2026-09-08-stale-model-attach-guard-design.md +79 -0
- package/package.json +83 -81
- package/runner/job-runner.mjs +2 -2
- package/runner/pty-runner.mjs +626 -3
- package/runner/state-runner.mjs +3 -0
- package/runner/title-runner.mjs +1 -1
- package/scripts/release_helper.mjs +277 -0
- package/src/commands/agent-board.ts +47 -35
- package/src/commands/attach-decision.mjs +66 -0
- package/src/commands/attach-flow.ts +45 -39
- package/src/commands/bg.ts +9 -0
- package/src/core/code-refs.mjs +85 -33
- package/src/core/evidence.mjs +2 -2
- package/src/core/heuristics.mjs +75 -2
- package/src/core/host-coordination.mjs +182 -0
- package/src/core/host-crash.mjs +43 -3
- package/src/core/host-probe.mjs +196 -0
- package/src/core/launch-options.mjs +17 -0
- package/src/core/launch.mjs +35 -35
- package/src/core/locks.mjs +196 -1
- package/src/core/paths.mjs +24 -0
- package/src/core/store.mjs +164 -5
- package/src/core/types.mjs +17 -1
- package/src/core/warm-host-sweeper.mjs +150 -0
- package/src/index.ts +40 -3
- package/src/runtime/service.mjs +1071 -108
- package/src/ui/dashboard-decisions.mjs +55 -0
- package/src/ui/dashboard.ts +67 -13
- package/src/ui/pty-attach.ts +23 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here, generated from
|
|
4
|
+
conventional commits by `scripts/release_helper.mjs`. Entries are
|
|
5
|
+
forward-only: they begin with the first release after this file landed —
|
|
6
|
+
for earlier history, see the git log and the pull-request list.
|
|
7
|
+
|
|
8
|
+
## [0.6.1] - 2026-09-08
|
|
9
|
+
|
|
10
|
+
### Fixes
|
|
11
|
+
|
|
12
|
+
- add an unconditional Ctrl+Left detach chord to the attach surface (issue #89) (#97)
|
|
13
|
+
- force full-clear repaint on dashboard mount and content shrink (issue #88) (#96)
|
|
14
|
+
- fail host launch fast on a provably stale defaultModel + exit attribution (issue #90) (#94)
|
|
15
|
+
- finalize provably-dead legacy hosts in attach resolver and self-heal (issue #87) (#93)
|
|
16
|
+
- swallow async spawn errors in detached runner launches (issue #86) (#92)
|
|
17
|
+
|
|
18
|
+
[0.6.1]: https://github.com/zhuxixi/pi-agent-board/compare/v0.6.0...v0.6.1
|
|
19
|
+
|
|
20
|
+
## [0.6.0] - 2026-09-07
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
- conventional-commit driven CHANGELOG via release_helper.mjs (issue #64) (#83)
|
|
25
|
+
|
|
26
|
+
### Fixes
|
|
27
|
+
|
|
28
|
+
- pty host stacking and control.sock cross-deletion via per-instance ownership protocol (issue #70) (#84)
|
|
29
|
+
- guard mention fallback against placeholders, code spans, and pr-context (issue #61) (#82)
|
|
30
|
+
- truncate never splits surrogate pairs or emits lone surrogates (issue #39) (#81)
|
|
31
|
+
- extract evidence outputPreview from AgentToolResult content (issue #41) (#77)
|
|
32
|
+
- reclaim idle warm PTY hosts via periodic sweep + lifecycle cleanup (issue #75) (#76)
|
|
33
|
+
- narrow code-refs PR back-link extraction by evidence context (issue #65) (#73)
|
|
34
|
+
|
|
35
|
+
### Performance
|
|
36
|
+
|
|
37
|
+
- use cached PTY probe on the reconcile drain path (issue #13) (#79)
|
|
38
|
+
|
|
39
|
+
### Changes
|
|
40
|
+
|
|
41
|
+
- Windows WezTerm IME needs a visible hardware cursor (issue #38) (#80)
|
|
42
|
+
- poll markCompleted to success instead of racing the persist window (issue #63) (#78)
|
|
43
|
+
|
|
44
|
+
[0.6.0]: https://github.com/zhuxixi/pi-agent-board/compare/v0.5.2...v0.6.0
|
package/README.md
CHANGED
|
@@ -93,7 +93,7 @@ From the board:
|
|
|
93
93
|
- In Peek, press `r` to reply without attaching.
|
|
94
94
|
- Press `v` for a read-only transcript, or `e` for evidence and diagnostics.
|
|
95
95
|
- Press `Enter`, `Right`, or `>` to attach to the real Pi session.
|
|
96
|
-
- In PTY attach mode, press `Left` on an empty child input line to return to the board. `Ctrl+]` is not a detach key — it is passed through to the child Pi editor. When the host is disconnected, `Left` always exits.
|
|
96
|
+
- In PTY attach mode, press `Left` on an empty child input line to return to the board, or `Ctrl+Left` at any time (even mid-draft). `Ctrl+]` is not a detach key — it is passed through to the child Pi editor. When the host is disconnected, `Left` always exits.
|
|
97
97
|
|
|
98
98
|
## Dashboard Workflow
|
|
99
99
|
|
|
@@ -192,7 +192,7 @@ The `e` view shows durable session evidence, including changed files, commands a
|
|
|
192
192
|
|
|
193
193
|
### PTY attach
|
|
194
194
|
|
|
195
|
-
PTY attach opens the real interactive Pi session. On an empty child input line, use `Left` to detach and return to the board; while you are editing text, `Left` is forwarded to the Pi editor, and a disconnected host can always be exited with `Left`. `Ctrl+]` is not a detach key — it is passed through to the child Pi editor. While attached, `PageUp`, `PageDown`, `Home`, `End`, and the mouse wheel scroll local scrollback. Mouse drag or double-click selects and copies text, clicks open detected links, and middle-click paste is available on systems with the required X11 tooling.
|
|
195
|
+
PTY attach opens the real interactive Pi session. On an empty child input line, use `Left` to detach and return to the board; while you are editing text, `Left` is forwarded to the Pi editor, `Ctrl+Left` detaches regardless of editor state, and a disconnected host can always be exited with `Left`. `Ctrl+]` is not a detach key — it is passed through to the child Pi editor. While attached, `PageUp`, `PageDown`, `Home`, `End`, and the mouse wheel scroll local scrollback. Mouse drag or double-click selects and copies text, clicks open detected links, and middle-click paste is available on systems with the required X11 tooling.
|
|
196
196
|
|
|
197
197
|
The attach surface can forward terminal clipboard and image/file passthrough sequences. These behaviors can be disabled individually in [Configuration](#configuration). Cold hosts may briefly show a loading/reconnect surface while their PTY becomes ready.
|
|
198
198
|
|
|
@@ -236,6 +236,26 @@ steer:awaiting-approval
|
|
|
236
236
|
|
|
237
237
|
Evidence is collected locally from session events. Agent Board can extract issue and pull-request references from that evidence and show badges such as `#40` or `▸#45` on rows; Peek includes the provider, confidence, source, and URL when available. Built-in GitHub/GitLab-style providers are available, and an optional per-store `providers.json` can extend the provider rules. The `AGENT_BOARD_CODE_REFS=off` setting disables extraction.
|
|
238
238
|
|
|
239
|
+
For internal code platforms (non-github/gitlab hosts) or custom CLIs, add a per-store `providers.json` so claim/action rules exist and sessions stop depending on the low-confidence mention fallback. Example — an internal CLI (`acli`) with claim-strength issue rules:
|
|
240
|
+
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"providers": [
|
|
244
|
+
{
|
|
245
|
+
"name": "acode",
|
|
246
|
+
"hosts": ["acode.internal.example.com"],
|
|
247
|
+
"rules": [
|
|
248
|
+
{ "pattern": "acli\\s+issue\\s+update\\s+#?(\\d+)(?=[\\s\\S]*--assignee)", "kind": "issue", "strength": "claim" },
|
|
249
|
+
{ "pattern": "acli\\s+issue\\s+(?:note|comment|close)\\s+#?(\\d+)", "kind": "issue", "strength": "action" },
|
|
250
|
+
{ "pattern": "acli\\s+issue\\s+(?:show|view)\\s+#?(\\d+)", "kind": "issue", "strength": "view" }
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
`hosts` matches the repo's remote host; rules follow the same `pattern`/`kind`/`strength` shape as the built-in `gh`/`glab` tables (`strength`: `claim` > `action` > `view`), and the `#N` capture group supplies the number. Validation errors from a broken file surface in the diagnostics panel and never break extraction — an invalid file is simply ignored.
|
|
258
|
+
|
|
239
259
|
## Attach and Fallback Behavior
|
|
240
260
|
|
|
241
261
|
When PTY support is healthy, Agent Board uses an interactive PTY host for attach and start-and-attach. If PTY support is unavailable, eligible managed sessions can still run in the background through the JSON runner; start-and-attach falls back to background launch with a warning. Adopted external foreground sessions require PTY to continue safely. Press `!` in the dashboard for diagnosis and repair hints.
|
|
@@ -319,6 +339,20 @@ Press `!` in the dashboard to open the diagnostic panel and follow its repair hi
|
|
|
319
339
|
|
|
320
340
|
A cold PTY host may briefly show a loading or reconnecting surface while it starts. Check the PTY status in the dashboard with `!`; stale hosts are diagnosed separately from active task workers. If the host never becomes healthy, repair `node-pty` or use background mode for eligible managed sessions.
|
|
321
341
|
|
|
342
|
+
### IME candidate window is stuck at the window edge (Windows WezTerm)
|
|
343
|
+
|
|
344
|
+
On Windows WezTerm with a WSL2 backend, the IME candidate window may stay pinned to the right edge instead of following the text cursor in an attached session. Windows WezTerm only tracks the IME candidate position from the visible hardware cursor, and Pi hides the hardware cursor by default — the block cursor you see in the editor is drawn content, not the hardware cursor. Linux terminals are not affected.
|
|
345
|
+
|
|
346
|
+
Make the hardware cursor visible, either way:
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
export PI_HARDWARE_CURSOR=1 # machine-local, e.g. ~/.zshrc.local
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
or set `"showHardwareCursor": true` in Pi's `settings.json` (syncs across machines if the config is version-controlled; harmless on Linux).
|
|
353
|
+
|
|
354
|
+
Trade-off: the real terminal cursor becomes visible inside the TUI. This is cosmetic only.
|
|
355
|
+
|
|
322
356
|
### Start & attach falls back to background
|
|
323
357
|
|
|
324
358
|
Start & attach requires PTY support. When PTY is unavailable, the task is still dispatched in the background and the dashboard displays a warning. Repair PTY and retry attach from the normal `/agent-board` command path.
|
|
@@ -346,15 +380,19 @@ npm run verify
|
|
|
346
380
|
|
|
347
381
|
## Publishing
|
|
348
382
|
|
|
349
|
-
Before publishing a release, verify the package,
|
|
383
|
+
Before publishing a release, verify the package, generate the changelog, then bump, and publish — the changelog must be generated **before** `npm version`, because `npm version` commits and tags the bump, which would empty the generation range:
|
|
350
384
|
|
|
351
385
|
```bash
|
|
352
386
|
npm run verify
|
|
353
|
-
npm version patch
|
|
387
|
+
npm run changelog -- --dry-run # preview the next section (version = current + patch)
|
|
388
|
+
npm run changelog -- patch # inserts the section into CHANGELOG.md
|
|
389
|
+
node scripts/release_helper.mjs verify # must exit 0: no functional PR missing from the top section
|
|
390
|
+
git add CHANGELOG.md && git commit -m "docs(changelog): <version>"
|
|
391
|
+
npm version patch # bumps package.json, commits, and tags vX.Y.Z
|
|
354
392
|
npm publish
|
|
355
393
|
```
|
|
356
394
|
|
|
357
|
-
Use `
|
|
395
|
+
Use `minor`/`major` in both the changelog and `npm version` steps when appropriate. The changelog is generated from conventional commits since the last `vX.Y.Z` tag (`scripts/release_helper.mjs`, ported from the jfox release flow); review the preview before committing. The `verify` step guards against PRs merged after the changelog was generated — rerun it after any late merge and, after removing the stale top section, re-run `npm run changelog -- <bump>` if it reports missing PRs (apply refuses when the section already exists — remove the stale section first). Release notes for the GitHub Release are the top CHANGELOG section. After publishing, users install the scoped package with:
|
|
358
396
|
|
|
359
397
|
```bash
|
|
360
398
|
pi install npm:@zhuxixi/pi-agent-board
|