pi-bro 0.25.0 → 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 CHANGED
@@ -2,6 +2,47 @@
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
+
34
+ ## [0.25.1] - 2026-10-19
35
+
36
+ ### Highlights
37
+
38
+ - `bro_advisor` answers faster: it relies on the session snapshot (including tool calls and outputs) first, and only reads files or runs commands when needed.
39
+ - `bro_advisor` no longer automatically restarts failed consultations up to three times with 5s and 10s waits; it runs once and reports any failure immediately.
40
+
41
+ ### Changed
42
+
43
+ - `buildAdvisorPrompt` and the `bro_advisor` tool description now instruct the advisor to use the captured session snapshot first and inspect the workspace only when something needed is missing or a key claim is in doubt, instead of requiring a fresh workspace investigation before advising.
44
+ - `runAdvisor` (formerly `runAdvisorWithRetries`) runs a single consultation attempt and surfaces any backend failure, timeout, or cancellation immediately without 5-second and 10-second full-restart retries.
45
+
5
46
  ## [0.25.0] - 2026-10-19
6
47
 
7
48
  ### Highlights
package/README.md CHANGED
@@ -61,8 +61,8 @@ 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 Muse is recommended for untrusted PRs. |
65
- | `bro_advisor` tool | **[Second opinion](docs/features/advisor.md#bro-advisor).** A tool your agent can call mid-task; a fresh backend process investigates and returns advice to the agent. ⚠️ [Runs with permissions bypassed](#what-leaves-your-machine). |
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
+ | `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
 
68
68
  For help by task, start at the **[docs home](docs/README.md)**; see the [command reference](docs/reference/commands.md) for syntax.
@@ -72,11 +72,10 @@ Guided Review has its own [guide](docs/guided-review.md).
72
72
 
73
73
  ## Requirements
74
74
 
75
- - Pi `>=0.84.2` (tested on 0.84.2 and 1.2) and Node.js `>=22.19.0`.
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 CLI on your `PATH`, signed in once from your terminal.
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 Muse is recommended for untrusted PRs (strict file-only inspection); Codex, Grok and Agy run with shell available under their sandbox, with an advisory.
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 Pi's
110
- provider credentials, but the CLI signs in its own way, which can include API
111
- keys set in your environment. Nothing Bro produces enters Pi's conversation
112
- unless you insert it, except advisor answers, which return to the agent as
113
- tool results.
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:
@@ -24,14 +24,15 @@ presence, and backend compatibility (for Agy, a minimum CLI version with an
24
24
  instructions, its active tools, and the conversation so far including tool
25
25
  calls and results — and sends it, along with an optional `question` the
26
26
  executor may pass, to a **fresh, standalone process of the selected
27
- backend** for every consultation. Nothing is resumed or reused across calls,
28
- including retries.
29
- - **Instructed to investigate, not implement**: the advisor process has real
27
+ backend** for every consultation. Nothing is resumed or reused across calls.
28
+ - **Snapshot first, workspace tools when needed**: the advisor process has real
30
29
  tool access in the workspace with permissions auto-approved — there is no
31
- enforced read-only isolation. It is instructed to verify claims itself and
32
- return advice, leaving edits to the executor, but that boundary is a
33
- behavioral prompt instruction rather than an enforced sandbox constraint, so
34
- treat its findings as advice to verify, not a guaranteed hands-off review.
30
+ enforced read-only isolation. It is instructed to rely on the captured
31
+ snapshot (including its tool calls and results) first, inspect the workspace
32
+ only when something is missing or a key claim is in doubt, and return advice
33
+ while leaving edits to the executor. That boundary is a behavioral prompt
34
+ instruction rather than an enforced sandbox constraint, so treat its findings
35
+ as advice to verify, not a guaranteed hands-off review.
35
36
  - **Steering**: The advisor reads standing priorities from `~/.pi/agent/bro-advisor.md`
36
37
  and session-specific priorities from `/bro advisor-steer`.
37
38
  `/bro advisor-steer` opens an editor for one session steering brief — e.g. "quick
@@ -47,24 +48,18 @@ presence, and backend compatibility (for Agy, a minimum CLI version with an
47
48
  session file (`bro-advisor-steering`) and is restored on resume or reload. Forking a
48
49
  session inherits session steering; edits made after the fork are independent of the
49
50
  original branch. Clearing session steering leaves durable steering intact.
50
- - **Retries**: on an invocation failure (not a completed answer — "I need
51
- more evidence" is a normal result, not a failure), Bro retries with the
52
- identical snapshot, steering, and question: once after 5 seconds, once more
53
- after 10 seconds, then returns the backend's own diagnostic — including a
54
- context-length error, verbatim — as the failure. Host-imposed deadlines and
55
- cancellation are terminal: neither starts another attempt or a backoff wait.
56
- The advisor CLI is asked to stop at 10 minutes; Bro's host deadline is 610
57
- seconds plus bounded process cleanup. A CLI-reported error before that host
58
- deadline remains an invocation failure and can be retried.
59
- Cancelling the tool call skips any pending retry wait.
60
- - **Progress and provenance**: while an attempt is running, Bro shows the last
51
+ - **Single attempt, no automatic retries**: each consultation runs once (the
52
+ advisor CLI is asked to stop at 10 minutes; Bro's host deadline is 610
53
+ seconds plus bounded process cleanup). Any backend failure, timeout, or
54
+ cancellation is returned immediately — including a context-length error,
55
+ verbatim — without waiting or restarting the consultation from scratch.
56
+ - **Progress and provenance**: while a consultation is running, Bro shows the last
61
57
  thing the advisor actually reported — a tool name or a user-facing response
62
58
  line, never hidden reasoning — and how long ago it arrived, e.g. `last
63
59
  reported: Read src/app.ts (2s ago)`, or "awaiting first activity" before
64
60
  anything arrives. Expanding a running consultation shows up to the last 4
65
- reported activity lines; each retry starts the trail over. The returned
66
- answer starts with backend, model, effort, attempt count, duration,
67
- workspace, steering presence, snapshot size, and known omission/compaction
68
- notes; the advisor's complete answer follows unchanged.
61
+ reported activity lines. The returned answer starts with backend, model,
62
+ effort, duration, workspace, steering presence, snapshot size, and known
63
+ omission/compaction notes; the advisor's complete answer follows unchanged.
69
64
  - **Model/effort**: resolved the same way as explain/show/btw, through
70
65
  `/bro config` (shared default or per-capability override).
@@ -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 CLI already installed and signed in (Agy, Claude, Grok, Codex, or Muse). See [requirements](../README.md#requirements).
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.
@@ -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 Muse 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.
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 Muse 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. No model-run project tests, commands, Git or network tools are available on Claude or Muse.
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 Muse in `/bro config` for untrusted PRs; saved reviews remain readable with any backend. Unsupported/older CLI flags fail visibly; there is no bypass fallback.
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 Muse in `/bro config` for strict file-only inspection on untrusted PRs |
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. **Agy catalog normalization**: for Agy selections, Bro maps suffixed variant IDs and handles fixed-effort models.
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) and Muse (write/shell/web disabled) 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).
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.25.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-coding-agent": "1.2.0",
107
- "@earendil-works/pi-tui": "1.2.0",
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"