@huseynsnmz/pi-suite 0.0.0-stage → 0.2.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/CHANGELOG.md +28 -0
- package/LICENSE +21 -0
- package/README.md +88 -2
- package/SECURITY.md +5 -0
- package/package.json +112 -4
- package/packages/board/CHANGELOG.md +340 -0
- package/packages/board/CONTRIBUTING.md +7 -0
- package/packages/board/LICENSE +21 -0
- package/packages/board/README.md +88 -0
- package/packages/board/SECURITY.md +19 -0
- package/packages/board/docs/how-it-works.md +31 -0
- package/packages/board/docs/reference.md +278 -0
- package/packages/board/package.json +81 -0
- package/packages/board/runner/job-runner-legacy.mjs +68 -0
- package/packages/board/runner/job-runner.mjs +834 -0
- package/packages/board/runner/pty-runner-legacy.mjs +50 -0
- package/packages/board/runner/pty-runner.mjs +2175 -0
- package/packages/board/runner/state-coordinator.mjs +673 -0
- package/packages/board/runner/state-runner.mjs +203 -0
- package/packages/board/runner/title-runner.mjs +80 -0
- package/packages/board/src/commands/agent-board.ts +394 -0
- package/packages/board/src/commands/attach-decision.mjs +66 -0
- package/packages/board/src/commands/attach-flow.ts +251 -0
- package/packages/board/src/commands/bg.ts +103 -0
- package/packages/board/src/commands/board-model.ts +21 -0
- package/packages/board/src/core/atomic.mjs +184 -0
- package/packages/board/src/core/attach-delete.mjs +24 -0
- package/packages/board/src/core/attach-frame-proof.mjs +870 -0
- package/packages/board/src/core/attach-frame-reporter.mjs +648 -0
- package/packages/board/src/core/attach-frame-stream.mjs +266 -0
- package/packages/board/src/core/attach-view-proof.mjs +709 -0
- package/packages/board/src/core/auto-state.mjs +377 -0
- package/packages/board/src/core/background-runs.mjs +273 -0
- package/packages/board/src/core/code-refs-store.mjs +315 -0
- package/packages/board/src/core/code-refs.mjs +913 -0
- package/packages/board/src/core/config.mjs +77 -0
- package/packages/board/src/core/control-protocol.mjs +482 -0
- package/packages/board/src/core/coordinator-client.mjs +633 -0
- package/packages/board/src/core/coordinator-journal.mjs +282 -0
- package/packages/board/src/core/coordinator-protocol.mjs +14 -0
- package/packages/board/src/core/cwd-stats.mjs +114 -0
- package/packages/board/src/core/dashboard-render.mjs +10 -0
- package/packages/board/src/core/derive.mjs +117 -0
- package/packages/board/src/core/diagnostics.mjs +133 -0
- package/packages/board/src/core/double-press.mjs +26 -0
- package/packages/board/src/core/editor-state-reporter.mjs +112 -0
- package/packages/board/src/core/events.mjs +286 -0
- package/packages/board/src/core/evidence.mjs +245 -0
- package/packages/board/src/core/follow-up-queue.mjs +211 -0
- package/packages/board/src/core/foreground-preview-cache.mjs +117 -0
- package/packages/board/src/core/foreground-projection-cache.mjs +99 -0
- package/packages/board/src/core/frame-witness-update.mjs +35 -0
- package/packages/board/src/core/heuristics.mjs +313 -0
- package/packages/board/src/core/hold-input.mjs +27 -0
- package/packages/board/src/core/host-coordination.mjs +300 -0
- package/packages/board/src/core/host-crash.mjs +79 -0
- package/packages/board/src/core/host-probe.mjs +207 -0
- package/packages/board/src/core/host-protocol.mjs +73 -0
- package/packages/board/src/core/ids.mjs +35 -0
- package/packages/board/src/core/ime-cursor-coalesce.mjs +193 -0
- package/packages/board/src/core/invocation.mjs +43 -0
- package/packages/board/src/core/launch-options.mjs +418 -0
- package/packages/board/src/core/launch.mjs +157 -0
- package/packages/board/src/core/load-config.mjs +4 -0
- package/packages/board/src/core/locks.mjs +530 -0
- package/packages/board/src/core/paths.mjs +183 -0
- package/packages/board/src/core/pid.mjs +75 -0
- package/packages/board/src/core/prewarm-schedule.mjs +41 -0
- package/packages/board/src/core/process-identity-probe.mjs +228 -0
- package/packages/board/src/core/prompt-transport.mjs +13 -0
- package/packages/board/src/core/pty-attach-jiggle-controller.mjs +356 -0
- package/packages/board/src/core/pty-attach-jiggle-retry.mjs +109 -0
- package/packages/board/src/core/pty-attach-reconnect.mjs +61 -0
- package/packages/board/src/core/pty-attach-render.mjs +229 -0
- package/packages/board/src/core/pty-links.mjs +81 -0
- package/packages/board/src/core/pty-scroll.mjs +522 -0
- package/packages/board/src/core/pty-support.mjs +327 -0
- package/packages/board/src/core/repo.mjs +103 -0
- package/packages/board/src/core/rows.mjs +414 -0
- package/packages/board/src/core/screen-log-gc.mjs +198 -0
- package/packages/board/src/core/screen-log.mjs +160 -0
- package/packages/board/src/core/session-view.mjs +174 -0
- package/packages/board/src/core/slash-commands.mjs +52 -0
- package/packages/board/src/core/state-commands.mjs +757 -0
- package/packages/board/src/core/status-consistency.mjs +98 -0
- package/packages/board/src/core/steering-prompts.mjs +34 -0
- package/packages/board/src/core/steering.mjs +133 -0
- package/packages/board/src/core/stop-latch.mjs +41 -0
- package/packages/board/src/core/store.mjs +523 -0
- package/packages/board/src/core/suspend.mjs +36 -0
- package/packages/board/src/core/terminal-attach-client.mjs +981 -0
- package/packages/board/src/core/terminal-attach-protocol.mjs +460 -0
- package/packages/board/src/core/terminal-model.mjs +222 -0
- package/packages/board/src/core/terminal-query-sequences.mjs +239 -0
- package/packages/board/src/core/terminal-reply-guard.mjs +222 -0
- package/packages/board/src/core/terminal-snapshot.mjs +440 -0
- package/packages/board/src/core/test-knobs.mjs +28 -0
- package/packages/board/src/core/title.mjs +43 -0
- package/packages/board/src/core/types.mjs +414 -0
- package/packages/board/src/core/warm-host-sweeper.mjs +168 -0
- package/packages/board/src/core/worktree.mjs +65 -0
- package/packages/board/src/index.ts +303 -0
- package/packages/board/src/runtime/service.mjs +3222 -0
- package/packages/board/src/ui/chrome.ts +20 -0
- package/packages/board/src/ui/dashboard-decisions.mjs +55 -0
- package/packages/board/src/ui/dashboard-evidence.mjs +85 -0
- package/packages/board/src/ui/dashboard.ts +2237 -0
- package/packages/board/src/ui/double-left.ts +30 -0
- package/packages/board/src/ui/external-editor.ts +25 -0
- package/packages/board/src/ui/focus.ts +32 -0
- package/packages/board/src/ui/pty-attach.ts +3184 -0
- package/packages/board/src/ui/waiting.ts +30 -0
- package/packages/commands/LICENSE +21 -0
- package/packages/commands/README.md +19 -0
- package/packages/commands/package.json +22 -0
- package/packages/commands/src/index.ts +43 -0
- package/packages/commands/src/security-review.ts +109 -0
- package/packages/frame/CHANGELOG.md +113 -0
- package/packages/frame/CONTRIBUTING.md +7 -0
- package/packages/frame/LICENSE +22 -0
- package/packages/frame/README.md +105 -0
- package/packages/frame/SECURITY.md +16 -0
- package/packages/frame/docs/how-it-works.md +53 -0
- package/packages/frame/docs/reference.md +78 -0
- package/packages/frame/package.json +72 -0
- package/packages/frame/src/data/git.ts +90 -0
- package/packages/frame/src/data/github.ts +140 -0
- package/packages/frame/src/data/gitlab.ts +63 -0
- package/packages/frame/src/data/mode.ts +49 -0
- package/packages/frame/src/data/past-prompts.ts +57 -0
- package/packages/frame/src/data/runner.ts +32 -0
- package/packages/frame/src/data/snapshot.ts +223 -0
- package/packages/frame/src/data/start-notes.ts +104 -0
- package/packages/frame/src/data/telemetry.ts +337 -0
- package/packages/frame/src/data/todos.ts +162 -0
- package/packages/frame/src/data/totals.ts +94 -0
- package/packages/frame/src/data/visits.ts +45 -0
- package/packages/frame/src/index.ts +696 -0
- package/packages/frame/src/kit/LICENSE +21 -0
- package/packages/frame/src/kit/app/attribution.ts +30 -0
- package/packages/frame/src/kit/app/builder.ts +186 -0
- package/packages/frame/src/kit/app/claim.ts +27 -0
- package/packages/frame/src/kit/app/feature.ts +91 -0
- package/packages/frame/src/kit/app/host.ts +214 -0
- package/packages/frame/src/kit/app/renderers.ts +62 -0
- package/packages/frame/src/kit/app/scope.ts +125 -0
- package/packages/frame/src/kit/board/model.ts +337 -0
- package/packages/frame/src/kit/contract.ts +79 -0
- package/packages/frame/src/kit/contracts/accounts.ts +33 -0
- package/packages/frame/src/kit/contracts/ask.ts +120 -0
- package/packages/frame/src/kit/contracts/board.ts +6 -0
- package/packages/frame/src/kit/contracts/by.ts +22 -0
- package/packages/frame/src/kit/contracts/calls.ts +46 -0
- package/packages/frame/src/kit/contracts/events.ts +89 -0
- package/packages/frame/src/kit/contracts/mode.ts +26 -0
- package/packages/frame/src/kit/contracts/names.ts +12 -0
- package/packages/frame/src/kit/contracts/peers.ts +77 -0
- package/packages/frame/src/kit/contracts/prompts.ts +8 -0
- package/packages/frame/src/kit/contracts/screen.ts +75 -0
- package/packages/frame/src/kit/contracts/skills.ts +81 -0
- package/packages/frame/src/kit/contracts/sources.ts +81 -0
- package/packages/frame/src/kit/contracts/views.ts +42 -0
- package/packages/frame/src/kit/control.ts +59 -0
- package/packages/frame/src/kit/dark-theme.ts +41 -0
- package/packages/frame/src/kit/decode.ts +210 -0
- package/packages/frame/src/kit/events/log.ts +313 -0
- package/packages/frame/src/kit/format.ts +25 -0
- package/packages/frame/src/kit/host.ts +4 -0
- package/packages/frame/src/kit/index.ts +25 -0
- package/packages/frame/src/kit/legacy-tasks.ts +39 -0
- package/packages/frame/src/kit/overlay-images.ts +36 -0
- package/packages/frame/src/kit/paths.ts +16 -0
- package/packages/frame/src/kit/screen/client.ts +74 -0
- package/packages/frame/src/kit/screen/feature.ts +64 -0
- package/packages/frame/src/kit/screen/model.ts +182 -0
- package/packages/frame/src/kit/screen/view.ts +838 -0
- package/packages/frame/src/kit/settings/files.ts +90 -0
- package/packages/frame/src/kit/settings/setting.ts +57 -0
- package/packages/frame/src/kit/settings/store.ts +192 -0
- package/packages/frame/src/kit/sources/file.ts +129 -0
- package/packages/frame/src/kit/sources/follow.ts +155 -0
- package/packages/frame/src/kit/testing.ts +260 -0
- package/packages/frame/src/kit/totals.ts +72 -0
- package/packages/frame/src/kit/ui/entry.ts +75 -0
- package/packages/frame/src/kit/ui/frame.ts +212 -0
- package/packages/frame/src/kit/ui/glyphs.ts +132 -0
- package/packages/frame/src/kit/ui/scroll.ts +14 -0
- package/packages/frame/src/render/diff.ts +157 -0
- package/packages/frame/src/render/fit.ts +86 -0
- package/packages/frame/src/render/format.ts +108 -0
- package/packages/frame/src/render/frame.ts +106 -0
- package/packages/frame/src/render/glyphs.ts +189 -0
- package/packages/frame/src/render/keys.ts +43 -0
- package/packages/frame/src/render/lead.ts +37 -0
- package/packages/frame/src/render/paint.ts +135 -0
- package/packages/frame/src/render/safe.ts +19 -0
- package/packages/frame/src/render/segments.ts +735 -0
- package/packages/frame/src/render/streaming.ts +223 -0
- package/packages/frame/src/render/timing.ts +106 -0
- package/packages/frame/src/render/tools.ts +167 -0
- package/packages/frame/src/settings.ts +105 -0
- package/packages/frame/src/ui/editor.ts +272 -0
- package/packages/frame/src/ui/effort.ts +36 -0
- package/packages/frame/src/ui/footer.ts +165 -0
- package/packages/frame/src/ui/header.ts +362 -0
- package/packages/frame/src/ui/history-search.ts +23 -0
- package/packages/frame/src/ui/interrupt.ts +21 -0
- package/packages/frame/src/ui/outputs.ts +170 -0
- package/packages/frame/src/ui/pi-entries.ts +298 -0
- package/packages/frame/src/ui/previews.ts +72 -0
- package/packages/frame/src/ui/queue.ts +75 -0
- package/packages/frame/src/ui/screen.ts +59 -0
- package/packages/frame/src/ui/timings.ts +48 -0
- package/packages/frame/src/ui/todos.ts +205 -0
- package/packages/frame/src/ui/tool-frame.ts +595 -0
- package/packages/frame/src/ui/working.ts +25 -0
- package/packages/frame/src/view/state.ts +97 -0
- package/packages/frame/src/view/transcript.ts +175 -0
- package/packages/frame/src/view/view.ts +162 -0
- package/packages/memory/CONTRIBUTING.md +7 -0
- package/packages/memory/LICENSE +21 -0
- package/packages/memory/README.md +44 -0
- package/packages/memory/SECURITY.md +20 -0
- package/packages/memory/package.json +55 -0
- package/packages/memory/skills/review-memory/SKILL.md +48 -0
- package/packages/memory/src/index.ts +163 -0
- package/packages/memory/src/prompt.ts +25 -0
- package/packages/memory/src/review.ts +150 -0
- package/packages/memory/src/secrets.ts +22 -0
- package/packages/memory/src/store.ts +173 -0
- package/packages/modes/CHANGELOG.md +104 -0
- package/packages/modes/CONTRIBUTING.md +7 -0
- package/packages/modes/LICENSE +21 -0
- package/packages/modes/README.md +174 -0
- package/packages/modes/SECURITY.md +17 -0
- package/packages/modes/package.json +55 -0
- package/packages/modes/skills/review-permissions/SKILL.md +54 -0
- package/packages/modes/src/bash.ts +218 -0
- package/packages/modes/src/deny-off.ts +62 -0
- package/packages/modes/src/git-safety.ts +72 -0
- package/packages/modes/src/index.ts +338 -0
- package/packages/modes/src/interview.ts +206 -0
- package/packages/modes/src/judge-gate.ts +113 -0
- package/packages/modes/src/modes.ts +121 -0
- package/packages/modes/src/review/apply.mjs +156 -0
- package/packages/modes/src/review/collect.mjs +208 -0
- package/packages/modes/src/review/tools.ts +71 -0
- package/packages/modes/src/sandbox.ts +37 -0
- package/packages/router/CHANGELOG.md +8 -0
- package/packages/router/LICENSE +21 -0
- package/packages/router/README.md +90 -0
- package/packages/router/package.json +51 -0
- package/packages/router/src/config.ts +65 -0
- package/packages/router/src/index.ts +172 -0
- package/packages/router/src/judge.ts +51 -0
- package/packages/router/src/route.ts +67 -0
- package/packages/web/CHANGELOG.md +36 -0
- package/packages/web/LICENSE +21 -0
- package/packages/web/README.md +87 -0
- package/packages/web/SECURITY.md +13 -0
- package/packages/web/package.json +59 -0
- package/packages/web/src/config.ts +109 -0
- package/packages/web/src/dnsfilter.ts +97 -0
- package/packages/web/src/extract.ts +65 -0
- package/packages/web/src/index.ts +217 -0
- package/packages/web/src/markdown.ts +122 -0
- package/packages/web/src/net.ts +109 -0
- package/packages/web/src/reader.ts +73 -0
- package/packages/web/src/sanitize.ts +50 -0
- package/packages/web/src/search.ts +76 -0
- package/packages/web/src/secrets.ts +22 -0
- package/packages/web/src/validate.ts +186 -0
- package/src/index.ts +156 -0
- package/src/settings.ts +79 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# pi-board
|
|
2
|
+
|
|
3
|
+
Part of [pi-suite](../../README.md). Turn it off with `/suite off board`.
|
|
4
|
+
|
|
5
|
+
A board for [Pi](https://pi.dev)'s background sessions: start a task and keep working, see which sessions need you, peek at them, reply, and attach when you want the whole conversation. The keys follow Claude Code's agent view.
|
|
6
|
+
|
|
7
|
+
It started as a fork of [`@zhuxixi/pi-agent-board`](https://github.com/zhuxixi/pi-agent-board) 0.13.1, so the design and most of the code are theirs, under the MIT license.
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
╭─ π-board 0.16.0 ────────────────────────────── node-pty healthy · hosts:2 ─╮
|
|
11
|
+
│ 1 needs answer · 1 running · •1 unread · 0 done │
|
|
12
|
+
╰────────────────────────────────────────────────────────────────────────────╯
|
|
13
|
+
◇ NEEDS ANSWER 1 ─────────────────────────────────────────────────────────────
|
|
14
|
+
›◆ fix the login test my-app Waiting on a prompt 2m
|
|
15
|
+
● RUNNING 1 ──────────────────────────────────────────────────────────────────
|
|
16
|
+
● update the changelog my-app Running git log 12s
|
|
17
|
+
╭─ new session ──────────────────────────────────────────────────────────────╮
|
|
18
|
+
│ › type a task to start a session │
|
|
19
|
+
╰─ enter resume space peek ctrl+f filter ctrl+x stop ? keys ─────────╯
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Quick start
|
|
23
|
+
|
|
24
|
+
Requires Pi 1.5 or newer.
|
|
25
|
+
|
|
26
|
+
1. Install it:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pi install npm:@huseynsnmz/pi-suite@0.1.0
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
2. Restart Pi, and press `Left` twice on an empty prompt, or run `/agent-board`.
|
|
33
|
+
3. Type a task and press `Enter`. It starts right away in the selected session's folder, shown on the input's title, with this session's model. With no sessions, that's this folder.
|
|
34
|
+
|
|
35
|
+
Your current session becomes a row too, even with no messages yet. `Esc`, or `Enter` on its row, brings you back to it.
|
|
36
|
+
|
|
37
|
+
Installing it runs `node-pty`'s install script, which sets up its terminal support.
|
|
38
|
+
|
|
39
|
+
## Keys
|
|
40
|
+
|
|
41
|
+
| Key | Action |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| Any text | Start writing a task |
|
|
44
|
+
| `Enter` | Start the task, or attach to the selected session |
|
|
45
|
+
| `Left` / `Right` | Attach to the selected session |
|
|
46
|
+
| `Ctrl+\` | Back to the board from a session. `Left` also works on an empty prompt |
|
|
47
|
+
| `Space` | Peek at a session, and type there to reply |
|
|
48
|
+
| `/` | Pi's commands, as at the prompt. Templates and skills start a session |
|
|
49
|
+
| `Ctrl+F` | Filter |
|
|
50
|
+
| `Ctrl+X` | Stop a session, and press again within 2 seconds to delete it |
|
|
51
|
+
| `Ctrl+N` | While typing, choose the folder, model and thinking level |
|
|
52
|
+
| `!` | `node-pty` diagnostics |
|
|
53
|
+
| `?` | All the keys |
|
|
54
|
+
| `Esc` | Clear the input, or leave the board |
|
|
55
|
+
| `Ctrl+C` twice | Quit Pi, from the board or a session. Sessions keep running |
|
|
56
|
+
| `Ctrl+Z` | Put Pi in the background, from the board or a session, and `fg` brings it back. Sessions keep running |
|
|
57
|
+
|
|
58
|
+
The full list is in the [reference](docs/reference.md).
|
|
59
|
+
|
|
60
|
+
## Settings
|
|
61
|
+
|
|
62
|
+
Settings live in `~/.pi/agent/extensions/pi-board/config.json`.
|
|
63
|
+
|
|
64
|
+
The board can use a model for titles, row summaries and working out what state a session is in. That's **off by default**, and built-in rules do the job instead. To choose a model, run `/board-model`. Helper calls cost tokens, and send up to 6,000 characters of a session's latest reply to that model.
|
|
65
|
+
|
|
66
|
+
## Good to know
|
|
67
|
+
|
|
68
|
+
- **No worktrees:** sessions in one repository share its files, so give each writer its own worktree.
|
|
69
|
+
- **Sessions outlive Pi:** closing Pi leaves them running. That's the point, but idle ones are only cleaned up by a timer or the next board activity.
|
|
70
|
+
- **Answering prompts:** a session waiting on a permission prompt shows `Needs answer`, and you attach to answer it. A reply from Peek waits in the queue.
|
|
71
|
+
- **Saved to disk:** sessions and a screen log are plain files under `~/.pi/agent/agent-board/`.
|
|
72
|
+
|
|
73
|
+
More detail is in [How it works](docs/how-it-works.md) and the [reference](docs/reference.md).
|
|
74
|
+
|
|
75
|
+
## `pi-frame`
|
|
76
|
+
|
|
77
|
+
[`pi-frame`](https://github.com/huseynsnmz/pi-suite/tree/main/packages/frame) 0.3.8 or newer draws its header and footer again when the board closes.
|
|
78
|
+
|
|
79
|
+
## Contributing
|
|
80
|
+
|
|
81
|
+
Issues are welcome, and pull requests are turned off. See [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md).
|
|
82
|
+
|
|
83
|
+
## Credits and license
|
|
84
|
+
|
|
85
|
+
MIT. See [LICENSE](LICENSE), which keeps the original copyright notice.
|
|
86
|
+
|
|
87
|
+
- [pi-agent-board](https://github.com/zhuxixi/pi-agent-board) by zhuxixi and its contributors
|
|
88
|
+
- The keys and layout follow [Claude Code's agent view](https://code.claude.com/docs/en/agent-view).
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
## Reporting a vulnerability
|
|
4
|
+
|
|
5
|
+
Please don't open a public issue for a security problem. Use **Report a vulnerability** on the repository's Security tab, or email huseyin@snmz.org.
|
|
6
|
+
|
|
7
|
+
Examples that count as security problems:
|
|
8
|
+
|
|
9
|
+
- A reply or other input from the board that answers a permission prompt in a session.
|
|
10
|
+
- Output from a session that reaches your terminal as a command, or runs anything outside that session.
|
|
11
|
+
- Another local user reaching a session through the board's sockets or files.
|
|
12
|
+
|
|
13
|
+
Fixes go into the latest release only.
|
|
14
|
+
|
|
15
|
+
## What this extension does not protect against
|
|
16
|
+
|
|
17
|
+
- **What a session can do:** each one is a real Pi session with your access. Use your permission rules and sandbox.
|
|
18
|
+
- **Project files:** a trusted project's Pi settings apply to its sessions.
|
|
19
|
+
- **Secrets on screen:** anything printed in a session is saved in its session file and screen log.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# How it works
|
|
2
|
+
|
|
3
|
+
Every session on the board is a real Pi session, running in a terminal the board keeps open for it.
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
/agent-board (a screen inside your Pi)
|
|
7
|
+
│ start a task
|
|
8
|
+
▼
|
|
9
|
+
detached runner ──→ real `pi` in a hidden terminal (node-pty)
|
|
10
|
+
│ ├─ your extensions, permissions and session file
|
|
11
|
+
│ └─ keeps running after you close Pi
|
|
12
|
+
▼
|
|
13
|
+
~/.pi/agent/agent-board/ ──→ the board reads state from here
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
- **Starting a task:** a detached runner starts Pi at a saved session file, and types your task into it.
|
|
17
|
+
- **State:** the extension also loads inside each session, and reports what it's doing to a small coordinator process, which is the only writer of each row's state. The board reads that.
|
|
18
|
+
- **Waiting on you:** a permission prompt or other dialog takes the keyboard from Pi's prompt during a run, and that puts the row in `Needs answer`. A reply from Peek waits in the queue, because typing into the session would answer the dialog.
|
|
19
|
+
- **Attaching:** the board shows the session's real terminal inside your Pi, and hands the keyboard over until you detach.
|
|
20
|
+
- **The session you're in:** pressing `Left` twice adds its session file as a row. Pi keeps running it, so the board never starts a second Pi on that file.
|
|
21
|
+
- **Without node-pty:** tasks run with `pi --mode json -p`, where nothing can answer a prompt, and you can't attach.
|
|
22
|
+
|
|
23
|
+
## What it costs
|
|
24
|
+
|
|
25
|
+
The board makes no model calls of its own unless you choose a helper model with `/board-model`. See the [reference](reference.md#helper-model).
|
|
26
|
+
|
|
27
|
+
## What it doesn't do
|
|
28
|
+
|
|
29
|
+
- **Isolate sessions:** sessions in one repository share its working tree, so they can overwrite each other. Use your own worktrees for parallel changes.
|
|
30
|
+
- **Sandbox anything:** each session has what any Pi session has, with your extensions and permissions.
|
|
31
|
+
- **Protect what's on screen:** session files and a replayable screen log are stored as plain files, so a secret printed in a terminal gets saved.
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
# Reference
|
|
2
|
+
|
|
3
|
+
## Main list
|
|
4
|
+
|
|
5
|
+
Typing goes straight into the input, as in Claude Code's agent view, so there's no mode to enter first.
|
|
6
|
+
|
|
7
|
+
| Key | Action |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| Any text | Start writing a task. |
|
|
10
|
+
| `Enter` | Start the task, or attach to the selected session when the input is empty. |
|
|
11
|
+
| `Ctrl+Enter` | Start the task and attach to it. |
|
|
12
|
+
| `Shift+Enter` / `Ctrl+J` | New line in the task. |
|
|
13
|
+
| `Ctrl+N` | While typing, choose the folder, model and thinking level first. |
|
|
14
|
+
| `Ctrl+Z` | Put Pi in the background, and `fg` brings it back. Sessions keep running. Works in an attached session too. |
|
|
15
|
+
| `Left` / `Right` | Attach to the selected session. |
|
|
16
|
+
| `Left` twice | From an empty Pi prompt, put this session on the board and open it. |
|
|
17
|
+
| `Up` / `Down` | Move between rows. |
|
|
18
|
+
| `PgUp` / `PgDn` | Move by a screenful. |
|
|
19
|
+
| `Home` / `End` | First or last row. |
|
|
20
|
+
| `Alt+Up` / `Alt+Down` | Previous or next group. |
|
|
21
|
+
| `Alt+1`..`Alt+9` | Attach to that row. |
|
|
22
|
+
| `Space` | Open or close Peek. |
|
|
23
|
+
| `/` | Pick one of Pi's commands. It closes the board and runs in the Pi you opened it from. A template or skill starts a session instead, like any task. |
|
|
24
|
+
| `Ctrl+F` | Filter the list. |
|
|
25
|
+
| `Ctrl+S` | Group by state or by directory. |
|
|
26
|
+
| `Shift+Up` / `Shift+Down` | Move the row up or down its group. |
|
|
27
|
+
| `Ctrl+G` | Write the task in `$VISUAL` or `$EDITOR`. |
|
|
28
|
+
| `Ctrl+T` | Pin or unpin. |
|
|
29
|
+
| `Ctrl+R` | Rename. |
|
|
30
|
+
| `Ctrl+X` | Stop the session; press again within 2 seconds to delete it. |
|
|
31
|
+
| `Ctrl+D` | Confirm marking an inactive session Done. |
|
|
32
|
+
| `Ctrl+B` | Hold or unhold an inactive session. |
|
|
33
|
+
| `Ctrl+A` | Select several rows. |
|
|
34
|
+
| `Ctrl+O` | Read-only transcript. |
|
|
35
|
+
| `Ctrl+E` | Evidence / Diagnostics. |
|
|
36
|
+
| `Ctrl+K` | Delete inactive rows in the selected state. |
|
|
37
|
+
| `!` | node-pty diagnostics and fix steps. |
|
|
38
|
+
| `?` | Help. |
|
|
39
|
+
| `Esc` | Clear a draft, or leave the board. |
|
|
40
|
+
| `Ctrl+C` | Clear a draft; press twice within a second to quit Pi, from the board or an attached session. Background sessions keep running. |
|
|
41
|
+
|
|
42
|
+
On macOS, the `Alt` keys need your terminal to send Option as Alt.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## Multi-select
|
|
46
|
+
|
|
47
|
+
Press `Ctrl+A` in the main list to act on several sessions at once.
|
|
48
|
+
|
|
49
|
+
| Key | Action |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `Up` / `Down` / `j` / `k` | Move the selection. |
|
|
52
|
+
| `Space` | Toggle the current row. |
|
|
53
|
+
| `a` | Select all visible rows. |
|
|
54
|
+
| `u` | Clear the selection. |
|
|
55
|
+
| `d` | Confirm marking the selected inactive rows Done. |
|
|
56
|
+
| `Ctrl+X` | Delete the selected Done rows (confirmation prompt). |
|
|
57
|
+
| `m` / `Esc` / `Ctrl+C` | Leave multi-select mode. |
|
|
58
|
+
| `?` | Open the help overlay. |
|
|
59
|
+
| `!` | Open node-pty diagnostics and fix steps. |
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## Peek
|
|
63
|
+
|
|
64
|
+
Peek shows the selected session's summary, blocker or question, latest output, and available issue/PR references.
|
|
65
|
+
|
|
66
|
+
| Key | Action |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| Any text | Start a reply, and press `Enter` to send it without attaching. |
|
|
69
|
+
| `Left` / `Right` | Attach to the session. |
|
|
70
|
+
| `Up` / `Down` | Move to the previous or next session. |
|
|
71
|
+
| `Ctrl+O` | Open the read-only transcript. |
|
|
72
|
+
| `Ctrl+E` | Open Evidence / Diagnostics. |
|
|
73
|
+
| `Ctrl+D` | Confirm marking the inactive session Done. |
|
|
74
|
+
| `Ctrl+B` | Hold or unhold the session. |
|
|
75
|
+
| `!` | Open node-pty diagnostics and fix steps. |
|
|
76
|
+
| `Space` / `Esc` | Return to the main list. |
|
|
77
|
+
|
|
78
|
+
When a Pi question or questionnaire tool is pending, inline reply is rejected; attach to answer that interactive question in the real Pi session.
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
## Transcript
|
|
82
|
+
|
|
83
|
+
The `v` view is a read-only projection of the durable Pi session JSONL. It does not interrupt a running worker.
|
|
84
|
+
|
|
85
|
+
| Key | Action |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| `Up` / `Down` / `j` / `k` | Scroll one line. |
|
|
88
|
+
| `PageUp` / `PageDown` | Scroll one page. |
|
|
89
|
+
| `Space` | Open Peek. |
|
|
90
|
+
| `r` | Enter reply mode. |
|
|
91
|
+
| `Enter` or `a` | Attach to the session. |
|
|
92
|
+
| `e` | Open Evidence / Diagnostics. |
|
|
93
|
+
| `d` | Confirm marking the inactive session Done. |
|
|
94
|
+
| `h` | Hold or unhold the session. |
|
|
95
|
+
| `!` | Open node-pty diagnostics and fix steps. |
|
|
96
|
+
| `Left` / `Esc` / `<` | Return to the main list. |
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
## Evidence / Diagnostics
|
|
100
|
+
|
|
101
|
+
The `e` view shows durable session evidence, including changed files, commands and their outcomes, command output previews, assistant evidence, errors, diagnostics, and artifact paths. Press `x` to clear diagnostics while preserving the evidence artifacts.
|
|
102
|
+
|
|
103
|
+
| Key | Action |
|
|
104
|
+
| --- | --- |
|
|
105
|
+
| `Up` / `Down` / `j` / `k` | Scroll one line. |
|
|
106
|
+
| `PageUp` / `PageDown` | Scroll one page. |
|
|
107
|
+
| `r` | Enter reply mode. |
|
|
108
|
+
| `v` | Open the read-only transcript. |
|
|
109
|
+
| `Enter`, `a`, `Right`, or `l` | Attach to the session. |
|
|
110
|
+
| `x` | Clear diagnostics; evidence is preserved. |
|
|
111
|
+
| `Left` / `Esc` / `<` | Return to the main list. |
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## PTY attach
|
|
115
|
+
|
|
116
|
+
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.
|
|
117
|
+
|
|
118
|
+
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).
|
|
119
|
+
|
|
120
|
+
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.
|
|
121
|
+
|
|
122
|
+
## States, Grouping, and Filters
|
|
123
|
+
|
|
124
|
+
The board separates a session's semantic task state from whether a worker process is currently alive. An exited worker can therefore leave a durable row that is still resumable or attachable.
|
|
125
|
+
|
|
126
|
+
| Display state | Meaning |
|
|
127
|
+
| --- | --- |
|
|
128
|
+
| **Queued** | A run has been scheduled but has not started processing. |
|
|
129
|
+
| **Running** | The session is actively processing. |
|
|
130
|
+
| **Needs answer** | The session is waiting for user input or an answer to a question. |
|
|
131
|
+
| **Needs instructions** | The run ended without being marked complete and needs the next directive. |
|
|
132
|
+
| **On hold** | The user parked this session intentionally (manual verdict, `h` to toggle). Automated writers can't push it to Done; queued follow-ups do not wake it. |
|
|
133
|
+
| **Done** | The user marked the inactive session complete; this is the default completion path. |
|
|
134
|
+
| **Failed** | The worker or host ended with an error. |
|
|
135
|
+
| **Stopped** | The user stopped the active work. |
|
|
136
|
+
|
|
137
|
+
Rows are grouped by state. When a state contains sessions from multiple directories, rows are grouped by folder within that state. Pinned rows and folders come first, then creation order remains stable; activity does not reshuffle the list. New agent activity is marked unread with stronger row glyphs and header/footer counts. Replies sent while a session is busy enter a durable FIFO follow-up queue and are delivered when the session is ready; a `qN` badge shows queued follow-ups.
|
|
138
|
+
|
|
139
|
+
Press `Ctrl+F` to enter filter mode. Filter tokens are case-insensitive and can be combined with free-text terms:
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
s:running
|
|
143
|
+
s:hold
|
|
144
|
+
review:ready
|
|
145
|
+
diag:stalled
|
|
146
|
+
evidence:error
|
|
147
|
+
queued:true
|
|
148
|
+
steer:awaiting-approval
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
- `s:<state>` matches a state prefix, including display-label aliases such as `needs-answer`.
|
|
152
|
+
- `review:ready` finds sessions with review-ready evidence.
|
|
153
|
+
- `evidence:error` finds sessions whose evidence contains errors.
|
|
154
|
+
- `queued:true` (also `yes` or `1`) finds sessions with queued follow-ups.
|
|
155
|
+
- `steer:<state>` filters by a persisted steering state.
|
|
156
|
+
- Bare words match name, summary, and working directory; multiple words use AND matching.
|
|
157
|
+
|
|
158
|
+
`diag:stalled` can consume persisted stalled diagnostics, but the current runner does not provide a general provider-stall detector. It should not be read as a complete automatic stall-detection feature.
|
|
159
|
+
|
|
160
|
+
## Evidence and Code References
|
|
161
|
+
|
|
162
|
+
Evidence is collected locally from session events. The 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.
|
|
163
|
+
|
|
164
|
+
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:
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"providers": [
|
|
169
|
+
{
|
|
170
|
+
"name": "acode",
|
|
171
|
+
"hosts": ["acode.internal.example.com"],
|
|
172
|
+
"rules": [
|
|
173
|
+
{ "pattern": "acli\\s+issue\\s+update\\s+#?(\\d+)(?=[\\s\\S]*--assignee)", "kind": "issue", "strength": "claim" },
|
|
174
|
+
{ "pattern": "acli\\s+issue\\s+(?:note|comment|close)\\s+#?(\\d+)", "kind": "issue", "strength": "action" },
|
|
175
|
+
{ "pattern": "acli\\s+issue\\s+(?:show|view)\\s+#?(\\d+)", "kind": "issue", "strength": "view" }
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
`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.
|
|
183
|
+
|
|
184
|
+
## Configuration
|
|
185
|
+
|
|
186
|
+
Settings live in `~/.pi/agent/extensions/pi-board/config.json`. Everything is optional, and a missing or broken file means the defaults. Restart Pi after editing it.
|
|
187
|
+
|
|
188
|
+
```json
|
|
189
|
+
{
|
|
190
|
+
"model": "provider/model-id",
|
|
191
|
+
"autoDone": false
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Helper model
|
|
196
|
+
|
|
197
|
+
Titles, row summaries and telling `Needs answer` from `Needs instructions` can use a model. **It's off by default**, so the board makes no model calls of its own and uses built-in rules instead.
|
|
198
|
+
|
|
199
|
+
Run `/board-model` inside Pi to pick a model or turn it off. It's saved to the file above and applies to sessions started from then on. These calls run through Pi, so any model Pi can use works, and they send up to 6,000 characters of a session's latest reply to that model.
|
|
200
|
+
|
|
201
|
+
### Other settings
|
|
202
|
+
|
|
203
|
+
| Key | Default | Purpose |
|
|
204
|
+
| --- | --- | --- |
|
|
205
|
+
| `model` | off | Helper model, as `provider/id`. |
|
|
206
|
+
| `groupBy` | `state` | `state` or `directory`. `Ctrl+S` changes it. |
|
|
207
|
+
| `root` | `~/.pi/agent/agent-board/` | Where the board stores its state. |
|
|
208
|
+
| `titleThinking` | `low` | Thinking level for titles. |
|
|
209
|
+
| `autoDone` | `false` | Let the helper model mark sessions Done. |
|
|
210
|
+
| `codeRefs` | `true` | Issue and pull request badges. |
|
|
211
|
+
| `disablePty` | `false` | Turn off live terminal sessions and attach. |
|
|
212
|
+
| `attachMouse` | `true` | Mouse handling in attached sessions. |
|
|
213
|
+
| `mouseScroll` | `true` | Mouse wheel scrolling in attached sessions. |
|
|
214
|
+
| `wheelLines` | `1` | Lines per wheel notch, from 1 to 50. |
|
|
215
|
+
| `maxWarmHosts` | `4` | Idle sessions kept ready for fast attach, from 0 to 50. |
|
|
216
|
+
| `warmHostTtlMs` | `600000` | How long an idle one is kept; `0` keeps it. |
|
|
217
|
+
| `nativePaste` | `true` | X11 PRIMARY copy and middle-click paste. |
|
|
218
|
+
| `forwardClipboard` | `true` | Forward OSC 52 clipboard writes from attached sessions. |
|
|
219
|
+
| `forwardImages` | `true` | Forward terminal images from attached sessions. |
|
|
220
|
+
| `imeFix` | `true` | IME cursor fix in attached sessions. |
|
|
221
|
+
| `terminalSnapshot` | `true` | Newer attach path; `false` uses the older one. |
|
|
222
|
+
| `replyGuard` | `true` | Discard stray terminal replies delivered as input. |
|
|
223
|
+
|
|
224
|
+
An `AGENT_BOARD_*` environment variable that's already set overrides the file for that run.
|
|
225
|
+
|
|
226
|
+
Setting `terminalSnapshot` to `false` 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).
|
|
227
|
+
|
|
228
|
+
Older `AGENT_VIEW_*` names are still read in selected compatibility paths. Prefer `AGENT_BOARD_*` for new setups. Internal child markers are managed by the board and are not user settings.
|
|
229
|
+
|
|
230
|
+
The `providers.json` file under the configured store root can extend the built-in issue/PR reference providers; see the [Evidence and Code References](#evidence-and-code-references) section for the feature overview.
|
|
231
|
+
|
|
232
|
+
## Troubleshooting
|
|
233
|
+
|
|
234
|
+
### Rows stay in `Running`
|
|
235
|
+
|
|
236
|
+
First verify that Pi itself can complete a one-shot model call:
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
pi --mode json -p --no-session "Reply with exactly: DONE"
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
The command should emit an assistant reply, then an `agent_end` event, and exit. If it hangs before the assistant reply, fix Pi provider authentication or network access first. The board cannot produce live model results until Pi works independently.
|
|
243
|
+
|
|
244
|
+
### `node-pty unavailable`
|
|
245
|
+
|
|
246
|
+
Press `!` in the dashboard to open the diagnostic panel and follow its fix steps. Common causes include a missing native `node-pty` binary, a Node/architecture mismatch, a missing or non-executable macOS `spawn-helper`, or macOS quarantine. You can temporarily set `AGENT_BOARD_DISABLE_PTY=1` to use background JSON-runner behavior where supported.
|
|
247
|
+
|
|
248
|
+
### Attach is slow or keeps reconnecting
|
|
249
|
+
|
|
250
|
+
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.
|
|
251
|
+
|
|
252
|
+
### IME candidate window is stuck at the window edge (Windows WezTerm)
|
|
253
|
+
|
|
254
|
+
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.
|
|
255
|
+
|
|
256
|
+
Make the hardware cursor visible, either way:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
export PI_HARDWARE_CURSOR=1 # machine-local, e.g. ~/.zshrc.local
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
or set `"showHardwareCursor": true` in Pi's `settings.json` (syncs across machines if the config is version-controlled; harmless on Linux).
|
|
263
|
+
|
|
264
|
+
Trade-off: the real terminal cursor becomes visible inside the TUI. This is cosmetic only.
|
|
265
|
+
|
|
266
|
+
### Start & attach falls back to background
|
|
267
|
+
|
|
268
|
+
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.
|
|
269
|
+
|
|
270
|
+
### Inline reply is rejected
|
|
271
|
+
|
|
272
|
+
A pending Pi question or questionnaire requires the real interactive session. Attach to the row and answer it there; ordinary replies can be sent from Peek and are queued while a session is busy.
|
|
273
|
+
|
|
274
|
+
### Sessions in the same repository conflict
|
|
275
|
+
|
|
276
|
+
Worktree isolation is not enabled. Stop overlapping writers, separate their working directories, or create and manage Git worktrees yourself before running concurrent coding tasks.
|
|
277
|
+
|
|
278
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@huseynsnmz/pi-board",
|
|
3
|
+
"version": "0.18.2",
|
|
4
|
+
"description": "A board for Pi's background sessions: start, watch, reply to and attach to them. A fork of @zhuxixi/pi-agent-board.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.ts",
|
|
7
|
+
"exports": "./index.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"CHANGELOG.md",
|
|
10
|
+
"CONTRIBUTING.md",
|
|
11
|
+
"LICENSE",
|
|
12
|
+
"README.md",
|
|
13
|
+
"SECURITY.md",
|
|
14
|
+
"docs",
|
|
15
|
+
"index.ts",
|
|
16
|
+
"runner",
|
|
17
|
+
"src"
|
|
18
|
+
],
|
|
19
|
+
"keywords": [
|
|
20
|
+
"pi-package",
|
|
21
|
+
"pi-extension",
|
|
22
|
+
"pi",
|
|
23
|
+
"pi-coding-agent",
|
|
24
|
+
"agent-board",
|
|
25
|
+
"background-agents",
|
|
26
|
+
"dashboard"
|
|
27
|
+
],
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/huseynsnmz/pi-suite.git",
|
|
32
|
+
"directory": "packages/board"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=20"
|
|
39
|
+
},
|
|
40
|
+
"pi": {
|
|
41
|
+
"extensions": [
|
|
42
|
+
"./src/index.ts"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"typecheck": "tsc --noEmit",
|
|
47
|
+
"test": "node scripts/run-tests.mjs",
|
|
48
|
+
"test:perf": "node scripts/run-perf-gate.mjs",
|
|
49
|
+
"pack:dry": "npm pack --dry-run",
|
|
50
|
+
"verify": "npm run typecheck && npm run test:perf && npm test && npm run test:coverage && npm run pack:dry"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
54
|
+
"@earendil-works/pi-tui": "*"
|
|
55
|
+
},
|
|
56
|
+
"peerDependenciesMeta": {
|
|
57
|
+
"@earendil-works/pi-coding-agent": {
|
|
58
|
+
"optional": true
|
|
59
|
+
},
|
|
60
|
+
"@earendil-works/pi-tui": {
|
|
61
|
+
"optional": true
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@earendil-works/pi-coding-agent": "1.5.0",
|
|
66
|
+
"@earendil-works/pi-tui": "1.5.0",
|
|
67
|
+
"@types/node": "26.6.6",
|
|
68
|
+
"typescript": "7.0.2"
|
|
69
|
+
},
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@xterm/headless": "6.0.0",
|
|
72
|
+
"node-pty": "1.1.0"
|
|
73
|
+
},
|
|
74
|
+
"overrides": {
|
|
75
|
+
"test-exclude": {
|
|
76
|
+
"glob": "14.0.3",
|
|
77
|
+
"minimatch": "11.0.4"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"private": true
|
|
81
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pre-coordinator direct-write helpers for job-runner (issue #91, PR #2).
|
|
3
|
+
*
|
|
4
|
+
* The View State Coordinator is the single logical writer of state.json /
|
|
5
|
+
* status.json. The ONLY legitimate direct-write path left in the JSON runner
|
|
6
|
+
* is the explicit `AGENT_BOARD_COORDINATOR=off` escape hatch (a documented
|
|
7
|
+
* designed exception in the writer-boundary test): a user who switches the
|
|
8
|
+
* coordinator off keeps the exact pre-coordinator persistence semantics.
|
|
9
|
+
*
|
|
10
|
+
* This module exists so `runner/job-runner.mjs` itself never imports the
|
|
11
|
+
* state materializers — the boundary test allowlists THIS file (disabled
|
|
12
|
+
* escape hatch), not the runner.
|
|
13
|
+
*/
|
|
14
|
+
import { projectViewState } from "../src/core/events.mjs";
|
|
15
|
+
import { readState, writeState, writeStatus } from "../src/core/store.mjs";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Direct-write the run status and its projected view state (the boot +
|
|
19
|
+
* throttled-persist tail of the pre-coordinator persist, minus the evidence
|
|
20
|
+
* artifacts which stay runner-owned in both modes).
|
|
21
|
+
* @param {{ root: string, viewId: string, runId: string, status: object }} ctx
|
|
22
|
+
*/
|
|
23
|
+
export function legacyPersistState({ root, viewId, runId, status }) {
|
|
24
|
+
void runId;
|
|
25
|
+
writeStatus(root, status);
|
|
26
|
+
writeState(root, projectViewState(status, Date.now(), readState(root, viewId)));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** @param {string} root @param {string} viewId @param {string} runId @param {object} status */
|
|
30
|
+
export function legacyWriteStatus(root, viewId, runId, status) {
|
|
31
|
+
void viewId;
|
|
32
|
+
void runId;
|
|
33
|
+
writeStatus(root, status);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** @param {string} root @param {string} viewId @param {object} state */
|
|
37
|
+
export function legacyWriteState(root, viewId, state) {
|
|
38
|
+
void viewId;
|
|
39
|
+
writeState(root, state);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Direct-write the plan-ready row state ("Approve this plan?") — exact legacy
|
|
44
|
+
* parity with the pre-coordinator finalizeSteeringIfNeeded write.
|
|
45
|
+
* @param {string} root @param {string} viewId @param {string} runId
|
|
46
|
+
*/
|
|
47
|
+
export function legacyPlanReadyStateWrite(root, viewId, runId) {
|
|
48
|
+
const prev = readState(root, viewId);
|
|
49
|
+
if (!prev) return;
|
|
50
|
+
prev.semanticState = "needs_input";
|
|
51
|
+
prev.processState = "exited";
|
|
52
|
+
prev.needsInput = true;
|
|
53
|
+
prev.question = "Approve this plan?";
|
|
54
|
+
prev.summary = "Plan ready for approval";
|
|
55
|
+
prev.currentRunId = runId;
|
|
56
|
+
prev.updatedAt = Date.now();
|
|
57
|
+
writeState(root, prev);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Direct-write the queued follow-up's bootstrap status + projected state —
|
|
62
|
+
* exact legacy parity with drainQueuedFollowUp.
|
|
63
|
+
* @param {string} root @param {string} viewId @param {object} nextStatus
|
|
64
|
+
*/
|
|
65
|
+
export function legacyFollowupBootstrap(root, viewId, nextStatus) {
|
|
66
|
+
writeStatus(root, nextStatus);
|
|
67
|
+
writeState(root, projectViewState(nextStatus, Date.now(), readState(root, viewId)));
|
|
68
|
+
}
|