@gavin-hu/my-pi-agent 0.15.1 → 0.17.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 (189) hide show
  1. package/README.md +22 -13
  2. package/README.zh-CN.md +19 -11
  3. package/extensions/bytefly/README.md +255 -200
  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/notice/component.ts +6 -4
  17. package/extensions/bytefly/notice/config.ts +16 -2
  18. package/extensions/bytefly/panel/commands.ts +46 -25
  19. package/extensions/bytefly/panel/format.ts +52 -22
  20. package/extensions/bytefly/panel/join.ts +36 -15
  21. package/extensions/bytefly/panel/settings.ts +72 -392
  22. package/extensions/bytefly/panel/skills.ts +51 -0
  23. package/extensions/bytefly/panel/tui/entries.ts +16 -14
  24. package/extensions/bytefly/panel/tui/extensions-view.ts +7 -58
  25. package/extensions/bytefly/panel/tui/frame.ts +11 -3
  26. package/extensions/bytefly/panel/tui/list-view.ts +72 -0
  27. package/extensions/bytefly/panel/tui/nav.ts +71 -3
  28. package/extensions/bytefly/panel/tui/settings-section.ts +250 -0
  29. package/extensions/bytefly/panel/tui/settings-view.ts +8 -12
  30. package/extensions/bytefly/panel/tui/skills-view.ts +50 -0
  31. package/extensions/bytefly/panel/tui.ts +223 -333
  32. package/extensions/bytefly/panel/types.ts +26 -8
  33. package/extensions/bytefly/picker/discovery.ts +32 -27
  34. package/extensions/bytefly/picker/resources.ts +22 -10
  35. package/extensions/bytefly/picker/runtime.ts +62 -34
  36. package/extensions/bytefly/picker/toggle.ts +16 -10
  37. package/extensions/bytefly/picker/types.ts +31 -13
  38. package/extensions/bytefly/update/format.ts +66 -8
  39. package/extensions/bytefly/update/patch.ts +66 -0
  40. package/extensions/bytefly/update/register.ts +4 -11
  41. package/extensions/bytefly/update/release.ts +65 -0
  42. package/extensions/bytefly/update/state.ts +14 -0
  43. package/extensions/bytefly/update/suppress.ts +47 -29
  44. package/extensions/bytefly/update/types.ts +15 -5
  45. package/extensions/bytefly/working/register.ts +2 -8
  46. package/extensions/check/tools.ts +2 -11
  47. package/extensions/check/tui.ts +2 -0
  48. package/extensions/context/README.md +172 -0
  49. package/extensions/context/collect.ts +53 -0
  50. package/extensions/context/commands.ts +100 -0
  51. package/extensions/context/format.ts +84 -0
  52. package/extensions/context/index.ts +16 -0
  53. package/extensions/context/report.ts +332 -0
  54. package/extensions/context/tui.ts +284 -0
  55. package/extensions/context/types.ts +124 -0
  56. package/extensions/file-browse/README.md +67 -19
  57. package/extensions/file-browse/client.ts +16 -463
  58. package/extensions/file-browse/config.ts +8 -0
  59. package/extensions/file-browse/html.ts +9 -7
  60. package/extensions/file-browse/index.ts +17 -2
  61. package/extensions/file-browse/live-client.ts +13 -13
  62. package/extensions/file-browse/live.ts +44 -10
  63. package/extensions/file-browse/markdown.ts +3 -10
  64. package/extensions/file-browse/palette.ts +224 -0
  65. package/extensions/file-browse/raw-html.ts +3 -10
  66. package/extensions/file-browse/router.ts +2 -2
  67. package/extensions/file-browse/server.ts +13 -2
  68. package/extensions/file-browse/styles.ts +8 -3
  69. package/extensions/file-browse/tree.ts +381 -0
  70. package/extensions/file-open/README.md +1 -2
  71. package/extensions/{document → file-read}/README.md +76 -57
  72. package/extensions/{document → file-read}/config.ts +12 -9
  73. package/extensions/{document → file-read}/extract/doc.ts +2 -2
  74. package/extensions/{document → file-read}/extract/docx.ts +3 -3
  75. package/extensions/{document → file-read}/extract/file.ts +9 -9
  76. package/extensions/{document → file-read}/extract/odt.ts +10 -8
  77. package/extensions/{document → file-read}/extract/pdf.ts +3 -3
  78. package/extensions/{document → file-read}/extract/rtf.ts +3 -3
  79. package/extensions/{document → file-read}/extract/xlsx.ts +4 -4
  80. package/extensions/{document → file-read}/formats.ts +11 -11
  81. package/extensions/file-read/index.ts +17 -0
  82. package/extensions/{document → file-read}/paging.ts +15 -13
  83. package/extensions/{document → file-read}/render.ts +17 -13
  84. package/extensions/{document → file-read}/schema.ts +7 -7
  85. package/extensions/{document → file-read}/tool.ts +36 -28
  86. package/extensions/goal/tools.ts +16 -25
  87. package/extensions/job/commands.ts +32 -46
  88. package/extensions/job/index.ts +20 -45
  89. package/extensions/job/runtime.ts +6 -8
  90. package/extensions/job/tools.ts +58 -103
  91. package/extensions/memory/commands.ts +30 -44
  92. package/extensions/memory/tools.ts +10 -20
  93. package/extensions/memory/tui.ts +5 -1
  94. package/extensions/plan/README.md +88 -33
  95. package/extensions/plan/commands.ts +19 -4
  96. package/extensions/plan/config.ts +27 -0
  97. package/extensions/plan/plan-index.ts +3 -1
  98. package/extensions/plan/plans.ts +31 -13
  99. package/extensions/plan/review.ts +34 -14
  100. package/extensions/plan/runtime.ts +3 -1
  101. package/extensions/plan/steps.ts +43 -14
  102. package/extensions/plan/tools/cancel.ts +79 -0
  103. package/extensions/plan/tools/enter.ts +16 -17
  104. package/extensions/plan/tools/exit.ts +60 -50
  105. package/extensions/plan/tools/steps.ts +13 -26
  106. package/extensions/plan/tools/write.ts +30 -38
  107. package/extensions/plan/tools.ts +5 -2
  108. package/extensions/plan/tui.ts +9 -7
  109. package/extensions/plan/types.ts +8 -0
  110. package/extensions/plan/web-chrome.ts +101 -0
  111. package/extensions/plan/web-client.ts +98 -311
  112. package/extensions/plan/web-markdown.ts +222 -0
  113. package/extensions/plan/web-page.ts +28 -2
  114. package/extensions/plan/web-router.ts +2 -2
  115. package/extensions/plan/web.ts +21 -12
  116. package/extensions/question/tools.ts +5 -4
  117. package/extensions/rewind/checklist.ts +4 -0
  118. package/extensions/rewind/review-tui.ts +3 -1
  119. package/extensions/rewind/rewind-tui.ts +4 -0
  120. package/extensions/subagent/README.md +25 -12
  121. package/extensions/subagent/background.ts +1 -7
  122. package/extensions/subagent/format.ts +72 -25
  123. package/extensions/subagent/index.ts +21 -47
  124. package/extensions/subagent/orchestrate.ts +18 -41
  125. package/extensions/subagent/render.ts +29 -42
  126. package/extensions/subagent/stream.ts +24 -18
  127. package/extensions/subagent/types.ts +7 -0
  128. package/extensions/todo/tools.ts +15 -20
  129. package/extensions/todo/tui.ts +5 -1
  130. package/extensions/watch/README.md +5 -5
  131. package/extensions/watch/commands.ts +33 -47
  132. package/extensions/watch/index.ts +10 -35
  133. package/extensions/watch/runtime.ts +5 -7
  134. package/extensions/watch/tools.ts +38 -77
  135. package/extensions/web-access/README.md +3 -3
  136. package/extensions/web-access/search/search.ts +9 -18
  137. package/extensions/wechat/README.md +40 -18
  138. package/extensions/wechat/bridge.ts +38 -40
  139. package/extensions/wechat/client.ts +1 -4
  140. package/extensions/wechat/commands.ts +1 -1
  141. package/extensions/wechat/interaction.ts +25 -4
  142. package/extensions/wechat/login-screen.ts +2 -3
  143. package/extensions/wechat/notices.ts +7 -5
  144. package/extensions/wechat/prompt.ts +19 -4
  145. package/extensions/wechat/qrcode.ts +9 -9
  146. package/extensions/wechat/slash.ts +14 -0
  147. package/extensions/wechat/status-screen.ts +2 -2
  148. package/extensions/wechat/timer.ts +9 -30
  149. package/extensions/wechat/tools.ts +7 -18
  150. package/extensions/worktree/README.md +48 -12
  151. package/extensions/worktree/commands.ts +109 -65
  152. package/extensions/worktree/enter.ts +1 -1
  153. package/extensions/worktree/exit.ts +11 -1
  154. package/extensions/worktree/lifecycle.ts +9 -1
  155. package/extensions/worktree/screen.ts +263 -0
  156. package/extensions/worktree/status.ts +84 -38
  157. package/lib/README.md +15 -11
  158. package/lib/config.ts +12 -0
  159. package/lib/escape.ts +15 -2
  160. package/lib/format.ts +6 -2
  161. package/lib/interaction.ts +18 -1
  162. package/lib/pdf.ts +2 -2
  163. package/lib/report.ts +75 -2
  164. package/lib/requirements.ts +2 -2
  165. package/lib/screen-session.ts +85 -0
  166. package/lib/timer.ts +61 -0
  167. package/lib/tool-result.ts +54 -4
  168. package/lib/tui/README.md +19 -11
  169. package/lib/tui/chrome.ts +27 -6
  170. package/lib/tui/columns.ts +33 -8
  171. package/lib/tui/dock-screen.ts +6 -2
  172. package/lib/tui/gauge.ts +9 -5
  173. package/lib/tui/rows.ts +15 -6
  174. package/lib/tui/rules.ts +4 -8
  175. package/lib/tui/tool.ts +55 -2
  176. package/lib/usage.ts +26 -0
  177. package/lib/web/README.md +131 -0
  178. package/lib/web/base.ts +19 -2
  179. package/lib/web/components.ts +10 -6
  180. package/lib/web/layout.ts +2 -0
  181. package/lib/web/markup.ts +2 -1
  182. package/lib/web/runtime.ts +103 -25
  183. package/lib/web/tokens.ts +23 -7
  184. package/package.json +10 -4
  185. package/skills/changelog/SKILL.md +148 -0
  186. package/skills/next/SKILL.md +184 -0
  187. package/extensions/document/index.ts +0 -17
  188. /package/extensions/{document → file-read}/deadline.ts +0 -0
  189. /package/extensions/{document → file-read}/extract/vendor.d.ts +0 -0
package/README.md CHANGED
@@ -43,8 +43,8 @@ want the agent to *think first and work safely*:
43
43
  - **Remember across sessions.** Durable notes live in plain markdown that you
44
44
  can read, edit, and version.
45
45
  - **Reach the web and your files.** Search, fetch, browse, open, and read
46
- documents from inside the session, and answer a WeChat chat through a bridge to
47
- the live session.
46
+ documents and spreadsheets from inside the session, and answer a WeChat chat
47
+ through a bridge to the live session.
48
48
 
49
49
  Everything is optional and independently toggleable. Nothing is forked, and no
50
50
  installed Pi file is modified: Pi discovers the resources through the `pi`
@@ -73,9 +73,13 @@ Then, from inside Pi:
73
73
  - `/bytefly [extension] [refresh]` opens the control center on Extensions, lists
74
74
  every loaded extension with its runtime health, enables or disables one, and
75
75
  clears a project override with `x`.
76
- - `/bytefly settings` opens the control center's Settings section: the curated
77
- settings, grouped by area, plus a **Theme** row, with `Space`/`Enter` to change
78
- a value and `Tab` for Global/Project scope.
76
+ - `/bytefly settings` opens the control center's Settings section: one flat list
77
+ of the thirteen preferences a session changes, each with its value beside the
78
+ label, `Space`/`Enter` to change one and `Tab` for Global/Project scope. Every
79
+ other key is a `bytefly.json` edit, listed in the configuration reference.
80
+ - `/bytefly skills` opens the control center's Skills section: one row per Pi
81
+ skill with its enable checkbox, its declared description underneath, and
82
+ `Space` to switch it on or off for the active scope.
79
83
  - `/bytefly doctor [extension] [refresh]` prints the doctor report —
80
84
  `run_doctor`'s text — and checks that each enabled extension has what it needs
81
85
  at runtime.
@@ -86,21 +90,23 @@ Then, from inside Pi:
86
90
 
87
91
  One thing the pack does on its own: once per interactive session, `bytefly`
88
92
  asks Pi's package manager which configured packages are behind, suppresses Pi's
89
- own startup update block, and posts one themed notice naming
90
- `pi update --extensions`; this package's new version also marks the header.
91
- Nothing about the session is sent, and `PI_OFFLINE` skips the check;
93
+ own startup update blocks, and posts one themed notice naming
94
+ `pi update --extensions`, plus one for a newer Pi that names `pi update` and the
95
+ changelog; a new version also marks the header — this package's, and Pi's own.
96
+ Nothing about the session is sent — Pi's own release request is only re-rendered —
97
+ and `PI_OFFLINE` skips the check;
92
98
  [`docs/security.md`](./docs/security.md) covers the trust boundaries.
93
99
 
94
100
  ## What you get
95
101
 
96
- 17 extensions, 2 packaged skills, and 2 themes, grouped by what you are trying
102
+ 18 extensions, 3 packaged skills, and 2 themes, grouped by what you are trying
97
103
  to do. Each extension's own `README.md` has the full tool and command surface.
98
104
 
99
105
  ### Plan and delegate
100
106
 
101
107
  | Extension | Tools and commands | What it does |
102
108
  |---|---|---|
103
- | [`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`. |
109
+ | [`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/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`. |
104
110
  | [`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. |
105
111
  | [`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. |
106
112
  | [`todo`](./extensions/todo/) | `todo`, `/todos` | A persistent task list (`pending` / `in_progress` / `completed`) with a one-line widget. |
@@ -108,12 +114,13 @@ to do. Each extension's own `README.md` has the full tool and command surface.
108
114
  | [`question`](./extensions/question/) | `ask_user_question` | Ask you one or more structured questions (labelled options plus free-form "Other") and wait. |
109
115
  | [`job`](./extensions/job/) | `job`, `/jobs` | Run long-lived shell commands in the background; inspect logs, wait, or kill them. |
110
116
  | [`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. |
117
+ | [`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. |
111
118
 
112
119
  ### Keep your work safe
113
120
 
114
121
  | Extension | Tools and commands | What it does |
115
122
  |---|---|---|
116
- | [`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. |
123
+ | [`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. |
117
124
  | [`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. |
118
125
  | [`memory`](./extensions/memory/) | `memory`, `/memory` | Durable cross-session notes as human-editable markdown, injected into each run and managed through the `/memory` picker. |
119
126
 
@@ -123,7 +130,7 @@ to do. Each extension's own `README.md` has the full tool and command surface.
123
130
  |---|---|---|
124
131
  | [`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. |
125
132
  | [`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. |
126
- | [`document`](./extensions/document/) | `read_doc` | Extract text from a local PDF, DOCX, DOC, ODT, RTF, or XLSX in process, paged. |
133
+ | [`file-read`](./extensions/file-read/) | `read_doc` | Extract text from a local PDF, DOCX, DOC, ODT, RTF, or XLSX in process, paged. |
127
134
  | [`file-open`](./extensions/file-open/) | `/open`, `open_path` | Open or reveal a file or directory in the OS-native application. |
128
135
  | [`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. |
129
136
 
@@ -131,7 +138,7 @@ to do. Each extension's own `README.md` has the full tool and command surface.
131
138
 
132
139
  | Extension | Tools and commands | What it does |
133
140
  |---|---|---|
134
- | [`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. |
141
+ | [`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. |
135
142
 
136
143
  ### Skills
137
144
 
@@ -143,6 +150,8 @@ advertised to the model, and its instructions load only when the task matches
143
150
  |---|---|
144
151
  | [`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. |
145
152
  | [`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. |
153
+ | [`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. |
154
+ | [`next`](./skills/next/SKILL.md) | Triages what to do next — loose work, a broken or unfinished promise — from the tree or from this conversation (`/skill:next session`), with the words and a path after the command saying what to ask and where to look. Read-only, and capped at a short ranked list with evidence and the command that starts each. |
146
155
 
147
156
  ### Themes
148
157
 
package/README.zh-CN.md CHANGED
@@ -37,7 +37,7 @@ Pi 提供一个精简而锐利的内核。这个包是在其之上的一层,
37
37
  - **绝不搞乱检出区。** 隔离只需一条命令:任务切到自己分支的 `git worktree` 中,
38
38
  每次提示还会生成快照,因此一次糟糕的回合只需一个 `/rewind` 就能回退。
39
39
  - **跨会话记忆。** 持久笔记以纯 Markdown 保存,可读、可改、可纳入版本控制。
40
- - **连通网络与文件。** 在会话内搜索、抓取、浏览、打开和读取文档,还可通过桥接
40
+ - **连通网络与文件。** 在会话内搜索、抓取、浏览、打开和读取文档与表格,还可通过桥接
41
41
  在微信里直接回答当前会话。
42
42
 
43
43
  一切都是可选的,且可独立开关。没有任何东西被分叉,也没有修改已安装的 Pi 文件:
@@ -64,8 +64,11 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
64
64
 
65
65
  - `/bytefly [extension] [refresh]` 打开控制中心的 Extensions 区,列出每个已加载扩展
66
66
  及其运行时健康状况,启用或禁用一个扩展,并用 `x` 清除项目级覆盖。
67
- - `/bytefly settings` 打开控制中心的 Settings 区:精选设置按类别分组,并提供
68
- **Theme** 行;用 `Space`/`Enter` 修改,用 `Tab` 切换 Global/Project 作用域。
67
+ - `/bytefly settings` 打开控制中心的 Settings 区:一次会话会改动的十三项设置排成
68
+ 一列,值紧跟在名称之后;用 `Space`/`Enter` 修改,用 `Tab` 切换 Global/Project
69
+ 作用域。其余键都是 `bytefly.json` 编辑,见配置参考。
70
+ - `/bytefly skills` 打开控制中心的 Skills 区:每个 Pi 技能一行,带启用复选框与
71
+ `SKILL.md` 声明的描述,用 `Space` 在当前作用域开关它。
69
72
  - `/bytefly doctor [extension] [refresh]` 打印 doctor 报告(`run_doctor` 的文本),
70
73
  检查每个已启用扩展在运行时是否具备所需条件。
71
74
  - `/bytefly update` 立即重跑包更新检查,报告可更新的包、本包版本与 release URL,
@@ -74,20 +77,22 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
74
77
  - `/skill:init` 通过内置的简短访谈和先审阅的计划创建或更新 `AGENTS.md`。
75
78
 
76
79
  还有一件包会自行做的事:每次交互式会话启动时,`bytefly` 询问 Pi 的包管理器
77
- 哪些已配置的包有更新,抑制 Pi 自己的启动更新块,并用一个主题化 notice 列出它们
78
- 和 `pi update --extensions`;本包的新版本还会标在头部。不会发送任何会话内容,
79
- `PI_OFFLINE` 可跳过检查;信任边界见 [`docs/security.md`](./docs/security.md)。
80
+ 哪些已配置的包有更新,抑制 Pi 自己的启动更新块,并用主题化 notice 列出它们
81
+ 和 `pi update --extensions`;Pi 自身的新版本也由它绘制,提示 `pi update` 与
82
+ changelog。新版本还会标在头部 —— 本包的与 Pi 自己的。不会发送任何会话内容
83
+ (Pi 自己的版本请求只是被重新绘制),`PI_OFFLINE` 可跳过检查;信任边界见
84
+ [`docs/security.md`](./docs/security.md)。
80
85
 
81
86
  ## 包含内容
82
87
 
83
- 17 个扩展、2 个随包技能,以及 2 个主题,按你想达成的目标分组。每个扩展自己的 `README.md`
88
+ 18 个扩展、4 个随包技能,以及 2 个主题,按你想达成的目标分组。每个扩展自己的 `README.md`
84
89
  提供完整的工具与命令说明。
85
90
 
86
91
  ### 规划与委派
87
92
 
88
93
  | 扩展 | 工具与命令 | 说明 |
89
94
  |---|---|---|
90
- | [`plan`](./extensions/plan/) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | 只读规划:模型先调研,把计划保存到 `.pi/plans` 下,你在写入任何内容前先批准。可在 TUI 中审阅,或在浏览器中打开以留下行内评论。`init` 技能复用同一审阅流程来创建或更新项目的 `AGENTS.md`。 |
95
+ | [`plan`](./extensions/plan/) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `cancel_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | 只读规划:模型先调研,把计划保存到 `.pi/plans` 下,你在写入任何内容前先批准。可在 TUI 中审阅,或在浏览器中打开以留下行内评论。`init` 技能复用同一审阅流程来创建或更新项目的 `AGENTS.md`。 |
91
96
  | [`check`](./extensions/check/) | `run_check`, `/check` | 检测项目的测试、lint 或类型检查命令(或使用 `check.command`),在受监管的进程中运行,并把失败整理成可导航的 `file:line` 列表。 |
92
97
  | [`subagent`](./extensions/subagent/) | `subagent`, `/agents` | 把任务委派给专职智能体(`explorer`、`planner`、`reviewer`、`worker`、`researcher`、`tester`、`debugger`、`documenter`),运行在它自己的 Pi 进程中 —— 单个、并行、链式或在后台运行;后台运行时在页脚显示数量,完成后发出提示。 |
93
98
  | [`todo`](./extensions/todo/) | `todo`, `/todos` | 持久任务列表(`pending` / `in_progress` / `completed`),配一行式 widget。 |
@@ -95,12 +100,13 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
95
100
  | [`question`](./extensions/question/) | `ask_user_question` | 向你提出一个或多个结构化问题(带标签的选项外加自由填写的“其他”)并等待回答。 |
96
101
  | [`job`](./extensions/job/) | `job`, `/jobs` | 在后台运行长时 shell 命令;查看日志、等待或结束它们。 |
97
102
  | [`watch`](./extensions/watch/) | `watch`, `/watch` | 跟踪文件或命令输出,按模式匹配行,并提醒你或把匹配的行交给智能体。 |
103
+ | [`context`](./extensions/context/) | `/context` | 显示上下文窗口的去向 —— 系统提示、工具定义、按角色拆分的对话、注入的笔记 —— 并从报告中触发压缩,给出压缩前后的数字。 |
98
104
 
99
105
  ### 保护你的工作
100
106
 
101
107
  | 扩展 | 工具与命令 | 说明 |
102
108
  |---|---|---|
103
- | [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree status|enter|exit|prune`, `--worktree` | 在隔离的 `git worktree` 里、在独立分支上工作;内置的 read/write/edit/bash 工具会跟随,清理时也不会丢弃工作。 |
109
+ | [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree` (screen), `/worktree enter|exit|prune`, `--worktree` | 在隔离的 `git worktree` 里、在独立分支上工作;内置的 read/write/edit/bash 工具会跟随,清理时也不会丢弃工作。 |
104
110
  | [`rewind`](./extensions/rewind/) | `/rewind`, `/review`, `↺ N` 状态标记 | 每次提示时在 `refs/pi/rewind` 下对仓库生成快照,可恢复代码、对话或两者,并在还原文件前审阅本轮改动。 |
105
111
  | [`memory`](./extensions/memory/) | `memory`, `/memory` | 跨会话的持久笔记,以可人工编辑的 Markdown 保存,注入每次运行,并通过 `/memory` 选择器管理。 |
106
112
 
@@ -110,7 +116,7 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
110
116
  |---|---|---|
111
117
  | [`web-access`](./extensions/web-access/) | `web_search`, `web_fetch` | 搜索网络(默认无密钥的 DuckDuckGo,可选 SearXNG 或 Brave),并把页面抓取为可读文本,支持分页、`find`、逐跳 SSRF 检查以及可选的 PDF 支持。 |
112
118
  | [`file-browse`](./extensions/file-browse/) | `/browse` | 启动一个以工作目录为根的本地回环、只读文件浏览器,带 Markdown 预览、模糊快速打开面板,以及为常开页面提供的实时状态。 |
113
- | [`document`](./extensions/document/) | `read_doc` | 在进程内从本地 PDF、DOCX、DOC、ODT、RTF 或 XLSX 提取文本,支持分页。 |
119
+ | [`file-read`](./extensions/file-read/) | `read_doc` | 在进程内从本地 PDF、DOCX、DOC、ODT、RTF 或 XLSX 提取文本,支持分页。 |
114
120
  | [`file-open`](./extensions/file-open/) | `/open`, `open_path` | 用操作系统原生应用打开或定位文件/目录。 |
115
121
  | [`wechat`](./extensions/wechat/) | `/wechat`, `send_wechat` | 通过微信 iLink 机器人 API 把微信聊天桥接到实时会话;入站文本、图片和文件会变成回合。 |
116
122
 
@@ -118,7 +124,7 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
118
124
 
119
125
  | 扩展 | 工具与命令 | 说明 |
120
126
  |---|---|---|
121
- | [`bytefly`](./extensions/bytefly/) | `/bytefly`(`doctor`、`settings`、`update` 子命令)、`run_doctor` | 可见的那一层:主题化头部配宽度自适应页脚,Pi 工作行上实时显示工具、调用次数与计时,转录中每个工具块以调用行为标题、结果正文挂在其下方。`/bytefly` 可开关扩展并集中存放精选设置;可选的 `notify` 会在一次运行、后台任务或待回答的问题需要你时发出系统通知。`bytefly.json` 是每个扩展都会读取的配置文档。 |
127
+ | [`bytefly`](./extensions/bytefly/) | `/bytefly`(`doctor`、`settings`、`skills`、`update` 子命令)、`run_doctor` | 可见的那一层:主题化头部配宽度自适应页脚,Pi 工作行上实时显示工具、调用次数与计时,转录中每个工具块以调用行为标题、结果正文挂在其下方。`/bytefly` 可开关扩展与技能,并集中存放精选设置;可选的 `notify` 会在一次运行、后台任务或待回答的问题需要你时发出系统通知,Pi 自己的启动更新块也会变成主题化 notice 与头部标记。`bytefly.json` 是每个扩展都会读取的配置文档。 |
122
128
 
123
129
  ### 技能
124
130
 
@@ -128,6 +134,8 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
128
134
  |---|---|
129
135
  | [`init`](./skills/init/SKILL.md) | 基于仓库证据,通过内置的交互式访谈和计划审阅创建或更新项目的 `AGENTS.md`。 |
130
136
  | [`refactor`](./skills/refactor/SKILL.md) | 审计项目或路径中的重构机会:重复代码、过大的模块、耦合、结构漂移,以及测试薄弱且改动频繁的代码。返回带证据和验证命令的排序清单;发现阶段只读。 |
137
+ | [`changelog`](./skills/changelog/SKILL.md) | 在变更的同一次提交中记录一条用户可见的条目,审计上一个 tag 以来缺失或薄弱的条目,并按项目自己的规则整理发布段落。 |
138
+ | [`next`](./skills/next/SKILL.md) | 梳理接下来该做什么——未收尾的工作、已破坏或未兑现的承诺——可基于代码树或本次会话(`/skill:next session`),命令后的文字说明问什么、路径说明看哪里。只读,输出带证据和启动命令的简短排序清单。 |
131
139
 
132
140
  ### 主题
133
141