Skip to content

Commit 36942cd

Browse files
authored
Merge pull request #82 from VibePod/pi-ikwid-mode
Add ikwid options for pi agent
2 parents c59da96 + c6f8d04 commit 36942cd

4 files changed

Lines changed: 15 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ Use `--ikwid` to append each agent's auto-approval / permission-skip flag when s
6464
| `devstral` (`vibe`) | `--auto-approve` |
6565
| `copilot` | `--yolo` |
6666
| `codex` | `--dangerously-bypass-approvals-and-sandbox` |
67+
| `pi` | `--approve` |
6768
| `opencode` | Not supported |
6869
| `auggie` | Not supported |
69-
| `pi` | Not supported |
7070

7171
![VibePod CLI preview](https://raw.githubusercontent.com/VibePod/vibepod-cli/main/docs/assets/preview.png)
7272

docs/agents/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ Use `--ikwid` to enable each agent's built-in auto-approval / permission-skip mo
196196
| `devstral` | `--auto-approve` |
197197
| `copilot` | `--yolo` |
198198
| `codex` | `--dangerously-bypass-approvals-and-sandbox` |
199+
| `pi` | `--approve` |
199200
| `opencode` | Not supported |
200201
| `auggie` | Not supported |
201-
| `pi` | Not supported |
202202

203203
Example:
204204

@@ -514,3 +514,9 @@ vp run pi # or: vp pi
514514
```
515515

516516
Pi runs the Pi coding agent from Earendil in the same isolated VibePod container workflow. Credentials and configuration are persisted under `~/.config/vibepod/agents/pi/`.
517+
518+
Pi has a per-project **trust/approval system**: before loading project-local extensions and settings, it asks you to trust the project once. Inside VibePod:
519+
520+
- Interactive: run `/trust` to save the decision. It is written to `PI_CODING_AGENT_DIR` (`/config/.pi/agent/trust.json`), which lives inside the persisted config mount, so the trust survives container restarts.
521+
- `--ikwid`: appends `--approve`, trusting project-local files for that run (see [IKWID mode](#ikwid-mode---ikwid)).
522+
- Non-interactive modes (`-p`, `--mode json`, `--mode rpc`) show no prompt and fall back to `defaultProjectTrust` in `/config/.pi/agent/settings.json` (`ask` | `always` | `never`). Pre-seed this file if you need unattended runs to trust projects automatically.

src/vibepod/core/agents.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ class AgentSpec:
122122
["pi"],
123123
"/config",
124124
{"HOME": "/config", "PI_CODING_AGENT_DIR": "/config/.pi/agent"},
125+
ikwid_args=["--approve"],
125126
),
126127
}
127128

tests/test_agents.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,18 @@ def test_devstral_spec_has_ikwid_args() -> None:
9393
assert spec.ikwid_args == ["--auto-approve"]
9494

9595

96+
def test_pi_spec_has_ikwid_args() -> None:
97+
spec = get_agent_spec("pi")
98+
assert spec.ikwid_args == ["--approve"]
99+
100+
96101
def test_gemini_spec_runs_via_node_wrapper() -> None:
97102
spec = get_agent_spec("gemini")
98103
assert spec.command == ["env", "HOME=/config", "node", "/usr/local/bin/gemini"]
99104

100105

101106
def test_unsupported_agents_have_no_ikwid_args() -> None:
102-
for agent in ("opencode", "auggie", "pi"):
107+
for agent in ("opencode", "auggie"):
103108
spec = get_agent_spec(agent)
104109
assert spec.ikwid_args is None, f"{agent} should not have ikwid_args"
105110

0 commit comments

Comments
 (0)