@gavin-hu/my-pi-agent 0.8.1 → 0.10.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/README.md +35 -8
- package/README.zh-CN.md +33 -8
- package/assets/bytefly.schema.json +17 -1
- package/assets/chrome.png +0 -0
- package/assets/file-browse.png +0 -0
- package/assets/job.png +0 -0
- package/assets/plan-review.png +0 -0
- package/assets/question.png +0 -0
- package/assets/rewind.png +0 -0
- package/assets/todo.png +0 -0
- package/assets/tool-renderings.png +0 -0
- package/assets/tools/ask_user_question.png +0 -0
- package/assets/tools/bash.png +0 -0
- package/assets/tools/edit.png +0 -0
- package/assets/tools/enter_plan_mode.png +0 -0
- package/assets/tools/enter_worktree.png +0 -0
- package/assets/tools/exit_plan_mode.png +0 -0
- package/assets/tools/exit_worktree.png +0 -0
- package/assets/tools/find.png +0 -0
- package/assets/tools/goal.png +0 -0
- package/assets/tools/grep.png +0 -0
- package/assets/tools/job.png +0 -0
- package/assets/tools/list_worktrees.png +0 -0
- package/assets/tools/ls.png +0 -0
- package/assets/tools/memory.png +0 -0
- package/assets/tools/notice.png +0 -0
- package/assets/tools/open_path.png +0 -0
- package/assets/tools/prune_worktrees.png +0 -0
- package/assets/tools/read.png +0 -0
- package/assets/tools/read_doc.png +0 -0
- package/assets/tools/run_doctor.png +0 -0
- package/assets/tools/send_wechat.png +0 -0
- package/assets/tools/set_plan_steps.png +0 -0
- package/assets/tools/subagent.png +0 -0
- package/assets/tools/todo.png +0 -0
- package/assets/tools/turn-rule.png +0 -0
- package/assets/tools/user-message.png +0 -0
- package/assets/tools/watch.png +0 -0
- package/assets/tools/web_fetch.png +0 -0
- package/assets/tools/web_search.png +0 -0
- package/assets/tools/write.png +0 -0
- package/assets/tools/write_plan.png +0 -0
- package/extensions/bytefly/README.md +306 -68
- package/extensions/bytefly/block/component.ts +282 -0
- package/extensions/bytefly/block/config.ts +24 -0
- package/extensions/bytefly/block/fallback.ts +120 -0
- package/extensions/bytefly/block/register.ts +164 -0
- package/extensions/bytefly/chrome.ts +97 -0
- package/extensions/bytefly/doctor/format.ts +36 -10
- package/extensions/bytefly/doctor/tools.ts +10 -6
- package/extensions/bytefly/footer/config.ts +1 -1
- package/extensions/bytefly/footer/render/format.ts +5 -18
- package/extensions/bytefly/footer/render/layout.ts +2 -1
- package/extensions/bytefly/footer/render/segments.ts +51 -78
- package/extensions/bytefly/header/component.ts +49 -21
- package/extensions/bytefly/header/config.ts +28 -21
- package/extensions/bytefly/header/register.ts +6 -1
- package/extensions/bytefly/index.ts +32 -12
- package/extensions/bytefly/message/config.ts +15 -0
- package/extensions/bytefly/message/format.ts +42 -0
- package/extensions/bytefly/message/register.ts +15 -0
- package/extensions/bytefly/notice/component.ts +107 -0
- package/extensions/bytefly/notice/config.ts +41 -0
- package/extensions/bytefly/notice/register.ts +27 -0
- package/extensions/bytefly/pad.ts +42 -0
- package/extensions/bytefly/panel/commands.ts +69 -35
- package/extensions/bytefly/panel/format.ts +8 -8
- package/extensions/bytefly/panel/tui.ts +45 -70
- package/extensions/bytefly/separator/component.ts +2 -1
- package/extensions/bytefly/separator/config.ts +16 -8
- package/extensions/bytefly/separator/format.ts +18 -38
- package/extensions/bytefly/separator/register.ts +3 -2
- package/extensions/bytefly/separator/types.ts +0 -10
- package/extensions/bytefly/working/config.ts +20 -0
- package/extensions/bytefly/working/format.ts +25 -0
- package/extensions/bytefly/working/register.ts +88 -0
- package/extensions/document/README.md +12 -5
- package/extensions/document/paging.ts +10 -10
- package/extensions/document/render.ts +17 -16
- package/extensions/document/tool.ts +1 -1
- package/extensions/file-browse/README.md +54 -10
- package/extensions/file-browse/client.ts +110 -2
- package/extensions/file-browse/config.ts +12 -0
- package/extensions/file-browse/diff.ts +187 -0
- package/extensions/file-browse/git.ts +180 -8
- package/extensions/file-browse/html.ts +401 -25
- package/extensions/file-browse/index.ts +15 -4
- package/extensions/file-browse/markdown.ts +33 -0
- package/extensions/file-browse/router.ts +94 -2
- package/extensions/file-browse/server.ts +4 -1
- package/extensions/file-open/README.md +6 -0
- package/extensions/goal/README.md +16 -10
- package/extensions/goal/format.ts +13 -25
- package/extensions/goal/tools.ts +11 -22
- package/extensions/goal/tui.ts +12 -40
- package/extensions/job/README.md +22 -13
- package/extensions/job/format.ts +36 -13
- package/extensions/job/index.ts +26 -21
- package/extensions/job/tools.ts +15 -12
- package/extensions/job/tui.ts +148 -222
- package/extensions/job/ui.ts +24 -49
- package/extensions/memory/README.md +7 -1
- package/extensions/memory/format.ts +5 -3
- package/extensions/memory/tools.ts +4 -3
- package/extensions/memory/tui.ts +32 -36
- package/extensions/plan/README.md +86 -36
- package/extensions/plan/blocks.ts +44 -2
- package/extensions/plan/feedback.ts +20 -5
- package/extensions/plan/index.ts +1 -1
- package/extensions/plan/runtime.ts +3 -2
- package/extensions/plan/tools.ts +43 -27
- package/extensions/plan/tui.ts +21 -27
- package/extensions/plan/web-client.ts +386 -40
- package/extensions/plan/web-page.ts +138 -33
- package/extensions/plan/web-router.ts +46 -13
- package/extensions/plan/web.ts +63 -12
- package/extensions/question/README.md +14 -2
- package/extensions/question/answers.ts +25 -18
- package/extensions/question/tools.ts +22 -16
- package/extensions/question/tui.ts +132 -76
- package/extensions/rewind/README.md +3 -1
- package/extensions/rewind/format.ts +35 -2
- package/extensions/rewind/index.ts +3 -1
- package/extensions/rewind/rewind-tui.ts +66 -62
- package/extensions/rewind/snapshot-run.ts +1 -1
- package/extensions/rewind/status.ts +3 -2
- package/extensions/subagent/README.md +6 -0
- package/extensions/subagent/index.ts +1 -1
- package/extensions/subagent/render.ts +108 -66
- package/extensions/todo/README.md +20 -13
- package/extensions/todo/format.ts +47 -34
- package/extensions/todo/tools.ts +6 -4
- package/extensions/todo/tui.ts +46 -26
- package/extensions/watch/README.md +16 -8
- package/extensions/watch/format.ts +33 -13
- package/extensions/watch/index.ts +29 -24
- package/extensions/watch/tools.ts +16 -9
- package/extensions/watch/tui.ts +142 -196
- package/extensions/watch/ui.ts +24 -46
- package/extensions/web-access/README.md +16 -7
- package/extensions/web-access/fetch/tool.ts +12 -11
- package/extensions/web-access/search/tool.ts +16 -13
- package/extensions/wechat/README.md +8 -2
- package/extensions/wechat/index.ts +4 -3
- package/extensions/wechat/login-screen.ts +8 -5
- package/extensions/wechat/status-screen.ts +41 -22
- package/extensions/wechat/tools.ts +6 -5
- package/extensions/worktree/README.md +6 -0
- package/extensions/worktree/enter.ts +1 -1
- package/extensions/worktree/index.ts +1 -1
- package/extensions/worktree/runtime.ts +1 -1
- package/lib/README.md +11 -7
- package/lib/format.ts +17 -0
- package/lib/notice.ts +87 -0
- package/lib/requirements.ts +2 -2
- package/lib/{tui.ts → tui/chrome.ts} +17 -34
- package/lib/tui/columns.ts +96 -0
- package/lib/{list-cursor.ts → tui/cursor.ts} +58 -4
- package/lib/tui/gauge.ts +78 -0
- package/lib/{ui.ts → tui/glyphs.ts} +10 -11
- package/lib/tui/indent.ts +166 -0
- package/lib/tui/index.ts +27 -0
- package/lib/tui/line-pane.ts +173 -0
- package/lib/tui/rows.ts +143 -0
- package/lib/tui/rules.ts +94 -0
- package/lib/tui/status-controller.ts +107 -0
- package/lib/tui/tokens.ts +72 -0
- package/lib/web/base.ts +2 -1
- package/lib/web/components.ts +3 -1
- package/lib/web/layout.ts +5 -1
- package/package.json +7 -3
- package/themes/bytefly-dark.json +7 -8
- package/themes/bytefly-light.json +10 -11
- package/assets/bytefly-chrome.png +0 -0
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ context across sessions. `my-pi-agent` is a single [Pi](https://pi.dev) package
|
|
|
11
11
|
that adds sixteen extensions and two themes — install the pack, turn off what
|
|
12
12
|
you do not want, and keep using Pi unchanged.
|
|
13
13
|
|
|
14
|
-

|
|
15
15
|
|
|
16
16
|
## Contents
|
|
17
17
|
|
|
@@ -59,10 +59,11 @@ pi -e . # try it for one run
|
|
|
59
59
|
|
|
60
60
|
Then, from inside Pi:
|
|
61
61
|
|
|
62
|
-
- `/
|
|
63
|
-
runtime health and enables or disables one.
|
|
64
|
-
- `/doctor`
|
|
65
|
-
checks that each enabled extension has what it needs
|
|
62
|
+
- `/bytefly [extension] [refresh]` opens the extension screen, lists every loaded
|
|
63
|
+
extension with its runtime health, and enables or disables one.
|
|
64
|
+
- `/bytefly doctor [extension] [refresh]` prints the doctor report —
|
|
65
|
+
`run_doctor`'s text — and checks that each enabled extension has what it needs
|
|
66
|
+
at runtime.
|
|
66
67
|
- `/settings` → **Theme** selects a theme.
|
|
67
68
|
- `/plan <task>` starts a task in read-only planning mode.
|
|
68
69
|
|
|
@@ -105,9 +106,35 @@ extension's own `README.md` has the full tool and command surface.
|
|
|
105
106
|
|
|
106
107
|
| Extension | Tools and commands | What it does |
|
|
107
108
|
|---|---|---|
|
|
108
|
-
| [`bytefly`](./extensions/bytefly/) | `/bytefly
|
|
109
|
+
| [`bytefly`](./extensions/bytefly/) | `/bytefly` (with the `doctor` subcommand), `run_doctor` | A themed header and width-adaptive footer, a two-row `You` nameplate on each user message, a rule between completed turns, a shared transcript notice, a tool block that leads with its call line and rails its result body two columns under it (the rail glyph is the `chrome.rail` setting), a live elapsed counter on Pi's working row, the `/bytefly` extension screen that lists every extension with its health and enables or disables one (`/bytefly doctor` prints the doctor report), and an opt-in `notify` capability that raises OS notifications when a run or a background job finishes or the agent asks for input. DeepSeek is priced out of the box, and `bytefly.json` is the shared config document every extension reads. |
|
|
109
110
|
| [`bytefly-dark`](./themes/bytefly-dark.json) / [`bytefly-light`](./themes/bytefly-light.json) | `/settings` → **Theme** | A GitHub-inspired dark palette and its light companion, with optional automatic light/dark switching. |
|
|
110
111
|
|
|
112
|
+
### Screens
|
|
113
|
+
|
|
114
|
+
<table>
|
|
115
|
+
<tr>
|
|
116
|
+
<td width="50%"><img src="assets/todo.png" alt="The /todos screen: a Todos title rule, a 3/7 completed summary, and the list with check, spinner, and circle glyphs" width="100%"></td>
|
|
117
|
+
<td width="50%"><img src="assets/question.png" alt="The ask_user_question dialog: Auth and Scope tabs, a question, four numbered options with descriptions, and the navigation hint" width="100%"></td>
|
|
118
|
+
</tr>
|
|
119
|
+
<tr>
|
|
120
|
+
<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>
|
|
121
|
+
<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>
|
|
122
|
+
</tr>
|
|
123
|
+
</table>
|
|
124
|
+
|
|
125
|
+
### Tool renderings
|
|
126
|
+
|
|
127
|
+
Every tool block as the transcript draws it — the tool's own call line as the
|
|
128
|
+
headline, then the result body two columns under it behind the transcript rail —
|
|
129
|
+
each tool's own renderer (or bytefly's generic fallback): the user nameplate and
|
|
130
|
+
a notice, Pi's built-ins, and every tool this package registers. The rail glyph
|
|
131
|
+
is the `chrome.rail` setting.
|
|
132
|
+
|
|
133
|
+

|
|
134
|
+
|
|
135
|
+
`bun run screenshot:tools` regenerates it; `bun run screenshot:tool-pngs` writes
|
|
136
|
+
one image per tool under [`assets/tools/`](./assets/tools).
|
|
137
|
+
|
|
111
138
|
## Configuration
|
|
112
139
|
|
|
113
140
|
Most extensions need no configuration. Every setting lives in one shared
|
|
@@ -146,9 +173,9 @@ stops the factories from registering; to drop the whole package, use Pi's
|
|
|
146
173
|
- **OS** — Windows, macOS, and Linux; the full check suite runs on all three in
|
|
147
174
|
CI.
|
|
148
175
|
- **git** on `PATH` for the `worktree` and `rewind` extensions; everything else
|
|
149
|
-
degrades or disables cleanly, and `/doctor` tells you what is missing.
|
|
176
|
+
degrades or disables cleanly, and `/bytefly doctor` tells you what is missing.
|
|
150
177
|
- Optional runtime pieces (for example a browser for HTML exports) are reported
|
|
151
|
-
per extension by `/doctor`.
|
|
178
|
+
per extension by `/bytefly doctor`.
|
|
152
179
|
|
|
153
180
|
## Contributing
|
|
154
181
|
|
package/README.zh-CN.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
`my-pi-agent` 是一个 [Pi](https://pi.dev) 包,新增十六个扩展和两个主题 —— 安装
|
|
11
11
|
整个包,关掉你不需要的部分,其余照常使用 Pi。
|
|
12
12
|
|
|
13
|
-

|
|
14
14
|
|
|
15
15
|
## 目录
|
|
16
16
|
|
|
@@ -55,10 +55,10 @@ pi -e . # 试运行一次
|
|
|
55
55
|
|
|
56
56
|
然后在 Pi 中:
|
|
57
57
|
|
|
58
|
-
- `/
|
|
59
|
-
|
|
60
|
-
- `/doctor`
|
|
61
|
-
|
|
58
|
+
- `/bytefly [extension] [refresh]` 打开扩展屏幕,列出每个已加载扩展及其运行时健康
|
|
59
|
+
状况,并启用或禁用一个扩展。
|
|
60
|
+
- `/bytefly doctor [extension] [refresh]` 打印 doctor 报告(`run_doctor` 的文本),
|
|
61
|
+
检查每个已启用扩展在运行时是否具备所需条件。
|
|
62
62
|
- `/settings` → **Theme** 选择主题。
|
|
63
63
|
- `/plan <任务>` 以只读规划模式开始一个任务。
|
|
64
64
|
|
|
@@ -101,9 +101,34 @@ pi -e . # 试运行一次
|
|
|
101
101
|
|
|
102
102
|
| 扩展 | 工具与命令 | 说明 |
|
|
103
103
|
|---|---|---|
|
|
104
|
-
| [`bytefly`](./extensions/bytefly/) | `/bytefly
|
|
104
|
+
| [`bytefly`](./extensions/bytefly/) | `/bytefly`(`doctor` 子命令)、`run_doctor` | 主题化头部与宽度自适应页脚、每条用户消息上方的两行 `You` 铭牌、已完成回合之间的分隔线、共享的转录通知、以调用行为标题并将结果正文挂在轨道下两列的工具块(轨道字形由 `chrome.rail` 设置)、Pi 工作行上的实时用时计数、`/bytefly` 扩展屏幕——列出每个扩展及其健康状况并启用或禁用一个扩展(`/bytefly doctor` 打印 doctor 报告);以及可选的 `notify` 能力:当一次运行或后台任务结束、或智能体请求输入时发出系统通知。DeepSeek 开箱即定价,`bytefly.json` 是每个扩展都会读取的共享配置文档。 |
|
|
105
105
|
| [`bytefly-dark`](./themes/bytefly-dark.json) / [`bytefly-light`](./themes/bytefly-light.json) | `/settings` → **Theme** | GitHub 风格的深色调色板及其浅色搭档,并支持可选的自动浅色/深色切换。 |
|
|
106
106
|
|
|
107
|
+
### 截图
|
|
108
|
+
|
|
109
|
+
<table>
|
|
110
|
+
<tr>
|
|
111
|
+
<td width="50%"><img src="assets/todo.png" alt="/todos 屏幕:Todos 标题线、3/7 完成摘要,以及带对勾、进行中和圆圈字形的列表" width="100%"></td>
|
|
112
|
+
<td width="50%"><img src="assets/question.png" alt="ask_user_question 对话框:Auth 与 Scope 标签页、问题、四个带说明的编号选项,以及导航提示" width="100%"></td>
|
|
113
|
+
</tr>
|
|
114
|
+
<tr>
|
|
115
|
+
<td width="50%"><img src="assets/job.png" alt="/jobs 屏幕:摘要行、带状态字形和耗时的任务行,以及焦点任务的命令、工作目录和最后一行输出" width="100%"></td>
|
|
116
|
+
<td width="50%"><img src="assets/rewind.png" alt="/rewind 屏幕:从新到旧的提示行、标记有代码快照的菱形,以及焦点提示的快照详情" width="100%"></td>
|
|
117
|
+
</tr>
|
|
118
|
+
</table>
|
|
119
|
+
|
|
120
|
+
### 工具渲染
|
|
121
|
+
|
|
122
|
+
每个工具块都按转录中的样子绘制:工具自身的调用行作为标题,结果正文在其下方两列、
|
|
123
|
+
由转录侧栏(rail)引出
|
|
124
|
+
(每个工具自身的渲染器或 bytefly 的通用回退)——用户铭牌与通知、Pi 内置工具,以及本包注册的每个工具。
|
|
125
|
+
侧栏字形由 `chrome.rail` 设置。
|
|
126
|
+
|
|
127
|
+

|
|
128
|
+
|
|
129
|
+
`bun run screenshot:tools` 重新生成它;`bun run screenshot:tool-pngs` 在
|
|
130
|
+
[`assets/tools/`](./assets/tools) 下为每个工具输出一张图。
|
|
131
|
+
|
|
107
132
|
## 配置
|
|
108
133
|
|
|
109
134
|
大多数扩展无需配置。所有设置都在一个共享文档 `bytefly.json` 中,从
|
|
@@ -139,8 +164,8 @@ Pi 的 `--no-extensions`,或从你的设置中删除该包。
|
|
|
139
164
|
- **Pi** —— 需要一个可用的安装;`my-pi-agent` 是一个包,不是分叉。
|
|
140
165
|
- **操作系统** —— Windows、macOS 和 Linux;完整检查套件在三者的 CI 上都会运行。
|
|
141
166
|
- **git** 需在 `PATH` 上,供 `worktree` 和 `rewind` 扩展使用;其余部分会优雅降级或
|
|
142
|
-
禁用,`/doctor` 会告诉你缺什么。
|
|
143
|
-
- 可选的运行时组件(例如用于 HTML 导出的浏览器)由 `/doctor` 按扩展报告。
|
|
167
|
+
禁用,`/bytefly doctor` 会告诉你缺什么。
|
|
168
|
+
- 可选的运行时组件(例如用于 HTML 导出的浏览器)由 `/bytefly doctor` 按扩展报告。
|
|
144
169
|
|
|
145
170
|
## 参与贡献
|
|
146
171
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://raw.githubusercontent.com/gavin-hu/my-pi-agent/main/assets/bytefly.schema.json",
|
|
4
4
|
"title": "bytefly shared extension config",
|
|
5
|
-
"description": "One document, one top-level section per extension (bytefly owns price, notify, and
|
|
5
|
+
"description": "One document, one top-level section per extension (bytefly owns price, notify, doctor, and chrome). Resolution is low to high: built-in defaults, <agent-dir>/bytefly.json, then <cwd>/.pi/bytefly.json (project wins). Unknown keys are ignored.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
"doctor": {
|
|
26
26
|
"$ref": "#/$defs/doctor"
|
|
27
27
|
},
|
|
28
|
+
"chrome": {
|
|
29
|
+
"$ref": "#/$defs/chrome"
|
|
30
|
+
},
|
|
28
31
|
"worktree": {
|
|
29
32
|
"$ref": "#/$defs/worktree"
|
|
30
33
|
},
|
|
@@ -67,6 +70,19 @@
|
|
|
67
70
|
},
|
|
68
71
|
"description": "Strings are trimmed; empty entries are dropped."
|
|
69
72
|
},
|
|
73
|
+
"chrome": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"description": "bytefly's transcript chrome presentation.",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"properties": {
|
|
78
|
+
"rail": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"maxLength": 1,
|
|
81
|
+
"default": "╎",
|
|
82
|
+
"description": "The transcript rail glyph, exactly one visible column. A wide, emoji, multi-character, empty, or control value falls back to ╎. The rail leads a tool result and a notice row; it is also drawn on the call frame for the two file-mutating tools (`edit`, `write`), whose call body carries the result. There is no status fill."
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
70
86
|
"price": {
|
|
71
87
|
"type": "object",
|
|
72
88
|
"description": "bytefly's price calculation (the footer's cost bar).",
|
|
Binary file
|
package/assets/file-browse.png
CHANGED
|
Binary file
|
package/assets/job.png
ADDED
|
Binary file
|
package/assets/plan-review.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/todo.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|