@zhuxixi/pi-agent-board 0.11.1 → 0.12.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +4 -3
  3. package/docs/superpowers/plans/2026-10-10-attach-delete-in-place.md +832 -0
  4. package/docs/superpowers/plans/2026-10-14-issue-170-attach-reply-guard.md +771 -0
  5. package/docs/superpowers/plans/2026-10-14-issue-178-accept-registration-race.md +1257 -0
  6. package/docs/superpowers/plans/2026-10-14-issue-184-snapshot-window-contract.md +657 -0
  7. package/docs/superpowers/plans/2026-10-14-issue-185-attach-wheel-alt-screen.md +47 -0
  8. package/docs/superpowers/plans/2026-10-14-issue-187-motionless-drag.md +931 -0
  9. package/docs/superpowers/plans/2026-10-14-issue-189-mixed-input-segments.md +823 -0
  10. package/docs/superpowers/plans/2026-10-15-issue-188-x10-mouse-release.md +526 -0
  11. package/docs/superpowers/plans/2026-10-16-issue-198-attach-wheel-forward-fallback.md +32 -0
  12. package/docs/superpowers/plans/2026-10-18-attach-wheel-replay-pseudo-scrollback.md +437 -0
  13. package/docs/superpowers/specs/2026-09-09-harden-runner-architecture-design.md +6 -0
  14. package/docs/superpowers/specs/2026-10-10-attach-delete-in-place-design.md +224 -0
  15. package/docs/superpowers/specs/2026-10-14-issue-170-attach-reply-guard-design.md +190 -0
  16. package/docs/superpowers/specs/2026-10-14-issue-178-accept-registration-race-design.md +287 -0
  17. package/docs/superpowers/specs/2026-10-14-issue-184-snapshot-window-contract-design.md +288 -0
  18. package/docs/superpowers/specs/2026-10-14-issue-185-attach-wheel-alt-screen-design.md +126 -0
  19. package/docs/superpowers/specs/2026-10-14-issue-187-motionless-drag-design.md +269 -0
  20. package/docs/superpowers/specs/2026-10-14-issue-189-mixed-input-segments-design.md +369 -0
  21. package/docs/superpowers/specs/2026-10-15-issue-188-x10-mouse-release-design.md +252 -0
  22. package/docs/superpowers/specs/2026-10-16-issue-198-attach-wheel-forward-fallback-design.md +67 -0
  23. package/docs/superpowers/specs/2026-10-18-attach-wheel-replay-pseudo-scrollback-design.md +250 -0
  24. package/package.json +1 -1
  25. package/src/commands/agent-board.ts +27 -3
  26. package/src/core/attach-delete.mjs +24 -0
  27. package/src/core/pty-scroll.mjs +323 -12
  28. package/src/core/rows.mjs +19 -0
  29. package/src/core/terminal-attach-client.mjs +9 -4
  30. package/src/core/terminal-attach-protocol.mjs +5 -2
  31. package/src/core/terminal-reply-guard.mjs +200 -0
  32. package/src/ui/dashboard.ts +4 -0
  33. package/src/ui/pty-attach.ts +272 -29
package/CHANGELOG.md CHANGED
@@ -5,6 +5,32 @@ conventional commits by `scripts/release_helper.mjs`. Entries are
5
5
  forward-only: they begin with the first release after this file landed —
6
6
  for earlier history, see the git log and the pull-request list.
7
7
 
8
+ ## [0.12.0] - 2026-10-19
9
+
10
+ ### Features
11
+
12
+ - **attach**: ctrl+x in-place delete confirm — archive from the attach view (#193)
13
+
14
+ ### Fixes
15
+
16
+ - **attach**: re-assert the fullscreen mouse mode when the attach view opens (#208) (#208)
17
+ - **attach**: stop spending wheel notches on snapshot-hydration scrollback (#206)
18
+ - **attach**: decode the X10 mouse release code as release (#200) (#200)
19
+ - **attach**: classify a motion-less legacy drag by screen geometry (#202)
20
+ - **attach**: dispatch mixed input reads per segment and pass terminal reports through (issue #189) (#196)
21
+ - **attach**: forward the fullscreen wheel whenever the local viewport cannot move (#199)
22
+ - **attach**: stop terminal reply fragments leaking into the attached child's input (#194)
23
+ - **attach**: forward the fullscreen wheel to alternate-screen children (#190)
24
+ - **attach**: scroll the fullscreen wheel in the attach viewport (#183)
25
+
26
+ ### Changes
27
+
28
+ - **attach**: gate the alt-wheel scenario on the child's first frame (#204)
29
+ - accept-registration race — echo-probe waits, flake postmortems, load-independent repro (#192) (#192)
30
+ - **attach**: keep the A5 burst inside the snapshot frame window and pin the window contract (#191)
31
+
32
+ [0.12.0]: https://github.com/zhuxixi/pi-agent-board/compare/v0.11.1...v0.12.0
33
+
8
34
  ## [0.11.1] - 2026-10-13
9
35
 
10
36
  ### Fixes
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 `Ctrl+Left` to return to the board at any time (even mid-draft), or `Ctrl+\` — the unconditional escape: it detaches regardless of editor state on any terminal that forwards the raw 0x1c byte (raw, kitty, and modifyOtherKeys keyboard modes all work). `Left` detaches only while the child Pi reports an empty editor; otherwise (draft, or unknown editor state) it is forwarded to the child. `Ctrl+]` is not a detach key — it is passed through to the child Pi editor. When the host is disconnected, `Left` always exits. `Ctrl+\` caveats: on keyboard layouts where `\` sits on AltGr (e.g. German) the chord may never produce the byte — use `Ctrl+Left` there; in legacy keyboard modes `Ctrl+4` emits the same byte and also detaches; and the key is captured from the child while attached, so the child's own `Ctrl+\` binding (e.g. the vim terminal-mode prefix) is unavailable. Automatic themes also resolve correctly in attach sessions: the child's background probe (OSC 11) and color-scheme change notifications are forwarded to your real terminal, replies flow back to the child when your terminal answers, and attach re-probes the background once when it settles so the theme is right from the first frame. Set `AGENT_BOARD_FORWARD_TERMINAL_QUERIES=0` to disable this (default on); keyboard-protocol negotiation (kitty/DA) is not forwarded — it happens once at child spawn, before attach exists.
96
+ - In PTY attach mode, press `Ctrl+Left` to return to the board at any time (even mid-draft), or `Ctrl+\` — the unconditional escape: it detaches regardless of editor state on any terminal that forwards the raw 0x1c byte (raw, kitty, and modifyOtherKeys keyboard modes all work). `Left` detaches only while the child Pi reports an empty editor; otherwise (draft, or unknown editor state) it is forwarded to the child. `Ctrl+]` is not a detach key — it is passed through to the child Pi editor. When the host is disconnected, `Left` always exits. `Ctrl+\` caveats: on keyboard layouts where `\` sits on AltGr (e.g. German) the chord may never produce the byte — use `Ctrl+Left` there; in legacy keyboard modes `Ctrl+4` emits the same byte and also detaches; and the key is captured from the child while attached, so the child's own `Ctrl+\` binding (e.g. the vim terminal-mode prefix) is unavailable. Automatic themes also resolve correctly in attach sessions: the child's background probe (OSC 11) and color-scheme change notifications are forwarded to your real terminal, replies flow back to the child when your terminal answers, and attach re-probes the background once when it settles so the theme is right from the first frame. Set `AGENT_BOARD_FORWARD_TERMINAL_QUERIES=0` to disable this (default on); keyboard-protocol negotiation (kitty/DA) is not forwarded — it happens once at child spawn, before attach exists. `Ctrl+X` opens an in-place delete confirm: press `y` (or Enter) to archive the row and return to the board with the next row selected — any other key cancels and is passed through to the session. While attached, the child Pi's own `Ctrl+X` bindings (copy in `/tree` and fullscreen, clear-all in the models dialog) are captured by this gesture.
97
97
 
98
98
  ## Dashboard Workflow
99
99
 
@@ -198,7 +198,7 @@ The `e` view shows durable session evidence, including changed files, commands a
198
198
 
199
199
  ### PTY attach
200
200
 
201
- PTY attach opens the real interactive Pi session. `Ctrl+Left` detaches and returns to the board regardless of editor state, and `Ctrl+\` is the unconditional escape — a single raw ASCII byte (0x1c) that terminals forward unchanged in raw mode (kitty CSI-u and modifyOtherKeys encodings included), honored no matter what the child editor reports. `Left` detaches only while the child Pi reports an empty editor; while you are editing text — or when the child's editor state is unknown (e.g. the child extension is missing) — `Left` is forwarded to the Pi editor. A disconnected host can always be exited with `Left`. `Ctrl+]` is not a detach key — it is passed through to the child Pi editor. `Ctrl+\` caveats: on keyboard layouts where `\` sits on AltGr (e.g. German) the chord may never produce the byte — use `Ctrl+Left` there; in legacy keyboard modes `Ctrl+4` emits the same byte and also detaches; and the key is captured from the child while attached, so the child's own `Ctrl+\` binding (e.g. the vim terminal-mode prefix) is unavailable. 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.
201
+ PTY attach opens the real interactive Pi session. `Ctrl+Left` detaches and returns to the board regardless of editor state, and `Ctrl+\` is the unconditional escape — a single raw ASCII byte (0x1c) that terminals forward unchanged in raw mode (kitty CSI-u and modifyOtherKeys encodings included), honored no matter what the child editor reports. `Left` detaches only while the child Pi reports an empty editor; while you are editing text — or when the child's editor state is unknown (e.g. the child extension is missing) — `Left` is forwarded to the Pi editor. A disconnected host can always be exited with `Left`. `Ctrl+]` is not a detach key — it is passed through to the child Pi editor. `Ctrl+\` caveats: on keyboard layouts where `\` sits on AltGr (e.g. German) the chord may never produce the byte — use `Ctrl+Left` there; in legacy keyboard modes `Ctrl+4` emits the same byte and also detaches; and the key is captured from the child while attached, so the child's own `Ctrl+\` binding (e.g. the vim terminal-mode prefix) is unavailable. While attached, `PageUp`, `PageDown`, `Home`, `End`, and the mouse wheel scroll local scrollback; whenever that viewport cannot move — the session holds the alternate screen (pi's fullscreen default), or there is no local history to travel — the wheel is forwarded to the session instead, which scrolls its own transcript: the same fallback the paging keys use. The attach viewport only scrolls scrollback the hosted session actually produced: rows that a snapshot hydration had to scroll out of the local window are not history, and the wheel is forwarded to the session instead of consuming those rows. 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. `Ctrl+X` opens an in-place delete confirm: press `y` (or Enter) to archive the row and return to the board with the next row selected — any other key cancels and is passed through to the session. While attached, the child Pi's own `Ctrl+X` bindings (copy in `/tree` and fullscreen, clear-all in the models dialog) are captured by this gesture.
202
202
 
203
203
  Automatic light/dark themes work in attach sessions too. The child Pi's background-color probe (OSC 11) and its color-scheme change notification switch are forwarded to your real terminal; replies and notifications flow back to the child when your terminal answers — a terminal that never answers keeps the dark fallback. Attach also re-probes the background once when it settles, so the theme is correct from the first frame without re-selecting it in `/settings`. All of this is on by default; set `AGENT_BOARD_FORWARD_TERMINAL_QUERIES=0` to disable it. Not covered: keyboard-protocol negotiation (kitty flags / DA1) is not forwarded — the child negotiates once at spawn, before any attach client exists, and forwarding it would retune the shared real-terminal keyboard stack — so modifier-key encoding can still differ from a directly-run Pi (the modifyOtherKeys fallback applies).
204
204
 
@@ -317,7 +317,7 @@ Set these variables before starting Pi. Model-backed features fall back graceful
317
317
  | `AGENT_BOARD_FORCE_PTY` | unset; `1` forces the PTY path | Force the PTY availability path when diagnosing or controlling fallback behavior. |
318
318
  | `AGENT_BOARD_ATTACH_MOUSE` | enabled; `0`, `off`, or `false` disables | Disable attach-view mouse handling and use terminal-native selection instead. |
319
319
  | `AGENT_BOARD_ENABLE_MOUSE_SCROLL` | enabled; `0` disables | Compatibility switch to disable attach-view mouse scrolling. |
320
- | `AGENT_BOARD_WHEEL_LINES` | `1`, clamped to `1..50` | Lines scrolled per mouse-wheel event in attach view. |
320
+ | `AGENT_BOARD_WHEEL_LINES` | `1`, clamped to `1..50` | Lines scrolled per mouse-wheel notch in the attach view (regular TUI mode; in fullscreen the TUI's own wheel accelerator decides the line count). |
321
321
  | `AGENT_BOARD_MAX_WARM_HOSTS` | `4`, clamped to `0..50` | Maximum number of idle PTY hosts retained for faster attach. |
322
322
  | `AGENT_BOARD_WARM_HOST_TTL_MS` | `600000` (10 minutes); `0` disables TTL eviction | How long an idle warm host may remain before it is evicted. |
323
323
  | `AGENT_BOARD_ATTACH_NATIVE_PASTE` | enabled; `0` disables | Disable X11 PRIMARY selection copy and middle-click paste integration. |
@@ -325,6 +325,7 @@ Set these variables before starting Pi. Model-backed features fall back graceful
325
325
  | `AGENT_BOARD_FORWARD_IMAGES` | enabled; `0` disables | Disable terminal image/file passthrough forwarding from an attached session. |
326
326
  | `AGENT_BOARD_IME_FIX` | enabled; `0` disables | Disable the attach-view IME cursor coalescer if your terminal has compatibility problems. |
327
327
  | `AGENT_BOARD_TERMINAL_SNAPSHOT` | enabled; `0` forces legacy | Force the pre-phase-4 attach path (screen.log replay + jiggle); escape hatch / rollback switch for the snapshot+subscribe attach protocol. |
328
+ | `AGENT_BOARD_REPLY_GUARD` | enabled; `0`, `off`, or `false` disables | Discard terminal reply fragments (device attributes, kitty flags, cell size, DCS) that pi-tui delivers as input, and forward color replies whole. While a reply head is open, up to 64 bytes / 250ms of following input is absorbed. |
328
329
 
329
330
  `AGENT_BOARD_TERMINAL_SNAPSHOT=0` routes attach onto the legacy fallback family: the screen.log replay tail plus the shrink-and-hold jiggle redraw. These paths exist only for pre-protocol runners and as a rollback hatch — they are not part of the snapshot+subscribe protocol path (issue #91 phase 4). They will be retired once the installed runner fleet is on the snapshot protocol baseline (detectable on the wire via hello protocol fields).
330
331