@gavin-hu/my-pi-agent 0.14.0 → 0.15.1
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 +54 -34
- package/README.zh-CN.md +44 -28
- 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 +126 -37
- package/extensions/file-browse/client.ts +98 -33
- package/extensions/file-browse/config.ts +24 -9
- package/extensions/file-browse/files.ts +183 -48
- package/extensions/file-browse/fuzzy.ts +65 -11
- package/extensions/file-browse/git.ts +37 -47
- package/extensions/file-browse/html.ts +97 -171
- package/extensions/file-browse/live-client.ts +158 -0
- package/extensions/file-browse/live.ts +222 -0
- package/extensions/file-browse/markdown.ts +110 -92
- package/extensions/file-browse/raw-html.ts +478 -0
- package/extensions/file-browse/router.ts +65 -78
- package/extensions/file-browse/server.ts +75 -59
- package/extensions/file-browse/styles.ts +124 -0
- 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 +32 -79
- package/extensions/plan/web.ts +21 -42
- 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 +192 -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 +101 -21
- 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/rewind/snapshot.ts +13 -4
- 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 +15 -9
- package/lib/README.md +23 -8
- package/lib/config.ts +50 -3
- package/lib/errors.ts +12 -0
- package/lib/format.ts +50 -0
- package/lib/git/read.ts +28 -0
- package/lib/goal-state.ts +23 -8
- package/lib/http/headers.ts +74 -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 +109 -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/pool.ts +62 -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 +418 -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,36 @@ 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
|
-
|
|
74
|
-
|
|
75
|
-
rail glyph, output padding, and the hardware cursor, with `Space`/`Enter` to
|
|
76
|
-
change a value and `Tab` for Global/Project scope.
|
|
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.
|
|
77
79
|
- `/bytefly doctor [extension] [refresh]` prints the doctor report —
|
|
78
80
|
`run_doctor`'s text — and checks that each enabled extension has what it needs
|
|
79
81
|
at runtime.
|
|
80
|
-
- `/
|
|
82
|
+
- `/bytefly update` re-runs the package update check now and reports the
|
|
83
|
+
updateable packages, this package's version and release URL, or a skip.
|
|
81
84
|
- `/plan <task>` starts a task in read-only planning mode.
|
|
85
|
+
- `/skill:init` creates or updates `AGENTS.md` through a short built-in interview and a plan you review first.
|
|
82
86
|
|
|
83
|
-
One thing the pack does on its own: once per interactive session, `bytefly`
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
One thing the pack does on its own: once per interactive session, `bytefly`
|
|
88
|
+
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;
|
|
86
92
|
[`docs/security.md`](./docs/security.md) covers the trust boundaries.
|
|
87
93
|
|
|
88
94
|
## What you get
|
|
89
95
|
|
|
90
|
-
|
|
91
|
-
extension's own `README.md` has the full tool and command surface.
|
|
96
|
+
17 extensions, 2 packaged skills, and 2 themes, grouped by what you are trying
|
|
97
|
+
to do. Each extension's own `README.md` has the full tool and command surface.
|
|
92
98
|
|
|
93
99
|
### Plan and delegate
|
|
94
100
|
|
|
95
101
|
| Extension | Tools and commands | What it does |
|
|
96
102
|
|---|---|---|
|
|
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
|
-
| [`
|
|
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`. |
|
|
104
|
+
| [`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
|
+
| [`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
106
|
| [`todo`](./extensions/todo/) | `todo`, `/todos` | A persistent task list (`pending` / `in_progress` / `completed`) with a one-line widget. |
|
|
100
107
|
| [`goal`](./extensions/goal/) | `goal`, `/goal` | A persistent session objective, kept in a widget and restated before each turn. |
|
|
101
108
|
| [`question`](./extensions/question/) | `ask_user_question` | Ask you one or more structured questions (labelled options plus free-form "Other") and wait. |
|
|
@@ -106,8 +113,8 @@ extension's own `README.md` has the full tool and command surface.
|
|
|
106
113
|
|
|
107
114
|
| Extension | Tools and commands | What it does |
|
|
108
115
|
|---|---|---|
|
|
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
|
|
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. |
|
|
117
|
+
| [`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
118
|
| [`memory`](./extensions/memory/) | `memory`, `/memory` | Durable cross-session notes as human-editable markdown, injected into each run and managed through the `/memory` picker. |
|
|
112
119
|
|
|
113
120
|
### Reach the world
|
|
@@ -115,7 +122,7 @@ extension's own `README.md` has the full tool and command surface.
|
|
|
115
122
|
| Extension | Tools and commands | What it does |
|
|
116
123
|
|---|---|---|
|
|
117
124
|
| [`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. |
|
|
118
|
-
| [`file-browse`](./extensions/file-browse/) | `/browse` | Start a loopback, read-only file browser rooted at the working directory, with Markdown preview
|
|
125
|
+
| [`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. |
|
|
119
126
|
| [`document`](./extensions/document/) | `read_doc` | Extract text from a local PDF, DOCX, DOC, ODT, RTF, or XLSX in process, paged. |
|
|
120
127
|
| [`file-open`](./extensions/file-open/) | `/open`, `open_path` | Open or reveal a file or directory in the OS-native application. |
|
|
121
128
|
| [`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. |
|
|
@@ -124,14 +131,26 @@ extension's own `README.md` has the full tool and command surface.
|
|
|
124
131
|
|
|
125
132
|
| Extension | Tools and commands | What it does |
|
|
126
133
|
|---|---|---|
|
|
127
|
-
| [`bytefly`](./extensions/bytefly/) | `/bytefly` (with the `doctor` and `
|
|
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. |
|
|
135
|
+
|
|
136
|
+
### Skills
|
|
137
|
+
|
|
138
|
+
Packaged workflows loaded on demand: each skill's name and description are
|
|
139
|
+
advertised to the model, and its instructions load only when the task matches
|
|
140
|
+
(`/skill:<name>` forces one).
|
|
141
|
+
|
|
142
|
+
| Skill | What it does |
|
|
143
|
+
|---|---|
|
|
144
|
+
| [`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
|
+
| [`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
146
|
|
|
129
147
|
### Themes
|
|
130
148
|
|
|
131
149
|
[`bytefly-dark`](./themes/bytefly-dark.json) is a GitHub-inspired dark palette
|
|
132
150
|
and [`bytefly-light`](./themes/bytefly-light.json) its light companion, with
|
|
133
151
|
optional automatic light/dark switching. Installing the pack does not change
|
|
134
|
-
your theme: pick one through `/settings` → **Theme
|
|
152
|
+
your theme: pick one through `/settings` → **Theme** (or `/bytefly settings` →
|
|
153
|
+
**Theme**), or set
|
|
135
154
|
`"theme": "bytefly-light/bytefly-dark"` for switching. The screenshots in this
|
|
136
155
|
README use `bytefly-dark`.
|
|
137
156
|
|
|
@@ -156,20 +175,23 @@ each tool's own renderer (or bytefly's generic fallback): the user nameplate and
|
|
|
156
175
|
a notice, Pi's built-ins, and every tool this package registers. The rail glyph
|
|
157
176
|
is the `chrome.rail` setting.
|
|
158
177
|
|
|
159
|
-

|
|
178
|
+

|
|
160
179
|
|
|
161
180
|
`bun run screenshot:tools` regenerates it; `bun run screenshot:tool-pngs` writes
|
|
162
181
|
one image per tool under [`assets/tools/`](./assets/tools).
|
|
163
182
|
|
|
183
|
+
Ready to use one? The [user guide](./docs/user-guide/) has a walkthrough for
|
|
184
|
+
each: the first run, the keys that matter, and what to expect on screen.
|
|
185
|
+
|
|
164
186
|
## Configuration
|
|
165
187
|
|
|
166
188
|
Most extensions need no configuration. Every setting lives in one shared
|
|
167
189
|
document, `bytefly.json`, read from `<agent-dir>/bytefly.json` and merged with
|
|
168
190
|
`<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
|
-
|
|
191
|
+
extension. Each extension's `README.md` covers the behaviour around its keys, and
|
|
192
|
+
[`docs/configuration.md`](./docs/configuration.md) has the resolution rules, the
|
|
193
|
+
settings screen walkthrough, and every section's keys with their type, default,
|
|
194
|
+
and bounds.
|
|
173
195
|
|
|
174
196
|
Every extension is on by default. To load the pack without some of them, set
|
|
175
197
|
`PI_DISABLED_EXTENSIONS` to a comma- or whitespace-separated list of extension
|
|
@@ -187,11 +209,9 @@ stops the factories from registering; to drop the whole package, use Pi's
|
|
|
187
209
|
|
|
188
210
|
| Guide | What it covers |
|
|
189
211
|
|---|---|
|
|
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. |
|
|
212
|
+
| [User guide](./docs/user-guide/) | A chaptered manual: install, every feature, settings, troubleshooting, and a command reference. |
|
|
213
|
+
| [Configuration](./docs/configuration.md) | Resolution, the settings screen, and every `bytefly.json` key with its default and bounds. |
|
|
214
|
+
| [Architecture](./docs/architecture.md) | The load path, runtime model, state, process shapes, and where new code belongs. |
|
|
195
215
|
| [Development](./docs/development.md) | Local setup, checks, tests, cross-platform notes, and the release process. |
|
|
196
216
|
| [Security](./docs/security.md) | Trust boundaries for the loopback and remote surfaces. |
|
|
197
217
|
| [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,32 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
|
|
|
61
64
|
|
|
62
65
|
- `/bytefly [extension] [refresh]` 打开控制中心的 Extensions 区,列出每个已加载扩展
|
|
63
66
|
及其运行时健康状况,启用或禁用一个扩展,并用 `x` 清除项目级覆盖。
|
|
64
|
-
- `/bytefly settings` 打开控制中心的 Settings
|
|
65
|
-
|
|
66
|
-
用 `Space`/`Enter` 修改,用 `Tab` 切换 Global/Project 作用域。
|
|
67
|
+
- `/bytefly settings` 打开控制中心的 Settings 区:精选设置按类别分组,并提供
|
|
68
|
+
**Theme** 行;用 `Space`/`Enter` 修改,用 `Tab` 切换 Global/Project 作用域。
|
|
67
69
|
- `/bytefly doctor [extension] [refresh]` 打印 doctor 报告(`run_doctor` 的文本),
|
|
68
70
|
检查每个已启用扩展在运行时是否具备所需条件。
|
|
69
|
-
- `/
|
|
71
|
+
- `/bytefly update` 立即重跑包更新检查,报告可更新的包、本包版本与 release URL,
|
|
72
|
+
或跳过原因。
|
|
70
73
|
- `/plan <任务>` 以只读规划模式开始一个任务。
|
|
74
|
+
- `/skill:init` 通过内置的简短访谈和先审阅的计划创建或更新 `AGENTS.md`。
|
|
71
75
|
|
|
72
|
-
还有一件包会自行做的事:每次交互式会话启动时,`bytefly`
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
还有一件包会自行做的事:每次交互式会话启动时,`bytefly` 询问 Pi 的包管理器
|
|
77
|
+
哪些已配置的包有更新,抑制 Pi 自己的启动更新块,并用一个主题化 notice 列出它们
|
|
78
|
+
和 `pi update --extensions`;本包的新版本还会标在头部。不会发送任何会话内容,
|
|
79
|
+
`PI_OFFLINE` 可跳过检查;信任边界见 [`docs/security.md`](./docs/security.md)。
|
|
75
80
|
|
|
76
81
|
## 包含内容
|
|
77
82
|
|
|
78
|
-
|
|
83
|
+
17 个扩展、2 个随包技能,以及 2 个主题,按你想达成的目标分组。每个扩展自己的 `README.md`
|
|
79
84
|
提供完整的工具与命令说明。
|
|
80
85
|
|
|
81
86
|
### 规划与委派
|
|
82
87
|
|
|
83
88
|
| 扩展 | 工具与命令 | 说明 |
|
|
84
89
|
|---|---|---|
|
|
85
|
-
| [`plan`](./extensions/plan/) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | 只读规划:模型先调研,把计划保存到 `.pi/plans` 下,你在写入任何内容前先批准。可在 TUI
|
|
86
|
-
| [`
|
|
90
|
+
| [`plan`](./extensions/plan/) | `enter_plan_mode`, `write_plan`, `exit_plan_mode`, `set_plan_steps`, `/plan`, `--plan` | 只读规划:模型先调研,把计划保存到 `.pi/plans` 下,你在写入任何内容前先批准。可在 TUI 中审阅,或在浏览器中打开以留下行内评论。`init` 技能复用同一审阅流程来创建或更新项目的 `AGENTS.md`。 |
|
|
91
|
+
| [`check`](./extensions/check/) | `run_check`, `/check` | 检测项目的测试、lint 或类型检查命令(或使用 `check.command`),在受监管的进程中运行,并把失败整理成可导航的 `file:line` 列表。 |
|
|
92
|
+
| [`subagent`](./extensions/subagent/) | `subagent`, `/agents` | 把任务委派给专职智能体(`explorer`、`planner`、`reviewer`、`worker`、`researcher`、`tester`、`debugger`、`documenter`),运行在它自己的 Pi 进程中 —— 单个、并行、链式或在后台运行;后台运行时在页脚显示数量,完成后发出提示。 |
|
|
87
93
|
| [`todo`](./extensions/todo/) | `todo`, `/todos` | 持久任务列表(`pending` / `in_progress` / `completed`),配一行式 widget。 |
|
|
88
94
|
| [`goal`](./extensions/goal/) | `goal`, `/goal` | 持久会话目标,保存在 widget 中,并在每个回合前重述。 |
|
|
89
95
|
| [`question`](./extensions/question/) | `ask_user_question` | 向你提出一个或多个结构化问题(带标签的选项外加自由填写的“其他”)并等待回答。 |
|
|
@@ -94,8 +100,8 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
|
|
|
94
100
|
|
|
95
101
|
| 扩展 | 工具与命令 | 说明 |
|
|
96
102
|
|---|---|---|
|
|
97
|
-
| [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree
|
|
98
|
-
| [`rewind`](./extensions/rewind/) | `/rewind`, `↺ N` 状态标记 | 每次提示时在 `refs/pi/rewind`
|
|
103
|
+
| [`worktree`](./extensions/worktree/) | `enter_worktree`, `exit_worktree`, `prune_worktrees`, `list_worktrees`, `/worktree status|enter|exit|prune`, `--worktree` | 在隔离的 `git worktree` 里、在独立分支上工作;内置的 read/write/edit/bash 工具会跟随,清理时也不会丢弃工作。 |
|
|
104
|
+
| [`rewind`](./extensions/rewind/) | `/rewind`, `/review`, `↺ N` 状态标记 | 每次提示时在 `refs/pi/rewind` 下对仓库生成快照,可恢复代码、对话或两者,并在还原文件前审阅本轮改动。 |
|
|
99
105
|
| [`memory`](./extensions/memory/) | `memory`, `/memory` | 跨会话的持久笔记,以可人工编辑的 Markdown 保存,注入每次运行,并通过 `/memory` 选择器管理。 |
|
|
100
106
|
|
|
101
107
|
### 连通外部世界
|
|
@@ -103,7 +109,7 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
|
|
|
103
109
|
| 扩展 | 工具与命令 | 说明 |
|
|
104
110
|
|---|---|---|
|
|
105
111
|
| [`web-access`](./extensions/web-access/) | `web_search`, `web_fetch` | 搜索网络(默认无密钥的 DuckDuckGo,可选 SearXNG 或 Brave),并把页面抓取为可读文本,支持分页、`find`、逐跳 SSRF 检查以及可选的 PDF 支持。 |
|
|
106
|
-
| [`file-browse`](./extensions/file-browse/) | `/browse` | 启动一个以工作目录为根的本地回环、只读文件浏览器,带 Markdown
|
|
112
|
+
| [`file-browse`](./extensions/file-browse/) | `/browse` | 启动一个以工作目录为根的本地回环、只读文件浏览器,带 Markdown 预览、模糊快速打开面板,以及为常开页面提供的实时状态。 |
|
|
107
113
|
| [`document`](./extensions/document/) | `read_doc` | 在进程内从本地 PDF、DOCX、DOC、ODT、RTF 或 XLSX 提取文本,支持分页。 |
|
|
108
114
|
| [`file-open`](./extensions/file-open/) | `/open`, `open_path` | 用操作系统原生应用打开或定位文件/目录。 |
|
|
109
115
|
| [`wechat`](./extensions/wechat/) | `/wechat`, `send_wechat` | 通过微信 iLink 机器人 API 把微信聊天桥接到实时会话;入站文本、图片和文件会变成回合。 |
|
|
@@ -112,13 +118,23 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
|
|
|
112
118
|
|
|
113
119
|
| 扩展 | 工具与命令 | 说明 |
|
|
114
120
|
|---|---|---|
|
|
115
|
-
| [`bytefly`](./extensions/bytefly/) | `/bytefly`(`doctor`、`settings` 子命令)、`run_doctor` | 可见的那一层:主题化头部配宽度自适应页脚,Pi 工作行上实时显示工具、调用次数与计时,转录中每个工具块以调用行为标题、结果正文挂在其下方。`/bytefly` 可开关扩展并集中存放精选设置;可选的 `notify` 会在一次运行、后台任务或待回答的问题需要你时发出系统通知。`bytefly.json` 是每个扩展都会读取的配置文档。 |
|
|
121
|
+
| [`bytefly`](./extensions/bytefly/) | `/bytefly`(`doctor`、`settings`、`update` 子命令)、`run_doctor` | 可见的那一层:主题化头部配宽度自适应页脚,Pi 工作行上实时显示工具、调用次数与计时,转录中每个工具块以调用行为标题、结果正文挂在其下方。`/bytefly` 可开关扩展并集中存放精选设置;可选的 `notify` 会在一次运行、后台任务或待回答的问题需要你时发出系统通知。`bytefly.json` 是每个扩展都会读取的配置文档。 |
|
|
122
|
+
|
|
123
|
+
### 技能
|
|
124
|
+
|
|
125
|
+
按需加载的随包工作流:每个技能的名称和描述会提供给模型,只有任务匹配时才加载完整说明(`/skill:<name>` 可强制加载)。
|
|
126
|
+
|
|
127
|
+
| 技能 | 说明 |
|
|
128
|
+
|---|---|
|
|
129
|
+
| [`init`](./skills/init/SKILL.md) | 基于仓库证据,通过内置的交互式访谈和计划审阅创建或更新项目的 `AGENTS.md`。 |
|
|
130
|
+
| [`refactor`](./skills/refactor/SKILL.md) | 审计项目或路径中的重构机会:重复代码、过大的模块、耦合、结构漂移,以及测试薄弱且改动频繁的代码。返回带证据和验证命令的排序清单;发现阶段只读。 |
|
|
116
131
|
|
|
117
132
|
### 主题
|
|
118
133
|
|
|
119
134
|
[`bytefly-dark`](./themes/bytefly-dark.json) 是 GitHub 风格的深色调色板,
|
|
120
135
|
[`bytefly-light`](./themes/bytefly-light.json) 是其浅色搭档,并支持可选的自动
|
|
121
|
-
浅色/深色切换。安装本包不会改变你的主题:通过 `/settings` → **Theme
|
|
136
|
+
浅色/深色切换。安装本包不会改变你的主题:通过 `/settings` → **Theme**(或
|
|
137
|
+
`/bytefly settings` → **Theme**)选择,
|
|
122
138
|
或设置 `"theme": "bytefly-light/bytefly-dark"` 以自动切换。本 README 的截图
|
|
123
139
|
使用 `bytefly-dark`。
|
|
124
140
|
|
|
@@ -147,14 +163,16 @@ Windows、macOS 和 Linux 均可运行,完整检查套件在每个平台上都
|
|
|
147
163
|
`bun run screenshot:tools` 重新生成它;`bun run screenshot:tool-pngs` 在
|
|
148
164
|
[`assets/tools/`](./assets/tools) 下为每个工具输出一张图。
|
|
149
165
|
|
|
166
|
+
准备上手了?[用户指南](./docs/user-guide/) 为每个扩展都准备了分步讲解:
|
|
167
|
+
第一次运行、关键按键,以及屏幕上会出现什么。
|
|
168
|
+
|
|
150
169
|
## 配置
|
|
151
170
|
|
|
152
171
|
大多数扩展无需配置。所有设置都在一个共享文档 `bytefly.json` 中,从
|
|
153
172
|
`<agent-dir>/bytefly.json` 读取,并与 `<cwd>/.pi/bytefly.json` 合并(项目优先),
|
|
154
173
|
位于一个以扩展名命名的顶层 section 下。每个扩展的 `README.md` 说明其键位的行为,
|
|
155
|
-
[`docs/configuration.md`](./docs/configuration.md)
|
|
156
|
-
|
|
157
|
-
类型、默认值和取值范围。
|
|
174
|
+
[`docs/configuration.md`](./docs/configuration.md) 则给出解析规则、设置界面操作方式,
|
|
175
|
+
以及每个 section 的键、类型、默认值和取值范围。
|
|
158
176
|
|
|
159
177
|
每个扩展默认都开启。若要在加载整包时排除其中一些,把 `PI_DISABLED_EXTENSIONS`
|
|
160
178
|
设为一个以逗号或空白分隔的扩展名列表(即 [`extensions/`](./extensions/) 下的目录
|
|
@@ -171,11 +189,9 @@ Pi 的 `--no-extensions`,或从你的设置中删除该包。
|
|
|
171
189
|
|
|
172
190
|
| 指南 | 内容 |
|
|
173
191
|
|---|---|
|
|
174
|
-
| [
|
|
175
|
-
| [
|
|
176
|
-
| [
|
|
177
|
-
| [配置参考](./docs/references/bytefly-config.md) | 列出 `bytefly.json` 的每个 section 与键,包括类型、默认值和取值范围。 |
|
|
178
|
-
| [架构](./docs/architecture.md) | 包、各扩展与 `lib/` 如何协同。 |
|
|
192
|
+
| [用户指南](./docs/user-guide/) | 分章手册:安装、每项功能、设置、故障排查与命令参考。 |
|
|
193
|
+
| [配置](./docs/configuration.md) | 解析规则、设置界面,以及 `bytefly.json` 每个键的默认值与取值范围。 |
|
|
194
|
+
| [架构](./docs/architecture.md) | 加载路径、运行时模型、状态、进程形态,以及新代码应放在哪里。 |
|
|
179
195
|
| [开发](./docs/development.md) | 本地设置、检查、测试、跨平台注意事项与发布流程。 |
|
|
180
196
|
| [安全](./docs/security.md) | 回环与远程界面的信任边界。 |
|
|
181
197
|
| [路线图](./ROADMAP.md) | 包的下一步方向,按 README 的承诺分组,并列出每条事项的依据。 |
|