pi-orchestrator-config 4.3.8 → 4.3.9
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/README.md +184 -165
- package/agents/git-expert.md +30 -1
- package/extensions/openai-compatible-discovery/index.ts +204 -0
- package/extensions/pidiff/pidiff-ui/package.json +1 -1
- package/extensions/shared/openai-compatible-discovery.ts +558 -0
- package/package.json +2 -1
- package/rules/20-code-review-loop.md +11 -1
- package/settings-keys.json +1 -1
package/README.md
CHANGED
|
@@ -10,79 +10,79 @@ A [pi package](https://github.com/badlogic/pi-mono) that implements an **orchest
|
|
|
10
10
|
|
|
11
11
|
Single extension that provides:
|
|
12
12
|
|
|
13
|
-
| Feature
|
|
14
|
-
|
|
15
|
-
| **Subagent tool**
|
|
16
|
-
| **`list_models`**
|
|
17
|
-
| **Async background agents**
|
|
18
|
-
| **CLI / ACPX providers**
|
|
19
|
-
| **`/btw` command**
|
|
20
|
-
| **`/async-status` command**
|
|
21
|
-
| **`/async-kill` command**
|
|
22
|
-
| **`ask_user` tool**
|
|
23
|
-
| **Python/pip enforcement**
|
|
24
|
-
| **Git protection**
|
|
25
|
-
| **Remote script exec block**
|
|
26
|
-
| **Dangerous command gate**
|
|
27
|
-
| **Rule injection**
|
|
28
|
-
| **Git status**
|
|
29
|
-
| **Desktop notifications**
|
|
30
|
-
| **File preview**
|
|
31
|
-
| **Pidash dashboard**
|
|
32
|
-
| **Pidiff viewer**
|
|
33
|
-
| **Dreaming**
|
|
34
|
-
| **Memory enforcement**
|
|
35
|
-
| **Upgrade changelog**
|
|
36
|
-
| **Task tracking**
|
|
37
|
-
| **Neovim integration**
|
|
38
|
-
| **Inter-agent communication**
|
|
39
|
-
| **Slash commands**
|
|
40
|
-
| **GitHub autocomplete**
|
|
41
|
-
| **Command arg completions**
|
|
42
|
-
| **Discord bot**
|
|
13
|
+
| Feature | Description |
|
|
14
|
+
| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| **Subagent tool** | Delegate tasks to specialist agents (single, parallel, chain, async modes); optional `model` param for model override |
|
|
16
|
+
| **`list_models`** | List available models and providers for subagent model override |
|
|
17
|
+
| **Async background agents** | Spawn agents in background with `async: true` — results surface automatically when complete. Fullscreen overlay dashboard with live output, keyboard nav, and kill support (`/async-status`, `/async-kill`). On **acpx** parents, optional async is coerced to sync; dream/cron need `internal_operations_provider` + `internal_operations_model`. `cli-*` providers support async natively (see `dev-docs/cli-provider.md`) |
|
|
18
|
+
| **CLI / ACPX providers** | Optional `cli_agents` / `acpx_agents` register `cli-*` / `acpx-*` via native `createProvider` (pi ≥ 0.84): `/login cli-<agent>` or `/login acpx-<agent>`, model refresh, filter when unavailable. Missing context window / maxTokens / cost filled from models.dev (`~/.pi/pi-config/models.dev.json`, 1-day refresh). Cold-start default restore (#753): gates `startup`\|`new`, empty `enabledModels`, trusted project merge — see `dev-docs/cli-provider.md`. Headless Cursor `--approve-mcps` when `CLI_APPROVE_MCPS` is set (`false` opts out) or the process is a sidecar (`SIDECAR_PORT`; `startSidecar()` stamps it while running and restores it on `close()`). Executable sidecar consumers should call `bindSidecarListenExit()` so bind/`stopped` fatals exit 1. Headless Gemini defaults `GEMINI_CLI_TRUST_WORKSPACE=true` and preserves an explicit parent value (including `false`). |
|
|
19
|
+
| **`/btw` command** | Quick side questions without polluting conversation history — ephemeral overlay |
|
|
20
|
+
| **`/async-status` command** | Show status of background agents — select one for live output streaming |
|
|
21
|
+
| **`/async-kill` command** | Kill async agents (overlay picker or by name/id) |
|
|
22
|
+
| **`ask_user` tool** | Structured user input with options and free-text — used by workflows |
|
|
23
|
+
| **Python/pip enforcement** | Auto-fixes `python`/`python3` → `uv run python`; blocks `pip`/`pip3` — requires `uv` |
|
|
24
|
+
| **Git protection** | Blocks commits/pushes to main/master, merged branches, `--no-verify`, `git add .` |
|
|
25
|
+
| **Remote script exec block** | Blocks `curl \| bash`, `eval $(curl)`, etc. Allows safe `VAR=$(curl ...)` variable assignments |
|
|
26
|
+
| **Dangerous command gate** | Confirms `rm -rf`, `sudo`, `mkfs`, etc. |
|
|
27
|
+
| **Rule injection** | Injects orchestrator routing rules into system prompt |
|
|
28
|
+
| **Git status** | Live git status in status line with colored icons — updates after every tool call. Shows clickable `#N` when the branch has an open PR. Last-activity clock `⏱ HH:MM (Xm/Xh ago)` shows time since last response |
|
|
29
|
+
| **Desktop notifications** | Notifies via `notify-send` on task completion, waiting for input, and action required |
|
|
30
|
+
| **File preview** | Serves generated HTML/frontend files via HTTP for browser preview from container |
|
|
31
|
+
| **Pidash dashboard** | Live web dashboard — multi-session monitoring, browser messaging, model switching, live session name updates, reasoning token display |
|
|
32
|
+
| **Pidiff viewer** | Per-project diff viewer with review comments — branch diffs, file tree, inline comments, git-based ignore rules |
|
|
33
|
+
| **Dreaming** | Background memory consolidation — extracts memories from sessions, deduplicates, maintains topic-based memory |
|
|
34
|
+
| **Memory enforcement** | Code-enforced memory entries — triggers on bash/tool/file events, actions: block, run_after, warn. LLM cannot ignore enforced rules. Dreaming-safe via _(enforced)_ marker |
|
|
35
|
+
| **Upgrade changelog** | Shows release notes on session start after pi-config version upgrade |
|
|
36
|
+
| **Task tracking** | Structured task lists for multi-step workflows — live widget, progress tracking, reminder nudges (owned, based on [@tintinweb/pi-tasks](https://github.com/tintinweb/pi-tasks) MIT) |
|
|
37
|
+
| **Neovim integration** | Send changed files and review findings to nvim's quickfix list — only active when running inside nvim |
|
|
38
|
+
| **Inter-agent communication** | P2P (`/coms`) agent communication — on-demand activation via slash command |
|
|
39
|
+
| **Slash commands** | `/pr-review`, `/issue-review`, `/release`, `/review-local`, `/review-status`, `/query-db`, `/btw`, `/async-status`, `/async-kill`, `/status`, `/dream`, `/remember`, `/coms`, `/pi-config-settings`, `/mcpc connect` — with autocomplete argument hints |
|
|
40
|
+
| **GitHub autocomplete** | Type `#` in the editor to get issue/PR suggestions from the current repo — lazy-loaded, 5min cache |
|
|
41
|
+
| **Command arg completions** | Tab-complete arguments for slash commands — providers and models for `/external-ai`, branches for `/review-local`, PR numbers for `/pr-review`, and more |
|
|
42
|
+
| **Discord bot** | Control pi sessions from your phone via Discord DMs — send prompts, answer ask_user dialogs, switch sessions |
|
|
43
43
|
|
|
44
44
|
### Agents (26)
|
|
45
45
|
|
|
46
|
-
| Category
|
|
47
|
-
|
|
48
|
-
| Languages
|
|
49
|
-
| Infrastructure | docker-expert, kubernetes-expert, jenkins-expert
|
|
50
|
-
| Dev workflow
|
|
51
|
-
| Documentation
|
|
52
|
-
| Code review
|
|
53
|
-
| Security
|
|
54
|
-
| Workflow
|
|
46
|
+
| Category | Agents |
|
|
47
|
+
| -------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
48
|
+
| Languages | python-expert, go-expert, ts-expert, java-expert, bash-expert |
|
|
49
|
+
| Infrastructure | docker-expert, kubernetes-expert, jenkins-expert |
|
|
50
|
+
| Dev workflow | git-expert, github-expert, test-runner, test-automator, debugger |
|
|
51
|
+
| Documentation | technical-documentation-writer, api-documenter, docs-fetcher |
|
|
52
|
+
| Code review | code-reviewer-quality, code-reviewer-guidelines, code-reviewer-security, code-reviewer-docs, code-reviewer-spec |
|
|
53
|
+
| Security | security-auditor |
|
|
54
|
+
| Workflow | scout, planner, worker, reviewer |
|
|
55
55
|
|
|
56
56
|
### Prompt Templates
|
|
57
57
|
|
|
58
|
-
| Prompt
|
|
59
|
-
|
|
60
|
-
| `/implement <task>`
|
|
61
|
-
| `/scout-and-plan <task>`
|
|
62
|
-
| `/implement-and-review <task>`
|
|
63
|
-
| `/pr-review [number\|url]`
|
|
64
|
-
| `/issue-review`
|
|
65
|
-
| `/release [flags]`
|
|
66
|
-
| `/review-local [branch]`
|
|
67
|
-
| `/review-handler [url] [--autorabbit] [--autoqodo]`
|
|
68
|
-
| `/domain-model [focus area]`
|
|
69
|
-
| `/refine-review <url>`
|
|
70
|
-
| `/coderabbit-rate-limit [number\|url]`
|
|
71
|
-
| `/create-coms-feature-manager`
|
|
72
|
-
| `/query-db <command>`
|
|
73
|
-
| `/external-ai <agent> [--model <model>] [--session-id <id>] [--fix\|--peer\|--resume] <prompt>` | Run prompts via AI CLIs directly (cursor, claude, gemini) — full model access
|
|
74
|
-
| `/external-ai-models-refresh`
|
|
75
|
-
| `/dream`
|
|
76
|
-
| `/remember <what>`
|
|
77
|
-
| `/dream-auto`
|
|
78
|
-
| `/cron add\|list\|list-all\|remove`
|
|
79
|
-
| `/async-kill [name\|id\|all]`
|
|
80
|
-
| `/pi-config-settings [project\|global]`
|
|
81
|
-
| `/status`
|
|
82
|
-
| `/nvim-changed-files`
|
|
83
|
-
| `/pidiff start\|stop\|restart\|status`
|
|
84
|
-
| `/coms start\|stop\|status`
|
|
85
|
-
| `/mcpc connect`
|
|
58
|
+
| Prompt | Description |
|
|
59
|
+
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
60
|
+
| `/implement <task>` | scout → planner → worker |
|
|
61
|
+
| `/scout-and-plan <task>` | scout → planner |
|
|
62
|
+
| `/implement-and-review <task>` | worker → 5 reviewers → worker |
|
|
63
|
+
| `/pr-review [number\|url]` | Fetch PR diff, check past review comments, review with guidelines, post and track comments |
|
|
64
|
+
| `/issue-review` | Review a GitHub issue spec and fix it |
|
|
65
|
+
| `/release [flags]` | Create GitHub release with changelog and version bumping |
|
|
66
|
+
| `/review-local [branch]` | Review local uncommitted or branch changes |
|
|
67
|
+
| `/review-handler [url] [--autorabbit] [--autoqodo]` | Process PR review comments, fix approved items |
|
|
68
|
+
| `/domain-model [focus area]` | Scan codebase and build/update a CONTEXT.md domain glossary for consistent AI vocabulary |
|
|
69
|
+
| `/refine-review <url>` | Refine and improve existing PR review comments |
|
|
70
|
+
| `/coderabbit-rate-limit [number\|url]` | Handle CodeRabbit rate limiting on PRs |
|
|
71
|
+
| `/create-coms-feature-manager` | Generate a coms feature-manager prompt customized for the current project (source template: `templates/coms-feature-manager-prompt.md`) |
|
|
72
|
+
| `/query-db <command>` | Query the review comments database |
|
|
73
|
+
| `/external-ai <agent> [--model <model>] [--session-id <id>] [--fix\|--peer\|--resume] <prompt>` | Run prompts via AI CLIs directly (cursor, claude, gemini) — full model access |
|
|
74
|
+
| `/external-ai-models-refresh` | Refresh cached AI CLI models for autocomplete |
|
|
75
|
+
| `/dream` | Run memory consolidation — extract, deduplicate, maintain topic-based memory |
|
|
76
|
+
| `/remember <what>` | Save a memory for future sessions |
|
|
77
|
+
| `/dream-auto` | Toggle automatic memory dreaming (every 3h + session end) |
|
|
78
|
+
| `/cron add\|list\|list-all\|remove` | Schedule recurring tasks within the pi session (e.g., `/cron add every 2h check for new issues`, `/cron add at 12:00 /review-handler`). `/cron list` and `/cron list-all` open overlay UI (view / remove; list-all = all sessions). Tasks run while pi is active, survive `/reload`, and stop on exit |
|
|
79
|
+
| `/async-kill [name\|id\|all]` | Kill async agents (overlay picker or by name/id) |
|
|
80
|
+
| `/pi-config-settings [project\|global]` | Interactive TUI settings editor — browse all pi-config settings with scope indicators, smart pickers for providers/models, and immediate save |
|
|
81
|
+
| `/status` | Unified session snapshot — async agents, cron tasks, git branch, context usage |
|
|
82
|
+
| `/nvim-changed-files` | Send git changed files to nvim's quickfix list (only inside nvim) |
|
|
83
|
+
| `/pidiff start\|stop\|restart\|status` | Manage the pidiff diff viewer server (per-project) |
|
|
84
|
+
| `/coms start\|stop\|status` | P2P local agent communication (Unix socket) |
|
|
85
|
+
| `/mcpc connect` | Connect MCP servers from `~/.pi/pi-config/mcp.json` (`mcpc connect --stdio`). Run after editing that file. |
|
|
86
86
|
|
|
87
87
|
### Inter-Agent Communication (coms)
|
|
88
88
|
|
|
@@ -98,12 +98,12 @@ Two systems for Pi agents to communicate with each other, activated on-demand vi
|
|
|
98
98
|
|
|
99
99
|
**Tools available once activated:**
|
|
100
100
|
|
|
101
|
-
| Tool
|
|
102
|
-
|
|
103
|
-
| `*_list`
|
|
104
|
-
| `*_send`
|
|
105
|
-
| `*_get`
|
|
106
|
-
| `*_await` | Block until response arrives
|
|
101
|
+
| Tool | Description |
|
|
102
|
+
| --------- | --------------------------------------------------------------- |
|
|
103
|
+
| `*_list` | List peer agents with names, models, context usage, queue depth |
|
|
104
|
+
| `*_send` | Send a prompt to a peer agent |
|
|
105
|
+
| `*_get` | Non-blocking poll for a response |
|
|
106
|
+
| `*_await` | Block until response arrives |
|
|
107
107
|
|
|
108
108
|
Forked from [disler/pi-vs-claude-code](https://github.com/disler/pi-vs-claude-code) coms extensions. We own these files — FIFO message queue, structured task delegation via coms protocol.
|
|
109
109
|
|
|
@@ -216,25 +216,44 @@ Run scout and planner in a chain to analyze the auth module
|
|
|
216
216
|
|
|
217
217
|
```bash
|
|
218
218
|
# Discover available models
|
|
219
|
-
list_models(provider="
|
|
219
|
+
list_models(provider="my-provider")
|
|
220
220
|
|
|
221
221
|
# Run agent with explicit model
|
|
222
|
-
subagent(agent="worker", task="...", model="
|
|
222
|
+
subagent(agent="worker", task="...", model="my-provider/model-id")
|
|
223
223
|
|
|
224
224
|
# Parallel tasks with per-task models
|
|
225
|
-
subagent(tasks=[{agent: "worker", task: "...", model: "
|
|
225
|
+
subagent(tasks=[{agent: "worker", task: "...", model: "my-provider/model-id", cwd: "..."}])
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
+
### OpenAI-compatible model discovery
|
|
229
|
+
|
|
230
|
+
Set `discoverModels: true` on a static `openai-completions` provider in `models.json` to load
|
|
231
|
+
its `/v1/models` catalog at interactive session start. Discovery never writes `models.json`. It
|
|
232
|
+
augments the configured provider in Pi's runtime registry, so Pi's ordinary `/model` picker
|
|
233
|
+
displays each result under the exact configured provider key, for example
|
|
234
|
+
`chatgpt-image-latest [litellm]`. The selected model keeps that same provider key and streams
|
|
235
|
+
through the configured provider. Existing static models remain available. Only exact duplicate
|
|
236
|
+
returned IDs are deduplicated.
|
|
237
|
+
|
|
238
|
+
After discovery and runtime registration both succeed, Pi appends a durable transcript entry such
|
|
239
|
+
as `Providers: litellm (242)`. The key and count come from that session's configured provider and
|
|
240
|
+
discovery response. Failed discovery or registration appends no entry, so a prior session's count
|
|
241
|
+
is never presented as current.
|
|
242
|
+
|
|
243
|
+
Each returned string ID remains selectable, including opaque, blank, and whitespace-preserved IDs.
|
|
244
|
+
Discovery materializes a complete Pi `Model` object for every result. It uses source metadata for
|
|
245
|
+
`name`, `reasoning`, `input`, `cost`, `contextWindow`, and `maxTokens` when the response provides
|
|
246
|
+
it. Missing or invalid metadata uses Pi's static-model compatibility defaults: `reasoning: false`,
|
|
247
|
+
zero costs, `contextWindow: 128000`, and `maxTokens: 16384`. Unknown input declares
|
|
248
|
+
`['text', 'image']` so Pi can safely inspect `model.input`. That declaration only satisfies Pi's
|
|
249
|
+
model contract. It does not filter discovery results or claim that the endpoint accepts image input.
|
|
250
|
+
|
|
228
251
|
## Code Review Loop
|
|
229
252
|
|
|
230
|
-
|
|
253
|
+
`review_loop_enforcement` controls automatic review-agent dispatch and commit enforcement.
|
|
231
254
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
3. **code-reviewer-security** — Bugs, logic errors, security
|
|
235
|
-
4. **code-reviewer-docs** — Documentation quality, completeness, accuracy
|
|
236
|
-
5. **code-reviewer-spec** — Code/PR/issue spec alignment
|
|
237
|
-
6. **test-automator** — Runs project tests (pytest, node tests, pre-commit)
|
|
255
|
+
- `true` automatically dispatches 6 agents in parallel (5 reviewers + `test-automator`) after code changes and requires a clean review before commits.
|
|
256
|
+
- `false` disables automatic review-agent and test-agent dispatch. Manual reviews and test runs are optional. No review state, cycle, or result is required before commit.
|
|
238
257
|
|
|
239
258
|
When `review_loop_enforcement` is enabled, the loop stops once all reviewers approve with 0 findings and tests pass
|
|
240
259
|
(`tests_passed: true` in `pi-config-review-state.jsonl`), OR after `review_loop_max_cycles` total cycles (default `3`,
|
|
@@ -275,10 +294,10 @@ See `dev-docs/project-settings.md` for the full settings table.
|
|
|
275
294
|
|
|
276
295
|
These are set automatically by the orchestrator when spawning reviewer agents:
|
|
277
296
|
|
|
278
|
-
| Variable
|
|
279
|
-
|
|
280
|
-
| `PI_REVIEW_BASE_BRANCH` | Base branch for diff comparison (auto-detected from PR or falls back to main)
|
|
281
|
-
| `PI_HAS_PR`
|
|
297
|
+
| Variable | Description |
|
|
298
|
+
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
299
|
+
| `PI_REVIEW_BASE_BRANCH` | Base branch for diff comparison (auto-detected from PR or falls back to main) |
|
|
300
|
+
| `PI_HAS_PR` | `true` if a PR exists for the current branch, `false` for pre-push reviews. When `false`, reviewers skip Review History and `code-reviewer-spec` runs a reduced flow (issue-only checks) |
|
|
282
301
|
|
|
283
302
|
#### Per-Project Resource Management
|
|
284
303
|
|
|
@@ -300,11 +319,11 @@ Priority: project > user > package (bundled).
|
|
|
300
319
|
|
|
301
320
|
The orchestrator loads rules from three directories (later layers override same-filename entries):
|
|
302
321
|
|
|
303
|
-
| Layer
|
|
304
|
-
|
|
305
|
-
| Package | `<pi-config>/rules/`
|
|
306
|
-
| User
|
|
307
|
-
| Project | `<project>/.pi/rules/` | Current project only
|
|
322
|
+
| Layer | Path | Scope | Number range |
|
|
323
|
+
| ------- | ---------------------- | -------------------------- | ------------ |
|
|
324
|
+
| Package | `<pi-config>/rules/` | All users, all projects | `00-69` |
|
|
325
|
+
| User | `~/.pi/agent/rules/` | All projects for this user | `70-89` |
|
|
326
|
+
| Project | `<project>/.pi/rules/` | Current project only | `90-99` |
|
|
308
327
|
|
|
309
328
|
To add a custom rule, create a `.md` file in the appropriate directory:
|
|
310
329
|
|
|
@@ -363,10 +382,10 @@ The `generate_image` tool creates images from structured descriptions via Gemini
|
|
|
363
382
|
|
|
364
383
|
Set `image_model` in `pi-config-settings.json` or use `PI_IMAGE_MODEL` env var.
|
|
365
384
|
|
|
366
|
-
| Setting / Variable
|
|
367
|
-
|
|
368
|
-
| `image_model` / `PI_IMAGE_MODEL`
|
|
369
|
-
| `GEMINI_API_KEY` or `GOOGLE_API_KEY` | Gemini API key (env only)
|
|
385
|
+
| Setting / Variable | Description |
|
|
386
|
+
| ------------------------------------ | -------------------------------------------------------------------------------------------------- |
|
|
387
|
+
| `image_model` / `PI_IMAGE_MODEL` | Google/Gemini image model for `generate_image` (Settings TUI filters to google; empty = disabled). |
|
|
388
|
+
| `GEMINI_API_KEY` or `GOOGLE_API_KEY` | Gemini API key (env only) |
|
|
370
389
|
|
|
371
390
|
**Usage:** Ask naturally — "generate an image of a sunset" — or use structured params: `subject`, `action`, `scene`, `composition`, `lighting`, `style`, `text`, `aspect_ratio`.
|
|
372
391
|
|
|
@@ -629,64 +648,64 @@ PI_PIDIFF_ENABLE=false pi
|
|
|
629
648
|
|
|
630
649
|
### Optional mounts
|
|
631
650
|
|
|
632
|
-
| Mount
|
|
633
|
-
|
|
634
|
-
| `-v "$HOME/.agents":"$HOME/.agents":rw`
|
|
635
|
-
| `-v "$HOME/.config/gcloud/application_default_credentials.json":"$HOME/.config/gcloud/application_default_credentials.json":ro` | Google Cloud ADC (for Claude via Vertex AI)
|
|
636
|
-
| `-v "$HOME/.config/cursor/auth.json":"$HOME/.config/cursor/auth.json":ro`
|
|
637
|
-
| `-v "$HOME/.claude/credentials.json":"$HOME/.claude/credentials.json":ro`
|
|
638
|
-
| `-v "$HOME/.config/glab-cli":"$HOME/.config/glab-cli":ro`
|
|
639
|
-
| `-v "$HOME/.coderabbit":"$HOME/.coderabbit":rw`
|
|
640
|
-
| `-v "$HOME/screenshots":"$HOME/screenshots"`
|
|
641
|
-
| `-v /var/run/docker.sock:/var/run/docker.sock:ro` + `--group-add $(stat -c '%g' /var/run/docker.sock)`
|
|
642
|
-
| `-v /var/run/podman/podman.sock:/var/run/podman/podman.sock:ro`
|
|
651
|
+
| Mount | Purpose |
|
|
652
|
+
| ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
|
|
653
|
+
| `-v "$HOME/.agents":"$HOME/.agents":rw` | User-level skills (install/uninstall from container) |
|
|
654
|
+
| `-v "$HOME/.config/gcloud/application_default_credentials.json":"$HOME/.config/gcloud/application_default_credentials.json":ro` | Google Cloud ADC (for Claude via Vertex AI) |
|
|
655
|
+
| `-v "$HOME/.config/cursor/auth.json":"$HOME/.config/cursor/auth.json":ro` | Cursor CLI auth (for acpx-cursor / cli-cursor models) |
|
|
656
|
+
| `-v "$HOME/.claude/credentials.json":"$HOME/.claude/credentials.json":ro` | Claude CLI auth (for acpx-claude / cli-claude models) |
|
|
657
|
+
| `-v "$HOME/.config/glab-cli":"$HOME/.config/glab-cli":ro` | GitLab CLI config (auth tokens, host settings) |
|
|
658
|
+
| `-v "$HOME/.coderabbit":"$HOME/.coderabbit":rw` | CodeRabbit CLI auth and review data |
|
|
659
|
+
| `-v "$HOME/screenshots":"$HOME/screenshots"` | Share screenshots/images with the agent |
|
|
660
|
+
| `-v /var/run/docker.sock:/var/run/docker.sock:ro` + `--group-add $(stat -c '%g' /var/run/docker.sock)` | Docker container inspection via `docker-safe` |
|
|
661
|
+
| `-v /var/run/podman/podman.sock:/var/run/podman/podman.sock:ro` | Podman container inspection via `docker-safe` |
|
|
643
662
|
|
|
644
663
|
### What's in the image
|
|
645
664
|
|
|
646
|
-
| Tool
|
|
647
|
-
|
|
648
|
-
| `pi`
|
|
649
|
-
| `git`
|
|
650
|
-
| `gh`
|
|
651
|
-
| `glab`
|
|
652
|
-
| `gcc`
|
|
653
|
-
| `uv` / `uvx`
|
|
654
|
-
| `go`
|
|
655
|
-
| `libxml2-dev`
|
|
656
|
-
| `mcpc`
|
|
657
|
-
| `myk-pi-tools`
|
|
658
|
-
| `prek`
|
|
659
|
-
| `acpx`
|
|
660
|
-
| `kubectl` / `oc`
|
|
661
|
-
| `agent-browser`
|
|
662
|
-
| `procps`
|
|
663
|
-
| `passwd`
|
|
664
|
-
| `docker` / `podman` | Container CLIs (used via `docker-safe` read-only wrapper)
|
|
665
|
-
| `docker-safe`
|
|
666
|
-
| `jq`
|
|
667
|
-
| `rg` (ripgrep)
|
|
668
|
-
| `cr`
|
|
669
|
-
| `curl`
|
|
665
|
+
| Tool | Purpose |
|
|
666
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
667
|
+
| `pi` | Coding agent |
|
|
668
|
+
| `git` | Version control |
|
|
669
|
+
| `gh` | GitHub CLI (PRs, issues) |
|
|
670
|
+
| `glab` | GitLab CLI (MRs, issues, pipelines) — install [gitlab-cli-skills](https://github.com/vince-winkintel/gitlab-cli-skills) for full agent support |
|
|
671
|
+
| `gcc` | C compiler — needed for building Python C extensions (e.g. ovirt-engine-sdk-python) |
|
|
672
|
+
| `uv` / `uvx` | Python execution (enforced by orchestrator) |
|
|
673
|
+
| `go` | Go development and code review |
|
|
674
|
+
| `libxml2-dev` | libxml2 headers — needed for building Python C extensions (e.g. ovirt-engine-sdk-python) |
|
|
675
|
+
| `mcpc` | MCP CLI (`npm: @apify/mcpc`). Put servers in `~/.pi/pi-config/mcp.json` (already on the `~/.pi` mount). Pi runs `mcpc connect … --stdio` on start. After editing the file, `/mcpc connect`. `entrypoint.sh` reinstalls `@apify/mcpc` on every start so `PI_HOST_USER` host `.npm-global` mapping does not hide the image copy. |
|
|
676
|
+
| `myk-pi-tools` | PR review, release, and other CLI utilities |
|
|
677
|
+
| `prek` | Pre-commit hook runner |
|
|
678
|
+
| `acpx` | Agent proxy for remote models |
|
|
679
|
+
| `kubectl` / `oc` | Kubernetes and OpenShift CLI |
|
|
680
|
+
| `agent-browser` | Browser automation CLI (navigate, click, screenshot, forms) |
|
|
681
|
+
| `procps` | Process utilities (ps, top, pgrep, pkill) |
|
|
682
|
+
| `passwd` | `usermod`/`groupmod` — init remaps user `node` to `PI_HOST_UID`/`PI_HOST_GID` |
|
|
683
|
+
| `docker` / `podman` | Container CLIs (used via `docker-safe` read-only wrapper) |
|
|
684
|
+
| `docker-safe` | Restricted Docker/Podman wrapper — container only (ps, logs, inspect, top, stats) |
|
|
685
|
+
| `jq` | JSON processing |
|
|
686
|
+
| `rg` (ripgrep) | Fast recursive search |
|
|
687
|
+
| `cr` | CodeRabbit CLI — local AI code reviews |
|
|
688
|
+
| `curl` | HTTP requests |
|
|
670
689
|
|
|
671
690
|
#### `myk-pi-tools` subcommands
|
|
672
691
|
|
|
673
|
-
| Command
|
|
674
|
-
|
|
675
|
-
| `myk-pi-tools pr diff`
|
|
676
|
-
| `myk-pi-tools pr info`
|
|
677
|
-
| `myk-pi-tools pr post-comment`
|
|
678
|
-
| `myk-pi-tools pr store-pr-review`
|
|
679
|
-
| `myk-pi-tools pr update-resolution`
|
|
680
|
-
| `myk-pi-tools pr get-review-history`
|
|
681
|
-
| `myk-pi-tools pr get-skipped-comments` | Get previously skipped review comments for a PR
|
|
682
|
-
| `myk-pi-tools pr claude-md`
|
|
683
|
-
| `myk-pi-tools release create`
|
|
684
|
-
| `myk-pi-tools db`
|
|
685
|
-
| `myk-pi-tools reviews`
|
|
686
|
-
| `myk-pi-tools memory`
|
|
687
|
-
| `myk-pi-tools ai-cli`
|
|
688
|
-
| `myk-pi-tools coderabbit`
|
|
689
|
-
| `myk-pi-tools settings get [key ...]`
|
|
692
|
+
| Command | Description |
|
|
693
|
+
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
694
|
+
| `myk-pi-tools pr diff` | Fetch PR diff and metadata |
|
|
695
|
+
| `myk-pi-tools pr info` | Fetch PR information as structured JSON |
|
|
696
|
+
| `myk-pi-tools pr post-comment` | Post inline comments to a PR |
|
|
697
|
+
| `myk-pi-tools pr store-pr-review` | Store posted PR review comments to `pr-reviews.db` |
|
|
698
|
+
| `myk-pi-tools pr update-resolution` | Update resolution status for a previously posted review comment. Used by Phase 1c of `/pr-review` to persist LLM evaluation verdicts |
|
|
699
|
+
| `myk-pi-tools pr get-review-history` | Return complete review history for a PR as JSON (posted, skipped, resolved findings). Used by reviewers to avoid re-raising dismissed findings |
|
|
700
|
+
| `myk-pi-tools pr get-skipped-comments` | Get previously skipped review comments for a PR |
|
|
701
|
+
| `myk-pi-tools pr claude-md` | Fetch `CLAUDE.md` and `AGENTS.md` content for a PR's repository |
|
|
702
|
+
| `myk-pi-tools release create` | Create a GitHub release with changelog |
|
|
703
|
+
| `myk-pi-tools db` | Review database query commands |
|
|
704
|
+
| `myk-pi-tools reviews` | Review handling commands |
|
|
705
|
+
| `myk-pi-tools memory` | Project memory commands — persistent per-repo learning |
|
|
706
|
+
| `myk-pi-tools ai-cli` | AI CLI commands (cursor, claude, gemini) |
|
|
707
|
+
| `myk-pi-tools coderabbit` | CodeRabbit commands (check, trigger, retry) |
|
|
708
|
+
| `myk-pi-tools settings get [key ...]` | Resolve settings (project → global → env → default). No args = all keys |
|
|
690
709
|
|
|
691
710
|
### What's protected
|
|
692
711
|
|
|
@@ -702,7 +721,7 @@ PI_PIDIFF_ENABLE=false pi
|
|
|
702
721
|
**Network** — `--network host` shares the host network stack,
|
|
703
722
|
so the container can reach any service your host can (LAN, localhost),
|
|
704
723
|
and the host can reach services started inside the container.
|
|
705
|
-
This is required for local MCP servers,
|
|
724
|
+
This is required for local MCP servers, OpenAI-compatible proxy, and file preview
|
|
706
725
|
(agents serve generated HTML/frontend files via HTTP for browser access).
|
|
707
726
|
If your LLM provider is cloud-based, you don't use local MCPs,
|
|
708
727
|
and you don't need file preview, you can omit `--network host`.
|
|
@@ -785,15 +804,15 @@ Control your pi sessions from your phone via Discord DMs.
|
|
|
785
804
|
|
|
786
805
|
### Discord Commands
|
|
787
806
|
|
|
788
|
-
| Command
|
|
789
|
-
|
|
790
|
-
| `!sessions` | List active pi sessions
|
|
791
|
-
| `!watch N`
|
|
792
|
-
| `!status`
|
|
793
|
-
| `!abort`
|
|
794
|
-
| `!help`
|
|
795
|
-
| Any text
|
|
796
|
-
| `/command`
|
|
807
|
+
| Command | Description |
|
|
808
|
+
| ----------- | ----------------------------------- |
|
|
809
|
+
| `!sessions` | List active pi sessions |
|
|
810
|
+
| `!watch N` | Watch/switch to session N |
|
|
811
|
+
| `!status` | Show current session info |
|
|
812
|
+
| `!abort` | Abort current operation |
|
|
813
|
+
| `!help` | Show commands |
|
|
814
|
+
| Any text | Send as prompt to watched session |
|
|
815
|
+
| `/command` | Forward slash command to pi session |
|
|
797
816
|
|
|
798
817
|
### How It Works
|
|
799
818
|
|
|
@@ -823,10 +842,10 @@ See [DEVELOPMENT.md](DEVELOPMENT.md) for tips on testing extensions locally, run
|
|
|
823
842
|
|
|
824
843
|
A standalone HTTP sidecar wrapping the Pi SDK, living under `packages/pi-sidecar/`.
|
|
825
844
|
|
|
826
|
-
| Package
|
|
827
|
-
|
|
828
|
-
| `@myk-org/pi-sidecar` | TypeScript | npm
|
|
829
|
-
| `pi-sidecar-client`
|
|
845
|
+
| Package | Language | Registry |
|
|
846
|
+
| --------------------- | ---------- | -------- |
|
|
847
|
+
| `@myk-org/pi-sidecar` | TypeScript | npm |
|
|
848
|
+
| `pi-sidecar-client` | Python | PyPI |
|
|
830
849
|
|
|
831
850
|
CLI commands: `npx pi-sidecar` (start server), `npx pi-sidecar-start` (background start/stop).
|
|
832
851
|
|
|
@@ -837,9 +856,9 @@ See [`packages/pi-sidecar/CONSUMER-GUIDE.md`](packages/pi-sidecar/CONSUMER-GUIDE
|
|
|
837
856
|
|
|
838
857
|
Google Vertex AI Claude provider for Pi, living under `packages/pi-vertex-claude/`.
|
|
839
858
|
|
|
840
|
-
| Package
|
|
841
|
-
|
|
842
|
-
| `@myk-org/pi-vertex-claude` | TypeScript | npm
|
|
859
|
+
| Package | Language | Registry |
|
|
860
|
+
| --------------------------- | ---------- | -------- |
|
|
861
|
+
| `@myk-org/pi-vertex-claude` | TypeScript | npm |
|
|
843
862
|
|
|
844
863
|
See [`packages/pi-vertex-claude/README.md`](packages/pi-vertex-claude/README.md) for full documentation.
|
|
845
864
|
|
package/agents/git-expert.md
CHANGED
|
@@ -55,7 +55,36 @@ Before ANY `git commit`, if `review_loop_enforcement` is `true`:
|
|
|
55
55
|
## Protection Rules
|
|
56
56
|
|
|
57
57
|
- NEVER commit or push to main/master branch (unless `allow_push_to_protected_branches` is `true` — see Project Settings)
|
|
58
|
-
-
|
|
58
|
+
- Before every commit on a non-main/master branch, check whether that branch was merged:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
current_branch=$(git branch --show-current)
|
|
62
|
+
remote_ref="refs/remotes/origin/$current_branch"
|
|
63
|
+
default_ref=$(git symbolic-ref --quiet refs/remotes/origin/HEAD 2>/dev/null || true)
|
|
64
|
+
if ! git show-ref --verify --quiet "$default_ref"; then
|
|
65
|
+
if git show-ref --verify --quiet refs/remotes/origin/main; then
|
|
66
|
+
default_ref=refs/remotes/origin/main
|
|
67
|
+
elif git show-ref --verify --quiet refs/remotes/origin/master; then
|
|
68
|
+
default_ref=refs/remotes/origin/master
|
|
69
|
+
else
|
|
70
|
+
echo "BLOCK: cannot resolve origin's default branch"
|
|
71
|
+
exit 1
|
|
72
|
+
fi
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
if git show-ref --verify --quiet "$remote_ref" \
|
|
76
|
+
&& git merge-base --is-ancestor "$remote_ref" "$default_ref" \
|
|
77
|
+
&& [ "$(git rev-parse "$remote_ref")" != "$(git rev-parse "$default_ref")" ]; then
|
|
78
|
+
echo "BLOCK: origin/$current_branch is already merged into ${default_ref#refs/remotes/origin/}"
|
|
79
|
+
exit 1
|
|
80
|
+
fi
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Resolve the default branch from `refs/remotes/origin/HEAD`. If that symbolic ref is unavailable
|
|
84
|
+
or invalid, fall back to `refs/remotes/origin/main`, then `refs/remotes/origin/master`; block the
|
|
85
|
+
commit if neither exists. Block only when `refs/remotes/origin/<current-branch>` exists, its tip
|
|
86
|
+
is an ancestor of the resolved default tip, and the two tips are not equal. A fresh pushed branch
|
|
87
|
+
at the default tip is allowed. If the matching remote ref does not exist, continue with the commit.
|
|
59
88
|
- NEVER use `--no-verify` flag
|
|
60
89
|
- Branch prefixes: `feature/`, `fix/`, `hotfix/`, `refactor/`
|
|
61
90
|
|