Repository navigation
Commit 4beffef
authored
feat(buzz-acp): update base prompt; add buzz context and skills to Pi agents (#7335)
## Summary
- launch Pi through a private Buzz wrapper so managed Pi agents receive
Buzz's base prompt plus the configured thread/channel session model via
`--system-prompt`
- load the Buzz workspace skill directory with Pi's repeatable `--skill`
flag, making `~/.buzz/.agents/skills/buzz-cli` available alongside Pi's
normal global skill discovery
- report Pi and `pi-acp` installation states separately so setup
guidance points to the missing component
`pi-acp` does not currently consume the ACP `session/new` system prompt,
but its normal new-session and restore paths do honor
`PI_ACP_PI_COMMAND` as the executable used to launch Pi. Buzz reserves
that variable and sets it to a private generated launcher. The launcher
invokes `pi` from Buzz's effective `PATH`, adds `--system-prompt <file>`
and `--skill <workspace>/.agents/skills`, and forwards `pi-acp`'s RPC
and session arguments unchanged. This keeps the integration entirely in
`block/buzz`, without changes to Pi or `pi-acp`.
### How PI_ACP_PI_COMMAND works in `pi-acp`
`PI_ACP_PI_COMMAND` selects one executable; it does not accept
arguments. Therefore:
```bash
# Does not work
PI_ACP_PI_COMMAND="pi --skill ~/.buzz/.agents/skills"
```
Buzz does not expose this variable as user configuration. It creates a
private launcher and sets `PI_ACP_PI_COMMAND` only on the `pi-acp`
child. Conceptually, that launcher executes:
```sh
#!/bin/sh
exec pi \
--system-prompt "$PRIVATE_SYSTEM_PROMPT" \
--skill "$HOME/.buzz/.agents/skills" \
"$@"
```
### Related issue
Follow-up to #7208. No duplicate issue or open PR found.
### Testing
- `just ci`
- `cargo test -p buzz-acp pi_launcher`
- `cargo test --manifest-path desktop/src-tauri/Cargo.toml
managed_agents::env_vars::tests`
- `cargo test --manifest-path desktop/src-tauri/Cargo.toml
managed_agents::discovery::presets::tests`
- pre-push branch checks
No screenshots: the UI change is state-dependent setup guidance only.
---
**Update Sep 4, 13:35:** Made `PI_ACP_PI_COMMAND` entirely Buzz-owned.
- Managed agent configuration now rejects the variable as a user
override.
- Buzz always launches `pi` from its effective `PATH` and rejects
inherited values before creating its private launcher.
- Removed the custom Pi executable discovery path and its internal
environment alias.
---
**Update Sep 4, 14:03:** Reject inherited `PI_ACP_PI_COMMAND` values
instead of replacing them.
- Pi startup now fails with an actionable message telling the user to
unset the variable.
- Removed the Pi-specific exception from the generic ACP environment
injection path.
Generated with Codex
---------
Signed-off-by: Salman Mohammed <[email protected]>1 parent 4afef86 commit 4beffef
7 files changed
Lines changed: 557 additions & 51 deletions
File tree
- crates/buzz-acp/src
- desktop/src-tauri/src/managed_agents
- discovery
- env_vars
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
2510 | 2511 | | |
2511 | 2512 | | |
2512 | 2513 | | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
2513 | 2557 | | |
2514 | 2558 | | |
2515 | 2559 | | |
| |||
2758 | 2802 | | |
2759 | 2803 | | |
2760 | 2804 | | |
2761 | | - | |
2762 | | - | |
2763 | 2805 | | |
2764 | 2806 | | |
2765 | 2807 | | |
| |||
2770 | 2812 | | |
2771 | 2813 | | |
2772 | 2814 | | |
2773 | | - | |
2774 | | - | |
2775 | | - | |
2776 | | - | |
2777 | | - | |
2778 | | - | |
2779 | | - | |
2780 | | - | |
2781 | | - | |
2782 | | - | |
2783 | | - | |
2784 | | - | |
2785 | | - | |
2786 | | - | |
| 2815 | + | |
2787 | 2816 | | |
2788 | 2817 | | |
2789 | 2818 | | |
| |||
4116 | 4145 | | |
4117 | 4146 | | |
4118 | 4147 | | |
| 4148 | + | |
| 4149 | + | |
| 4150 | + | |
| 4151 | + | |
4119 | 4152 | | |
4120 | 4153 | | |
4121 | 4154 | | |
| |||
5208 | 5241 | | |
5209 | 5242 | | |
5210 | 5243 | | |
| 5244 | + | |
| 5245 | + | |
| 5246 | + | |
5211 | 5247 | | |
5212 | 5248 | | |
5213 | 5249 | | |
| |||
0 commit comments