@gavin-hu/my-pi-agent 0.14.0 → 0.15.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 +55 -33
- package/README.zh-CN.md +44 -27
- package/extensions/bytefly/README.md +193 -140
- package/extensions/bytefly/block/component.ts +7 -15
- package/extensions/bytefly/block/register.ts +6 -1
- package/extensions/bytefly/doctor/register.ts +24 -5
- package/extensions/bytefly/doctor/tools.ts +4 -0
- package/extensions/bytefly/footer/collect/snapshot.ts +6 -1
- package/extensions/bytefly/footer/config.ts +10 -6
- package/extensions/bytefly/footer/price/price.ts +5 -3
- package/extensions/bytefly/footer/price/rates.ts +63 -26
- package/extensions/bytefly/footer/render/status.ts +3 -3
- package/extensions/bytefly/header/component.ts +3 -2
- package/extensions/bytefly/index.ts +3 -3
- package/extensions/bytefly/notice/component.ts +8 -3
- package/extensions/bytefly/notify/config.ts +6 -11
- package/extensions/bytefly/notify/dispatch.ts +13 -5
- package/extensions/bytefly/panel/commands.ts +21 -1
- package/extensions/bytefly/panel/format.ts +5 -2
- package/extensions/bytefly/panel/settings-runtime.ts +26 -6
- package/extensions/bytefly/panel/settings.ts +41 -4
- package/extensions/bytefly/panel/themes.ts +32 -0
- package/extensions/bytefly/panel/tui/editing.ts +77 -0
- package/extensions/bytefly/panel/tui/entries.ts +24 -0
- package/extensions/bytefly/panel/tui/extensions-view.ts +13 -8
- package/extensions/bytefly/panel/tui/frame.ts +121 -4
- package/extensions/bytefly/panel/tui/settings-view.ts +54 -15
- package/extensions/bytefly/panel/tui.ts +94 -152
- package/extensions/bytefly/picker/discovery.ts +1 -0
- package/extensions/bytefly/picker/types.ts +2 -0
- package/extensions/bytefly/separator/component.ts +14 -4
- package/extensions/bytefly/update/cache.ts +58 -19
- package/extensions/bytefly/update/check.ts +35 -0
- package/extensions/bytefly/update/format.ts +76 -35
- package/extensions/bytefly/update/register.ts +144 -55
- package/extensions/bytefly/update/state.ts +4 -2
- package/extensions/bytefly/update/suppress.ts +66 -0
- package/extensions/bytefly/update/types.ts +15 -0
- package/extensions/check/README.md +253 -0
- package/extensions/check/commands.ts +128 -0
- package/extensions/check/config.ts +39 -0
- package/extensions/check/detect.ts +269 -0
- package/extensions/check/failures.ts +230 -0
- package/extensions/check/format.ts +135 -0
- package/extensions/check/index.ts +26 -0
- package/extensions/check/render.ts +185 -0
- package/extensions/check/runner.ts +176 -0
- package/extensions/check/runtime.ts +244 -0
- package/extensions/check/source.ts +80 -0
- package/extensions/check/tools.ts +173 -0
- package/extensions/check/tui.ts +195 -0
- package/extensions/check/types.ts +99 -0
- package/extensions/document/README.md +1 -1
- package/extensions/document/extract/pdf.ts +8 -16
- package/extensions/document/formats.ts +2 -2
- package/extensions/file-browse/README.md +66 -32
- package/extensions/file-browse/client.ts +95 -32
- package/extensions/file-browse/config.ts +9 -9
- package/extensions/file-browse/git.ts +37 -47
- package/extensions/file-browse/html.ts +39 -58
- package/extensions/file-browse/markdown.ts +110 -92
- package/extensions/file-browse/raw-html.ts +478 -0
- package/extensions/file-browse/router.ts +32 -70
- package/extensions/file-browse/server.ts +18 -56
- package/extensions/file-browse/urls.ts +80 -0
- package/extensions/goal/README.md +103 -47
- package/extensions/goal/clarify-parse.ts +4 -9
- package/extensions/goal/clarify.ts +27 -4
- package/extensions/goal/commands.ts +24 -11
- package/extensions/goal/format.ts +41 -10
- package/extensions/goal/index.ts +39 -16
- package/extensions/goal/plan-route.ts +51 -0
- package/extensions/goal/schema.ts +6 -23
- package/extensions/goal/state.ts +39 -57
- package/extensions/goal/tools.ts +26 -20
- package/extensions/goal/types.ts +11 -1
- package/extensions/job/README.md +20 -6
- package/extensions/job/format.ts +18 -68
- package/extensions/job/index.ts +26 -41
- package/extensions/job/log-writer.ts +208 -0
- package/extensions/job/logs.ts +3 -2
- package/extensions/job/process.ts +6 -99
- package/extensions/job/runtime.ts +42 -181
- package/extensions/job/schema.ts +1 -4
- package/extensions/job/tools.ts +1 -15
- package/extensions/job/tui.ts +117 -307
- package/extensions/job/ui.ts +7 -33
- package/extensions/memory/README.md +1 -1
- package/extensions/memory/errors.ts +5 -6
- package/extensions/memory/tui.ts +14 -24
- package/extensions/plan/README.md +94 -18
- package/extensions/plan/commands.ts +9 -5
- package/extensions/plan/format.ts +87 -0
- package/extensions/plan/index.ts +31 -15
- package/extensions/plan/plans.ts +2 -3
- package/extensions/plan/policy.ts +0 -6
- package/extensions/plan/runtime.ts +4 -2
- package/extensions/plan/steps.ts +37 -8
- package/extensions/plan/todos.ts +44 -3
- package/extensions/plan/tools/enter.ts +94 -0
- package/extensions/plan/tools/exit.ts +296 -0
- package/extensions/plan/tools/nested.ts +21 -0
- package/extensions/plan/tools/steps.ts +136 -0
- package/extensions/plan/tools/todo-seed.ts +76 -0
- package/extensions/plan/tools/write.ts +127 -0
- package/extensions/plan/tools.ts +18 -703
- package/extensions/plan/web-client.ts +6 -22
- package/extensions/plan/web-page.ts +19 -30
- package/extensions/plan/web-router.ts +34 -71
- package/extensions/plan/web.ts +13 -40
- package/extensions/question/answers.ts +3 -8
- package/extensions/question/tui.ts +6 -6
- package/extensions/rewind/README.md +95 -22
- package/extensions/rewind/checklist.ts +185 -0
- package/extensions/rewind/commands.ts +8 -0
- package/extensions/rewind/config.ts +3 -11
- package/extensions/rewind/format.ts +220 -2
- package/extensions/rewind/git.ts +74 -7
- package/extensions/rewind/hunk-picker.ts +114 -0
- package/extensions/rewind/patch.ts +88 -0
- package/extensions/rewind/path-picker.ts +67 -100
- package/extensions/rewind/paths.ts +93 -19
- package/extensions/rewind/restore.ts +53 -10
- package/extensions/rewind/review-tui.ts +320 -0
- package/extensions/rewind/review.ts +397 -0
- package/extensions/rewind/rewind-tui.ts +4 -3
- package/extensions/rewind/runtime.ts +94 -17
- package/extensions/subagent/README.md +61 -6
- package/extensions/subagent/background-tui.ts +208 -0
- package/extensions/subagent/background.ts +470 -0
- package/extensions/subagent/commands.ts +80 -0
- package/extensions/subagent/config.ts +4 -0
- package/extensions/subagent/format.ts +24 -1
- package/extensions/subagent/index.ts +91 -2
- package/extensions/subagent/render.ts +13 -0
- package/extensions/subagent/run.ts +17 -16
- package/extensions/subagent/schema.ts +12 -0
- package/extensions/subagent/types.ts +11 -0
- package/extensions/subagent/ui.ts +50 -0
- package/extensions/todo/README.md +18 -13
- package/extensions/todo/format.ts +3 -2
- package/extensions/todo/runtime.ts +3 -2
- package/extensions/todo/schema.ts +8 -84
- package/extensions/todo/state.ts +5 -46
- package/extensions/todo/tools.ts +2 -1
- package/extensions/todo/types.ts +6 -15
- package/extensions/watch/README.md +14 -6
- package/extensions/watch/child.ts +150 -0
- package/extensions/watch/format.ts +8 -48
- package/extensions/watch/index.ts +42 -58
- package/extensions/watch/runtime.ts +49 -128
- package/extensions/watch/schema.ts +1 -4
- package/extensions/watch/tools.ts +1 -11
- package/extensions/watch/tui.ts +103 -273
- package/extensions/watch/ui.ts +5 -32
- package/extensions/web-access/README.md +1 -1
- package/extensions/web-access/fetch/page.ts +1 -1
- package/extensions/web-access/fetch/tool.ts +6 -2
- package/extensions/web-access/search/search.ts +2 -5
- package/extensions/wechat/README.md +1 -1
- package/extensions/wechat/client.ts +23 -0
- package/extensions/wechat/commands.ts +57 -42
- package/extensions/wechat/deliver.ts +5 -9
- package/extensions/wechat/errors.ts +3 -6
- package/extensions/wechat/inbound.ts +2 -5
- package/extensions/wechat/index.ts +2 -8
- package/extensions/wechat/outbound.ts +2 -4
- package/extensions/wechat/peer-worker.ts +3 -8
- package/extensions/wechat/poll.ts +10 -9
- package/extensions/wechat/presence.ts +35 -62
- package/extensions/wechat/reply-pipeline.ts +3 -1
- package/extensions/wechat/status-screen.ts +1 -1
- package/extensions/wechat/timer.ts +57 -0
- package/extensions/worktree/config.ts +8 -20
- package/extensions/worktree/enter.ts +7 -12
- package/extensions/worktree/git.ts +38 -69
- package/extensions/worktree/index.ts +5 -4
- package/extensions/worktree/registry.ts +7 -7
- package/extensions/worktree/root-tools.ts +2 -2
- package/extensions/worktree/status.ts +3 -2
- package/lib/README.md +22 -8
- package/lib/config.ts +50 -3
- package/lib/errors.ts +12 -0
- package/lib/format.ts +50 -0
- package/lib/git/read.ts +8 -0
- package/lib/goal-state.ts +23 -8
- package/lib/http/headers.ts +54 -0
- package/lib/http/index.ts +13 -0
- package/lib/http/response.ts +46 -0
- package/lib/http/router.ts +52 -0
- package/lib/http/server.ts +91 -0
- package/lib/lines.ts +77 -0
- package/lib/pdf.ts +82 -0
- package/lib/plan-entry.ts +71 -0
- package/lib/plan-state.ts +34 -0
- package/lib/report.ts +99 -0
- package/lib/requirements.ts +25 -19
- package/lib/spawn.ts +170 -0
- package/lib/todo-state.ts +110 -23
- package/lib/tool-names.ts +7 -0
- package/lib/tool-result.ts +33 -0
- package/lib/tui/README.md +68 -3
- package/lib/tui/chrome.ts +28 -4
- package/lib/tui/columns.ts +6 -1
- package/lib/tui/confirm.ts +65 -0
- package/lib/tui/dock-screen.ts +410 -0
- package/lib/tui/glyphs.ts +2 -1
- package/lib/tui/indent.ts +1 -1
- package/lib/tui/index.ts +2 -0
- package/lib/tui/rows.ts +21 -0
- package/lib/tui/status-controller.ts +35 -1
- package/lib/tui/tool.ts +59 -1
- package/lib/web/components.ts +20 -1
- package/lib/web/markup.ts +32 -0
- package/lib/web/runtime.ts +50 -0
- package/package.json +22 -5
- package/skills/init/SKILL.md +165 -0
- package/skills/init/references/agents-md-quality.md +103 -0
- package/skills/init/references/interview-questions.md +81 -0
- package/skills/refactor/SKILL.md +141 -0
- package/extensions/watch/process.ts +0 -63
- package/extensions/web-access/fetch/pdf.ts +0 -45
package/README.md
CHANGED
|
@@ -8,9 +8,13 @@
|
|
|
8
8
|
[](https://pi.dev)
|
|
9
9
|
|
|
10
10
|
`my-pi-agent` is a single [Pi](https://pi.dev) package that adds a curated set
|
|
11
|
-
of extensions and themes to the agent you already use — install the pack, turn
|
|
11
|
+
of extensions, skills, and themes to the agent you already use — install the pack, turn
|
|
12
12
|
off what you do not want, and keep using Pi unchanged.
|
|
13
13
|
|
|
14
|
+
This page is the catalog and the setup instructions. For how to use a feature —
|
|
15
|
+
the keys, the commands, and what you should see — start with the
|
|
16
|
+
[user guide](./docs/user-guide/).
|
|
17
|
+
|
|
14
18
|

|
|
15
19
|
|
|
16
20
|
## Contents
|
|
@@ -42,10 +46,10 @@ want the agent to *think first and work safely*:
|
|
|
42
46
|
documents from inside the session, and answer a WeChat chat through a bridge to
|
|
43
47
|
the live session.
|
|
44
48
|
|
|
45
|
-
Everything is optional and independently toggleable. Nothing is
|
|
46
|
-
|
|
47
|
-
[`package.json`](./package.json), so the package upgrades with Pi
|
|
48
|
-
other.
|
|
49
|
+
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
|
+
manifest in [`package.json`](./package.json), so the package upgrades with Pi
|
|
52
|
+
like any other.
|
|
49
53
|
|
|
50
54
|
## Quick start
|
|
51
55
|
|
|
@@ -55,7 +59,7 @@ Requires a working [Pi](https://pi.dev) installation.
|
|
|
55
59
|
pi install npm:@gavin-hu/my-pi-agent
|
|
56
60
|
```
|
|
57
61
|
|
|
58
|
-
[
|
|
62
|
+
[User guide](./docs/user-guide/) has the other sources — git, a
|
|
59
63
|
pinned release, a project-local install, and a trial that writes nothing — plus
|
|
60
64
|
the fit decision, the first workflows, and how to remove the pack.
|
|
61
65
|
|
|
@@ -69,33 +73,38 @@ Then, from inside Pi:
|
|
|
69
73
|
- `/bytefly [extension] [refresh]` opens the control center on Extensions, lists
|
|
70
74
|
every loaded extension with its runtime health, enables or disables one, and
|
|
71
75
|
clears a project override with `x`.
|
|
72
|
-
- `/bytefly settings` opens the control center's Settings section:
|
|
73
|
-
startup
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
change a value and `Tab` for Global/Project scope.
|
|
76
|
+
- `/bytefly settings` opens the control center's Settings section: ten groups
|
|
77
|
+
covering startup, notifications, diagnostics, pricing, transcript, terminal,
|
|
78
|
+
worktree, snapshots, jobs, and memory, plus a **Theme** row, with
|
|
79
|
+
`Space`/`Enter` to change a value and `Tab` for Global/Project scope.
|
|
77
80
|
- `/bytefly doctor [extension] [refresh]` prints the doctor report —
|
|
78
81
|
`run_doctor`'s text — and checks that each enabled extension has what it needs
|
|
79
82
|
at runtime.
|
|
80
|
-
- `/
|
|
83
|
+
- `/bytefly update` re-runs the package update check now and reports the
|
|
84
|
+
updateable packages, this package's version and release URL, or a skip.
|
|
81
85
|
- `/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.
|
|
82
87
|
|
|
83
|
-
One thing the pack does on its own: once per interactive session, `bytefly`
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
One thing the pack does on its own: once per interactive session, `bytefly`
|
|
89
|
+
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;
|
|
86
93
|
[`docs/security.md`](./docs/security.md) covers the trust boundaries.
|
|
87
94
|
|
|
88
95
|
## What you get
|
|
89
96
|
|
|
90
|
-
|
|
91
|
-
extension's own `README.md` has the full tool and
|
|
97
|
+
Seventeen extensions and two packaged skills, grouped by what you are trying to
|
|
98
|
+
do, plus two themes. Each extension's own `README.md` has the full tool and
|
|
99
|
+
command surface.
|
|
92
100
|
|
|
93
101
|
### Plan and delegate
|
|
94
102
|
|
|
95
103
|
| Extension | Tools and commands | What it does |
|
|
96
104
|
|---|---|---|
|
|
97
|
-
| [`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. |
|
|
98
|
-
| [`
|
|
105
|
+
| [`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`. |
|
|
106
|
+
| [`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. |
|
|
107
|
+
| [`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. |
|
|
99
108
|
| [`todo`](./extensions/todo/) | `todo`, `/todos` | A persistent task list (`pending` / `in_progress` / `completed`) with a one-line widget. |
|
|
100
109
|
| [`goal`](./extensions/goal/) | `goal`, `/goal` | A persistent session objective, kept in a widget and restated before each turn. |
|
|
101
110
|
| [`question`](./extensions/question/) | `ask_user_question` | Ask you one or more structured questions (labelled options plus free-form "Other") and wait. |
|
|
@@ -106,8 +115,8 @@ extension's own `README.md` has the full tool and command surface.
|
|
|
106
115
|
|
|
107
116
|
| Extension | Tools and commands | What it does |
|
|
108
117
|
|---|---|---|
|
|
109
|
-
| [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree
|
|
110
|
-
| [`rewind`](./extensions/rewind/) | `/rewind`, `↺ N` status chip | Snapshot the repo on every prompt under `refs/pi/rewind
|
|
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. |
|
|
119
|
+
| [`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. |
|
|
111
120
|
| [`memory`](./extensions/memory/) | `memory`, `/memory` | Durable cross-session notes as human-editable markdown, injected into each run and managed through the `/memory` picker. |
|
|
112
121
|
|
|
113
122
|
### Reach the world
|
|
@@ -124,14 +133,26 @@ extension's own `README.md` has the full tool and command surface.
|
|
|
124
133
|
|
|
125
134
|
| Extension | Tools and commands | What it does |
|
|
126
135
|
|---|---|---|
|
|
127
|
-
| [`bytefly`](./extensions/bytefly/) | `/bytefly` (with the `doctor` and `
|
|
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. |
|
|
137
|
+
|
|
138
|
+
### Skills
|
|
139
|
+
|
|
140
|
+
Packaged workflows loaded on demand: each skill's name and description are
|
|
141
|
+
advertised to the model, and its instructions load only when the task matches
|
|
142
|
+
(`/skill:<name>` forces one).
|
|
143
|
+
|
|
144
|
+
| Skill | What it does |
|
|
145
|
+
|---|---|
|
|
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. |
|
|
147
|
+
| [`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. |
|
|
128
148
|
|
|
129
149
|
### Themes
|
|
130
150
|
|
|
131
151
|
[`bytefly-dark`](./themes/bytefly-dark.json) is a GitHub-inspired dark palette
|
|
132
152
|
and [`bytefly-light`](./themes/bytefly-light.json) its light companion, with
|
|
133
153
|
optional automatic light/dark switching. Installing the pack does not change
|
|
134
|
-
your theme: pick one through `/settings` → **Theme
|
|
154
|
+
your theme: pick one through `/settings` → **Theme** (or `/bytefly settings` →
|
|
155
|
+
**Theme**), or set
|
|
135
156
|
`"theme": "bytefly-light/bytefly-dark"` for switching. The screenshots in this
|
|
136
157
|
README use `bytefly-dark`.
|
|
137
158
|
|
|
@@ -156,20 +177,23 @@ each tool's own renderer (or bytefly's generic fallback): the user nameplate and
|
|
|
156
177
|
a notice, Pi's built-ins, and every tool this package registers. The rail glyph
|
|
157
178
|
is the `chrome.rail` setting.
|
|
158
179
|
|
|
159
|
-

|
|
180
|
+

|
|
160
181
|
|
|
161
182
|
`bun run screenshot:tools` regenerates it; `bun run screenshot:tool-pngs` writes
|
|
162
183
|
one image per tool under [`assets/tools/`](./assets/tools).
|
|
163
184
|
|
|
185
|
+
Ready to use one? The [user guide](./docs/user-guide/) has a walkthrough for
|
|
186
|
+
each: the first run, the keys that matter, and what to expect on screen.
|
|
187
|
+
|
|
164
188
|
## Configuration
|
|
165
189
|
|
|
166
190
|
Most extensions need no configuration. Every setting lives in one shared
|
|
167
191
|
document, `bytefly.json`, read from `<agent-dir>/bytefly.json` and merged with
|
|
168
192
|
`<cwd>/.pi/bytefly.json` (project wins), under a top-level section named for the
|
|
169
|
-
extension. Each extension's `README.md` covers the behaviour around its keys,
|
|
170
|
-
[`docs/configuration.md`](./docs/configuration.md)
|
|
171
|
-
|
|
172
|
-
|
|
193
|
+
extension. Each extension's `README.md` covers the behaviour around its keys, and
|
|
194
|
+
[`docs/configuration.md`](./docs/configuration.md) has the resolution rules, the
|
|
195
|
+
settings screen walkthrough, and every section's keys with their type, default,
|
|
196
|
+
and bounds.
|
|
173
197
|
|
|
174
198
|
Every extension is on by default. To load the pack without some of them, set
|
|
175
199
|
`PI_DISABLED_EXTENSIONS` to a comma- or whitespace-separated list of extension
|
|
@@ -187,11 +211,9 @@ stops the factories from registering; to drop the whole package, use Pi's
|
|
|
187
211
|
|
|
188
212
|
| Guide | What it covers |
|
|
189
213
|
|---|---|
|
|
190
|
-
| [
|
|
191
|
-
| [
|
|
192
|
-
| [
|
|
193
|
-
| [Configuration reference](./docs/references/bytefly-config.md) | Every `bytefly.json` section and key, with its type, default, and bounds. |
|
|
194
|
-
| [Architecture](./docs/architecture.md) | How the package, its extensions, and `lib/` fit together. |
|
|
214
|
+
| [User guide](./docs/user-guide/) | A chaptered manual: install, every feature, settings, troubleshooting, and a command reference. |
|
|
215
|
+
| [Configuration](./docs/configuration.md) | Resolution, the settings screen, and every `bytefly.json` key with its default and bounds. |
|
|
216
|
+
| [Architecture](./docs/architecture.md) | The load path, runtime model, state, process shapes, and where new code belongs. |
|
|
195
217
|
| [Development](./docs/development.md) | Local setup, checks, tests, cross-platform notes, and the release process. |
|
|
196
218
|
| [Security](./docs/security.md) | Trust boundaries for the loopback and remote surfaces. |
|
|
197
219
|
| [Roadmap](./ROADMAP.md) | Where the pack is going, grouped by the README's promises, with the evidence behind each item. |
|
package/README.zh-CN.md
CHANGED
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
[](https://pi.dev)
|
|
9
9
|
|
|
10
10
|
`my-pi-agent` 是一个 [Pi](https://pi.dev) 包,在你已经使用的智能体之上新增一组精选
|
|
11
|
-
|
|
11
|
+
扩展、技能和主题 —— 安装整个包,关掉你不需要的部分,其余照常使用 Pi。
|
|
12
|
+
|
|
13
|
+
本页是目录与安装说明。要了解某个功能怎么用 —— 按键、命令以及应有的效果 ——
|
|
14
|
+
请先看[用户指南](./docs/user-guide/)。
|
|
12
15
|
|
|
13
16
|

|
|
14
17
|
|
|
@@ -37,9 +40,9 @@ Pi 提供一个精简而锐利的内核。这个包是在其之上的一层,
|
|
|
37
40
|
- **连通网络与文件。** 在会话内搜索、抓取、浏览、打开和读取文档,还可通过桥接
|
|
38
41
|
在微信里直接回答当前会话。
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
[`package.json`](./package.json) 里的 `pi` manifest
|
|
42
|
-
|
|
43
|
+
一切都是可选的,且可独立开关。没有任何东西被分叉,也没有修改已安装的 Pi 文件:
|
|
44
|
+
Pi 通过 [`package.json`](./package.json) 里的 `pi` manifest 发现这些资源,因此
|
|
45
|
+
该包能像其他包一样随 Pi 一起升级。
|
|
43
46
|
|
|
44
47
|
## 快速开始
|
|
45
48
|
|
|
@@ -49,7 +52,7 @@ Pi 提供一个精简而锐利的内核。这个包是在其之上的一层,
|
|
|
49
52
|
pi install npm:@gavin-hu/my-pi-agent
|
|
50
53
|
```
|
|
51
54
|
|
|
52
|
-
[
|
|
55
|
+
[用户指南](./docs/user-guide/) 介绍其余安装方式——git、固定版本、
|
|
53
56
|
仅项目本地安装,以及不写入任何内容的试用——还有适用性判断、首个工作流和移除方式。
|
|
54
57
|
|
|
55
58
|
`git` 需在 `PATH` 上,供 [`worktree`](./extensions/worktree/) 与
|
|
@@ -61,29 +64,33 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
|
|
|
61
64
|
|
|
62
65
|
- `/bytefly [extension] [refresh]` 打开控制中心的 Extensions 区,列出每个已加载扩展
|
|
63
66
|
及其运行时健康状况,启用或禁用一个扩展,并用 `x` 清除项目级覆盖。
|
|
64
|
-
- `/bytefly settings` 打开控制中心的 Settings
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
- `/bytefly settings` 打开控制中心的 Settings 区:十个分组覆盖启动、通知、
|
|
68
|
+
诊断、计价、转录、终端、worktree、快照、任务与监听器、记忆,并提供 **Theme**
|
|
69
|
+
行;用 `Space`/`Enter` 修改,用 `Tab` 切换 Global/Project 作用域。
|
|
67
70
|
- `/bytefly doctor [extension] [refresh]` 打印 doctor 报告(`run_doctor` 的文本),
|
|
68
71
|
检查每个已启用扩展在运行时是否具备所需条件。
|
|
69
|
-
- `/
|
|
72
|
+
- `/bytefly update` 立即重跑包更新检查,报告可更新的包、本包版本与 release URL,
|
|
73
|
+
或跳过原因。
|
|
70
74
|
- `/plan <任务>` 以只读规划模式开始一个任务。
|
|
75
|
+
- `/skill:init` 通过内置的简短访谈和先审阅的计划创建或更新 `AGENTS.md`。
|
|
71
76
|
|
|
72
|
-
还有一件包会自行做的事:每次交互式会话启动时,`bytefly`
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
还有一件包会自行做的事:每次交互式会话启动时,`bytefly` 询问 Pi 的包管理器
|
|
78
|
+
哪些已配置的包有更新,抑制 Pi 自己的启动更新块,并用一个主题化 notice 列出它们
|
|
79
|
+
和 `pi update --extensions`;本包的新版本还会标在头部。不会发送任何会话内容,
|
|
80
|
+
`PI_OFFLINE` 可跳过检查;信任边界见 [`docs/security.md`](./docs/security.md)。
|
|
75
81
|
|
|
76
82
|
## 包含内容
|
|
77
83
|
|
|
78
|
-
|
|
84
|
+
十七个扩展和两个随包技能,按你想达成的目标分组,外加两个主题。每个扩展自己的 `README.md`
|
|
79
85
|
提供完整的工具与命令说明。
|
|
80
86
|
|
|
81
87
|
### 规划与委派
|
|
82
88
|
|
|
83
89
|
| 扩展 | 工具与命令 | 说明 |
|
|
84
90
|
|---|---|---|
|
|
85
|
-
| [`plan`](./extensions/plan/) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | 只读规划:模型先调研,把计划保存到 `.pi/plans` 下,你在写入任何内容前先批准。可在 TUI
|
|
86
|
-
| [`
|
|
91
|
+
| [`plan`](./extensions/plan/) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | 只读规划:模型先调研,把计划保存到 `.pi/plans` 下,你在写入任何内容前先批准。可在 TUI 中审阅,或在浏览器中打开以留下行内评论。`init` 技能复用同一审阅流程来创建或更新项目的 `AGENTS.md`。 |
|
|
92
|
+
| [`check`](./extensions/check/) | `run_check`, `/check` | 检测项目的测试、lint 或类型检查命令(或使用 `check.command`),在受监管的进程中运行,并把失败整理成可导航的 `file:line` 列表。 |
|
|
93
|
+
| [`subagent`](./extensions/subagent/) | `subagent`, `/agents` | 把任务委派给专职智能体(`explorer`、`planner`、`reviewer`、`worker`、`researcher`、`tester`、`debugger`、`documenter`),运行在它自己的 Pi 进程中 —— 单个、并行、链式或在后台运行;后台运行时在页脚显示数量,完成后发出提示。 |
|
|
87
94
|
| [`todo`](./extensions/todo/) | `todo`, `/todos` | 持久任务列表(`pending` / `in_progress` / `completed`),配一行式 widget。 |
|
|
88
95
|
| [`goal`](./extensions/goal/) | `goal`, `/goal` | 持久会话目标,保存在 widget 中,并在每个回合前重述。 |
|
|
89
96
|
| [`question`](./extensions/question/) | `ask_user_question` | 向你提出一个或多个结构化问题(带标签的选项外加自由填写的“其他”)并等待回答。 |
|
|
@@ -94,8 +101,8 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
|
|
|
94
101
|
|
|
95
102
|
| 扩展 | 工具与命令 | 说明 |
|
|
96
103
|
|---|---|---|
|
|
97
|
-
| [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree
|
|
98
|
-
| [`rewind`](./extensions/rewind/) | `/rewind`, `↺ N` 状态标记 | 每次提示时在 `refs/pi/rewind`
|
|
104
|
+
| [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree status|enter|exit|prune`, `--worktree` | 在隔离的 `git worktree` 里、在独立分支上工作;内置的 read/write/edit/bash 工具会跟随,清理时也不会丢弃工作。 |
|
|
105
|
+
| [`rewind`](./extensions/rewind/) | `/rewind`, `/review`, `↺ N` 状态标记 | 每次提示时在 `refs/pi/rewind` 下对仓库生成快照,可恢复代码、对话或两者,并在还原文件前审阅本轮改动。 |
|
|
99
106
|
| [`memory`](./extensions/memory/) | `memory`, `/memory` | 跨会话的持久笔记,以可人工编辑的 Markdown 保存,注入每次运行,并通过 `/memory` 选择器管理。 |
|
|
100
107
|
|
|
101
108
|
### 连通外部世界
|
|
@@ -112,13 +119,23 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
|
|
|
112
119
|
|
|
113
120
|
| 扩展 | 工具与命令 | 说明 |
|
|
114
121
|
|---|---|---|
|
|
115
|
-
| [`bytefly`](./extensions/bytefly/) | `/bytefly`(`doctor`、`settings` 子命令)、`run_doctor` | 可见的那一层:主题化头部配宽度自适应页脚,Pi 工作行上实时显示工具、调用次数与计时,转录中每个工具块以调用行为标题、结果正文挂在其下方。`/bytefly` 可开关扩展并集中存放精选设置;可选的 `notify` 会在一次运行、后台任务或待回答的问题需要你时发出系统通知。`bytefly.json` 是每个扩展都会读取的配置文档。 |
|
|
122
|
+
| [`bytefly`](./extensions/bytefly/) | `/bytefly`(`doctor`、`settings`、`update` 子命令)、`run_doctor` | 可见的那一层:主题化头部配宽度自适应页脚,Pi 工作行上实时显示工具、调用次数与计时,转录中每个工具块以调用行为标题、结果正文挂在其下方。`/bytefly` 可开关扩展并集中存放精选设置;可选的 `notify` 会在一次运行、后台任务或待回答的问题需要你时发出系统通知。`bytefly.json` 是每个扩展都会读取的配置文档。 |
|
|
123
|
+
|
|
124
|
+
### 技能
|
|
125
|
+
|
|
126
|
+
按需加载的随包工作流:每个技能的名称和描述会提供给模型,只有任务匹配时才加载完整说明(`/skill:<name>` 可强制加载)。
|
|
127
|
+
|
|
128
|
+
| 技能 | 说明 |
|
|
129
|
+
|---|---|
|
|
130
|
+
| [`init`](./skills/init/SKILL.md) | 基于仓库证据,通过内置的交互式访谈和计划审阅创建或更新项目的 `AGENTS.md`。 |
|
|
131
|
+
| [`refactor`](./skills/refactor/SKILL.md) | 审计项目或路径中的重构机会:重复代码、过大的模块、耦合、结构漂移,以及测试薄弱且改动频繁的代码。返回带证据和验证命令的排序清单;发现阶段只读。 |
|
|
116
132
|
|
|
117
133
|
### 主题
|
|
118
134
|
|
|
119
135
|
[`bytefly-dark`](./themes/bytefly-dark.json) 是 GitHub 风格的深色调色板,
|
|
120
136
|
[`bytefly-light`](./themes/bytefly-light.json) 是其浅色搭档,并支持可选的自动
|
|
121
|
-
浅色/深色切换。安装本包不会改变你的主题:通过 `/settings` → **Theme
|
|
137
|
+
浅色/深色切换。安装本包不会改变你的主题:通过 `/settings` → **Theme**(或
|
|
138
|
+
`/bytefly settings` → **Theme**)选择,
|
|
122
139
|
或设置 `"theme": "bytefly-light/bytefly-dark"` 以自动切换。本 README 的截图
|
|
123
140
|
使用 `bytefly-dark`。
|
|
124
141
|
|
|
@@ -147,14 +164,16 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
|
|
|
147
164
|
`bun run screenshot:tools` 重新生成它;`bun run screenshot:tool-pngs` 在
|
|
148
165
|
[`assets/tools/`](./assets/tools) 下为每个工具输出一张图。
|
|
149
166
|
|
|
167
|
+
准备上手了?[用户指南](./docs/user-guide/) 为每个扩展都准备了分步讲解:
|
|
168
|
+
第一次运行、关键按键,以及屏幕上会出现什么。
|
|
169
|
+
|
|
150
170
|
## 配置
|
|
151
171
|
|
|
152
172
|
大多数扩展无需配置。所有设置都在一个共享文档 `bytefly.json` 中,从
|
|
153
173
|
`<agent-dir>/bytefly.json` 读取,并与 `<cwd>/.pi/bytefly.json` 合并(项目优先),
|
|
154
174
|
位于一个以扩展名命名的顶层 section 下。每个扩展的 `README.md` 说明其键位的行为,
|
|
155
|
-
[`docs/configuration.md`](./docs/configuration.md)
|
|
156
|
-
|
|
157
|
-
类型、默认值和取值范围。
|
|
175
|
+
[`docs/configuration.md`](./docs/configuration.md) 则给出解析规则、设置界面操作方式,
|
|
176
|
+
以及每个 section 的键、类型、默认值和取值范围。
|
|
158
177
|
|
|
159
178
|
每个扩展默认都开启。若要在加载整包时排除其中一些,把 `PI_DISABLED_EXTENSIONS`
|
|
160
179
|
设为一个以逗号或空白分隔的扩展名列表(即 [`extensions/`](./extensions/) 下的目录
|
|
@@ -171,11 +190,9 @@ Pi 的 `--no-extensions`,或从你的设置中删除该包。
|
|
|
171
190
|
|
|
172
191
|
| 指南 | 内容 |
|
|
173
192
|
|---|---|
|
|
174
|
-
| [
|
|
175
|
-
| [
|
|
176
|
-
| [
|
|
177
|
-
| [配置参考](./docs/references/bytefly-config.md) | 列出 `bytefly.json` 的每个 section 与键,包括类型、默认值和取值范围。 |
|
|
178
|
-
| [架构](./docs/architecture.md) | 包、各扩展与 `lib/` 如何协同。 |
|
|
193
|
+
| [用户指南](./docs/user-guide/) | 分章手册:安装、每项功能、设置、故障排查与命令参考。 |
|
|
194
|
+
| [配置](./docs/configuration.md) | 解析规则、设置界面,以及 `bytefly.json` 每个键的默认值与取值范围。 |
|
|
195
|
+
| [架构](./docs/architecture.md) | 加载路径、运行时模型、状态、进程形态,以及新代码应放在哪里。 |
|
|
179
196
|
| [开发](./docs/development.md) | 本地设置、检查、测试、跨平台注意事项与发布流程。 |
|
|
180
197
|
| [安全](./docs/security.md) | 回环与远程界面的信任边界。 |
|
|
181
198
|
| [路线图](./ROADMAP.md) | 包的下一步方向,按 README 的承诺分组,并列出每条事项的依据。 |
|