@gavin-hu/my-pi-agent 0.9.0 → 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.
Files changed (132) hide show
  1. package/README.md +28 -2
  2. package/README.zh-CN.md +27 -2
  3. package/assets/bytefly.schema.json +17 -1
  4. package/assets/chrome.png +0 -0
  5. package/assets/job.png +0 -0
  6. package/assets/plan-review.png +0 -0
  7. package/assets/question.png +0 -0
  8. package/assets/rewind.png +0 -0
  9. package/assets/todo.png +0 -0
  10. package/assets/tool-renderings.png +0 -0
  11. package/assets/tools/ask_user_question.png +0 -0
  12. package/assets/tools/bash.png +0 -0
  13. package/assets/tools/edit.png +0 -0
  14. package/assets/tools/enter_plan_mode.png +0 -0
  15. package/assets/tools/enter_worktree.png +0 -0
  16. package/assets/tools/exit_plan_mode.png +0 -0
  17. package/assets/tools/exit_worktree.png +0 -0
  18. package/assets/tools/find.png +0 -0
  19. package/assets/tools/goal.png +0 -0
  20. package/assets/tools/grep.png +0 -0
  21. package/assets/tools/job.png +0 -0
  22. package/assets/tools/list_worktrees.png +0 -0
  23. package/assets/tools/ls.png +0 -0
  24. package/assets/tools/memory.png +0 -0
  25. package/assets/tools/notice.png +0 -0
  26. package/assets/tools/open_path.png +0 -0
  27. package/assets/tools/prune_worktrees.png +0 -0
  28. package/assets/tools/read.png +0 -0
  29. package/assets/tools/read_doc.png +0 -0
  30. package/assets/tools/run_doctor.png +0 -0
  31. package/assets/tools/send_wechat.png +0 -0
  32. package/assets/tools/set_plan_steps.png +0 -0
  33. package/assets/tools/subagent.png +0 -0
  34. package/assets/tools/todo.png +0 -0
  35. package/assets/tools/turn-rule.png +0 -0
  36. package/assets/tools/user-message.png +0 -0
  37. package/assets/tools/watch.png +0 -0
  38. package/assets/tools/web_fetch.png +0 -0
  39. package/assets/tools/web_search.png +0 -0
  40. package/assets/tools/write.png +0 -0
  41. package/assets/tools/write_plan.png +0 -0
  42. package/extensions/bytefly/README.md +261 -36
  43. package/extensions/bytefly/block/component.ts +282 -0
  44. package/extensions/bytefly/block/config.ts +24 -0
  45. package/extensions/bytefly/block/fallback.ts +120 -0
  46. package/extensions/bytefly/block/register.ts +164 -0
  47. package/extensions/bytefly/chrome.ts +97 -0
  48. package/extensions/bytefly/doctor/tools.ts +5 -2
  49. package/extensions/bytefly/header/component.ts +21 -10
  50. package/extensions/bytefly/header/config.ts +0 -3
  51. package/extensions/bytefly/header/register.ts +6 -1
  52. package/extensions/bytefly/index.ts +32 -12
  53. package/extensions/bytefly/message/config.ts +15 -0
  54. package/extensions/bytefly/message/format.ts +42 -0
  55. package/extensions/bytefly/message/register.ts +15 -0
  56. package/extensions/bytefly/notice/component.ts +107 -0
  57. package/extensions/bytefly/notice/config.ts +41 -0
  58. package/extensions/bytefly/notice/register.ts +27 -0
  59. package/extensions/bytefly/pad.ts +42 -0
  60. package/extensions/bytefly/separator/component.ts +2 -1
  61. package/extensions/bytefly/separator/format.ts +17 -10
  62. package/extensions/bytefly/separator/register.ts +3 -2
  63. package/extensions/bytefly/working/config.ts +20 -0
  64. package/extensions/bytefly/working/format.ts +25 -0
  65. package/extensions/bytefly/working/register.ts +88 -0
  66. package/extensions/document/README.md +11 -4
  67. package/extensions/document/paging.ts +10 -10
  68. package/extensions/document/render.ts +7 -7
  69. package/extensions/file-browse/README.md +3 -1
  70. package/extensions/file-browse/client.ts +9 -2
  71. package/extensions/file-browse/git.ts +4 -7
  72. package/extensions/file-browse/html.ts +27 -17
  73. package/extensions/file-open/README.md +6 -0
  74. package/extensions/goal/README.md +16 -10
  75. package/extensions/goal/format.ts +7 -20
  76. package/extensions/goal/tools.ts +5 -17
  77. package/extensions/goal/tui.ts +12 -40
  78. package/extensions/job/README.md +21 -12
  79. package/extensions/job/format.ts +2 -2
  80. package/extensions/job/index.ts +25 -20
  81. package/extensions/job/tools.ts +5 -3
  82. package/extensions/job/tui.ts +13 -8
  83. package/extensions/memory/README.md +6 -0
  84. package/extensions/memory/format.ts +5 -3
  85. package/extensions/plan/README.md +32 -12
  86. package/extensions/plan/tools.ts +20 -5
  87. package/extensions/plan/web-client.ts +58 -17
  88. package/extensions/plan/web-page.ts +34 -9
  89. package/extensions/plan/web-router.ts +40 -9
  90. package/extensions/plan/web.ts +22 -2
  91. package/extensions/question/README.md +13 -1
  92. package/extensions/question/answers.ts +25 -18
  93. package/extensions/question/tools.ts +11 -6
  94. package/extensions/rewind/README.md +2 -0
  95. package/extensions/rewind/format.ts +6 -1
  96. package/extensions/rewind/index.ts +3 -1
  97. package/extensions/rewind/snapshot-run.ts +1 -1
  98. package/extensions/subagent/README.md +6 -0
  99. package/extensions/subagent/index.ts +1 -1
  100. package/extensions/subagent/render.ts +56 -29
  101. package/extensions/todo/README.md +19 -12
  102. package/extensions/todo/format.ts +17 -25
  103. package/extensions/todo/tools.ts +2 -1
  104. package/extensions/todo/tui.ts +3 -2
  105. package/extensions/watch/README.md +14 -6
  106. package/extensions/watch/format.ts +2 -2
  107. package/extensions/watch/index.ts +28 -23
  108. package/extensions/watch/tools.ts +5 -3
  109. package/extensions/watch/tui.ts +12 -7
  110. package/extensions/web-access/README.md +16 -7
  111. package/extensions/web-access/fetch/tool.ts +1 -1
  112. package/extensions/web-access/search/tool.ts +3 -3
  113. package/extensions/wechat/README.md +6 -0
  114. package/extensions/worktree/README.md +6 -0
  115. package/lib/README.md +2 -1
  116. package/lib/format.ts +17 -0
  117. package/lib/notice.ts +87 -0
  118. package/lib/tui/chrome.ts +8 -4
  119. package/lib/tui/cursor.ts +2 -1
  120. package/lib/tui/glyphs.ts +10 -11
  121. package/lib/tui/indent.ts +166 -0
  122. package/lib/tui/index.ts +3 -1
  123. package/lib/tui/rows.ts +39 -5
  124. package/lib/tui/rules.ts +9 -3
  125. package/lib/tui/tokens.ts +14 -0
  126. package/lib/web/base.ts +2 -1
  127. package/lib/web/components.ts +3 -1
  128. package/lib/web/layout.ts +5 -1
  129. package/package.json +7 -3
  130. package/themes/bytefly-dark.json +7 -8
  131. package/themes/bytefly-light.json +10 -11
  132. 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
- ![A terminal window running the Pi TUI with the bytefly header, hint row, context and loaded extensions, a turn separator, and the status bar](assets/bytefly-chrome.png)
14
+ ![A terminal window running the Pi TUI with the bytefly header, hint row, context and loaded extensions, a turn separator, and the status bar](assets/chrome.png)
15
15
 
16
16
  ## Contents
17
17
 
@@ -106,9 +106,35 @@ extension's own `README.md` has the full tool and command surface.
106
106
 
107
107
  | Extension | Tools and commands | What it does |
108
108
  |---|---|---|
109
- | [`bytefly`](./extensions/bytefly/) | `/bytefly` (with the `doctor` subcommand), `run_doctor` | A themed header and width-adaptive footer, a rule between completed turns, 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
+ | [`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. |
110
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. |
111
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
+ ![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, send_wechat, ask_user_question, the plan tools, and the worktree tools](assets/tool-renderings.png)
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
+
112
138
  ## Configuration
113
139
 
114
140
  Most extensions need no configuration. Every setting lives in one shared
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
- ![一个运行 Pi TUI 的终端窗口,包含 bytefly 头部、提示行、上下文与已加载扩展、回合分隔线以及状态栏](assets/bytefly-chrome.png)
13
+ ![一个运行 Pi TUI 的终端窗口,包含 bytefly 头部、提示行、上下文与已加载扩展、回合分隔线以及状态栏](assets/chrome.png)
14
14
 
15
15
  ## 目录
16
16
 
@@ -101,9 +101,34 @@ pi -e . # 试运行一次
101
101
 
102
102
  | 扩展 | 工具与命令 | 说明 |
103
103
  |---|---|---|
104
- | [`bytefly`](./extensions/bytefly/) | `/bytefly`(`doctor` 子命令)、`run_doctor` | 主题化头部与宽度自适应页脚、已完成回合之间的分隔线、`/bytefly` 扩展屏幕——列出每个扩展及其健康状况并启用或禁用一个扩展(`/bytefly doctor` 打印 doctor 报告);以及可选的 `notify` 能力:当一次运行或后台任务结束、或智能体请求输入时发出系统通知。DeepSeek 开箱即定价,`bytefly.json` 是每个扩展都会读取的共享配置文档。 |
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
+ ![每个工具块的全页参考图:用户铭牌、通知、回合分隔线,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)
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` 中,从
@@ -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 doctor). Resolution is low to high: built-in defaults, <agent-dir>/bytefly.json, then <cwd>/.pi/bytefly.json (project wins). Unknown keys are ignored.",
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/job.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
Binary file
Binary file
Binary file