@gavin-hu/my-pi-agent 0.16.0 → 0.18.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 (200) hide show
  1. package/README.md +29 -15
  2. package/README.zh-CN.md +27 -15
  3. package/extensions/bytefly/README.md +195 -115
  4. package/extensions/bytefly/footer/collect/entries.ts +1 -6
  5. package/extensions/bytefly/footer/collect/snapshot.ts +23 -9
  6. package/extensions/bytefly/footer/price/price.ts +12 -8
  7. package/extensions/bytefly/footer/register.ts +13 -1
  8. package/extensions/bytefly/footer/types.ts +11 -0
  9. package/extensions/bytefly/footer/unpriced.ts +36 -0
  10. package/extensions/bytefly/header/component.ts +15 -29
  11. package/extensions/bytefly/header/identity.ts +71 -0
  12. package/extensions/bytefly/header/register.ts +9 -3
  13. package/extensions/bytefly/index.ts +13 -5
  14. package/extensions/bytefly/message/format.ts +20 -13
  15. package/extensions/bytefly/message/register.ts +8 -7
  16. package/extensions/bytefly/notify/types.ts +1 -1
  17. package/extensions/bytefly/panel/commands.ts +46 -25
  18. package/extensions/bytefly/panel/format.ts +49 -14
  19. package/extensions/bytefly/panel/join.ts +35 -9
  20. package/extensions/bytefly/panel/settings.ts +29 -39
  21. package/extensions/bytefly/panel/skills.ts +51 -0
  22. package/extensions/bytefly/panel/tui/extensions-view.ts +7 -61
  23. package/extensions/bytefly/panel/tui/frame.ts +9 -1
  24. package/extensions/bytefly/panel/tui/list-view.ts +72 -0
  25. package/extensions/bytefly/panel/tui/nav.ts +71 -3
  26. package/extensions/bytefly/panel/tui/settings-section.ts +250 -0
  27. package/extensions/bytefly/panel/tui/skills-view.ts +50 -0
  28. package/extensions/bytefly/panel/tui.ts +223 -331
  29. package/extensions/bytefly/panel/types.ts +26 -8
  30. package/extensions/bytefly/picker/discovery.ts +32 -27
  31. package/extensions/bytefly/picker/resources.ts +16 -8
  32. package/extensions/bytefly/picker/runtime.ts +62 -34
  33. package/extensions/bytefly/picker/toggle.ts +16 -10
  34. package/extensions/bytefly/picker/types.ts +31 -13
  35. package/extensions/bytefly/update/format.ts +66 -8
  36. package/extensions/bytefly/update/patch.ts +66 -0
  37. package/extensions/bytefly/update/register.ts +4 -11
  38. package/extensions/bytefly/update/release.ts +65 -0
  39. package/extensions/bytefly/update/state.ts +14 -0
  40. package/extensions/bytefly/update/suppress.ts +47 -29
  41. package/extensions/bytefly/update/types.ts +15 -5
  42. package/extensions/check/tui.ts +2 -0
  43. package/extensions/context/README.md +21 -11
  44. package/extensions/context/format.ts +10 -8
  45. package/extensions/context/report.ts +21 -8
  46. package/extensions/context/tui.ts +26 -10
  47. package/extensions/context/types.ts +5 -3
  48. package/extensions/file-browse/README.md +89 -22
  49. package/extensions/file-browse/chrome.ts +83 -0
  50. package/extensions/file-browse/client.ts +74 -459
  51. package/extensions/file-browse/config.ts +12 -3
  52. package/extensions/file-browse/diff-html.ts +94 -0
  53. package/extensions/file-browse/html.ts +26 -152
  54. package/extensions/file-browse/live-client.ts +47 -1
  55. package/extensions/file-browse/live.ts +35 -14
  56. package/extensions/file-browse/palette.ts +224 -0
  57. package/extensions/file-browse/rev.ts +42 -0
  58. package/extensions/file-browse/router.ts +27 -6
  59. package/extensions/file-browse/server.ts +7 -0
  60. package/extensions/file-browse/styles.ts +10 -3
  61. package/extensions/file-browse/tree.ts +381 -0
  62. package/extensions/file-read/README.md +4 -1
  63. package/extensions/file-read/extract/odt.ts +7 -5
  64. package/extensions/goal/plan-route.ts +8 -2
  65. package/extensions/goal/tools.ts +6 -11
  66. package/extensions/job/README.md +7 -5
  67. package/extensions/job/index.ts +35 -52
  68. package/extensions/job/tools.ts +51 -77
  69. package/extensions/memory/README.md +3 -3
  70. package/extensions/memory/tools.ts +4 -6
  71. package/extensions/memory/tui.ts +5 -1
  72. package/extensions/plan/README.md +333 -84
  73. package/extensions/plan/commands.ts +73 -7
  74. package/extensions/plan/feedback.ts +300 -63
  75. package/extensions/plan/index.ts +1 -1
  76. package/extensions/plan/plan-index.ts +4 -2
  77. package/extensions/plan/plan-text.ts +18 -1
  78. package/extensions/plan/plans.ts +184 -58
  79. package/extensions/plan/review-prompt.ts +93 -0
  80. package/extensions/plan/review.ts +95 -95
  81. package/extensions/plan/runtime.ts +4 -2
  82. package/extensions/plan/split.ts +87 -0
  83. package/extensions/plan/steps.ts +123 -107
  84. package/extensions/plan/tools/cancel.ts +79 -0
  85. package/extensions/plan/tools/enter.ts +17 -12
  86. package/extensions/plan/tools/exit.ts +148 -59
  87. package/extensions/plan/tools/steps.ts +7 -19
  88. package/extensions/plan/tools/write.ts +29 -31
  89. package/extensions/plan/tools.ts +6 -3
  90. package/extensions/plan/tui.ts +60 -15
  91. package/extensions/plan/types.ts +45 -3
  92. package/extensions/plan/web-chrome.ts +102 -0
  93. package/extensions/plan/web-client.ts +177 -446
  94. package/extensions/plan/web-collab.ts +207 -0
  95. package/extensions/plan/web-comments.ts +269 -0
  96. package/extensions/plan/web-markdown.ts +222 -0
  97. package/extensions/plan/web-page.ts +131 -19
  98. package/extensions/plan/web-router.ts +148 -32
  99. package/extensions/plan/web-share-session.ts +197 -0
  100. package/extensions/plan/web-share.ts +169 -0
  101. package/extensions/plan/web-streams.ts +124 -0
  102. package/extensions/plan/web-tokens.ts +63 -0
  103. package/extensions/plan/web.ts +193 -45
  104. package/extensions/question/README.md +3 -0
  105. package/extensions/question/dialogs.ts +91 -1
  106. package/extensions/question/tools.ts +2 -1
  107. package/extensions/rewind/checklist.ts +4 -0
  108. package/extensions/rewind/review-tui.ts +3 -1
  109. package/extensions/rewind/rewind-tui.ts +4 -0
  110. package/extensions/session-bus/README.md +247 -0
  111. package/extensions/session-bus/commands.ts +165 -0
  112. package/extensions/session-bus/format.ts +124 -0
  113. package/extensions/session-bus/index.ts +69 -0
  114. package/extensions/session-bus/notice.ts +58 -0
  115. package/extensions/session-bus/protocol.ts +134 -0
  116. package/extensions/session-bus/result.ts +243 -0
  117. package/extensions/session-bus/rows.ts +169 -0
  118. package/extensions/session-bus/runtime.ts +575 -0
  119. package/extensions/session-bus/store.ts +329 -0
  120. package/extensions/session-bus/team.ts +102 -0
  121. package/extensions/session-bus/tools.ts +227 -0
  122. package/extensions/session-bus/tui.ts +394 -0
  123. package/extensions/session-bus/types.ts +98 -0
  124. package/extensions/subagent/README.md +26 -13
  125. package/extensions/subagent/format.ts +72 -25
  126. package/extensions/subagent/index.ts +21 -47
  127. package/extensions/subagent/orchestrate.ts +18 -41
  128. package/extensions/subagent/render.ts +29 -42
  129. package/extensions/subagent/stream.ts +24 -18
  130. package/extensions/subagent/types.ts +7 -0
  131. package/extensions/todo/tools.ts +5 -6
  132. package/extensions/todo/tui.ts +5 -1
  133. package/extensions/watch/README.md +9 -5
  134. package/extensions/watch/index.ts +25 -44
  135. package/extensions/watch/tools.ts +31 -59
  136. package/extensions/wechat/README.md +45 -36
  137. package/extensions/wechat/bridge.ts +46 -48
  138. package/extensions/wechat/client.ts +1 -4
  139. package/extensions/wechat/commands.ts +3 -3
  140. package/extensions/wechat/deliver.ts +57 -37
  141. package/extensions/wechat/interaction.ts +54 -18
  142. package/extensions/wechat/login-screen.ts +2 -3
  143. package/extensions/wechat/notices.ts +9 -7
  144. package/extensions/wechat/peer-worker.ts +19 -34
  145. package/extensions/wechat/presence.ts +3 -4
  146. package/extensions/wechat/prompt.ts +53 -23
  147. package/extensions/wechat/reply-pipeline.ts +12 -4
  148. package/extensions/wechat/slash.ts +14 -0
  149. package/extensions/wechat/status-screen.ts +2 -2
  150. package/extensions/wechat/tools.ts +3 -11
  151. package/extensions/worktree/README.md +48 -12
  152. package/extensions/worktree/commands.ts +109 -65
  153. package/extensions/worktree/enter.ts +1 -1
  154. package/extensions/worktree/exit.ts +11 -1
  155. package/extensions/worktree/git.ts +5 -0
  156. package/extensions/worktree/lifecycle.ts +9 -1
  157. package/extensions/worktree/registry.ts +11 -5
  158. package/extensions/worktree/screen.ts +263 -0
  159. package/extensions/worktree/status.ts +84 -40
  160. package/lib/README.md +12 -7
  161. package/lib/claims/overlap.ts +43 -0
  162. package/lib/config.ts +12 -0
  163. package/lib/format.ts +6 -2
  164. package/lib/http/router.ts +40 -13
  165. package/lib/http/server.ts +27 -13
  166. package/lib/interaction.ts +28 -1
  167. package/lib/notice.ts +29 -2
  168. package/lib/plan-entry.ts +7 -2
  169. package/lib/plans/sections.ts +172 -0
  170. package/lib/plans/setting.ts +52 -0
  171. package/lib/plans/split.ts +215 -0
  172. package/lib/plans/store.ts +19 -0
  173. package/lib/plans/team.ts +151 -0
  174. package/lib/qr.ts +64 -0
  175. package/lib/repo-key.ts +74 -0
  176. package/lib/report.ts +117 -25
  177. package/lib/requirements.ts +1 -2
  178. package/lib/tool-result.ts +54 -4
  179. package/lib/tui/README.md +30 -8
  180. package/lib/tui/chrome.ts +27 -6
  181. package/lib/tui/dock-screen.ts +91 -19
  182. package/lib/tui/gauge.ts +9 -5
  183. package/lib/tui/line-pane.ts +15 -4
  184. package/lib/tui/tool.ts +23 -4
  185. package/lib/usage.ts +26 -0
  186. package/lib/web/README.md +131 -0
  187. package/lib/web/base.ts +19 -2
  188. package/lib/web/components.ts +10 -6
  189. package/lib/web/layout.ts +2 -0
  190. package/lib/web/markup.ts +2 -1
  191. package/lib/web/runtime.ts +103 -25
  192. package/lib/web/tokens.ts +23 -7
  193. package/package.json +5 -2
  194. package/skills/changelog/SKILL.md +57 -45
  195. package/skills/init/SKILL.md +80 -45
  196. package/skills/init/references/agents-md-quality.md +26 -2
  197. package/skills/init/references/interview-questions.md +36 -14
  198. package/skills/next/SKILL.md +209 -0
  199. package/skills/parallel-dev/SKILL.md +150 -0
  200. package/extensions/wechat/qrcode.ts +0 -46
package/README.md CHANGED
@@ -36,7 +36,8 @@ want the agent to *think first and work safely*:
36
36
  plan file that the agent then follows step by step.
37
37
  - **Delegate and parallelize.** Run specialist subagents in their own Pi
38
38
  processes, push a long build into a background job, and let a watcher tail a
39
- log until it matters — all while you keep the thread.
39
+ log until it matters — then run several sessions on one repository through a
40
+ shared bus, each owning its slice, all while you keep the thread.
40
41
  - **Never wreck the checkout.** Isolation is one command: the task moves onto its
41
42
  own branch in a `git worktree`, and every prompt is snapshotted so a bad turn
42
43
  is one `/rewind` away.
@@ -47,7 +48,7 @@ want the agent to *think first and work safely*:
47
48
  through a bridge to the live session.
48
49
 
49
50
  Everything is optional and independently toggleable. Nothing is forked, and no
50
- installed Pi file is modified: Pi discovers the resources through the `pi`
51
+ installed Pi file is written to: Pi discovers the resources through the `pi`
51
52
  manifest in [`package.json`](./package.json), so the package upgrades with Pi
52
53
  like any other.
53
54
 
@@ -74,34 +75,40 @@ Then, from inside Pi:
74
75
  every loaded extension with its runtime health, enables or disables one, and
75
76
  clears a project override with `x`.
76
77
  - `/bytefly settings` opens the control center's Settings section: one flat list
77
- of the fourteen preferences a session changes, each with its value beside the
78
+ of the thirteen preferences a session changes, each with its value beside the
78
79
  label, `Space`/`Enter` to change one and `Tab` for Global/Project scope. Every
79
80
  other key is a `bytefly.json` edit, listed in the configuration reference.
81
+ - `/bytefly skills` opens the control center's Skills section: one row per Pi
82
+ skill with its enable checkbox, its declared description underneath, and
83
+ `Space` to switch it on or off for the active scope.
80
84
  - `/bytefly doctor [extension] [refresh]` prints the doctor report —
81
85
  `run_doctor`'s text — and checks that each enabled extension has what it needs
82
86
  at runtime.
83
87
  - `/bytefly update` re-runs the package update check now and reports the
84
88
  updateable packages, this package's version and release URL, or a skip.
85
89
  - `/plan <task>` starts a task in read-only planning mode.
86
- - `/skill:init` creates or updates `AGENTS.md` through a short built-in interview and a plan you review first.
90
+ - `/skill:init` creates or updates the instruction file Pi reads through a short
91
+ built-in interview and a plan you review first.
87
92
 
88
93
  One thing the pack does on its own: once per interactive session, `bytefly`
89
94
  asks Pi's package manager which configured packages are behind, suppresses Pi's
90
- own startup update block, and posts one themed notice naming
91
- `pi update --extensions`; this package's new version also marks the header.
92
- Nothing about the session is sent, and `PI_OFFLINE` skips the check;
95
+ own startup update blocks, and posts one themed notice naming
96
+ `pi update --extensions`, plus one for a newer Pi that names `pi update` and the
97
+ changelog; a new version also marks the header — this package's, and Pi's own.
98
+ Nothing about the session is sent — Pi's own release request is only re-rendered —
99
+ and `PI_OFFLINE` skips the check;
93
100
  [`docs/security.md`](./docs/security.md) covers the trust boundaries.
94
101
 
95
102
  ## What you get
96
103
 
97
- 18 extensions, 3 packaged skills, and 2 themes, grouped by what you are trying
104
+ 19 extensions, 5 packaged skills, and 2 themes, grouped by what you are trying
98
105
  to do. Each extension's own `README.md` has the full tool and command surface.
99
106
 
100
107
  ### Plan and delegate
101
108
 
102
109
  | Extension | Tools and commands | What it does |
103
110
  |---|---|---|
104
- | [`plan`](./extensions/plan/) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | Read-only planning: the model investigates, saves a plan under `.pi/plans`, and you approve it before anything is written. Review in the TUI, or open it in a browser to leave inline comments. The `init` skill uses the same review to create or update a project's `AGENTS.md`. |
111
+ | [`plan`](./extensions/plan/) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `cancel_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | Read-only planning: the model investigates, saves a plan under `~/.pi/agent/plans/<repo-key>` — one store per repository, shared by its worktrees — and you approve it before anything is written; with `plan.split` on, the approval can also split it into slices that separate sessions join by name. Review in the TUI, or open it in a browser to leave inline comments: the page follows the plan file live, and you can hand one reviewer link per teammate so each comments under their own name. The `init` skill uses the same review to create or update a project's `AGENTS.md`. |
105
112
  | [`check`](./extensions/check/) | `run_check`, `/check` | Detect the project's test, lint, or typecheck command (or take `check.command`), run it in a supervised process, and turn failures into a navigable `file:line` list. |
106
113
  | [`subagent`](./extensions/subagent/) | `subagent`, `/agents` | Delegate a task to a specialist agent (`explorer`, `planner`, `reviewer`, `worker`, `researcher`, `tester`, `debugger`, `documenter`) in its own Pi process — single, parallel, chained, or in the background, with a footer chip while it runs and a finish notice. |
107
114
  | [`todo`](./extensions/todo/) | `todo`, `/todos` | A persistent task list (`pending` / `in_progress` / `completed`) with a one-line widget. |
@@ -109,13 +116,14 @@ to do. Each extension's own `README.md` has the full tool and command surface.
109
116
  | [`question`](./extensions/question/) | `ask_user_question` | Ask you one or more structured questions (labelled options plus free-form "Other") and wait. |
110
117
  | [`job`](./extensions/job/) | `job`, `/jobs` | Run long-lived shell commands in the background; inspect logs, wait, or kill them. |
111
118
  | [`watch`](./extensions/watch/) | `watch`, `/watch` | Tail a file or command output, match lines against patterns, and alert you or hand matching lines to the agent. |
119
+ | [`session-bus`](./extensions/session-bus/) | `session`, `/sessions` (screen) | Coordinate parallel Pi sessions on one repository: discover peers, exchange short messages/events, consume an inbox, join a slice of an approved split or claim paths before editing, with `/sessions` as a live board of peers, unread mail, and claims. Local, pull-based by default, with an opt-in inbox watch that raises this session's turn once it is idle; it never spawns an agent. |
112
120
  | [`context`](./extensions/context/) | `/context` | Show where the context window goes — system prompt, tool definitions, conversation by role, injected notes — and compact from the report with the before and after numbers. |
113
121
 
114
122
  ### Keep your work safe
115
123
 
116
124
  | Extension | Tools and commands | What it does |
117
125
  |---|---|---|
118
- | [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree status|enter|exit|prune`, `--worktree` | Work inside an isolated `git worktree` on its own branch; the built-in read/write/edit/bash tools follow, and cleanup refuses to throw work away. |
126
+ | [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree` (screen), `/worktree enter|exit|prune`, `--worktree` | Work inside an isolated `git worktree` on its own branch; the built-in read/write/edit/bash tools follow, and cleanup refuses to throw work away. |
119
127
  | [`rewind`](./extensions/rewind/) | `/rewind`, `/review`, `↺ N` status chip | Snapshot the repo on every prompt under `refs/pi/rewind`, restore code, conversation, or both, and review the latest turn's changes before reverting a file. |
120
128
  | [`memory`](./extensions/memory/) | `memory`, `/memory` | Durable cross-session notes as human-editable markdown, injected into each run and managed through the `/memory` picker. |
121
129
 
@@ -124,7 +132,7 @@ to do. Each extension's own `README.md` has the full tool and command surface.
124
132
  | Extension | Tools and commands | What it does |
125
133
  |---|---|---|
126
134
  | [`web-access`](./extensions/web-access/) | `web_search`, `web_fetch` | Search the web (keyless DuckDuckGo by default, optional SearXNG or Brave) and fetch a page as readable text, with paging, `find`, per-hop SSRF checks, and optional PDF support. |
127
- | [`file-browse`](./extensions/file-browse/) | `/browse` | Start a loopback, read-only file browser rooted at the working directory, with Markdown preview, a fuzzy quick-open palette, and live status for a page left open. |
135
+ | [`file-browse`](./extensions/file-browse/) | `/browse` | Start a loopback, read-only file browser rooted at the working directory, with Markdown preview, a fuzzy quick-open palette, a `path:12-30` reference copied from a selection, live status for a page left open, and a reload hint when the folder it lists changes. |
128
136
  | [`file-read`](./extensions/file-read/) | `read_doc` | Extract text from a local PDF, DOCX, DOC, ODT, RTF, or XLSX in process, paged. |
129
137
  | [`file-open`](./extensions/file-open/) | `/open`, `open_path` | Open or reveal a file or directory in the OS-native application. |
130
138
  | [`wechat`](./extensions/wechat/) | `/wechat`, `send_wechat` | Bridge a WeChat chat to the live session over the Weixin iLink bot API; inbound text, images, and files become turns. |
@@ -133,7 +141,7 @@ to do. Each extension's own `README.md` has the full tool and command surface.
133
141
 
134
142
  | Extension | Tools and commands | What it does |
135
143
  |---|---|---|
136
- | [`bytefly`](./extensions/bytefly/) | `/bytefly` (with the `doctor`, `settings`, and `update` subcommands), `run_doctor` | The visible layer: a themed header with a width-adaptive footer, a live run line on Pi's working row (tool, tool count, and elapsed time), and a transcript where every tool block leads with its call line and rails its result under it. `/bytefly` switches extensions and holds the curated settings; opt-in `notify` raises OS notifications when a run, a job, or a question needs you. `bytefly.json` is the config document every extension reads. |
144
+ | [`bytefly`](./extensions/bytefly/) | `/bytefly` (with the `doctor`, `settings`, `skills`, and `update` subcommands), `run_doctor` | The visible layer: a themed header with a width-adaptive footer, a live run line on Pi's working row (tool, tool count, and elapsed time), and a transcript where every tool block leads with its call line and rails its result under it. `/bytefly` switches extensions and skills and holds the curated settings; opt-in `notify` raises OS notifications when a run, a job, or a question needs you, and Pi's own startup update blocks become themed notices and header markers. `bytefly.json` is the config document every extension reads. |
137
145
 
138
146
  ### Skills
139
147
 
@@ -143,9 +151,11 @@ advertised to the model, and its instructions load only when the task matches
143
151
 
144
152
  | Skill | What it does |
145
153
  |---|---|
146
- | [`init`](./skills/init/SKILL.md) | Creates or updates a project's `AGENTS.md` through a built-in interactive interview and plan review, from repository evidence. |
154
+ | [`init`](./skills/init/SKILL.md) | Creates or updates the instruction file Pi actually reads (`AGENTS.md`, or `AGENTS.override.md` when it shadows it) through a built-in interactive interview and plan review, deriving commands, generated paths, packages, and purpose from repository evidence. |
147
155
  | [`refactor`](./skills/refactor/SKILL.md) | Audits a project or path for refactoring opportunities: duplication, oversized modules, coupling, drift, and high-churn code with weak tests. Returns a ranked shortlist with evidence and verification commands; discovery is read-only. |
148
- | [`changelog`](./skills/changelog/SKILL.md) | Drafts the candidate bullet before implementation, records one user-visible bullet in the same commit, audits commits since the last tag for missing or weak entries, and curates a release section from the project's own rules. |
156
+ | [`changelog`](./skills/changelog/SKILL.md) | Records one user-visible bullet in the same commit as the change, audits commits since the last tag for missing or weak entries, and curates a release section from the project's own rules. |
157
+ | [`parallel-dev`](./skills/parallel-dev/SKILL.md) | Runs parallel development as a lead and a team: a lead accountable for the contract, shared files, merge order and a green baseline who also owns a workstream, one owner per disjoint workstream, a walking skeleton first, advisory path claims, a turn-boundary protocol, and independent verification. |
158
+ | [`next`](./skills/next/SKILL.md) | Suggests the next todos by priority — loose work, a broken or unfinished promise — from this conversation once it has done work, and from the tree only when it is empty, with the words and a path after the command saying what to ask and where to look. Read-only, and capped at a short numbered list with evidence and the command that starts each. |
149
159
 
150
160
  ### Themes
151
161
 
@@ -168,6 +178,10 @@ README use `bytefly-dark`.
168
178
  <td width="50%"><img src="assets/job.png" alt="The /jobs screen: a summary line, the job rows with status glyphs and elapsed times, and the focused job's command, cwd, and last output line" width="100%"></td>
169
179
  <td width="50%"><img src="assets/rewind.png" alt="The /rewind screen: prompt rows newest first, a diamond marking prompts with a code snapshot, and the focused prompt's snapshot detail" width="100%"></td>
170
180
  </tr>
181
+ <tr>
182
+ <td width="50%"><img src="assets/session.png" alt="The /sessions screen: a counts summary, session rows with unread and claim counts, the focused session's cwd, claims, and identity, and the Tab scope and watch hints" width="100%"></td>
183
+ <td width="50%"><img src="assets/watch.png" alt="The /watch screen: a summary line and watcher rows with live match counts and the focused watcher's pattern and source" width="100%"></td>
184
+ </tr>
171
185
  </table>
172
186
 
173
187
  ### Tool renderings
@@ -178,7 +192,7 @@ each tool's own renderer (or bytefly's generic fallback): the user nameplate and
178
192
  a notice, Pi's built-ins, and every tool this package registers. The rail glyph
179
193
  is the `chrome.rail` setting.
180
194
 
181
- ![A full-page reference of every tool block: the user nameplate, a notice, the turn rule, Pi's read, write, edit, bash, grep, find, and ls renderers, and every package tool — todo, goal, memory, job, watch, subagent, web_search, web_fetch, read_doc, open_path, run_doctor, run_check, send_wechat, ask_user_question, the plan tools, and the worktree tools](assets/tool-renderings.png)
195
+ ![A full-page reference of every tool block: the user nameplate, a notice, the turn rule, Pi's read, write, edit, bash, grep, find, and ls renderers, and every package tool — todo, goal, memory, job, watch, subagent, web_search, web_fetch, read_doc, open_path, run_doctor, run_check, send_wechat, ask_user_question, session, the plan tools, and the worktree tools](assets/tool-renderings.png)
182
196
 
183
197
  `bun run screenshot:tools` regenerates it; `bun run screenshot:tool-pngs` writes
184
198
  one image per tool under [`assets/tools/`](./assets/tools).
package/README.zh-CN.md CHANGED
@@ -33,14 +33,15 @@ Pi 提供一个精简而锐利的内核。这个包是在其之上的一层,
33
33
  - **先规划,再执行。** 只读的规划模式把一次任务变成一份可审阅的计划文件,智能体
34
34
  随后按步骤执行。
35
35
  - **委派与并行。** 在各自的 Pi 进程中运行专职子智能体,把耗时构建交给后台任务,
36
- 让 watcher 盯住日志直到出现关键行 —— 你继续把握主线。
36
+ 让 watcher 盯住日志直到出现关键行,还能让同一仓库上的多个会话通过共享总线协作、
37
+ 各自负责自己的一摊 —— 你继续把握主线。
37
38
  - **绝不搞乱检出区。** 隔离只需一条命令:任务切到自己分支的 `git worktree` 中,
38
39
  每次提示还会生成快照,因此一次糟糕的回合只需一个 `/rewind` 就能回退。
39
40
  - **跨会话记忆。** 持久笔记以纯 Markdown 保存,可读、可改、可纳入版本控制。
40
41
  - **连通网络与文件。** 在会话内搜索、抓取、浏览、打开和读取文档与表格,还可通过桥接
41
42
  在微信里直接回答当前会话。
42
43
 
43
- 一切都是可选的,且可独立开关。没有任何东西被分叉,也没有修改已安装的 Pi 文件:
44
+ 一切都是可选的,且可独立开关。没有任何东西被分叉,也没有写入任何已安装的 Pi 文件:
44
45
  Pi 通过 [`package.json`](./package.json) 里的 `pi` manifest 发现这些资源,因此
45
46
  该包能像其他包一样随 Pi 一起升级。
46
47
 
@@ -64,31 +65,35 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
64
65
 
65
66
  - `/bytefly [extension] [refresh]` 打开控制中心的 Extensions 区,列出每个已加载扩展
66
67
  及其运行时健康状况,启用或禁用一个扩展,并用 `x` 清除项目级覆盖。
67
- - `/bytefly settings` 打开控制中心的 Settings 区:一次会话会改动的十四项设置排成
68
+ - `/bytefly settings` 打开控制中心的 Settings 区:一次会话会改动的十三项设置排成
68
69
  一列,值紧跟在名称之后;用 `Space`/`Enter` 修改,用 `Tab` 切换 Global/Project
69
70
  作用域。其余键都是 `bytefly.json` 编辑,见配置参考。
71
+ - `/bytefly skills` 打开控制中心的 Skills 区:每个 Pi 技能一行,带启用复选框与
72
+ `SKILL.md` 声明的描述,用 `Space` 在当前作用域开关它。
70
73
  - `/bytefly doctor [extension] [refresh]` 打印 doctor 报告(`run_doctor` 的文本),
71
74
  检查每个已启用扩展在运行时是否具备所需条件。
72
75
  - `/bytefly update` 立即重跑包更新检查,报告可更新的包、本包版本与 release URL,
73
76
  或跳过原因。
74
77
  - `/plan <任务>` 以只读规划模式开始一个任务。
75
- - `/skill:init` 通过内置的简短访谈和先审阅的计划创建或更新 `AGENTS.md`。
78
+ - `/skill:init` 通过内置的简短访谈和先审阅的计划创建或更新 Pi 实际读取的指令文件。
76
79
 
77
80
  还有一件包会自行做的事:每次交互式会话启动时,`bytefly` 询问 Pi 的包管理器
78
- 哪些已配置的包有更新,抑制 Pi 自己的启动更新块,并用一个主题化 notice 列出它们
79
- 和 `pi update --extensions`;本包的新版本还会标在头部。不会发送任何会话内容,
80
- `PI_OFFLINE` 可跳过检查;信任边界见 [`docs/security.md`](./docs/security.md)。
81
+ 哪些已配置的包有更新,抑制 Pi 自己的启动更新块,并用主题化 notice 列出它们
82
+ 和 `pi update --extensions`;Pi 自身的新版本也由它绘制,提示 `pi update` 与
83
+ changelog。新版本还会标在头部 —— 本包的与 Pi 自己的。不会发送任何会话内容
84
+ (Pi 自己的版本请求只是被重新绘制),`PI_OFFLINE` 可跳过检查;信任边界见
85
+ [`docs/security.md`](./docs/security.md)。
81
86
 
82
87
  ## 包含内容
83
88
 
84
- 18 个扩展、3 个随包技能,以及 2 个主题,按你想达成的目标分组。每个扩展自己的 `README.md`
89
+ 19 个扩展、5 个随包技能,以及 2 个主题,按你想达成的目标分组。每个扩展自己的 `README.md`
85
90
  提供完整的工具与命令说明。
86
91
 
87
92
  ### 规划与委派
88
93
 
89
94
  | 扩展 | 工具与命令 | 说明 |
90
95
  |---|---|---|
91
- | [`plan`](./extensions/plan/) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | 只读规划:模型先调研,把计划保存到 `.pi/plans` 下,你在写入任何内容前先批准。可在 TUI 中审阅,或在浏览器中打开以留下行内评论。`init` 技能复用同一审阅流程来创建或更新项目的 `AGENTS.md`。 |
96
+ | [`plan`](./extensions/plan/) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `cancel_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | 只读规划:模型先调研,把计划保存到 `~/.pi/agent/plans/<repo-key>` 下(每个仓库一份,各 worktree 共享),你在写入任何内容前先批准;开启 `plan.split` 后,批准时还可以把计划拆成切片,由独立会话按名字加入。可在 TUI 中审阅,或在浏览器中打开以留下行内评论:页面会跟随计划文件实时更新,你也可以给每位同事各一个审阅链接,各自以绑定的名义评论。`init` 技能复用同一审阅流程来创建或更新项目的 `AGENTS.md`。 |
92
97
  | [`check`](./extensions/check/) | `run_check`, `/check` | 检测项目的测试、lint 或类型检查命令(或使用 `check.command`),在受监管的进程中运行,并把失败整理成可导航的 `file:line` 列表。 |
93
98
  | [`subagent`](./extensions/subagent/) | `subagent`, `/agents` | 把任务委派给专职智能体(`explorer`、`planner`、`reviewer`、`worker`、`researcher`、`tester`、`debugger`、`documenter`),运行在它自己的 Pi 进程中 —— 单个、并行、链式或在后台运行;后台运行时在页脚显示数量,完成后发出提示。 |
94
99
  | [`todo`](./extensions/todo/) | `todo`, `/todos` | 持久任务列表(`pending` / `in_progress` / `completed`),配一行式 widget。 |
@@ -96,13 +101,14 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
96
101
  | [`question`](./extensions/question/) | `ask_user_question` | 向你提出一个或多个结构化问题(带标签的选项外加自由填写的“其他”)并等待回答。 |
97
102
  | [`job`](./extensions/job/) | `job`, `/jobs` | 在后台运行长时 shell 命令;查看日志、等待或结束它们。 |
98
103
  | [`watch`](./extensions/watch/) | `watch`, `/watch` | 跟踪文件或命令输出,按模式匹配行,并提醒你或把匹配的行交给智能体。 |
104
+ | [`session-bus`](./extensions/session-bus/) | `session`, `/sessions`(屏幕) | 在同一仓库的多个 Pi 会话之间协调:发现彼此、交换简短消息/事件、读取收件箱、加入已批准拆分中的一个切片或编辑前声明路径;`/sessions` 是显示对等会话、未读邮件和路径声明的实时面板。本地、默认拉取式;会话可以自行开启收件箱监视,在空闲时唤起本会话的一轮,从不创建智能体。 |
99
105
  | [`context`](./extensions/context/) | `/context` | 显示上下文窗口的去向 —— 系统提示、工具定义、按角色拆分的对话、注入的笔记 —— 并从报告中触发压缩,给出压缩前后的数字。 |
100
106
 
101
107
  ### 保护你的工作
102
108
 
103
109
  | 扩展 | 工具与命令 | 说明 |
104
110
  |---|---|---|
105
- | [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree status|enter|exit|prune`, `--worktree` | 在隔离的 `git worktree` 里、在独立分支上工作;内置的 read/write/edit/bash 工具会跟随,清理时也不会丢弃工作。 |
111
+ | [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree` (screen), `/worktree enter|exit|prune`, `--worktree` | 在隔离的 `git worktree` 里、在独立分支上工作;内置的 read/write/edit/bash 工具会跟随,清理时也不会丢弃工作。 |
106
112
  | [`rewind`](./extensions/rewind/) | `/rewind`, `/review`, `↺ N` 状态标记 | 每次提示时在 `refs/pi/rewind` 下对仓库生成快照,可恢复代码、对话或两者,并在还原文件前审阅本轮改动。 |
107
113
  | [`memory`](./extensions/memory/) | `memory`, `/memory` | 跨会话的持久笔记,以可人工编辑的 Markdown 保存,注入每次运行,并通过 `/memory` 选择器管理。 |
108
114
 
@@ -111,7 +117,7 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
111
117
  | 扩展 | 工具与命令 | 说明 |
112
118
  |---|---|---|
113
119
  | [`web-access`](./extensions/web-access/) | `web_search`, `web_fetch` | 搜索网络(默认无密钥的 DuckDuckGo,可选 SearXNG 或 Brave),并把页面抓取为可读文本,支持分页、`find`、逐跳 SSRF 检查以及可选的 PDF 支持。 |
114
- | [`file-browse`](./extensions/file-browse/) | `/browse` | 启动一个以工作目录为根的本地回环、只读文件浏览器,带 Markdown 预览、模糊快速打开面板,以及为常开页面提供的实时状态。 |
120
+ | [`file-browse`](./extensions/file-browse/) | `/browse` | 启动一个以工作目录为根的本地回环、只读文件浏览器,带 Markdown 预览、模糊快速打开面板、从选区复制 `path:12-30` 引用、为常开页面提供的实时状态,以及所列目录变化时的重新加载提示。 |
115
121
  | [`file-read`](./extensions/file-read/) | `read_doc` | 在进程内从本地 PDF、DOCX、DOC、ODT、RTF 或 XLSX 提取文本,支持分页。 |
116
122
  | [`file-open`](./extensions/file-open/) | `/open`, `open_path` | 用操作系统原生应用打开或定位文件/目录。 |
117
123
  | [`wechat`](./extensions/wechat/) | `/wechat`, `send_wechat` | 通过微信 iLink 机器人 API 把微信聊天桥接到实时会话;入站文本、图片和文件会变成回合。 |
@@ -120,7 +126,7 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
120
126
 
121
127
  | 扩展 | 工具与命令 | 说明 |
122
128
  |---|---|---|
123
- | [`bytefly`](./extensions/bytefly/) | `/bytefly`(`doctor`、`settings`、`update` 子命令)、`run_doctor` | 可见的那一层:主题化头部配宽度自适应页脚,Pi 工作行上实时显示工具、调用次数与计时,转录中每个工具块以调用行为标题、结果正文挂在其下方。`/bytefly` 可开关扩展并集中存放精选设置;可选的 `notify` 会在一次运行、后台任务或待回答的问题需要你时发出系统通知。`bytefly.json` 是每个扩展都会读取的配置文档。 |
129
+ | [`bytefly`](./extensions/bytefly/) | `/bytefly`(`doctor`、`settings`、`skills`、`update` 子命令)、`run_doctor` | 可见的那一层:主题化头部配宽度自适应页脚,Pi 工作行上实时显示工具、调用次数与计时,转录中每个工具块以调用行为标题、结果正文挂在其下方。`/bytefly` 可开关扩展与技能,并集中存放精选设置;可选的 `notify` 会在一次运行、后台任务或待回答的问题需要你时发出系统通知,Pi 自己的启动更新块也会变成主题化 notice 与头部标记。`bytefly.json` 是每个扩展都会读取的配置文档。 |
124
130
 
125
131
  ### 技能
126
132
 
@@ -128,9 +134,11 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
128
134
 
129
135
  | 技能 | 说明 |
130
136
  |---|---|
131
- | [`init`](./skills/init/SKILL.md) | 基于仓库证据,通过内置的交互式访谈和计划审阅创建或更新项目的 `AGENTS.md`。 |
137
+ | [`init`](./skills/init/SKILL.md) | 通过内置的交互式访谈和计划审阅,基于仓库证据创建或更新 Pi 实际读取的指令文件(`AGENTS.md`;存在覆盖它的 `AGENTS.override.md` 时则是该文件),并从仓库推导命令、生成路径与包范围。 |
132
138
  | [`refactor`](./skills/refactor/SKILL.md) | 审计项目或路径中的重构机会:重复代码、过大的模块、耦合、结构漂移,以及测试薄弱且改动频繁的代码。返回带证据和验证命令的排序清单;发现阶段只读。 |
133
- | [`changelog`](./skills/changelog/SKILL.md) | 实现前先起草候选条目,实施后在同一次提交中记录一条用户可见的变更,审计上一个 tag 以来缺失或薄弱的条目,并按项目自己的规则整理发布段落。 |
139
+ | [`changelog`](./skills/changelog/SKILL.md) | 在变更的同一次提交中记录一条用户可见的条目,审计上一个 tag 以来缺失或薄弱的条目,并按项目自己的规则整理发布段落。 |
140
+ | [`parallel-dev`](./skills/parallel-dev/SKILL.md) | 以“负责人加团队”的方式组织并行开发:负责人对契约、共享文件、合并顺序和绿色基线负责,同时自己承担一个工作流;每个互不重叠的工作流各有一名所有者,先做可运行的纵向骨架,声明路径,在每个回合的边界协作,并由他人独立验证。 |
141
+ | [`next`](./skills/next/SKILL.md) | 按优先级建议接下来的待办——未收尾的工作、已破坏或未兑现的承诺——会话已有工作时基于本次会话,仅当会话为空时才基于代码树;命令后的文字说明问什么、路径说明看哪里。只读,输出带证据和启动命令的简短编号清单。 |
134
142
 
135
143
  ### 主题
136
144
 
@@ -152,6 +160,10 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
152
160
  <td width="50%"><img src="assets/job.png" alt="/jobs 屏幕:摘要行、带状态字形和耗时的任务行,以及焦点任务的命令、工作目录和最后一行输出" width="100%"></td>
153
161
  <td width="50%"><img src="assets/rewind.png" alt="/rewind 屏幕:从新到旧的提示行、标记有代码快照的菱形,以及焦点提示的快照详情" width="100%"></td>
154
162
  </tr>
163
+ <tr>
164
+ <td width="50%"><img src="assets/session.png" alt="/sessions 屏幕:计数摘要、带未读数和路径声明数的会话行、焦点会话的工作目录、声明和身份,以及 Tab 范围与监视提示" width="100%"></td>
165
+ <td width="50%"><img src="assets/watch.png" alt="/watch 屏幕:摘要行和带实时匹配数的监视行,以及焦点监视的模式与来源" width="100%"></td>
166
+ </tr>
155
167
  </table>
156
168
 
157
169
  ### 工具渲染
@@ -161,7 +173,7 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
161
173
  (每个工具自身的渲染器或 bytefly 的通用回退)——用户铭牌与通知、Pi 内置工具,以及本包注册的每个工具。
162
174
  侧栏字形由 `chrome.rail` 设置。
163
175
 
164
- ![每个工具块的全页参考图:用户铭牌、通知、回合分隔线,Pi 的 read、write、edit、bash、grep、find、ls 渲染器,以及每个包内工具——todo、goal、memory、job、watch、subagent、web_search、web_fetch、read_doc、open_path、run_doctor、send_wechat、ask_user_question、plan 工具与 worktree 工具](assets/tool-renderings.png)
176
+ ![每个工具块的全页参考图:用户铭牌、通知、回合分隔线,Pi 的 read、write、edit、bash、grep、find、ls 渲染器,以及每个包内工具——todo、goal、memory、job、watch、subagent、web_search、web_fetch、read_doc、open_path、run_doctor、send_wechat、ask_user_question、session、plan 工具与 worktree 工具](assets/tool-renderings.png)
165
177
 
166
178
  `bun run screenshot:tools` 重新生成它;`bun run screenshot:tool-pngs` 在
167
179
  [`assets/tools/`](./assets/tools) 下为每个工具输出一张图。