pi-bro 0.25.1 → 0.26.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/CHANGELOG.md +29 -0
- package/README.md +12 -10
- package/docs/getting-started.md +2 -2
- package/docs/guided-review.md +4 -4
- package/docs/reference/data-and-permissions.md +16 -3
- package/docs/reference/settings.md +7 -2
- package/docs/reference/troubleshooting.md +5 -0
- package/package.json +5 -3
- package/src/advisor.ts +4 -2
- package/src/backend.ts +511 -11
- package/src/bro.ts +5 -0
- package/src/btw.ts +28 -4
- package/src/config-ui.ts +149 -51
- package/src/doctor.ts +142 -3
- package/src/explain-modal.ts +2 -2
- package/src/settings.ts +85 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to pi-bro are documented here.
|
|
4
4
|
|
|
5
|
+
## [0.26.0] - 2026-10-20
|
|
6
|
+
|
|
7
|
+
### Highlights
|
|
8
|
+
|
|
9
|
+
- Run any Bro feature on **Pi itself**: a new `pi` backend drives an in-process Pi SDK session with your own Pi models and credentials. No extra CLI to install.
|
|
10
|
+
- `/bro config` is now two steps: pick the backend, then its model. Esc steps back without saving.
|
|
11
|
+
- Pi is the safest review option alongside Claude and Muse: Guided Review gets file-only tools and no shell.
|
|
12
|
+
|
|
13
|
+
### Breaking
|
|
14
|
+
|
|
15
|
+
- **pi-bro now requires Pi `>=1.3.0`** (previously `>=0.84.2`). The Pi backend is built on SDK APIs introduced after 0.84.2 — `SettingsManager.getSettings()`, `ModelRuntime.getAllModels()` and seeded `SessionManager.inMemory(cwd, { id }, entries)` (1.0.0), and the `disabledBuiltinExtensions` resource-loader option (1.1.0) — so an older host cannot load the extension at all. Update Pi before upgrading pi-bro; the five CLI backends need no other change. `pi-floor` in CI now pins 1.3.0, the oldest supported version.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- New `pi` backend for `explain`, `show`, `elevate`, `btw` (restricted and full), `advisor`, and Guided Review. It runs `createAgentSession` inside this process, uses your Pi model registry and configured credentials, and needs no CLI.
|
|
20
|
+
- `/bro config` two-step picker: step 1 chooses the backend (Default for capability overrides, Agy, Claude, Grok, Codex, Muse, Pi), step 2 chooses that backend's model. Esc in step 2 returns to step 1 without saving; a selection only saves on a complete model pick. The Agy family list and the Pi catalog load independently, so `/bro config` works when Agy is offline.
|
|
21
|
+
- Pi model choices come from your configured scoped models (`enabledModels`), falling back to every model with configured credentials. Virtual (`pi-virtual`) models are filtered out and cannot be selected.
|
|
22
|
+
- A `/bro doctor` Pi section that checks the selected physical model, its auth and scope membership, the effective effort, and the curated tool set for each capability, all without a CLI spawn or a live model turn.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- Guided Review accepts `pi` as a file-only backend (read/grep/find/ls, no shell) alongside Claude and Muse, and no longer treats it as a shell-capable sandbox. Its session also ignores the captured checkout's `.pi/settings.json`, `.pi/SYSTEM.md` and `.pi/APPEND_SYSTEM.md`, so a PR cannot steer settings or inject system instructions for the review. Host-untrusted workspaces get the same protection.
|
|
27
|
+
- Pi `btw` keeps its side session in memory only (nothing written under `~/.pi/agent/sessions`), resumes it within the same mode and preferences, and drops it on a `/mode` switch or preferences change, matching Agy. An expired or evicted side conversation now fails loudly instead of silently restarting without its history.
|
|
28
|
+
- Settings version 2 accepts `"backend": "pi"` with a `"<provider>/<id>"` model (split on the first `/` only). A malformed custom model ID is reported in the field instead of throwing out of `/bro config`.
|
|
29
|
+
- Pi model choices come from your configured scoped models (`enabledModels`), falling back to every model with configured credentials. The catalog now includes models authenticated by runtime keys, so the picker offers everything a run can actually use. Virtual (`pi-virtual`) models are filtered out and cannot be selected.
|
|
30
|
+
- Pi `btw` and `advisor` runs are raced against the deadline and cancellation latch, so an uncooperative provider can no longer hold the caller or start a model request after its deadline.
|
|
31
|
+
- `/bro doctor` now computes and reports the effective Pi reasoning effort (`requested → effective` only when they differ) instead of claiming a clamp it never checked, and describes both BTW access modes. Scoped-model `:thinking` suffixes are honoured when the Bro effort is `default`.
|
|
32
|
+
- Docs, README, and `/bro help` document the Pi backend and the two-step picker.
|
|
33
|
+
|
|
5
34
|
## [0.25.1] - 2026-10-19
|
|
6
35
|
|
|
7
36
|
### Highlights
|
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ File and webpage examples need your own real path or URL; see [how to explain th
|
|
|
61
61
|
| `/bro show` | **[Show](docs/features/show.md#bro-show).** The last few turns drawn as a shape (call tree, file tree, diff, pseudocode, a sequence diagram, or an HTML layout) instead of prose. |
|
|
62
62
|
| `/bro elevate` or **Ctrl+Shift+E** | **[Elevate](docs/elevate.md).** Discover missing expert considerations, select useful improvements, and rewrite your task without submitting it. Shares BTW backend settings. |
|
|
63
63
|
| `/bro btw` | **[Side questions](docs/features/btw.md#bro-btw-side-conversation).** A separate conversation seeded with recent context, so you can ask without interrupting the agent. ⚠️ [Full-permission mode](#what-leaves-your-machine) can edit files. |
|
|
64
|
-
| `/bro guided-review <PR>` | **[Guided Review](docs/guided-review.md).** An explanation and quality assessment of a GitHub PR, with ranked findings, source evidence and private questions. Claude or
|
|
64
|
+
| `/bro guided-review <PR>` | **[Guided Review](docs/guided-review.md).** An explanation and quality assessment of a GitHub PR, with ranked findings, source evidence and private questions. Claude, Muse, or Pi is recommended for untrusted PRs. |
|
|
65
65
|
| `bro_advisor` tool | **[Second opinion](docs/features/advisor.md#bro-advisor).** A tool your agent can call mid-task; a fresh backend process reviews the session snapshot, can inspect the workspace when needed, and returns advice to the agent. ⚠️ [Runs with permissions bypassed](#what-leaves-your-machine). |
|
|
66
66
|
| `/bro config`, `/bro preferences` | **[Settings](docs/reference/settings.md#settings) and [preferences](docs/user-guide.md#preferences).** Pick the backend, model and effort per feature, and tell Bro how you like answers. |
|
|
67
67
|
|
|
@@ -72,11 +72,10 @@ Guided Review has its own [guide](docs/guided-review.md).
|
|
|
72
72
|
|
|
73
73
|
## Requirements
|
|
74
74
|
|
|
75
|
-
- Pi `>=
|
|
75
|
+
- Pi `>=1.3.0` and Node.js `>=22.19.0`.
|
|
76
76
|
- macOS or Linux. Windows is untested; there, cancelling stops only the
|
|
77
77
|
backend's direct process, not anything it started.
|
|
78
|
-
- At least one backend
|
|
79
|
-
You only need the one you use:
|
|
78
|
+
- At least one backend on your `PATH`, signed in once from your terminal, **or the built-in Pi backend**. You only need the one you use:
|
|
80
79
|
|
|
81
80
|
| Backend | CLI | Notes |
|
|
82
81
|
| --- | --- | --- |
|
|
@@ -85,9 +84,10 @@ Guided Review has its own [guide](docs/guided-review.md).
|
|
|
85
84
|
| [Grok Build](https://docs.x.ai/build/overview) | `grok` | Guided Review uses its read-only sandbox (shell-enabled). |
|
|
86
85
|
| [Codex CLI](https://github.com/openai/codex) | `codex` | Guided Review uses its read-only sandbox (shell-enabled). |
|
|
87
86
|
| [Muse Code](https://dev.meta.ai/docs/muse-code) | `muse` | Works for every feature; strict file-only inspection for Guided Review. |
|
|
87
|
+
| **Pi** (in-process) | none | Runs a Pi SDK session inside this process using your Pi models and credentials. No extra install. Restricted features get no tools; Guided Review is file-only; the advisor and full-access BTW get workspace tools. |
|
|
88
88
|
|
|
89
89
|
- Guided Review also needs Git and an authenticated [`gh`](https://cli.github.com/).
|
|
90
|
-
Claude or
|
|
90
|
+
Claude, Muse, or Pi is recommended for untrusted PRs (strict file-only inspection); Codex, Grok and Agy run with shell available under their sandbox, with an advisory.
|
|
91
91
|
- [PiG](docs/pig-compatibility.md) support is experimental.
|
|
92
92
|
|
|
93
93
|
## What leaves your machine
|
|
@@ -106,11 +106,13 @@ which may keep it under their own policies. Paths below are under
|
|
|
106
106
|
| Advisor | The agent's system instructions, tool list and whole conversation, including tool calls and results (reasoning and images omitted), plus your steering | Steering in `bro-advisor.md` and the session file |
|
|
107
107
|
|
|
108
108
|
`/bro url` also connects straight to the website, which sees your IP address.
|
|
109
|
-
Bro runs each CLI as you, with your environment. It never reads or copies
|
|
110
|
-
provider credentials, but
|
|
111
|
-
keys set in your environment.
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
Bro runs each CLI as you, with your environment. It never reads or copies an
|
|
110
|
+
external CLI's provider credentials, but a CLI signs in its own way, which can
|
|
111
|
+
include API keys set in your environment. The built-in **Pi** backend is the
|
|
112
|
+
exception: it runs in-process, so it reads your Pi `auth.json` and reuses your
|
|
113
|
+
Pi provider credentials for the model you select. Nothing Bro produces enters
|
|
114
|
+
Pi's conversation unless you insert it, except advisor answers, which return to
|
|
115
|
+
the agent as tool results.
|
|
114
116
|
|
|
115
117
|
> [!WARNING]
|
|
116
118
|
> These run the backend in your workspace with its permission checks bypassed:
|
package/docs/getting-started.md
CHANGED
|
@@ -4,7 +4,7 @@ Pi-bro helps you understand agent replies, ask side questions, and review work w
|
|
|
4
4
|
|
|
5
5
|
## 1. Install
|
|
6
6
|
|
|
7
|
-
You need **Pi**, Node.js 22.19.0 or later, and one supported backend
|
|
7
|
+
You need **Pi**, Node.js 22.19.0 or later, and one supported backend already installed and signed in (Agy, Claude, Grok, Codex, or Muse) — or the built-in **Pi** backend, which uses your Pi session's own models and needs no extra CLI. See [requirements](../README.md#requirements).
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
pi install npm:pi-bro
|
|
@@ -44,4 +44,4 @@ See the [docs home](README.md) for detailed workflows.
|
|
|
44
44
|
|
|
45
45
|
## Data and access before you use Bro at work
|
|
46
46
|
|
|
47
|
-
Bro sends your selected text and some context to the backend CLI and model provider you configure. BTW and the advisor have different access rules; some modes can read or change local files. Read [What leaves your machine](../README.md#what-leaves-your-machine) and the [backend access matrix](reference/data-and-permissions.md#backends-access-and-retention) before using private data. A model prompt saying 'do not access' is not a security boundary.
|
|
47
|
+
Bro sends your selected text and some context to the backend CLI and model provider you configure. BTW and the advisor have different access rules; some modes can read or change local files. The Pi backend runs in-process but still sends the prompt to whichever Pi model provider you select. Read [What leaves your machine](../README.md#what-leaves-your-machine) and the [backend access matrix](reference/data-and-permissions.md#backends-access-and-retention) before using private data. A model prompt saying 'do not access' is not a security boundary.
|
package/docs/guided-review.md
CHANGED
|
@@ -6,7 +6,7 @@ The normal journey is: **open a PR → read and investigate → leave when satis
|
|
|
6
6
|
|
|
7
7
|
## Open a review
|
|
8
8
|
|
|
9
|
-
Requirements: local Pi interactive mode, Git, authenticated GitHub CLI (`gh`), and a configured review backend (Claude or
|
|
9
|
+
Requirements: local Pi interactive mode, Git, authenticated GitHub CLI (`gh`), and a configured review backend (Claude, Muse, or Pi is recommended for untrusted PRs). Run `gh auth status` to check GitHub authentication; `/bro doctor` checks Bro's selected backend setup and shows an advisory when the review backend uses a shell-capable sandbox, without proving GitHub access or model connectivity.
|
|
10
10
|
|
|
11
11
|
```text
|
|
12
12
|
/bro guided-review https://github.com/OWNER/REPO/pull/123
|
|
@@ -83,9 +83,9 @@ Use Overview → Regenerate guide only when you want a fresh explanation/assessm
|
|
|
83
83
|
|
|
84
84
|
## Access, privacy and storage
|
|
85
85
|
|
|
86
|
-
Review never runs with full-access or bypass flags. **Claude and
|
|
86
|
+
Review never runs with full-access or bypass flags. **Claude, Muse, and Pi provide strict file-only inspection** and are recommended for untrusted PRs: Claude runs with `--restricted`, Read/Grep/Glob only, `dontAsk`, safe mode and no MCP; Muse disables write, shell and web tools, foreign personal context and native session logs, without trusting repository rules; Pi runs in-process with `read/grep/find/ls` only, no shell, and an isolated session. No model-run project tests, commands, Git or network tools are available on Claude, Muse, or Pi.
|
|
87
87
|
|
|
88
|
-
**Codex, Grok and Agy run with shell available inside their own sandbox**, and each sandbox is different: Codex and Grok apply a read-only sandbox (`codex exec --sandbox read-only --ephemeral`, `grok --sandbox read-only --permission-mode dontAsk`), while Agy's `--sandbox` only restricts terminal commands and still lets them write inside the project. All three inspect the captured checkout with a 10-minute review deadline, and **none is shell-free**. When one of these backends is selected for review, Bro shows an advisory during acquisition, in the live review workspace, and in `/bro doctor` (as a non-fatal informational note). Set the **review** override to Claude or
|
|
88
|
+
**Codex, Grok and Agy run with shell available inside their own sandbox**, and each sandbox is different: Codex and Grok apply a read-only sandbox (`codex exec --sandbox read-only --ephemeral`, `grok --sandbox read-only --permission-mode dontAsk`), while Agy's `--sandbox` only restricts terminal commands and still lets them write inside the project. All three inspect the captured checkout with a 10-minute review deadline, and **none is shell-free**. When one of these backends is selected for review, Bro shows an advisory during acquisition, in the live review workspace, and in `/bro doctor` (as a non-fatal informational note). Set the **review** override to Claude, Muse, or Pi in `/bro config` for untrusted PRs; saved reviews remain readable with any backend. Unsupported/older CLI flags fail visibly; there is no bypass fallback.
|
|
89
89
|
|
|
90
90
|
Captured evidence is read from pinned Git blobs, so a shell-capable backend that writes inside the checkout cannot alter the code shown as evidence — but it can still change what it later reads, so treat very large changes with suspicion when using Agy.
|
|
91
91
|
|
|
@@ -108,7 +108,7 @@ One open writer per review is supported within a Pi process. Concurrent editing
|
|
|
108
108
|
| Problem | What to do |
|
|
109
109
|
| --- | --- |
|
|
110
110
|
| GitHub unavailable when reopening | Use bare `/bro guided-review` to choose a saved review; the picker does not fetch |
|
|
111
|
-
| Sandboxed shell review backend (Codex, Grok, Agy) | Advisory shown; choose Claude or
|
|
111
|
+
| Sandboxed shell review backend (Codex, Grok, Agy) | Advisory shown; choose Claude, Muse, or Pi in `/bro config` for strict file-only inspection on untrusted PRs |
|
|
112
112
|
| Git/gh authentication or fetch error | Read the acquisition error; check Git/`gh auth status`; retry explicitly |
|
|
113
113
|
| Invalid/failed preparation | Changed files remain available; use Prepare guide to retry when ready for another call |
|
|
114
114
|
| Failed regeneration | Current guide is kept; retry only if you want another call |
|
|
@@ -9,6 +9,10 @@ credentials, and does not copy credentials or rewrite backend configuration.
|
|
|
9
9
|
Each backend and your model provider may retain sessions, logs, and request
|
|
10
10
|
data under their own settings and policies.
|
|
11
11
|
|
|
12
|
+
The **Pi** backend is the in-process exception: it does not spawn a CLI. It runs a
|
|
13
|
+
Pi SDK session inside the host process using your own Pi model registry and its
|
|
14
|
+
configured credentials, so it uses the same account route as your Pi session.
|
|
15
|
+
|
|
12
16
|
| | Explain / show | BTW conversation-only | BTW full permission | Advisor | Guided Review |
|
|
13
17
|
| --- | --- | --- | --- | --- | --- |
|
|
14
18
|
| **Agy** | Temporary directory, Agy sandbox | Temporary directory, Agy sandbox | Workspace, permissions bypassed | Fresh workspace process, permissions bypassed | Captured checkout, Agy sandbox (shell and in-project writes allowed; advisory) |
|
|
@@ -16,6 +20,7 @@ data under their own settings and policies.
|
|
|
16
20
|
| **Grok** | Temporary directory, **prompt instruction only** | Workspace, **prompt instruction only** | Workspace, permissions bypassed | Fresh workspace process, permissions bypassed | Captured checkout, read-only sandbox (shell-enabled; advisory) |
|
|
17
21
|
| **Codex** | Scratch directory, read-only sandbox, ephemeral session | Workspace, read-only sandbox | Workspace, approvals and sandbox bypassed | Fresh workspace process, approvals and sandbox bypassed | Captured checkout, read-only sandbox, ephemeral (shell-enabled; advisory) |
|
|
18
22
|
| **Muse** | Scratch directory, approval/write/shell disabled, no session log | Workspace, approval/write/shell disabled | Workspace, permissions bypassed (`--yolo`) | Fresh workspace process, permissions bypassed (`--yolo`) | Captured checkout; writes/shell/web disabled, no session log |
|
|
23
|
+
| **Pi** | No tools at all (isolated in-process session) | No tools at all | Workspace, read/bash/edit/write (no nested delegation or MCP) | Workspace, read/bash/edit/write (no nested delegation or MCP) | Captured checkout, read/grep/find/ls only (no shell) |
|
|
19
24
|
|
|
20
25
|
- Grok always runs explain, show, btw and the advisor with its sandbox off and
|
|
21
26
|
permissions bypassed; its tools, hooks, skills, plugins, and MCP may remain
|
|
@@ -41,7 +46,15 @@ data under their own settings and policies.
|
|
|
41
46
|
including across `/mode` switches. An Agy conversation stays bound to the
|
|
42
47
|
workspace it started in, so after a `/mode` switch — or whenever a thread
|
|
43
48
|
has turns but no native session ID — Bro starts a fresh native session
|
|
44
|
-
seeded with the main-session context and every earlier turn.
|
|
49
|
+
seeded with the main-session context and every earlier turn. Pi keeps its side
|
|
50
|
+
session in memory only (nothing is written under `~/.pi/agent/sessions`) and,
|
|
51
|
+
like Agy, drops it on a `/mode` switch.
|
|
52
|
+
- Pi runs in-process with no CLI, no extensions, no skills, no prompt templates,
|
|
53
|
+
no context files, MCP or codemode, and auto-retry and compaction disabled. Its
|
|
54
|
+
Guided Review uses read/grep/find/ls only and cannot run shell commands, and it
|
|
55
|
+
ignores the captured checkout's `.pi/settings.json` so an untrusted PR cannot
|
|
56
|
+
steer the reviewing session. In restricted explain/show/elevate/btw it has no
|
|
57
|
+
tools at all.
|
|
45
58
|
- Cancellation, deadlines, and invalid output streams stop the backend's
|
|
46
59
|
process group on POSIX, escalating after a five-second grace period. On
|
|
47
60
|
Windows only the direct child is targeted. Detached shell work or external
|
|
@@ -53,7 +66,7 @@ data under their own settings and policies.
|
|
|
53
66
|
When resolving backend, model, and reasoning effort:
|
|
54
67
|
1. **Per-capability override**: `overrides.<capability>` (`explain`, `show`, `btw`, `advisor`, or `review`) pins that capability's complete selection.
|
|
55
68
|
2. **Shared default**: otherwise the capability inherits `default` (root `model`/`effort` in older flat files).
|
|
56
|
-
3. **
|
|
69
|
+
3. **Backend-specific normalization**: Agy selections are mapped against its installed catalog (suffixed variants, fixed-effort models); Pi selections are `<provider>/<id>` physical models resolved against your Pi registry.
|
|
57
70
|
4. **Initial file creation only**: `PI_BRO_MODEL` has no effect once the settings file exists.
|
|
58
71
|
|
|
59
72
|
When resolving turn count for `/bro show`:
|
|
@@ -80,7 +93,7 @@ When shaping an answer, each part has one owner:
|
|
|
80
93
|
seeded main-session conversation text (plus earlier turns when a native
|
|
81
94
|
session is reseeded) to the selected backend. In full permission mode the
|
|
82
95
|
side agent can additionally read and edit the workspace.
|
|
83
|
-
- **Guided Review requests**: PR identity/description, captured diff, relevant private discussion and preferences go to the selected backend, which can inspect captured files. Main-session context is not attached. Claude (`--restricted`, file tools only)
|
|
96
|
+
- **Guided Review requests**: PR identity/description, captured diff, relevant private discussion and preferences go to the selected backend, which can inspect captured files. Main-session context is not attached. Claude (`--restricted`, file tools only), Muse (write/shell/web disabled), and Pi (`read/grep/find/ls` only, in-process) use strict file-only inspection and are recommended for untrusted PRs. Codex and Grok inspect the captured checkout under a read-only sandbox; Agy's `--sandbox` still allows in-project writes. All three run shell commands and show an advisory. Prompt injection can still corrupt conclusions or reveal captured content to the provider; this is not a general confidentiality guarantee. See [Guided Review access and storage](../guided-review.md#access-privacy-and-storage).
|
|
84
97
|
- **Preferences**: `bro-preferences.md` is sent with every explain, Show,
|
|
85
98
|
BTW, Elevate, and Guided Review request to the selected backend. It is never sent to the advisor or
|
|
86
99
|
to Pi's main model.
|
|
@@ -32,7 +32,8 @@ Settings live in this user-editable file, created when the extension loads
|
|
|
32
32
|
"showTurns": 1,
|
|
33
33
|
"overrides": {
|
|
34
34
|
"explain": { "backend": "claude", "model": "sonnet", "effort": "medium" },
|
|
35
|
-
"advisor": { "backend": "grok", "model": "grok-4.7", "effort": "high" }
|
|
35
|
+
"advisor": { "backend": "grok", "model": "grok-4.7", "effort": "high" },
|
|
36
|
+
"review": { "backend": "pi", "model": "anthropic/claude-sonnet-4-5", "effort": "high" }
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
```
|
|
@@ -47,7 +48,11 @@ Bro reads the file again before each request, so manual edits apply next time.
|
|
|
47
48
|
model decide). Agy selections are normalized against Agy's installed model
|
|
48
49
|
catalog. Claude, Grok, Codex, and Muse accept seeded or custom model IDs; a model/effort
|
|
49
50
|
combination the account does not support fails with the backend's own error
|
|
50
|
-
instead of silently falling back.
|
|
51
|
+
instead of silently falling back. **Pi** selections are a `"<provider>/<id>"` pair
|
|
52
|
+
from your Pi model catalog, chosen from your configured scoped models
|
|
53
|
+
(`enabledModels`, falling back to every model with configured credentials).
|
|
54
|
+
Explicit Pi efforts are clamped to the model's supported reasoning levels; the
|
|
55
|
+
picker's own step 1 chooses the backend and step 2 the model.
|
|
51
56
|
- `mode` is `brief`, `balanced` (the default), or `faithful`. `showTurns` is
|
|
52
57
|
the default number of turns `/bro show` draws (default 1); `/bro show
|
|
53
58
|
<n-turns>` overrides it for one run.
|
|
@@ -16,6 +16,11 @@ feature. Failed checks explain what to fix.
|
|
|
16
16
|
- **Codex**: installed version and configured authentication.
|
|
17
17
|
- **Muse**: installed version only; authentication and connectivity are not
|
|
18
18
|
verified.
|
|
19
|
+
- **Pi**: physical model catalog, configured authentication, scope membership,
|
|
20
|
+
effective reasoning effort, and each feature's tool set. Uses the in-process
|
|
21
|
+
SDK with host registrations and runtime credentials plus current on-disk
|
|
22
|
+
models/auth; workspace settings follow the host's trust decision. No CLI or
|
|
23
|
+
connectivity probe runs.
|
|
19
24
|
|
|
20
25
|
Doctor never sends source text or runs a model completion. A successful check
|
|
21
26
|
confirms the setup but cannot guarantee that a later provider request will
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-bro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "A sidekick for you and your Pi agent: plain-language explanations, side questions, diagrams, PR review and second opinions, without cluttering the agent's context.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -98,13 +98,15 @@
|
|
|
98
98
|
"image": "https://raw.githubusercontent.com/tranhoangnguyen03/pi-bro/main/docs/images/social-preview.png"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
|
+
"@earendil-works/pi-ai": "*",
|
|
101
102
|
"@earendil-works/pi-coding-agent": "*",
|
|
102
103
|
"@earendil-works/pi-tui": "*",
|
|
103
104
|
"typebox": "*"
|
|
104
105
|
},
|
|
105
106
|
"devDependencies": {
|
|
106
|
-
"@earendil-works/pi-
|
|
107
|
-
"@earendil-works/pi-
|
|
107
|
+
"@earendil-works/pi-ai": "1.3.0",
|
|
108
|
+
"@earendil-works/pi-coding-agent": "1.3.0",
|
|
109
|
+
"@earendil-works/pi-tui": "1.3.0",
|
|
108
110
|
"@types/node": "^24.0.0",
|
|
109
111
|
"typebox": "1.3.27",
|
|
110
112
|
"typescript": "6.0.3"
|
package/src/advisor.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { ExtensionAPI, ExtensionContext, SessionEntry } from "@earendil-wor
|
|
|
4
4
|
import { convertToLlm, getAgentDir, getMarkdownTheme } from "@earendil-works/pi-coding-agent";
|
|
5
5
|
import { Container, Markdown, Text } from "@earendil-works/pi-tui";
|
|
6
6
|
import { Type } from "typebox";
|
|
7
|
-
import { execute as executeBackend, type BackendSelection } from "./backend.ts";
|
|
7
|
+
import { execute as executeBackend, setPiHostContext, type BackendSelection } from "./backend.ts";
|
|
8
8
|
import { MAX_ADVISOR_STEERING_CHARS, buildAdvisorPrompt } from "./prompt.ts";
|
|
9
9
|
import { type BackendName, readSettings, selectionForCapability } from "./settings.ts";
|
|
10
10
|
import { errorMessage, isRecord } from "./util.ts";
|
|
@@ -376,7 +376,7 @@ export function advisorAttemptLabel(details: AdvisorToolDetails): string {
|
|
|
376
376
|
return `Bro advisor · ${details.model ?? "unknown model"} · ${Math.ceil((details.durationMs ?? details.elapsedMs) / 1_000)}s`;
|
|
377
377
|
}
|
|
378
378
|
const latest = details.activity?.at(-1);
|
|
379
|
-
const backendLabel = details.backend === "claude" ? "Claude" : details.backend === "grok" ? "Grok" : details.backend === "codex" ? "Codex" : details.backend === "muse" ? "Muse" : "Agy";
|
|
379
|
+
const backendLabel = details.backend === "claude" ? "Claude" : details.backend === "grok" ? "Grok" : details.backend === "codex" ? "Codex" : details.backend === "muse" ? "Muse" : details.backend === "pi" ? "Pi" : "Agy";
|
|
380
380
|
// "last reported" + freshness, never a claim about what the backend is doing right now and never
|
|
381
381
|
// "stalled" -- silence since lastActivityAt is not itself evidence of a stuck run.
|
|
382
382
|
const activityLabel = latest
|
|
@@ -404,6 +404,8 @@ export function registerAdvisorTool(pi: ExtensionAPI): void {
|
|
|
404
404
|
),
|
|
405
405
|
}),
|
|
406
406
|
async execute(_toolCallId, params, signal, onUpdate, ctx) {
|
|
407
|
+
// The in-process Pi backend needs the host registry; publish it before any consultation.
|
|
408
|
+
setPiHostContext(ctx);
|
|
407
409
|
const state = resolveAdvisorState(ctx.sessionManager.getBranch());
|
|
408
410
|
const durableSteering = await readAdvisorSteering();
|
|
409
411
|
const settings = await readSettings();
|