pi-bro 0.39.0 → 0.40.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/CHANGELOG.md +18 -0
- package/README.md +2 -7
- package/docs/features/architecture.md +1 -1
- package/docs/features/btw.md +1 -3
- package/docs/features/elevate.md +1 -1
- package/docs/features/grill-me.md +1 -1
- package/docs/features/guided-review.md +5 -5
- package/docs/features/remember-me.md +0 -2
- package/docs/reference/data-and-permissions.md +6 -17
- package/docs/reference/settings.md +7 -5
- package/docs/reference/troubleshooting.md +0 -4
- package/package.json +1 -4
- package/src/advisor.ts +1 -1
- package/src/architecture.ts +2 -2
- package/src/backend.ts +12 -31
- package/src/backends/agy.ts +4 -4
- package/src/backends/cli-process.ts +5 -11
- package/src/backends/contract.ts +4 -7
- package/src/btw.ts +1 -1
- package/src/config-navigation.ts +1 -4
- package/src/config-ui.ts +34 -19
- package/src/doctor.ts +86 -28
- package/src/explain-modal.ts +1 -1
- package/src/grill.ts +1 -1
- package/src/remember-engine.ts +0 -4
- package/src/settings.ts +98 -81
- package/src/backends/grok.ts +0 -204
- package/src/backends/muse.ts +0 -173
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to pi-bro are documented here.
|
|
4
4
|
|
|
5
|
+
## [0.40.1] - 2026-11-29
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- `/bro doctor` now accepts custom Agy models absent from `agy models` (such as Neon or Carbon) with an informational note instead of failing them as unavailable, while continuing to fail unsupported efforts on cataloged models.
|
|
10
|
+
- `/bro doctor` now reports Codex's live `models_cache.json` catalog status when Codex is in use, and updates the Preferences summary to list all features that use `bro-preferences.md`.
|
|
11
|
+
|
|
12
|
+
## [0.40.0] - 2026-11-29
|
|
13
|
+
|
|
14
|
+
### Highlights
|
|
15
|
+
|
|
16
|
+
- Agy model discovery now groups any model name returned by `agy models` dynamically across `low`, `medium`, `high`, `xhigh`, and `max` efforts, and adds an **Agy · custom model ID…** fallback in `/bro config`.
|
|
17
|
+
- Codex model discovery now loads live choices from `$CODEX_HOME/models_cache.json` (default `~/.codex/models_cache.json`, omitting hidden entries) instead of hard-coded model names, adds `max` effort support, and keeps **Codex · custom model ID…** as fallback.
|
|
18
|
+
|
|
19
|
+
### Breaking
|
|
20
|
+
|
|
21
|
+
- Removed Grok and Muse backend support (`src/backends/grok.ts`, `src/backends/muse.ts`). Supported backends are now **Agy, Claude, Codex, and Pi**. If an existing `bro-settings.json` still references `grok` or `muse`, execution fails clearly while `/bro config` recovers in memory so you can pick a replacement backend and save.
|
|
22
|
+
|
|
5
23
|
## [0.39.0] - 2026-11-28
|
|
6
24
|
|
|
7
25
|
### Highlights
|
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ File and webpage examples need your own real path or URL; see [how to explain th
|
|
|
68
68
|
| `/bro overthink` | **[Overthink](docs/features/overthink.md).** Get one actionable second look from the active Pi model, with inspectable evidence. Use Ctrl+R to check now; enable automatic checks in config if you want them. |
|
|
69
69
|
| `/bro grill-me` | **[Grill Me](docs/features/grill-me.md) (experimental).** A private, opinionated decision interview: light, balanced or exhaustive; one question per round; `/consolidate` drafts a brief without ending the interview; `/copy` returns the latest reply or decision brief to the clipboard. Uses BTW model settings; read-only restrictions vary by backend. |
|
|
70
70
|
| `/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. |
|
|
71
|
-
| `/bro guided-review <PR>` | **[Guided Review](docs/features/guided-review.md).** An explanation and quality assessment of a GitHub PR, with ranked findings, source evidence and private questions. Claude
|
|
71
|
+
| `/bro guided-review <PR>` | **[Guided Review](docs/features/guided-review.md).** An explanation and quality assessment of a GitHub PR, with ranked findings, source evidence and private questions. Claude or Pi is recommended for untrusted PRs. |
|
|
72
72
|
| `/bro guided-review delete [PR]` | Choose a saved review and explicitly delete its record, questions and captured source after confirmation. No automatic cleanup. |
|
|
73
73
|
| `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). |
|
|
74
74
|
| `/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. |
|
|
@@ -89,13 +89,11 @@ Guided Review has its own [guide](docs/features/guided-review.md).
|
|
|
89
89
|
| --- | --- | --- |
|
|
90
90
|
| [Google Antigravity](https://antigravity.google/docs/cli-install) | `agy` | Used for new settings if no physical Pi model is selected. Needs `>=1.1.15`. Guided Review uses `--sandbox`, which restricts shell commands but still allows writes inside the project. |
|
|
91
91
|
| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `claude` | Works for every feature; strict file-only inspection for Guided Review. |
|
|
92
|
-
| [Grok Build](https://docs.x.ai/build/overview) | `grok` | Guided Review uses its read-only sandbox (shell-enabled). |
|
|
93
92
|
| [Codex CLI](https://github.com/openai/codex) | `codex` | Guided Review uses its read-only sandbox (shell-enabled). |
|
|
94
|
-
| [Muse Code](https://dev.meta.ai/docs/muse-code) | `muse` | Works for every feature; strict file-only inspection for Guided Review. |
|
|
95
93
|
| **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. |
|
|
96
94
|
|
|
97
95
|
- Guided Review also needs Git and an authenticated [`gh`](https://cli.github.com/).
|
|
98
|
-
Claude
|
|
96
|
+
Claude or Pi is recommended for untrusted PRs (strict file-only inspection); Codex and Agy run with shell available under their sandbox, with an advisory.
|
|
99
97
|
- [PiG](docs/pig-compatibility.md) support is experimental.
|
|
100
98
|
|
|
101
99
|
## What leaves your machine
|
|
@@ -135,9 +133,6 @@ the agent as tool results.
|
|
|
135
133
|
> - **Grill Me `/access full`:** explicitly opts into unrestricted workspace permissions. The no-edits prompt is not an access control.
|
|
136
134
|
> - **BTW full-permission mode** (turned on with `/mode` inside BTW): it is
|
|
137
135
|
> meant to edit files and run commands.
|
|
138
|
-
> - **Grok:** its sandbox is off except during Guided Review, which uses the
|
|
139
|
-
> read-only sandbox. "Answer only from the supplied context" is only an
|
|
140
|
-
> instruction.
|
|
141
136
|
|
|
142
137
|
Details per backend:
|
|
143
138
|
[Backends: access and retention](docs/reference/data-and-permissions.md#backends-access-and-retention)
|
|
@@ -26,7 +26,7 @@ After a successful run, **O** opens the generated HTML using Bro's existing brow
|
|
|
26
26
|
|
|
27
27
|
Bro copies non-ignored, readable project files into a temporary working directory. It skips symlinks, obvious credential files, binaries and very large files. Existing architecture docs get priority in the snapshot budget. Bro separately records existing documentation hashes, including omitted assets and large generated HTML, so omission does not look like a concurrent new file. The displayed inventory and omitted-file list help the model avoid inventing what it could not inspect.
|
|
28
28
|
|
|
29
|
-
The selected backend inspects that **temporary source copy**. Claude
|
|
29
|
+
The selected backend inspects that **temporary source copy**. Claude and Pi use file-only inspection; Codex can run shell in a read-only sandbox; **Agy may write inside the temporary copy**. The temporary copy is not an operating-system sandbox; a CLI's broader local or network access is controlled by that CLI, not Bro.
|
|
30
30
|
|
|
31
31
|
The model only returns a JSON **proposal**. Bro validates paths, graph links, source references and generated HTML, then writes the resulting files under `docs/architecture/`. Markdown link checks ignore code examples and do not parse Mermaid as Markdown. Legitimate links to omitted images, PDFs and other files resolve against the original repo without copying their bytes into model context. References to temporary support files and symlink escapes are refused.
|
|
32
32
|
|
package/docs/features/btw.md
CHANGED
|
@@ -19,9 +19,7 @@ asked in.
|
|
|
19
19
|
back. The conversation is kept across switches. How conversation-only is
|
|
20
20
|
enforced depends on the backend — see
|
|
21
21
|
[Backends: access and retention](../reference/data-and-permissions.md#backends-access-and-retention).
|
|
22
|
-
**Conversation-only does not mean a hard sandbox on every backend:**
|
|
23
|
-
relies on an instruction; Codex and Muse can retain some read, shell, or
|
|
24
|
-
network abilities under their own restricted settings. Do not send secrets
|
|
22
|
+
**Conversation-only does not mean a hard sandbox on every backend:** Codex can retain some read, shell, or network abilities under its read-only sandbox, and Agy's sandbox does not guarantee zero writes. Do not send secrets
|
|
25
23
|
on the assumption that the model cannot access anything else.
|
|
26
24
|
- Every new or cleared thread is seeded with up to the last 8 turns of
|
|
27
25
|
main-session user/assistant conversation text (40,000 characters max, with a
|
package/docs/features/elevate.md
CHANGED
|
@@ -103,7 +103,7 @@ Elevate never writes to Pi's editor. It may use the unsent draft as its starting
|
|
|
103
103
|
|
|
104
104
|
- Bro sends the **request**, conversation history selected by **Messages** or **Full**, saved Bro preferences if any, and later the **approved findings**, to the selected backend/provider. History is initially uncapped; Full includes tool-call arguments and text results. Hidden reasoning and image binaries are never captured. Explicit overload retries can remove older context as described above.
|
|
105
105
|
- Elevate uses the **BTW backend/model/effort setting** from `/bro config`, falling back to Bro's shared default. There is **no separate Elevate setting** in this MVP. Each stage makes a **fresh, non-continuing** backend call; your Elevate selections live only in memory and clear on close/reload.
|
|
106
|
-
- Requests use Bro's **restricted explain-style execution path**. Restrictions depend on the backend. For example, **
|
|
106
|
+
- Requests use Bro's **restricted explain-style execution path**. Restrictions depend on the backend. For example, **Codex can have read tools** under its read-only sandbox, including tools governed by local configuration. **Do not treat this as a firm sandbox or a guarantee of no file/network access.** Consult [backend access details](../reference/data-and-permissions.md#backends-access-and-retention). Elevate itself has no file-read or file-write action.
|
|
107
107
|
- Closing or cancelling does not submit anything to the main agent. Your backend and provider may still retain prompts or process data under their own policies. Clipboard copies may remain in clipboard history.
|
|
108
108
|
|
|
109
109
|
## Troubleshooting
|
|
@@ -51,7 +51,7 @@ While Bro works, the footer shows the current stage and elapsed seconds. When th
|
|
|
51
51
|
|
|
52
52
|
## Access, privacy and limits
|
|
53
53
|
|
|
54
|
-
- Inspection uses the Guided Review backend path in your current workspace. Claude
|
|
54
|
+
- Inspection uses the Guided Review backend path in your current workspace. Claude and Pi have file-only tools. Codex has a read-only sandbox with shell access. **Agy inspection can still write project files.** No-edit prompts are not security controls.
|
|
55
55
|
- Full access can read, edit and execute commands. Bro instructs the model not to make changes, but cannot enforce that instruction. There is no automatic escalation.
|
|
56
56
|
- Each turn makes a fresh backend call replaying the complete interview. Long interviews cost more and may exceed context limits; there is no hidden truncation or fallback.
|
|
57
57
|
- The provider receives your topic, interview history, Bro preferences and up to eight recent main-session user/assistant text turns (40,000 characters). Captured context excludes tool calls/results, hidden reasoning and images. Backend tools can inspect additional workspace content.
|
|
@@ -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
|
|
9
|
+
Requirements: local Pi interactive mode, Git, authenticated GitHub CLI (`gh`), and a configured review backend (Claude 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
|
|
@@ -100,15 +100,15 @@ Deletion cannot be undone. There is no automatic cleanup.
|
|
|
100
100
|
|
|
101
101
|
## Access, privacy and storage
|
|
102
102
|
|
|
103
|
-
Review never runs with full-access or bypass flags. **Claude
|
|
103
|
+
Review never runs with full-access or bypass flags. **Claude 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; 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 or Pi.
|
|
104
104
|
|
|
105
|
-
**Codex
|
|
105
|
+
**Codex and Agy run with shell available inside their own sandbox**, and each sandbox is different: Codex applies a read-only sandbox (`codex exec --sandbox read-only --ephemeral`), while Agy's `--sandbox` only restricts terminal commands and still lets them write inside the project. Both inspect the captured checkout with a 10-minute review deadline, and **neither 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 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.
|
|
106
106
|
|
|
107
107
|
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.
|
|
108
108
|
|
|
109
109
|
These controls reduce malicious-code execution/write risk, but repository content can still manipulate the model's conclusions. Captured content, questions and answers go to the provider; do not use review as a secrets boundary or approval certificate. CLI enforcement and managed host policies remain the backend's responsibility.
|
|
110
110
|
|
|
111
|
-
PR identity/description, diff, relevant saved discussion and your Bro preferences are sent to the selected backend. It can inspect the captured source. Main-session conversation is not automatically attached. Each request reconstructs context; review does not resume BTW/native sessions. Claude
|
|
111
|
+
PR identity/description, diff, relevant saved discussion and your Bro preferences are sent to the selected backend. It can inspect the captured source. Main-session conversation is not automatically attached. Each request reconstructs context; review does not resume BTW/native sessions. Claude and Codex disable native session persistence where their CLIs support it; backend/provider retention policies still apply.
|
|
112
112
|
|
|
113
113
|
Records, private text and captured source remain under:
|
|
114
114
|
|
|
@@ -131,7 +131,7 @@ One open writer per review is supported within a Pi process. Concurrent editing
|
|
|
131
131
|
| Problem | What to do |
|
|
132
132
|
| --- | --- |
|
|
133
133
|
| GitHub unavailable when reopening | Use bare `/bro guided-review` to choose a saved review; resume and deletion from local records do not fetch |
|
|
134
|
-
| Sandboxed shell review backend (Codex,
|
|
134
|
+
| Sandboxed shell review backend (Codex, Agy) | Advisory shown; choose Claude or Pi in `/bro config` for strict file-only inspection on untrusted PRs |
|
|
135
135
|
| Git/gh authentication or fetch error | Read the acquisition error; check Git/`gh auth status`; retry explicitly |
|
|
136
136
|
| Invalid/failed preparation | Changed files remain available; use Prepare guide to retry when ready for another call |
|
|
137
137
|
| Failed regeneration | Current guide is kept; retry only if you want another call |
|
|
@@ -68,8 +68,6 @@ Remember Me uses **the backend and model selected for BTW**. Every valid BTW bac
|
|
|
68
68
|
| Codex | `--sandbox read-only`, ephemeral execution and temporary working directory; read-only sandbox, **not** no-tools. |
|
|
69
69
|
| Claude | CLI tools disabled with `--tools ""`, strict empty MCP config, temporary working directory, no session persistence. |
|
|
70
70
|
| Pi | Fresh SDK session with no tools, extensions, skills, or project context files, using the **selected configured physical model**. |
|
|
71
|
-
| Muse | Write and shell disabled, approvals disabled, temporary working directory. Do not infer that all other abilities are disabled. |
|
|
72
|
-
| Grok | A restricted **prompt request**, but CLI sandbox off and permissions bypassed; it is **not** a technical tool/write boundary. |
|
|
73
71
|
|
|
74
72
|
The modal shows a backend-specific notice before sending data. Bro's `/save` gate controls **only writes to its approved memory store**. It does not prevent any action that the selected backend's own permissions might allow. See [execution configuration](../reference/settings.md) for backend details.
|
|
75
73
|
|
|
@@ -17,17 +17,9 @@ configured credentials, so it uses the same account route as your Pi session.
|
|
|
17
17
|
| --- | --- | --- | --- | --- | --- |
|
|
18
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) |
|
|
19
19
|
| **Claude Code** | Scratch directory, tools/MCP/skills disabled, no session persistence | Workspace, tools disabled | Workspace, permissions bypassed | Fresh workspace process, permissions bypassed | Restricted Read/Grep/Glob only; confined checkout, no persistence |
|
|
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) |
|
|
21
20
|
| **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) |
|
|
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
21
|
| **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) |
|
|
24
22
|
|
|
25
|
-
- Grok always runs explain, show, btw and the advisor with its sandbox off and
|
|
26
|
-
permissions bypassed; its tools, hooks, skills, plugins, and MCP may remain
|
|
27
|
-
available. "Answer only from the supplied context" is a request, not an
|
|
28
|
-
enforced restriction. Guided Review is the exception: it runs with
|
|
29
|
-
`--sandbox read-only --permission-mode dontAsk` but still executes shell
|
|
30
|
-
commands inside that sandbox.
|
|
31
23
|
- Codex's read-only sandbox is not a tool-free mode: workspace reads and
|
|
32
24
|
sandboxed commands remain available, including for Guided Review. Bro does
|
|
33
25
|
not disable configured MCP servers or web search; their access is governed
|
|
@@ -35,14 +27,11 @@ configured credentials, so it uses the same account route as your Pi session.
|
|
|
35
27
|
- Agy's Guided Review runs under `--sandbox`, which restricts terminal
|
|
36
28
|
commands but still permits writes inside the project; it has no file-only
|
|
37
29
|
tool filter.
|
|
38
|
-
- Muse's restricted mode disables write and shell tools and approval prompts,
|
|
39
|
-
not all tools: workspace reads and web tools remain available without approval.
|
|
40
|
-
It is not a tool-free or network-isolated mode.
|
|
41
30
|
- Claude's restrictions are tool/configuration settings (with safe mode), not
|
|
42
31
|
an OS sandbox; built-in and managed Claude behavior can remain. Running a
|
|
43
32
|
permission-bypassing mode as root may be rejected by Claude.
|
|
44
|
-
- BTW continues natively: Agy by conversation ID, Claude
|
|
45
|
-
`--resume`, Codex by `resume
|
|
33
|
+
- BTW continues natively: Agy by conversation ID, Claude by
|
|
34
|
+
`--resume`, and Codex by `resume` of the same session,
|
|
46
35
|
including across `/mode` switches. An Agy conversation stays bound to the
|
|
47
36
|
workspace it started in, so after a `/mode` switch — or whenever a thread
|
|
48
37
|
has turns but no native session ID — Bro starts a fresh native session
|
|
@@ -86,7 +75,7 @@ When shaping an answer, each part has one owner:
|
|
|
86
75
|
|
|
87
76
|
`/bro architecture` inherits the BTW backend/model/effort selection but uses Guided Review's **restricted inspection execution** (fresh, non-continuing call), against a temporary copy of non-ignored project files. Model text, source files it reads, optional focus and preferences go to the selected provider. Bro does not automatically send the main Pi conversation.
|
|
88
77
|
|
|
89
|
-
Claude
|
|
78
|
+
Claude and Pi provide file-only inspection. Codex runs a shell-enabled read-only sandbox. Agy's inspection sandbox **can write inside the temporary project copy**. A temporary directory does not constrain a CLI's global filesystem/network access. Bro's own import writes only checked `docs/architecture/` files; this is not a blanket guarantee about backend side effects. Project content remains untrusted data.
|
|
90
79
|
|
|
91
80
|
Excluded/large/binary files are not in the snapshot; Bro validates graph paths and Markdown links and checks that source/target files did not change before import. Snapshot checks cannot prove semantic accuracy or guarantee multi-file atomicity across abrupt host shutdown. The temporary copy and the model proposal are removed when the operation completes. Files under `docs/architecture/` remain normal repo documents. No autonomous commits or background runs.
|
|
92
81
|
|
|
@@ -102,13 +91,13 @@ See [feature guide](../features/architecture.md).
|
|
|
102
91
|
pasted text, extracted document text, extracted webpage text, or recent
|
|
103
92
|
session conversation text (tool calls, tool results, reasoning, and images
|
|
104
93
|
omitted) to the selected backend and its configured model provider.
|
|
105
|
-
- **Elevate requests**: `/bro elevate` sends your objective, preferences, and all user/assistant text on the current branch by default, without a fixed history cap. Its visible Context switch can include tool-call arguments and text results (Full), potentially including sensitive file contents or command output. Both modes exclude hidden reasoning and image binaries. Only explicit Retry after a context-overload error trims older history; the UI discloses reduced context. Its optional rewrite call includes only approved findings. It makes fresh restricted calls through the BTW model setting, but a backend's restricted mode is not a universal file/network sandbox
|
|
94
|
+
- **Elevate requests**: `/bro elevate` sends your objective, preferences, and all user/assistant text on the current branch by default, without a fixed history cap. Its visible Context switch can include tool-call arguments and text results (Full), potentially including sensitive file contents or command output. Both modes exclude hidden reasoning and image binaries. Only explicit Retry after a context-overload error trims older history; the UI discloses reduced context. Its optional rewrite call includes only approved findings. It makes fresh restricted calls through the BTW model setting, but a backend's restricted mode is not a universal file/network sandbox. Elevate never edits or submits Pi's main draft. The user may copy the revision and paste it manually. See the [Elevate guide](../features/elevate.md).
|
|
106
95
|
- **Side conversation requests**: `/bro btw` sends your side questions and the
|
|
107
96
|
seeded main-session conversation text (plus earlier turns when a native
|
|
108
97
|
session is reseeded) to the selected backend. In full permission mode the
|
|
109
98
|
side agent can additionally read and edit the workspace.
|
|
110
|
-
- **Grill Me requests**: `/bro grill-me` sends the user-supplied topic, their answers, the full private Grill Me transcript so far, preferences, and up to 8 recent main-session text turns (40,000 characters) to the BTW-selected provider. It runs **fresh** each turn in the current workspace, via the Guided Review *inspection execution path* (not the Guided Review UI or checkout). Claude
|
|
111
|
-
- **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)
|
|
99
|
+
- **Grill Me requests**: `/bro grill-me` sends the user-supplied topic, their answers, the full private Grill Me transcript so far, preferences, and up to 8 recent main-session text turns (40,000 characters) to the BTW-selected provider. It runs **fresh** each turn in the current workspace, via the Guided Review *inspection execution path* (not the Guided Review UI or checkout). Claude and Pi use file-only tools; Codex uses a read-only sandbox with shell; **Agy can still write inside the project**. The model is always told not to edit or run mutating commands, but a prompt instruction is not an enforced restriction. Optional `/access full` explicitly uses a fresh, full-permission backend call and gives the backend unrestricted tools; it never happens automatically. Grill Me and BTW hold separate in-memory threads, and nothing enters the main agent unless the user inserts it into an empty editor. See [Grill Me](../features/grill-me.md).
|
|
100
|
+
- **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 Pi (`read/grep/find/ls` only, in-process) use strict file-only inspection and are recommended for untrusted PRs. Codex inspects the captured checkout under a read-only sandbox; Agy's `--sandbox` still allows in-project writes. Both 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](../features/guided-review.md#access-privacy-and-storage).
|
|
112
101
|
- **Preferences**: `bro-preferences.md` is sent with every explain, Show,
|
|
113
102
|
BTW, Elevate, Grill Me, Guided Review, and Overthink request. It is never sent to the advisor or
|
|
114
103
|
added to Pi's main conversation.
|
|
@@ -65,7 +65,7 @@ Settings live in this user-editable file, created when the extension loads
|
|
|
65
65
|
"showTurns": 1,
|
|
66
66
|
"overrides": {
|
|
67
67
|
"explain": { "backend": "claude", "model": "sonnet", "effort": "medium" },
|
|
68
|
-
"advisor": { "backend": "
|
|
68
|
+
"advisor": { "backend": "codex", "model": "gpt-6.1-sol", "effort": "high" },
|
|
69
69
|
"review": { "backend": "pi", "model": "anthropic/claude-sonnet-4-5", "effort": "high" }
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -78,10 +78,12 @@ Bro reads the file again before each request, so manual edits apply next time. I
|
|
|
78
78
|
happens to match it; select **Default** in `/bro config` to inherit again.
|
|
79
79
|
Omitted overrides inherit `default`.
|
|
80
80
|
- `effort` must be one the backend offers (`default` omits it and lets the
|
|
81
|
-
model decide). Agy
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
model decide). Agy models come live from `agy models` (with a custom model ID
|
|
82
|
+
fallback). Codex models come live from Codex's local `models_cache.json`
|
|
83
|
+
(respecting `CODEX_HOME`, with a custom model ID fallback). Claude accepts its
|
|
84
|
+
`sonnet`/`opus` aliases or any explicit model ID; a model/effort combination
|
|
85
|
+
the account does not support fails with the backend's own error instead of
|
|
86
|
+
silently falling back. **Pi** selections are a `"<provider>/<id>"` pair
|
|
85
87
|
from your Pi model catalog, chosen from your configured scoped models
|
|
86
88
|
(`enabledModels`, falling back to every model with configured credentials).
|
|
87
89
|
Explicit Pi efforts are clamped to the model's supported reasoning levels; the
|
|
@@ -11,11 +11,7 @@ feature. Failed checks explain what to fix.
|
|
|
11
11
|
|
|
12
12
|
- **Agy**: installed version, model catalog, and account access.
|
|
13
13
|
- **Claude Code**: installed version and configured authentication.
|
|
14
|
-
- **Grok**: installed version only; authentication and connectivity are not
|
|
15
|
-
verified.
|
|
16
14
|
- **Codex**: installed version and configured authentication.
|
|
17
|
-
- **Muse**: installed version only; authentication and connectivity are not
|
|
18
|
-
verified.
|
|
19
15
|
- **Pi**: physical model catalog, configured authentication, scope membership,
|
|
20
16
|
effective reasoning effort, and each feature's tool set. Uses the in-process
|
|
21
17
|
SDK with host registrations and runtime credentials plus current on-disk
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-bro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.1",
|
|
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",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"advisor",
|
|
36
36
|
"second-opinion",
|
|
37
37
|
"codex",
|
|
38
|
-
"muse",
|
|
39
38
|
"coding-agent",
|
|
40
39
|
"ai-agents",
|
|
41
40
|
"cli",
|
|
@@ -84,8 +83,6 @@
|
|
|
84
83
|
"src/backends/cli-process.ts",
|
|
85
84
|
"src/backends/codex.ts",
|
|
86
85
|
"src/backends/contract.ts",
|
|
87
|
-
"src/backends/grok.ts",
|
|
88
|
-
"src/backends/muse.ts",
|
|
89
86
|
"src/backends/pi.ts",
|
|
90
87
|
"src/cli-auth.ts",
|
|
91
88
|
"src/prompt.ts",
|
package/src/advisor.ts
CHANGED
|
@@ -373,7 +373,7 @@ export function advisorAttemptLabel(details: AdvisorToolDetails): string {
|
|
|
373
373
|
return `Bro advisor · ${details.model ?? "unknown model"} · ${Math.ceil((details.durationMs ?? details.elapsedMs) / 1_000)}s`;
|
|
374
374
|
}
|
|
375
375
|
const latest = details.activity?.at(-1);
|
|
376
|
-
const backendLabel = details.backend === "claude" ? "Claude" : details.backend === "
|
|
376
|
+
const backendLabel = details.backend === "claude" ? "Claude" : details.backend === "codex" ? "Codex" : details.backend === "pi" ? "Pi" : "Agy";
|
|
377
377
|
// "last reported" + freshness, never a claim about what the backend is doing right now and never
|
|
378
378
|
// "stalled" -- silence since lastActivityAt is not itself evidence of a stuck run.
|
|
379
379
|
const activityLabel = latest
|
package/src/architecture.ts
CHANGED
|
@@ -25,8 +25,8 @@ type ArchitecturePipeline = {
|
|
|
25
25
|
|
|
26
26
|
function inspectionNotice(backend: string): string {
|
|
27
27
|
if (backend === "agy") return "Agy can write inside the temporary project copy during inspection; Bro imports only checked architecture docs.";
|
|
28
|
-
if (backend === "codex"
|
|
29
|
-
if (backend === "claude" || backend === "
|
|
28
|
+
if (backend === "codex") return backend + " can use shell commands in a read-only sandbox during inspection.";
|
|
29
|
+
if (backend === "claude" || backend === "pi") return "Inspection uses file-reading tools only; Bro writes the verified output.";
|
|
30
30
|
return "Inspecting a temporary copy of the project.";
|
|
31
31
|
}
|
|
32
32
|
|
package/src/backend.ts
CHANGED
|
@@ -3,18 +3,15 @@ import { executeClaude } from "./backends/claude.ts";
|
|
|
3
3
|
import { DEFAULT_KILL_ESCALATION_MS } from "./backends/cli-process.ts";
|
|
4
4
|
import { executeCodex } from "./backends/codex.ts";
|
|
5
5
|
import {
|
|
6
|
-
CLAUDE_EFFORTS, CODEX_EFFORTS,
|
|
6
|
+
CLAUDE_EFFORTS, CODEX_EFFORTS, PI_EFFORTS,
|
|
7
7
|
type BackendAccess, type BackendExecuteOptions, type BackendFeature, type BackendOnProgress,
|
|
8
8
|
type BackendOutcome, type BackendProgress, type BackendRequest, type BackendSelection,
|
|
9
9
|
} from "./backends/contract.ts";
|
|
10
|
-
import { executeGrok } from "./backends/grok.ts";
|
|
11
|
-
import { executeMuse } from "./backends/muse.ts";
|
|
12
10
|
import { executePi, getPiHostContext, type PiHostContext } from "./backends/pi.ts";
|
|
13
11
|
|
|
14
12
|
export * from "./backends/contract.ts";
|
|
15
13
|
export { agyFailureMessage, agySelection, advisorFlagErrorHint, parseBtwAgyLine } from "./backends/agy.ts";
|
|
16
14
|
export { beginAttempt, frameStdoutLines, MAX_STDOUT_LINE_CHARS } from "./backends/cli-process.ts";
|
|
17
|
-
export { GROK_RESTRICTED_PREFIX } from "./backends/grok.ts";
|
|
18
15
|
export {
|
|
19
16
|
bridgePiRuntimeForCatalog, getPiHostContext, piEffectiveEffort, piPhysicalModel,
|
|
20
17
|
piScopedThinkingLevel, piToolAllowlist, setPiHostContext, splitPiModel,
|
|
@@ -24,20 +21,20 @@ export { verifyCliSubscription } from "./cli-auth.ts";
|
|
|
24
21
|
|
|
25
22
|
// Shared internal execution boundary for explain, show, btw, advisor, and review.
|
|
26
23
|
// This implements docs/plans/2026-09-22-shared-backend-design.md across all supported backends
|
|
27
|
-
// (Agy, Claude Code,
|
|
24
|
+
// (Agy, Claude Code, Codex, and the in-process Pi SDK): it owns model selection, process
|
|
28
25
|
// (or session) invocation, progress/outcome normalization, continuation, and single-attempt cleanup.
|
|
29
26
|
// Feature code keeps retries, UI, source/session capture and settings.
|
|
30
|
-
// For Guided Review (`feature: "review"`), Claude
|
|
31
|
-
// Agy
|
|
27
|
+
// For Guided Review (`feature: "review"`), Claude and Pi enforce strict file-only inspection;
|
|
28
|
+
// Agy and Codex run inside their own sandbox with shell available, and the UI owns telling
|
|
32
29
|
// the user via `reviewBackendNotice`.
|
|
33
30
|
|
|
34
|
-
// Per-backend truth, not one shared sentence: Codex
|
|
31
|
+
// Per-backend truth, not one shared sentence: Codex has a read-only sandbox, Agy's
|
|
35
32
|
// sandbox only restricts terminal commands and still lets it write inside the project. Kept short
|
|
36
33
|
// enough that the whole notice fits the review window's advisory rows on a narrow terminal.
|
|
37
|
-
export function reviewBackendNotice(backend: "agy" | "claude" | "
|
|
38
|
-
if (backend === "claude" || backend === "
|
|
34
|
+
export function reviewBackendNotice(backend: "agy" | "claude" | "codex" | "pi"): string | undefined {
|
|
35
|
+
if (backend === "claude" || backend === "pi") return undefined;
|
|
39
36
|
const sandbox = backend === "agy" ? "sandboxed shell (project writes allowed)" : "sandboxed shell in a read-only sandbox";
|
|
40
|
-
return `Guided Review on ${backend} uses ${sandbox}, not strict file-only inspection. Claude
|
|
37
|
+
return `Guided Review on ${backend} uses ${sandbox}, not strict file-only inspection. Claude or Pi is recommended for untrusted PRs.`;
|
|
41
38
|
}
|
|
42
39
|
// One default deadline table for every adapter: workspace-full, Guided Review and the advisor get
|
|
43
40
|
// the long bound; btw the middle one; explain/show the short one.
|
|
@@ -76,12 +73,12 @@ async function executeOnce(
|
|
|
76
73
|
) return { status: "failure", message: "Unsupported execution request: check feature access, workspace cwd and continuation." };
|
|
77
74
|
const backend = (selection as { backend?: unknown }).backend;
|
|
78
75
|
// An explicit tag guard: a stale or corrupt runtime tag must fail, never fall through to Agy.
|
|
79
|
-
if (backend !== undefined && backend !== "agy" && backend !== "claude" && backend !== "
|
|
80
|
-
return { status: "failure", message: `Unknown backend ${JSON.stringify(backend)}: pick Agy, Claude,
|
|
76
|
+
if (backend !== undefined && backend !== "agy" && backend !== "claude" && backend !== "codex" && backend !== "pi") {
|
|
77
|
+
return { status: "failure", message: `Unknown backend ${JSON.stringify(backend)}: pick Agy, Claude, Codex or Pi in \`/bro config\`.` };
|
|
81
78
|
}
|
|
82
79
|
// Review requires cwd above; restricted BTW also keeps native external sessions in the caller's workspace.
|
|
83
80
|
if (request.feature === "btw" && !request.cwd?.trim() &&
|
|
84
|
-
(backend === "codex" || backend === "
|
|
81
|
+
(backend === "codex" || backend === "claude")) {
|
|
85
82
|
return { status: "failure", message: "Unsupported execution request: check feature access, workspace cwd and continuation." };
|
|
86
83
|
}
|
|
87
84
|
const killEscalationMs = options?.killEscalationMs ?? DEFAULT_KILL_ESCALATION_MS;
|
|
@@ -98,26 +95,10 @@ async function executeOnce(
|
|
|
98
95
|
// Codex btw always runs (and resumes) in the caller's workspace, even restricted.
|
|
99
96
|
|
|
100
97
|
if (invalidModelEffortSelection(selection, CODEX_EFFORTS)) {
|
|
101
|
-
return { status: "failure", message: "Unsupported Codex selection: check the model and effort (low, medium, high or
|
|
98
|
+
return { status: "failure", message: "Unsupported Codex selection: check the model and effort (low, medium, high, xhigh or max)." };
|
|
102
99
|
}
|
|
103
100
|
return executeCodex(request, selection, signal, onProgress, killEscalationMs, deadlineMs);
|
|
104
101
|
}
|
|
105
|
-
if (selection.backend === "muse") {
|
|
106
|
-
// Muse btw always runs (and resumes) in the caller's workspace, even restricted.
|
|
107
|
-
|
|
108
|
-
if (invalidModelEffortSelection(selection, MUSE_EFFORTS)) {
|
|
109
|
-
return { status: "failure", message: "Unsupported Muse selection: check the model and effort (minimal, low, medium, high, xhigh or max)." };
|
|
110
|
-
}
|
|
111
|
-
return executeMuse(request, selection, signal, onProgress, killEscalationMs, deadlineMs);
|
|
112
|
-
}
|
|
113
|
-
if (selection.backend === "grok") {
|
|
114
|
-
// Grok btw always runs (and resumes) in the caller's workspace, even restricted.
|
|
115
|
-
|
|
116
|
-
if (invalidModelEffortSelection(selection, GROK_EFFORTS)) {
|
|
117
|
-
return { status: "failure", message: "Unsupported Grok selection: check the model and effort (low, medium, high or xhigh)." };
|
|
118
|
-
}
|
|
119
|
-
return executeGrok(request, selection, signal, onProgress, killEscalationMs, deadlineMs);
|
|
120
|
-
}
|
|
121
102
|
if (selection.backend === "claude") {
|
|
122
103
|
// Claude btw always runs (and resumes) in the caller's workspace, even restricted.
|
|
123
104
|
|
package/src/backends/agy.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { tmpdir } from "node:os";
|
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { withDoctor } from "../util.ts";
|
|
5
5
|
import { finishCliAttempt, startCliAttempt, stoppedCliOutcome } from "./cli-process.ts";
|
|
6
|
-
import { btwToolName, type AgySelection, type BackendOnProgress, type BackendOutcome, type BackendRequest } from "./contract.ts";
|
|
6
|
+
import { AGY_EFFORTS, btwToolName, type AgySelection, type BackendOnProgress, type BackendOutcome, type BackendRequest } from "./contract.ts";
|
|
7
7
|
|
|
8
8
|
export function agyFailureMessage(action: string, result: { code: number; killed: boolean; stderr: string }): string {
|
|
9
9
|
if (result.killed) return `Agy timed out while trying to ${action}. Run \`/bro doctor\` for setup help.`;
|
|
@@ -12,11 +12,11 @@ export function agyFailureMessage(action: string, result: { code: number; killed
|
|
|
12
12
|
return `Agy could not ${action}. Make sure Agy is installed and signed in, then run \`/bro doctor\`.`;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
// Strips
|
|
15
|
+
// Strips an effort suffix from a stored model id and separates it back into a plain
|
|
16
16
|
// Agy `--model`/`--effort` pair; a "default" effort omits --effort entirely (Agy's own default).
|
|
17
|
-
export function agySelection(pair: { model: string; effort: "default" |
|
|
17
|
+
export function agySelection(pair: { model: string; effort: "default" | (typeof AGY_EFFORTS)[number] }): AgySelection {
|
|
18
18
|
if (pair.effort === "default") return { model: pair.model };
|
|
19
|
-
const suffix =
|
|
19
|
+
const suffix = AGY_EFFORTS.find((effort) => pair.model.endsWith(`-${effort}`));
|
|
20
20
|
return {
|
|
21
21
|
model: suffix ? pair.model.slice(0, -suffix.length - 1) : pair.model,
|
|
22
22
|
effort: pair.effort,
|
|
@@ -6,13 +6,9 @@ export function processStartMessage(processError: NodeJS.ErrnoException, cli = "
|
|
|
6
6
|
if (processError.code === "ENOENT") {
|
|
7
7
|
return cli === "Agy"
|
|
8
8
|
? "Agy could not start. Make sure Agy is installed and on PATH, then run `/bro doctor`."
|
|
9
|
-
: cli === "
|
|
10
|
-
? "
|
|
11
|
-
:
|
|
12
|
-
? "Codex could not start. Make sure `codex` is installed and on PATH, then run `/bro doctor`."
|
|
13
|
-
: cli === "Muse"
|
|
14
|
-
? "Muse could not start. Make sure `muse` is installed and on PATH, then run `/bro doctor`."
|
|
15
|
-
: "Claude Code could not start. Make sure `claude` is installed and on PATH, then run `/bro doctor`.";
|
|
9
|
+
: cli === "Codex"
|
|
10
|
+
? "Codex could not start. Make sure `codex` is installed and on PATH, then run `/bro doctor`."
|
|
11
|
+
: "Claude Code could not start. Make sure `claude` is installed and on PATH, then run `/bro doctor`.";
|
|
16
12
|
}
|
|
17
13
|
return `${cli} could not start: ${processError.message}\n\nRun \`/bro doctor\` for setup help.`;
|
|
18
14
|
}
|
|
@@ -222,7 +218,7 @@ export function stoppedCliOutcome(
|
|
|
222
218
|
|
|
223
219
|
/** Session continuity is a shared BTW promise, even though CLIs report IDs differently. */
|
|
224
220
|
export function checkedBtwContinuation(
|
|
225
|
-
name: "Claude" | "
|
|
221
|
+
name: "Claude" | "Codex",
|
|
226
222
|
requested: BackendContinuation | undefined,
|
|
227
223
|
observed: { id?: string; init?: string; result?: string },
|
|
228
224
|
): BackendContinuation | { error: string } {
|
|
@@ -234,14 +230,12 @@ export function checkedBtwContinuation(
|
|
|
234
230
|
}
|
|
235
231
|
|
|
236
232
|
/** Exit diagnostics share framing, while each backend still owns its prompt and protocol. */
|
|
237
|
-
export function cliExitFailure(name: "Claude" | "
|
|
233
|
+
export function cliExitFailure(name: "Claude" | "Codex", action: string, stderr: string): string {
|
|
238
234
|
const detail = stderr.trim();
|
|
239
235
|
if (detail) return `${name} could not ${action}: ${detail}\n\nRun \`/bro doctor\` for setup help.`;
|
|
240
236
|
const installation = {
|
|
241
237
|
Claude: "Claude Code",
|
|
242
|
-
Grok: "`grok`",
|
|
243
238
|
Codex: "`codex`",
|
|
244
|
-
Muse: "`muse`",
|
|
245
239
|
}[name];
|
|
246
240
|
return `${name} could not ${action}. Make sure ${installation} is installed and signed in, then run \`/bro doctor\`.`;
|
|
247
241
|
}
|
package/src/backends/contract.ts
CHANGED
|
@@ -4,25 +4,22 @@ import type { createAgentSession } from "@earendil-works/pi-coding-agent";
|
|
|
4
4
|
export type BackendFeature = "explain" | "show" | "btw" | "advisor" | "review";
|
|
5
5
|
export type BackendAccess = "restricted" | "workspace-full";
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export const AGY_EFFORTS = ["low", "medium", "high", "xhigh", "max"] as const;
|
|
8
|
+
export type AgySelection = { model: string; effort?: (typeof AGY_EFFORTS)[number] };
|
|
8
9
|
export const CLAUDE_EFFORTS = ["low", "medium", "high", "xhigh", "max"] as const;
|
|
9
|
-
export const
|
|
10
|
-
export const CODEX_EFFORTS = ["low", "medium", "high", "xhigh"] as const;
|
|
11
|
-
export const MUSE_EFFORTS = ["minimal", "low", "medium", "high", "xhigh", "max"] as const;
|
|
10
|
+
export const CODEX_EFFORTS = ["low", "medium", "high", "xhigh", "max"] as const;
|
|
12
11
|
export const PI_EFFORTS = ["minimal", "low", "medium", "high", "xhigh", "max"] as const;
|
|
13
12
|
export type BackendSelection =
|
|
14
13
|
| ({ backend?: "agy" } & AgySelection)
|
|
15
14
|
| { backend: "claude"; model: string; effort?: (typeof CLAUDE_EFFORTS)[number] }
|
|
16
|
-
| { backend: "grok"; model: string; effort?: (typeof GROK_EFFORTS)[number] }
|
|
17
15
|
| { backend: "codex"; model: string; effort?: (typeof CODEX_EFFORTS)[number] }
|
|
18
|
-
| { backend: "muse"; model: string; effort?: (typeof MUSE_EFFORTS)[number] }
|
|
19
16
|
| { backend: "pi"; model: string; effort?: (typeof PI_EFFORTS)[number] };
|
|
20
17
|
export type BackendContinuation = { id: string };
|
|
21
18
|
export type BackendProgress = { kind: "text"; text: string } | { kind: "activity"; label: string; timestamp: number; tool?: string };
|
|
22
19
|
export type BackendOnProgress = (progress: BackendProgress) => void;
|
|
23
20
|
|
|
24
21
|
/** BTW reports a tool name/type, not a command, argument, or assistant message.
|
|
25
|
-
* All
|
|
22
|
+
* All four adapters use this extraction before events cross into the UI. */
|
|
26
23
|
export function btwToolName(value: unknown): string | undefined {
|
|
27
24
|
if (typeof value !== "string") return undefined;
|
|
28
25
|
// Restrict to the initial identifier. Agy may supply "Read /path" (or
|
package/src/btw.ts
CHANGED
|
@@ -71,7 +71,7 @@ export function toggleBtwMode(thread: BtwThread): void {
|
|
|
71
71
|
thread.full = !thread.full;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
// Claude
|
|
74
|
+
// Claude and Codex run btw in the workspace for both modes and resume one native session across
|
|
75
75
|
// /mode switches. An Agy conversation stays bound to the workspace it started in (a sandbox scratch
|
|
76
76
|
// dir vs. the repo), so an access change drops it; the next turn reseeds a fresh native session
|
|
77
77
|
// with the main-session context and the whole thread. Pi behaves like Agy here: its restricted mode
|
package/src/config-navigation.ts
CHANGED
|
@@ -57,18 +57,15 @@ export function configFeatureAccessNote(settings: BroSettings, feature: "btw" |
|
|
|
57
57
|
const notes: Record<typeof backend,string> = {
|
|
58
58
|
agy:"Agy's conversation-only path uses a temporary directory and sandboxed shell; the sandbox is not a no-write guarantee.",
|
|
59
59
|
claude:"Claude disables tools in conversation-only mode.",
|
|
60
|
-
grok:"Grok's conversation-only limit is prompt guidance only: its sandbox stays off and permissions are bypassed.",
|
|
61
60
|
codex:"Codex allows workspace reads and sandboxed commands under its read-only sandbox; it is not tool-free.",
|
|
62
|
-
muse:"Muse disables shell, write and approvals in conversation-only mode, but other tools can remain available.",
|
|
63
61
|
pi:"Pi's conversation-only session has no tools, extensions or context files.",
|
|
64
62
|
};
|
|
65
63
|
return "BTW: /mode in the BTW modal toggles conversation-only and full workspace access; full mode bypasses backend permission checks. "+notes[backend];
|
|
66
64
|
}
|
|
67
65
|
const existing=reviewBackendNotice(backend);
|
|
68
66
|
if(existing)return existing;
|
|
69
|
-
const strict: Record<"claude"|"
|
|
67
|
+
const strict: Record<"claude"|"pi",string>={
|
|
70
68
|
claude:"Claude uses Read/Grep/Glob file-inspection tools only in the captured checkout; no shell.",
|
|
71
|
-
muse:"Muse disables shell, writes and web access in the captured checkout; reads remain available.",
|
|
72
69
|
pi:"Pi permits only read/grep/find/ls in the captured checkout; no shell or workspace writes.",
|
|
73
70
|
};
|
|
74
71
|
return "Guided Review: "+strict[backend as keyof typeof strict]+
|