@emiliosp/pi-maestro 0.7.4 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ADR.md +58 -0
- package/README.md +1 -1
- package/ROADMAP.md +113 -20
- package/docs/glossary.md +1 -0
- package/docs/workflow.md +14 -1
- package/node_modules/pi-subagents/CHANGELOG.md +140 -0
- package/node_modules/pi-subagents/README.md +1 -1
- package/node_modules/pi-subagents/agents/evidence-auditor.md +1 -0
- package/node_modules/pi-subagents/agents/oracle.md +9 -19
- package/node_modules/pi-subagents/agents/researcher.md +0 -3
- package/node_modules/pi-subagents/agents/reviewer.md +18 -61
- package/node_modules/pi-subagents/agents/scout.md +1 -4
- package/node_modules/pi-subagents/agents/worker.md +8 -25
- package/node_modules/pi-subagents/docs/agents.md +71 -4
- package/node_modules/pi-subagents/docs/configuration.md +75 -10
- package/node_modules/pi-subagents/docs/extension-api.md +40 -11
- package/node_modules/pi-subagents/docs/missions.md +24 -17
- package/node_modules/pi-subagents/docs/models.md +1 -1
- package/node_modules/pi-subagents/docs/observability.md +12 -5
- package/node_modules/pi-subagents/docs/tool-reference.md +103 -85
- package/node_modules/pi-subagents/docs/watchdog.md +8 -6
- package/node_modules/pi-subagents/docs/workflows.md +17 -8
- package/node_modules/pi-subagents/index.d.ts.map +1 -1
- package/node_modules/pi-subagents/index.js +5 -0
- package/node_modules/pi-subagents/index.js.map +1 -1
- package/node_modules/pi-subagents/package.json +2 -1
- package/node_modules/pi-subagents/prompts/council.md +1 -1
- package/node_modules/pi-subagents/skills/pi-subagents/SKILL.md +2 -2
- package/node_modules/pi-subagents/skills/pi-subagents/references/constraints-and-recipes.md +1 -1
- package/node_modules/pi-subagents/skills/pi-subagents/references/execution-controls.md +16 -16
- package/node_modules/pi-subagents/skills/pi-subagents/references/management-authoring-rpc.md +16 -12
- package/node_modules/pi-subagents/skills/pi-subagents/references/multi-lane-orchestration.md +1 -1
- package/node_modules/pi-subagents/skills/pi-subagents/references/prompting-and-roles.md +3 -3
- package/node_modules/pi-subagents/src/agents/advertised-agent-prompt.d.ts +5 -1
- package/node_modules/pi-subagents/src/agents/advertised-agent-prompt.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/agents/advertised-agent-prompt.js +8 -2
- package/node_modules/pi-subagents/src/agents/advertised-agent-prompt.js.map +1 -1
- package/node_modules/pi-subagents/src/agents/agent-management.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/agents/agent-management.js +5 -0
- package/node_modules/pi-subagents/src/agents/agent-management.js.map +1 -1
- package/node_modules/pi-subagents/src/agents/agent-scope.d.ts +1 -0
- package/node_modules/pi-subagents/src/agents/agent-scope.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/agents/agent-scope.js +3 -0
- package/node_modules/pi-subagents/src/agents/agent-scope.js.map +1 -1
- package/node_modules/pi-subagents/src/agents/agent-serializer.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/agents/agent-serializer.js +3 -0
- package/node_modules/pi-subagents/src/agents/agent-serializer.js.map +1 -1
- package/node_modules/pi-subagents/src/agents/agents.d.ts +14 -2
- package/node_modules/pi-subagents/src/agents/agents.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/agents/agents.js +94 -36
- package/node_modules/pi-subagents/src/agents/agents.js.map +1 -1
- package/node_modules/pi-subagents/src/api/external-runs.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/api/external-runs.js +5 -4
- package/node_modules/pi-subagents/src/api/external-runs.js.map +1 -1
- package/node_modules/pi-subagents/src/api/preflight.d.ts +2 -0
- package/node_modules/pi-subagents/src/api/preflight.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/api/preflight.js +7 -3
- package/node_modules/pi-subagents/src/api/preflight.js.map +1 -1
- package/node_modules/pi-subagents/src/extension/active-runs-prompt.d.ts +8 -0
- package/node_modules/pi-subagents/src/extension/active-runs-prompt.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/active-runs-prompt.js +30 -0
- package/node_modules/pi-subagents/src/extension/active-runs-prompt.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/config.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/extension/config.js +29 -2
- package/node_modules/pi-subagents/src/extension/config.js.map +1 -1
- package/node_modules/pi-subagents/src/extension/control-notices.d.ts +0 -2
- package/node_modules/pi-subagents/src/extension/control-notices.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/extension/control-notices.js +1 -7
- package/node_modules/pi-subagents/src/extension/control-notices.js.map +1 -1
- package/node_modules/pi-subagents/src/extension/declaration-pinning.d.ts +19 -0
- package/node_modules/pi-subagents/src/extension/declaration-pinning.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/declaration-pinning.js +154 -0
- package/node_modules/pi-subagents/src/extension/declaration-pinning.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/doctor.d.ts +3 -1
- package/node_modules/pi-subagents/src/extension/doctor.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/extension/doctor.js +3 -9
- package/node_modules/pi-subagents/src/extension/doctor.js.map +1 -1
- package/node_modules/pi-subagents/src/extension/fanout-child.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/extension/fanout-child.js +6 -8
- package/node_modules/pi-subagents/src/extension/fanout-child.js.map +1 -1
- package/node_modules/pi-subagents/src/extension/index.d.ts +1 -2
- package/node_modules/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/extension/index.js +121 -127
- package/node_modules/pi-subagents/src/extension/index.js.map +1 -1
- package/node_modules/pi-subagents/src/extension/rpc.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/extension/rpc.js +12 -6
- package/node_modules/pi-subagents/src/extension/rpc.js.map +1 -1
- package/node_modules/pi-subagents/src/extension/schemas.d.ts +137 -1
- package/node_modules/pi-subagents/src/extension/schemas.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/extension/schemas.js +22 -22
- package/node_modules/pi-subagents/src/extension/schemas.js.map +1 -1
- package/node_modules/pi-subagents/src/extension/subagent-guide.d.ts +1 -0
- package/node_modules/pi-subagents/src/extension/subagent-guide.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/extension/subagent-guide.js +80 -6
- package/node_modules/pi-subagents/src/extension/subagent-guide.js.map +1 -1
- package/node_modules/pi-subagents/src/extension/subagent-options.d.ts +8 -0
- package/node_modules/pi-subagents/src/extension/subagent-options.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/extension/subagent-options.js +52 -0
- package/node_modules/pi-subagents/src/extension/subagent-options.js.map +1 -0
- package/node_modules/pi-subagents/src/extension/tool-activation.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/extension/tool-activation.js +7 -4
- package/node_modules/pi-subagents/src/extension/tool-activation.js.map +1 -1
- package/node_modules/pi-subagents/src/extension/tool-description.d.ts +4 -7
- package/node_modules/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/extension/tool-description.js +45 -59
- package/node_modules/pi-subagents/src/extension/tool-description.js.map +1 -1
- package/node_modules/pi-subagents/src/inspectors/actions.d.ts +2 -0
- package/node_modules/pi-subagents/src/inspectors/actions.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/inspectors/actions.js +41 -13
- package/node_modules/pi-subagents/src/inspectors/actions.js.map +1 -1
- package/node_modules/pi-subagents/src/inspectors/plugins.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/inspectors/plugins.js +3 -2
- package/node_modules/pi-subagents/src/inspectors/plugins.js.map +1 -1
- package/node_modules/pi-subagents/src/inspectors/tmux/actions.d.ts +26 -0
- package/node_modules/pi-subagents/src/inspectors/tmux/actions.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/tmux/actions.js +182 -0
- package/node_modules/pi-subagents/src/inspectors/tmux/actions.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/tmux/client.d.ts +28 -0
- package/node_modules/pi-subagents/src/inspectors/tmux/client.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/tmux/client.js +65 -0
- package/node_modules/pi-subagents/src/inspectors/tmux/client.js.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/tmux/plugin.d.ts +8 -0
- package/node_modules/pi-subagents/src/inspectors/tmux/plugin.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/inspectors/tmux/plugin.js +15 -0
- package/node_modules/pi-subagents/src/inspectors/tmux/plugin.js.map +1 -0
- package/node_modules/pi-subagents/src/integrations/herdr-status.d.ts +0 -1
- package/node_modules/pi-subagents/src/integrations/herdr-status.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/integrations/herdr-status.js +18 -52
- package/node_modules/pi-subagents/src/integrations/herdr-status.js.map +1 -1
- package/node_modules/pi-subagents/src/integrations/program-status.d.ts +31 -0
- package/node_modules/pi-subagents/src/integrations/program-status.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/integrations/program-status.js +189 -0
- package/node_modules/pi-subagents/src/integrations/program-status.js.map +1 -0
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.d.ts +17 -1
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.js +102 -9
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -1
- package/node_modules/pi-subagents/src/intercom/result-intercom.js +1 -1
- package/node_modules/pi-subagents/src/intercom/result-intercom.js.map +1 -1
- package/node_modules/pi-subagents/src/intercom/supervisor-ui.d.ts +2 -12
- package/node_modules/pi-subagents/src/intercom/supervisor-ui.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/intercom/supervisor-ui.js +2 -154
- package/node_modules/pi-subagents/src/intercom/supervisor-ui.js.map +1 -1
- package/node_modules/pi-subagents/src/missions/store.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/missions/store.js +27 -5
- package/node_modules/pi-subagents/src/missions/store.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.d.ts +2 -1
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.js +10 -6
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/async-execution.d.ts +9 -1
- package/node_modules/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/async-execution.js +253 -144
- package/node_modules/pi-subagents/src/runs/background/async-execution.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.d.ts +4 -1
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.js +3 -2
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/async-resume.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/async-resume.js +9 -3
- package/node_modules/pi-subagents/src/runs/background/async-resume.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/await-async-run.d.ts +8 -4
- package/node_modules/pi-subagents/src/runs/background/await-async-run.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/await-async-run.js +14 -8
- package/node_modules/pi-subagents/src/runs/background/await-async-run.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/binary-bootstrap.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/binary-bootstrap.js +2 -1
- package/node_modules/pi-subagents/src/runs/background/binary-bootstrap.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.d.ts +2 -0
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.js +9 -6
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/control-channel.d.ts +1 -0
- package/node_modules/pi-subagents/src/runs/background/control-channel.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/control-channel.js +27 -3
- package/node_modules/pi-subagents/src/runs/background/control-channel.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/fleet-view.js +5 -5
- package/node_modules/pi-subagents/src/runs/background/fleet-view.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/notify.d.ts +12 -2
- package/node_modules/pi-subagents/src/runs/background/notify.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/notify.js +152 -13
- package/node_modules/pi-subagents/src/runs/background/notify.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/result-files.d.ts +29 -0
- package/node_modules/pi-subagents/src/runs/background/result-files.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/result-files.js +104 -6
- package/node_modules/pi-subagents/src/runs/background/result-files.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/result-watcher.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/result-watcher.js +60 -64
- package/node_modules/pi-subagents/src/runs/background/result-watcher.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/resume-guidance.js +2 -2
- package/node_modules/pi-subagents/src/runs/background/resume-guidance.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/run-child-session.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/run-child-session.js +9 -15
- package/node_modules/pi-subagents/src/runs/background/run-child-session.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/run-id-resolver.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/run-id-resolver.js +9 -6
- package/node_modules/pi-subagents/src/runs/background/run-id-resolver.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/run-status.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/run-status.js +19 -15
- package/node_modules/pi-subagents/src/runs/background/run-status.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/runner-aliases.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/runner-aliases.js +11 -8
- package/node_modules/pi-subagents/src/runs/background/runner-aliases.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/runner-child-launch.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/runner-child-launch.js +1 -0
- package/node_modules/pi-subagents/src/runs/background/runner-child-launch.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/runner-http-dispatcher.d.ts +3 -0
- package/node_modules/pi-subagents/src/runs/background/runner-http-dispatcher.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/runner-http-dispatcher.js +2 -0
- package/node_modules/pi-subagents/src/runs/background/runner-http-dispatcher.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.d.ts +9 -0
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.js +124 -36
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-runner-bootstrap.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-runner-bootstrap.js +5 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-runner-bootstrap.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.d.ts +3 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.js +211 -283
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.d.ts +2 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.js +34 -20
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.d.ts +1 -0
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.js +47 -1
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/wait-tool.js +36 -23
- package/node_modules/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/workflow-terminal-proof.d.ts +1 -1
- package/node_modules/pi-subagents/src/runs/background/workflow-terminal-proof.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/background/workflow-terminal-proof.js +12 -3
- package/node_modules/pi-subagents/src/runs/background/workflow-terminal-proof.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.d.ts +7 -1
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.js +55 -32
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/foreground/execution.js +101 -79
- package/node_modules/pi-subagents/src/runs/foreground/execution.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.d.ts +5 -1
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.js +184 -84
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/child-hooks.js +6 -5
- package/node_modules/pi-subagents/src/runs/shared/child-hooks.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/child-launch.d.ts +2 -0
- package/node_modules/pi-subagents/src/runs/shared/child-launch.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/child-launch.js +1 -0
- package/node_modules/pi-subagents/src/runs/shared/child-launch.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/child-session.d.ts +4 -0
- package/node_modules/pi-subagents/src/runs/shared/child-session.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/child-session.js +28 -23
- package/node_modules/pi-subagents/src/runs/shared/child-session.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/child-tool-plan.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/child-tool-plan.js +11 -10
- package/node_modules/pi-subagents/src/runs/shared/child-tool-plan.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/dynamic-fanout.js +1 -1
- package/node_modules/pi-subagents/src/runs/shared/dynamic-fanout.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/effective-system-prompt.d.ts +4 -4
- package/node_modules/pi-subagents/src/runs/shared/effective-system-prompt.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/effective-system-prompt.js +5 -4
- package/node_modules/pi-subagents/src/runs/shared/effective-system-prompt.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/external-cli-runner.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/external-cli-runner.js +3 -2
- package/node_modules/pi-subagents/src/runs/shared/external-cli-runner.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/herdr-placed-run.d.ts +1 -0
- package/node_modules/pi-subagents/src/runs/shared/herdr-placed-run.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/herdr-placed-run.js +10 -6
- package/node_modules/pi-subagents/src/runs/shared/herdr-placed-run.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/model-resolution-diagnostic.d.ts +17 -5
- package/node_modules/pi-subagents/src/runs/shared/model-resolution-diagnostic.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/model-resolution-diagnostic.js +37 -10
- package/node_modules/pi-subagents/src/runs/shared/model-resolution-diagnostic.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/model-resolution.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/model-resolution.js +29 -1
- package/node_modules/pi-subagents/src/runs/shared/model-resolution.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/nested-events.d.ts +2 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-events.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/nested-events.js +4 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-events.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/orca-progress-tabs.js +1 -1
- package/node_modules/pi-subagents/src/runs/shared/orca-progress-tabs.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/parallel-handoff.js +2 -2
- package/node_modules/pi-subagents/src/runs/shared/parallel-handoff.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/parallel-utils.d.ts +2 -0
- package/node_modules/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/partial-output.d.ts +7 -0
- package/node_modules/pi-subagents/src/runs/shared/partial-output.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/partial-output.js +7 -0
- package/node_modules/pi-subagents/src/runs/shared/partial-output.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/runner-launcher.d.ts +12 -0
- package/node_modules/pi-subagents/src/runs/shared/runner-launcher.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/runner-launcher.js +25 -0
- package/node_modules/pi-subagents/src/runs/shared/runner-launcher.js.map +1 -0
- package/node_modules/pi-subagents/src/runs/shared/single-output.d.ts +31 -1
- package/node_modules/pi-subagents/src/runs/shared/single-output.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/single-output.js +100 -21
- package/node_modules/pi-subagents/src/runs/shared/single-output.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/structured-output.d.ts +2 -0
- package/node_modules/pi-subagents/src/runs/shared/structured-output.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/structured-output.js +26 -8
- package/node_modules/pi-subagents/src/runs/shared/structured-output.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/subagent-control.js +3 -3
- package/node_modules/pi-subagents/src/runs/shared/subagent-control.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts +37 -2
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +130 -22
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/tool-budget.js +1 -1
- package/node_modules/pi-subagents/src/runs/shared/tool-budget.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/workflow-async-child-guidance.js +1 -1
- package/node_modules/pi-subagents/src/runs/shared/workflow-async-child-guidance.js.map +1 -1
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-plan.js +1 -1
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-plan.js.map +1 -1
- package/node_modules/pi-subagents/src/shared/atomic-json.d.ts +4 -3
- package/node_modules/pi-subagents/src/shared/atomic-json.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/shared/atomic-json.js +3 -1
- package/node_modules/pi-subagents/src/shared/atomic-json.js.map +1 -1
- package/node_modules/pi-subagents/src/shared/child-transcript.js +1 -1
- package/node_modules/pi-subagents/src/shared/child-transcript.js.map +1 -1
- package/node_modules/pi-subagents/src/shared/edit-distance.d.ts +5 -0
- package/node_modules/pi-subagents/src/shared/edit-distance.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/edit-distance.js +33 -0
- package/node_modules/pi-subagents/src/shared/edit-distance.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/extension-context.d.ts +5 -0
- package/node_modules/pi-subagents/src/shared/extension-context.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/shared/extension-context.js +7 -0
- package/node_modules/pi-subagents/src/shared/extension-context.js.map +1 -1
- package/node_modules/pi-subagents/src/shared/formatters.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/shared/formatters.js +1 -6
- package/node_modules/pi-subagents/src/shared/formatters.js.map +1 -1
- package/node_modules/pi-subagents/src/shared/model-info.d.ts +8 -0
- package/node_modules/pi-subagents/src/shared/model-info.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/shared/model-info.js +22 -0
- package/node_modules/pi-subagents/src/shared/model-info.js.map +1 -1
- package/node_modules/pi-subagents/src/shared/package-version.d.ts +3 -0
- package/node_modules/pi-subagents/src/shared/package-version.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/package-version.js +15 -0
- package/node_modules/pi-subagents/src/shared/package-version.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/parent-wake.d.ts +24 -0
- package/node_modules/pi-subagents/src/shared/parent-wake.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/parent-wake.js +71 -0
- package/node_modules/pi-subagents/src/shared/parent-wake.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/pruned-fork.d.ts +1 -1
- package/node_modules/pi-subagents/src/shared/pruned-fork.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/shared/pruned-fork.js +6 -0
- package/node_modules/pi-subagents/src/shared/pruned-fork.js.map +1 -1
- package/node_modules/pi-subagents/src/shared/runtime-module-path.d.ts +11 -0
- package/node_modules/pi-subagents/src/shared/runtime-module-path.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/shared/runtime-module-path.js +17 -0
- package/node_modules/pi-subagents/src/shared/runtime-module-path.js.map +1 -0
- package/node_modules/pi-subagents/src/shared/types.d.ts +33 -10
- package/node_modules/pi-subagents/src/shared/types.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/shared/types.js +7 -4
- package/node_modules/pi-subagents/src/shared/types.js.map +1 -1
- package/node_modules/pi-subagents/src/shared/utils.d.ts +2 -0
- package/node_modules/pi-subagents/src/shared/utils.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/shared/utils.js +10 -7
- package/node_modules/pi-subagents/src/shared/utils.js.map +1 -1
- package/node_modules/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/slash/slash-commands.js +21 -10
- package/node_modules/pi-subagents/src/slash/slash-commands.js.map +1 -1
- package/node_modules/pi-subagents/src/slash/subagents-admin.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/slash/subagents-admin.js +3 -1
- package/node_modules/pi-subagents/src/slash/subagents-admin.js.map +1 -1
- package/node_modules/pi-subagents/src/tui/fleet-status.d.ts +5 -0
- package/node_modules/pi-subagents/src/tui/fleet-status.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/tui/fleet-status.js +24 -3
- package/node_modules/pi-subagents/src/tui/fleet-status.js.map +1 -1
- package/node_modules/pi-subagents/src/tui/fleet-transcript.d.ts +2 -0
- package/node_modules/pi-subagents/src/tui/fleet-transcript.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/tui/fleet-transcript.js +7 -2
- package/node_modules/pi-subagents/src/tui/fleet-transcript.js.map +1 -1
- package/node_modules/pi-subagents/src/tui/fleet.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/tui/fleet.js +11 -6
- package/node_modules/pi-subagents/src/tui/fleet.js.map +1 -1
- package/node_modules/pi-subagents/src/tui/render.d.ts +2 -2
- package/node_modules/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/tui/render.js +19 -17
- package/node_modules/pi-subagents/src/tui/render.js.map +1 -1
- package/node_modules/pi-subagents/src/tui/subagent-messages.d.ts +23 -0
- package/node_modules/pi-subagents/src/tui/subagent-messages.d.ts.map +1 -0
- package/node_modules/pi-subagents/src/tui/subagent-messages.js +270 -0
- package/node_modules/pi-subagents/src/tui/subagent-messages.js.map +1 -0
- package/node_modules/pi-subagents/src/watchdog/change-signature.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/watchdog/change-signature.js +1 -3
- package/node_modules/pi-subagents/src/watchdog/change-signature.js.map +1 -1
- package/node_modules/pi-subagents/src/watchdog/register-main.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/watchdog/register-main.js +1 -19
- package/node_modules/pi-subagents/src/watchdog/register-main.js.map +1 -1
- package/node_modules/pi-subagents/src/watchdog/render.d.ts +2 -10
- package/node_modules/pi-subagents/src/watchdog/render.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/watchdog/render.js +1 -19
- package/node_modules/pi-subagents/src/watchdog/render.js.map +1 -1
- package/node_modules/pi-subagents/src/watchdog/tool-actions.js +2 -2
- package/node_modules/pi-subagents/src/watchdog/tool-actions.js.map +1 -1
- package/node_modules/pi-subagents/src/workflows/scripted-workflow.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/workflows/scripted-workflow.js +33 -10
- package/node_modules/pi-subagents/src/workflows/scripted-workflow.js.map +1 -1
- package/node_modules/pi-subagents/src/workflows/workflow-resources.d.ts.map +1 -1
- package/node_modules/pi-subagents/src/workflows/workflow-resources.js +12 -0
- package/node_modules/pi-subagents/src/workflows/workflow-resources.js.map +1 -1
- package/package.json +3 -3
- package/DESIGN_DECISIONS.md +0 -21
- package/node_modules/pi-subagents/src/runs/shared/run-history.d.ts +0 -67
- package/node_modules/pi-subagents/src/runs/shared/run-history.d.ts.map +0 -1
- package/node_modules/pi-subagents/src/runs/shared/run-history.js +0 -270
- package/node_modules/pi-subagents/src/runs/shared/run-history.js.map +0 -1
|
@@ -2,69 +2,33 @@
|
|
|
2
2
|
name: reviewer
|
|
3
3
|
description: Versatile review specialist for code diffs, plans, proposed solutions, codebase health, and PR/issue validation
|
|
4
4
|
tools: read, grep, find, ls, watchdog_diff, contact_supervisor
|
|
5
|
+
acceptanceRole: read-only
|
|
5
6
|
thinking: high
|
|
6
7
|
systemPromptMode: replace
|
|
7
8
|
inheritProjectContext: true
|
|
8
9
|
inheritSkills: false
|
|
9
10
|
---
|
|
10
11
|
|
|
11
|
-
You are a disciplined review subagent.
|
|
12
|
+
You are a disciplined review subagent. Inspect, evaluate, and report findings with evidence. Do not guess; verify from the code, tests, docs, or requirements.
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
- Tests cover the change and still pass.
|
|
20
|
-
- No unintended side effects or regressions.
|
|
21
|
-
- The change is minimal and readable.
|
|
22
|
-
|
|
23
|
-
### 2. Plans
|
|
24
|
-
Validate a proposed plan for:
|
|
25
|
-
- Feasibility and completeness.
|
|
26
|
-
- Missing steps or hidden risks.
|
|
27
|
-
- Alignment with existing architecture and constraints.
|
|
28
|
-
- Whether the scope is appropriately bounded.
|
|
29
|
-
|
|
30
|
-
### 3. Proposed solutions
|
|
31
|
-
Evaluate a suggested approach for:
|
|
32
|
-
- Correctness and tradeoffs.
|
|
33
|
-
- Fit with existing codebase patterns.
|
|
34
|
-
- Whether simpler alternatives exist.
|
|
35
|
-
- Edge cases the proposal may miss.
|
|
36
|
-
|
|
37
|
-
### 4. Current overall state of the codebase
|
|
38
|
-
Assess codebase health by inspecting key files, tests, and structure. Look for:
|
|
39
|
-
- Architecture drift or tech debt.
|
|
40
|
-
- Inconsistent patterns or naming.
|
|
41
|
-
- Areas lacking tests or documentation.
|
|
42
|
-
- Obvious bugs or fragile code.
|
|
43
|
-
- Opportunities to simplify or consolidate.
|
|
44
|
-
|
|
45
|
-
### 5. Specific PR or issue
|
|
46
|
-
Review a PR or issue by understanding the context, then verifying:
|
|
47
|
-
- The fix or feature addresses the root cause.
|
|
48
|
-
- Changes are minimal and focused.
|
|
49
|
-
- No regressions are introduced.
|
|
50
|
-
- Tests and docs are updated as needed.
|
|
14
|
+
## What to check by review type
|
|
15
|
+
- Code diffs: the implementation matches intent and requirements; it is correct and handles edge cases; tests cover the change and still pass; no unintended side effects or regressions; the change is minimal and readable.
|
|
16
|
+
- Plans: feasibility and completeness, missing steps or hidden risks, fit with existing architecture and constraints, and appropriately bounded scope.
|
|
17
|
+
- Proposed solutions: correctness and tradeoffs, fit with codebase patterns, simpler alternatives, and missed edge cases.
|
|
18
|
+
- Codebase state: architecture drift or tech debt, inconsistent patterns or naming, areas lacking tests or docs, obvious bugs or fragile code, and chances to simplify or consolidate.
|
|
19
|
+
- A specific PR or issue: understand the context, then verify the change addresses the root cause, stays minimal and focused, introduces no regressions, and updates tests and docs as needed.
|
|
51
20
|
|
|
52
21
|
## Working rules
|
|
53
|
-
- Start from the exact diff and named source seam for code-behavior review.
|
|
54
|
-
- Read the relevant files first
|
|
55
|
-
- Repo-local `progress.md` files are allowed scratch/memory files. Do not flag them as repo noise, delete them, or ask to remove them
|
|
56
|
-
-
|
|
57
|
-
- Do not use shell commands, mutate the repository, or request general Git access. Report any test command
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
- If everything looks good, say so plainly.
|
|
61
|
-
- If you are asked to maintain progress, record what you checked and what you found.
|
|
62
|
-
- If review-only or no-edit instructions conflict with progress-writing instructions, review-only/no-edit wins. Do not write `progress.md`; mention the conflict in your final review only if it matters.
|
|
22
|
+
- Start from the exact diff and named source seam for code-behavior review. Discover with specific source, symbol, type, method, and path searches. Use broad or unscoped `grep` only when exhaustive verification is required, such as checking call sites, imports, removed names, or absence of a pattern.
|
|
23
|
+
- Read the relevant files first, and the plan and progress when the task supplies them.
|
|
24
|
+
- Repo-local `progress.md` files are allowed scratch/memory files. Do not flag them as repo noise, delete them, or ask to remove them because they are untracked; in a coding repo they should stay untracked and be covered by `.gitignore`.
|
|
25
|
+
- `watchdog_diff` does not inspect committed ranges. When a task asks for one, require a supplied artifact or report that limitation rather than claiming the commit was reviewed.
|
|
26
|
+
- Do not use shell commands, mutate the repository, or request general Git access. Report any test command a supervisor must run.
|
|
27
|
+
- Prefer small corrective edits over broad rewrites in your recommendations.
|
|
28
|
+
- If asked to maintain progress, record what you checked and found. If review-only or no-edit instructions conflict with progress-writing instructions, no-edit wins: do not write `progress.md`, and mention the conflict only if it matters.
|
|
63
29
|
|
|
64
30
|
## Supervisor coordination
|
|
65
|
-
If runtime bridge instructions identify a safe supervisor target and you are blocked or need a decision, use `contact_supervisor` with `reason: "need_decision"` and wait for the reply. Do not ask for clarification when the only conflict is review-only/no-edit versus progress-writing; no-edit wins. Use `reason: "progress_update"` only for meaningful progress or
|
|
66
|
-
|
|
67
|
-
If `contact_supervisor` is unavailable, report the blocking decision in your final review. Use generic `intercom` only when an external intercom provider explicitly supplies that tool and the task identifies a safe target.
|
|
31
|
+
If runtime bridge instructions identify a safe supervisor target and you are blocked or need a decision, use `contact_supervisor` with `reason: "need_decision"` and wait for the reply. Do not ask for clarification when the only conflict is review-only/no-edit versus progress-writing; no-edit wins. Use `reason: "progress_update"` only for meaningful progress or discoveries that change the review plan. Do not send routine completion handoffs; return the completed review normally. If `contact_supervisor` is unavailable, report the blocking decision in your final review. Use generic `intercom` only when an external intercom provider explicitly supplies that tool and the task identifies a safe target.
|
|
68
32
|
|
|
69
33
|
## Review output format
|
|
70
34
|
Structure your findings clearly:
|
|
@@ -79,13 +43,6 @@ Structure your findings clearly:
|
|
|
79
43
|
|
|
80
44
|
When reviewing code, cite file paths and line numbers. When reviewing plans, cite specific sections and assumptions.
|
|
81
45
|
|
|
82
|
-
Filter findings by evidence, not by severity. Report only concrete current issues
|
|
83
|
-
within the named review target, and support each one with source proof, a test
|
|
84
|
-
or repro, or a contract contradiction. For a diff review, require that the issue
|
|
85
|
-
is caused or made reachable by that diff. Use P0 for issues
|
|
86
|
-
that block merge, P1 for issues that should be fixed before release, and P2 for
|
|
87
|
-
report-only notes. Say exactly `No issues found.` when nothing qualifies.
|
|
46
|
+
Filter findings by evidence, not by severity. Report only concrete current issues within the named review target, and support each one with source proof, a test or repro, or a contract contradiction. For a diff review, require that the issue is caused or made reachable by that diff. Use P0 for issues that block merge, P1 for issues that should be fixed before release, and P2 for report-only notes. Say exactly `No issues found.` when nothing qualifies.
|
|
88
47
|
|
|
89
|
-
Use `blockers only` only for a final pre-merge re-check after the P1/P2
|
|
90
|
-
inventory is already captured, or for an explicit emergency hotfix where the
|
|
91
|
-
parent intentionally defers non-blocking findings.
|
|
48
|
+
Use `blockers only` only for a final pre-merge re-check after the P1/P2 inventory is already captured, or for an explicit emergency hotfix where the parent intentionally defers non-blocking findings.
|
|
@@ -22,7 +22,7 @@ Focus on the minimum context another agent needs in order to act:
|
|
|
22
22
|
- constraints, risks, and open questions
|
|
23
23
|
|
|
24
24
|
Working rules:
|
|
25
|
-
-
|
|
25
|
+
- Reserve unscoped `grep` for exhaustive exact-literal verification after a scoped source/path pass.
|
|
26
26
|
- Use `bash` only for non-interactive inspection commands.
|
|
27
27
|
- When you cite code, use exact file paths and line ranges.
|
|
28
28
|
- If you are told to write output, write it to the provided path and keep the final response short.
|
|
@@ -45,6 +45,3 @@ Explain how the pieces connect.
|
|
|
45
45
|
|
|
46
46
|
## Start Here
|
|
47
47
|
Name the first file another agent should open and why.
|
|
48
|
-
|
|
49
|
-
## Supervisor coordination
|
|
50
|
-
If runtime bridge instructions identify a safe supervisor target and you are blocked or need a decision, use `contact_supervisor` with `reason: "need_decision"` and wait for the reply. Use `reason: "progress_update"` only for meaningful progress or unexpected discoveries that change the plan. Do not send routine completion handoffs; return the completed scout findings normally.
|
|
@@ -15,41 +15,24 @@ defaultProgress: true
|
|
|
15
15
|
|
|
16
16
|
You are `worker`: the implementation subagent.
|
|
17
17
|
|
|
18
|
-
You are the single writer thread.
|
|
18
|
+
You are the single writer thread. Execute the assigned task or approved direction with narrow, coherent edits. The main agent and user remain the decision authority.
|
|
19
19
|
|
|
20
|
-
Use
|
|
20
|
+
Use your tools directly. First read the provided context, supplied files, plan, task paths, and named seams; use broad search only to verify or expand from that starting point. Then implement carefully and minimally.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Your tools are a strict allowlist: you do not inherit the parent session's extension tools. Using an extension tool requires a custom agent that lists it in `tools` and loads its provider through `extensions` or `subagentOnlyExtensions`.
|
|
23
23
|
|
|
24
24
|
If the task is framed as an approved direction, oracle handoff, or execution plan, treat that direction as the contract. Validate it against the actual code, but do not silently make new product, architecture, or scope decisions.
|
|
25
25
|
|
|
26
|
-
If the implementation
|
|
27
|
-
|
|
28
|
-
Default responsibilities:
|
|
29
|
-
- validate the task or approved direction against the actual code
|
|
30
|
-
- implement the smallest correct change
|
|
31
|
-
- follow existing patterns in the codebase
|
|
32
|
-
- verify the result with appropriate checks when possible
|
|
33
|
-
- keep `progress.md` accurate when asked to maintain it
|
|
34
|
-
- report back clearly with changes, validation, risks, and next steps
|
|
26
|
+
If the implementation needs a decision that was not approved, including a gap in the approved direction, pause and escalate instead of deciding it yourself. Runtime bridge instructions, when present, are the source of truth for which supervisor to contact and how. Use `contact_supervisor` with `reason: "need_decision"` and stay alive for the reply before continuing. Use `reason: "progress_update"` only for concise non-blocking updates that help or were requested. Keep any blocked/progress update short and still return the full task result normally. If `contact_supervisor` is unavailable, stop and report the required decision in your final response. Do not send routine completion handoffs, and do not end your final response with a question the supervisor must answer before you can continue.
|
|
35
27
|
|
|
36
28
|
Working rules:
|
|
37
|
-
-
|
|
29
|
+
- Validate the task or direction against the actual code; implement the smallest correct change and follow existing patterns.
|
|
38
30
|
- Preserve source discoverability: use specific names, clear types, one spelling per concept, source-named tests, and definition comments only when they explain a needed constraint.
|
|
39
31
|
- Do not add speculative scaffolding or future-proofing unless explicitly required.
|
|
40
32
|
- Do not leave placeholder code, TODOs, or silent scope changes.
|
|
41
|
-
- Use `bash` for inspection, validation, and relevant tests.
|
|
42
|
-
-
|
|
43
|
-
- If
|
|
44
|
-
- If implementation reveals an unapproved product or architecture choice, use `contact_supervisor` with `reason: "need_decision"` and wait for the reply instead of deciding it yourself or returning a final choose-one answer.
|
|
45
|
-
- If your delegated task expects code or file edits and you have not made those edits, do not return a success summary. Make the edits, contact the supervisor if blocked, or explicitly report that no edits were made.
|
|
46
|
-
- If you send a blocked/progress update through `contact_supervisor`, keep it short and still return the full structured task result normally.
|
|
47
|
-
- Do not send routine completion handoffs. Return the completed implementation summary normally when no coordination is needed.
|
|
48
|
-
|
|
49
|
-
When running in a chain, expect instructions about:
|
|
50
|
-
- which files to read first
|
|
51
|
-
- where to maintain progress tracking
|
|
52
|
-
- where to write output if a file target is provided
|
|
33
|
+
- Use `bash` for inspection, validation, and relevant tests; verify the result when possible.
|
|
34
|
+
- Keep `progress.md` accurate when asked to maintain it.
|
|
35
|
+
- If your task expects code or file edits and you have not made them, do not return a success summary. Make the edits, contact the supervisor if blocked, or explicitly report that no edits were made.
|
|
53
36
|
|
|
54
37
|
Your final response should follow this shape:
|
|
55
38
|
|
|
@@ -31,6 +31,7 @@ Discovery notes:
|
|
|
31
31
|
- Use `subagents.agentExcludeDirs` to prune literal directory subtrees without disabling legacy agents. See [configuration.md](configuration.md#excluded-agent-directories-settings) for path resolution, scope, and exemptions.
|
|
32
32
|
- Installed Pi packages can expose agent directories from either `{"pi-subagents":{"agents":["./agents"]}}` or `{"pi":{"subagents":{"agents":["./agents"]}}}` in their package manifest. Package agents load above builtins and below user/project agents.
|
|
33
33
|
- Use `agentScope: "user" | "project" | "both"` to control discovery. `both` is the default, and project definitions win runtime-name collisions.
|
|
34
|
+
- When the session declined Pi project trust, discovery ignores project agents and chains, packages installed for the project or declared in its `package.json`, and project subagent settings, so `both` behaves as `user` and an explicit `project` scope is rejected.
|
|
34
35
|
|
|
35
36
|
## Builtin agents
|
|
36
37
|
|
|
@@ -66,6 +67,8 @@ The Pi async run remains the source of truth for status, artifacts, wake/wait, m
|
|
|
66
67
|
|
|
67
68
|
External CLI agents use their own runner contract. They are deliberate execution modes, not implicit recovery paths for a failed native `subagent` workflow. For backlog lanes and other subagent-governed workflows, switching to an external, foreground, or CLI runner requires explicit owner approval after the exact failure/run/worktree state is recorded and the worktree is verified clean or its partial diff is captured. Do not pass native Pi child options such as model override, structured output, acceptance/agent contract, tool budgets, fast mode, fork context, skills, or native Pi tools unless the adapter explicitly implements them.
|
|
68
69
|
|
|
70
|
+
#### Codex exec profiles
|
|
71
|
+
|
|
69
72
|
The built-in `codex-exec` and `codex-exec-writer` profiles are the supported Codex one-shot modes. Both require an installed and authenticated Codex CLI. The adapters own `codex exec --json` argv with ignored user config and rules, ephemeral sessions, approval policy `never`, and a final-message artifact.
|
|
70
73
|
|
|
71
74
|
| Profile | Access | Sandbox |
|
|
@@ -101,6 +104,8 @@ node --experimental-strip-types --import ./test/support/register-loader.mjs \
|
|
|
101
104
|
|
|
102
105
|
The read-only smoke must report `writeCanaryExists: false`. The writer smoke must report `writeCanaryMatches: true`. Both reports include startup duration and terminal proof without raw protocol output, prompts, or credentials.
|
|
103
106
|
|
|
107
|
+
#### Claude Code profiles
|
|
108
|
+
|
|
104
109
|
The built-in `claude-code` and `claude-code-writer` profiles are the supported Claude Code one-shot modes. Both require an installed Claude Code CLI that is already authenticated through its normal local login. Claude Code 2.1.150 needs the user setting source for normal OAuth/keychain authentication, so both adapters load user settings but exclude project and local settings. User-level Claude Code settings and hooks are therefore an operator-trusted prerequisite. Review or disable unsafe user hooks before using either profile.
|
|
105
110
|
|
|
106
111
|
| Profile | Access | Permission mode | Built-in tools |
|
|
@@ -144,6 +149,8 @@ node --experimental-strip-types --import ./test/support/register-loader.mjs \
|
|
|
144
149
|
|
|
145
150
|
Both smoke reports record `authentication: "existing-cli-required"`, `settingSources: "user"`, and `userSettingsTrust: "required"` without recording credential details. For read-only, confirm `terminalState` is `completed` and `writeCanaryExists` is `false`. For writer, confirm `terminalState` is `completed` and `writeCanaryMatches` is `true`. `durationMs` records cold process time. If authentication is missing or revoked, repair the normal local Claude Code login and rerun the smoke. Reports do not contain raw protocol output or credentials.
|
|
146
151
|
|
|
152
|
+
#### Cursor CLI profiles
|
|
153
|
+
|
|
147
154
|
The built-in `cursor-agent` and `cursor-agent-writer` profiles are the supported Cursor CLI one-shot modes. Both require an installed Cursor CLI and either `CURSOR_API_KEY` or an existing local login.
|
|
148
155
|
|
|
149
156
|
| Profile | Access | Cursor mode |
|
|
@@ -187,6 +194,8 @@ node --experimental-strip-types --import ./test/support/register-loader.mjs \
|
|
|
187
194
|
|
|
188
195
|
The read-only smoke must report `writeCanaryExists: false`. The writer smoke must report `writeCanaryMatches: true`. Both reports record `workspaceTrust: "operator-managed-saved"`, confirm that the external prompt root was added, and include startup duration and terminal proof without raw protocol output, prompts, or credentials. A trust-required error remains terminal; the harness does not retry with a trust, force, or yolo flag.
|
|
189
196
|
|
|
197
|
+
#### Native oracle compared with external advisors
|
|
198
|
+
|
|
190
199
|
Native `oracle` runs inside Pi and can use its configured read tools. The Claude profiles send the assembled prompt to the local Claude Code CLI through stdin. An external-job agent sends the assembled prompt to its registered provider. Provider options and a prompt digest are persisted in Pi run state. The prompt text is delivered through the local host bridge to the provider and is not stored in the public result payload. Do not place secrets in advisory prompts unless the target provider is approved to receive them.
|
|
191
200
|
|
|
192
201
|
### External-job state table
|
|
@@ -230,6 +239,8 @@ You can override selected agent fields without copying the whole agent. Override
|
|
|
230
239
|
|
|
231
240
|
Supported override fields: `description`, `advertise`, `machine`, `output`, `outputMode`, `defaultReads`, `model`, `defaultProvider`, `thinking`, `systemPromptMode`, `inheritProjectContext`, `inheritGlobalContext`, `inheritSkills`, `defaultContext`, `acceptanceRole`, `disabled`, `skills`, `tools`, and `systemPrompt`.
|
|
232
241
|
|
|
242
|
+
`launcher` is not a supported override field, and an override that sets it is rejected. To run a builtin under a launcher, copy it into a user agent file (for example with `eject`) and set `launcher` there.
|
|
243
|
+
|
|
233
244
|
- `description` replaces the discovered description for builtin and custom agents, which lets list output show deployment-specific routing or model metadata.
|
|
234
245
|
- Use `output: false`, `defaultReads: false`, `defaultContext: false`, `acceptanceRole: false`, or `machine: false` to clear an inherited value.
|
|
235
246
|
- Use `tools: "inherit"` when that one role should omit its bundled or frontmatter tool allowlist and receive Pi's normal builtins (plus ambient extensions when it runs as a background child).
|
|
@@ -271,15 +282,66 @@ Placed external profiles are one-shot and stop-only: they cannot steer, resume,
|
|
|
271
282
|
|
|
272
283
|
pi-subagents never clones, pulls, or checks out on the machine. Generic `external-cli` commands and managed worktrees are rejected before launch; saved-machine placement accepts native Pi and only the six code-owned external profiles.
|
|
273
284
|
|
|
285
|
+
## Sandboxing background children with a launcher
|
|
286
|
+
|
|
287
|
+
A launcher wraps an agent's background runner in a command you choose, so that agent can run in a different sandbox from the parent session. Define the command in the user config key [`runnerLaunchers`](configuration.md#runnerlaunchers), then name it in the agent file:
|
|
288
|
+
|
|
289
|
+
```yaml
|
|
290
|
+
---
|
|
291
|
+
name: researcher
|
|
292
|
+
description: Web research with network access
|
|
293
|
+
launcher: net
|
|
294
|
+
---
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
The background runner for this agent then starts as `<launcher argv> <resolved runner command>`, where the runner command is the Node or compiled Pi command pi-subagents would otherwise run directly. The child keeps native steering, supervisor questions, stop, resume, usage, and results.
|
|
298
|
+
|
|
299
|
+
How it behaves:
|
|
300
|
+
|
|
301
|
+
- **Who defines the command.** Only the user config defines what a launcher runs. An agent file, including a project agent from a cloned repository, can only name a launcher you already defined. A project agent with the same name as one of your agents can still shadow it, so your own agent files and their names are the trust boundary.
|
|
302
|
+
- **Background only.** A launcher agent runs in the background when the call omits `async`, even with `asyncByDefault: false`, and a workflow-script child that selects it runs in the background too. `async: false`, `clarify`, and `foregroundOnly` are refused, even when `forceTopLevelAsync` is set, because foreground children run inside the parent process and keep the parent's sandbox.
|
|
303
|
+
- **Not combined with other placement.** `launcher` cannot be combined with `machine` (from frontmatter, a settings override, or the call) or with an `external-cli` or `external-job` runner.
|
|
304
|
+
- **Unknown names fail.** If the name is not in `runnerLaunchers`, the launch fails before anything starts, without using a fan-out slot or creating a session directory. It never falls back to running without the launcher.
|
|
305
|
+
- **Status.** The run's `status.json` records `launcher: { name, argv }`. Environment values are never recorded.
|
|
306
|
+
- **Resume and revival.** A resumed run uses the launcher recorded when the run was first launched, not the agent file's current value, and looks up that name's argv in the config the session loaded, like a new launch does; edits to `runnerLaunchers` apply after `/reload`. A run launched without a launcher stays unwrapped even if its agent file gains `launcher` later. If the recorded name is no longer in `runnerLaunchers`, the resume fails before anything starts, and the run can be resumed once the name is defined again.
|
|
307
|
+
- **Several agents in one runner.** A new chain attached to a running subagent, or steps appended to a running chain, run in one background runner. All agents in it must name the same launcher, or none; a mix is refused before anything starts, and the error names each agent and its launcher. Appended steps must also match the launcher of the runner they join. Steps in one wrapped chain share its sandbox; to give branches different sandboxes, run them as workflow-script children, which each get their own runner.
|
|
308
|
+
- **Agent management.** `subagent({ action: "create" })` and `update` cannot set `launcher`; edit the agent file instead. Other updates keep an existing `launcher` line.
|
|
309
|
+
|
|
310
|
+
### Wrapper requirements
|
|
311
|
+
|
|
312
|
+
A launcher command must:
|
|
313
|
+
|
|
314
|
+
- run the runner command it receives, either by replacing itself with it (`exec`) or by staying attached until it exits;
|
|
315
|
+
- give the runner read and write access, at the same absolute paths, to the subagent temp root (`async-subagent-runs/`, `async-subagent-results/`, and `supervisor-channels/`; the root is `PI_SUBAGENTS_TEMP_ROOT` when set), the child session and artifact directories, the agent directory (`~/.pi/agent`, which holds auth), and the working directory, plus read access to the Pi install;
|
|
316
|
+
- allow network access to your model provider;
|
|
317
|
+
- if it filters the environment, pass through at least `HOME`, `PATH`, `TMPDIR`, every `PI_*` variable, `JITI_ALIAS`, and the API keys your provider needs.
|
|
318
|
+
|
|
319
|
+
Steering, stop, and supervisor requests and replies travel through files in those directories, not through signals, so they work as long as the paths are shared.
|
|
320
|
+
|
|
321
|
+
### Broker wrappers
|
|
322
|
+
|
|
323
|
+
Some sandboxes, such as nono's broker mode, start the runner in a separate process instead of as a child of the launcher command. pi-subagents does not rely on the launcher's process being the runner:
|
|
324
|
+
|
|
325
|
+
- Before it starts any work, the runner reports its own process id. The launch waits up to 10 seconds for it and fails if it does not arrive. `status.json` and run events use the runner's process id, not the launcher's.
|
|
326
|
+
- When the launcher process exits, its exit code and signal are kept in `launcher-close.json` in the run directory. That exit is treated as the runner's exit only when the runner's process is confirmed dead. A runner killed by a signal may be reported by the launcher as exit code `128 + n` (for example `143` for `SIGTERM`).
|
|
327
|
+
- If only the launcher process is killed while the runner keeps working, the run keeps running and still accepts steer and stop. No process-exit proof is recorded when the runner later exits, so if `maxActiveAsyncRunsPerSession` is set, the run's capacity slot stays held; the abandoned-slot policy releases it only if the run ends failed.
|
|
328
|
+
- If the sandbox does not let the parent check the runner's process id, a runner that dies without its launcher noticing stays `running` until the stale-run check marks it failed after 24 hours without a status update.
|
|
329
|
+
- A broker may end the runner when the broker's own session ends, so background runs under such a launcher may not outlive the Pi session.
|
|
330
|
+
|
|
331
|
+
### Limits
|
|
332
|
+
|
|
333
|
+
- A launcher controls where the child runs, not where its output goes. Results, transcripts, and files the child writes in shared directories are visible to the parent as usual.
|
|
334
|
+
- A launcher that submits the work elsewhere and returns immediately is not supported, because the runner must keep running and share files with the parent. For runs on another machine, use `machine:` with Herdr.
|
|
335
|
+
|
|
274
336
|
## Parent prompt discovery
|
|
275
337
|
|
|
276
338
|
Set `advertise: true` in a specialist's agent file frontmatter for parent-prompt discovery, or in `subagents.agentOverrides.<name>.advertise` when the definition must stay untouched. When the `subagent` tool is active, pi-subagents adds an agent-owned catalog of names and descriptions to the parent system prompt. Disabled agents and agents excluded by the current capability ceiling are omitted. Advertisement is not supported through runtime registration.
|
|
277
339
|
|
|
278
|
-
Advertisement is opt-in discovery, not automatic routing. The catalog is sorted by name and limited to 16 agents and 12,288 total rendered UTF-8 bytes, including XML escaping, instructions, and omission counts. Descriptions are capped at 512 UTF-8 bytes before escaping. Entries that cannot fit are omitted; canonical agent names are never truncated. The parent
|
|
340
|
+
Advertisement is opt-in discovery, not automatic routing. The catalog is sorted by name and limited to 16 agents and 12,288 total rendered UTF-8 bytes, including XML escaping, instructions, and omission counts. Descriptions are capped at 512 UTF-8 bytes before escaping. Entries that cannot fit are omitted; canonical agent names are never truncated. The parent does not need a `list` call before launching an advertised agent: a launch that names an unknown or disabled agent fails with the available agents, and an external CLI agent's runner is checked by preflight when it launches.
|
|
279
341
|
|
|
280
342
|
The file catalog snapshot refreshes at session start/reload and after extension-owned agent-management mutations. External file or settings edits require `/reload`; ordinary turns do not poll the filesystem. Tool availability and capability-ceiling filtering are checked in memory on every prompt. A failed management-triggered refresh withdraws the catalog until a successful refresh, without changing the persisted mutation's result.
|
|
281
343
|
|
|
282
|
-
The catalog is sent as Pi's `advertised_subagents` prompt section. When it changes mid-session, Pi appends it as a small system message instead of changing the system prompt, so the provider prompt cache is kept. This only works if no other loaded extension returns a replacement `systemPrompt` from `before_agent_start`; in that case Pi folds section changes back into the system prompt and the cache is lost for that request.
|
|
344
|
+
The catalog is sent as Pi's `advertised_subagents` prompt section. When it changes mid-session, Pi appends it as a small system message instead of changing the system prompt, so the provider prompt cache is kept. This only works if no other loaded extension returns a replacement `systemPrompt` from `before_agent_start`; in that case Pi folds section changes back into the system prompt and the cache is lost for that request. A resumed session keeps the catalog introduction it already recorded, so a pi-subagents upgrade that rewords the introduction does not change the section; the entries always reflect the current agents.
|
|
283
345
|
|
|
284
346
|
## Prompt assembly
|
|
285
347
|
|
|
@@ -372,6 +434,7 @@ Field notes:
|
|
|
372
434
|
| `defaultReads` | Files to read before running the agent. |
|
|
373
435
|
| `defaultProgress` | Maintain `progress.md`. |
|
|
374
436
|
| `async` | Default a single-agent launch to background (`true`) or foreground (`false`) when the call omits `async`. Explicit call values and `forceTopLevelAsync` win. |
|
|
437
|
+
| `launcher` | Name of a [`runnerLaunchers`](configuration.md#runnerlaunchers) entry that wraps this agent's background runner, such as a sandbox command. Names only; the command itself is defined in user config. See [Sandboxing background children with a launcher](#sandboxing-background-children-with-a-launcher). |
|
|
375
438
|
| `timeoutMs` | Positive integer default runtime deadline in milliseconds for single-agent launches. Foreground launches use 30 minutes when neither the call nor agent provides a timeout; explicit `timeoutMs`/`maxRuntimeMs` and agent defaults win. |
|
|
376
439
|
| `toolTimeoutMs` | Optional positive integer hard per-tool-call deadline in milliseconds. An explicit call value wins, then this agent default, global `toolTimeoutMs`, and `PI_SUBAGENT_TOOL_TIMEOUT_MS`. When omitted, known-fast built-in tools get a five-minute default; long-running tools get attention notices but no hard default. It does not extend the run-level deadline; `contact_supervisor`, `intercom`, and `bg_wait` are exempt. |
|
|
377
440
|
| `acceptance` | Acceptance default for single-agent launches. Use a scalar level such as `checked` or an inline/block YAML map such as `{ level: "none", reason: "lightweight lookup" }`. Explicit call values win; chain and parallel acceptance remains task/step configuration. |
|
|
@@ -454,7 +517,7 @@ How `tools` behaves:
|
|
|
454
517
|
|
|
455
518
|
An allowlisted name does not load the extension that registers it. Load that provider through `extensions`, `subagentOnlyExtensions`, a path-like `tools` entry, or (background children only) normal Pi extension discovery. Pi's built-in `codemode` is the exception: native children register the host SDK's official factory when codemode is permitted, without enabling it in the main session. On older Pi hosts without that factory, a child that requests codemode still reports it as unavailable; a capability ceiling that denies extensions prevents its registration.
|
|
456
519
|
|
|
457
|
-
Ambient extensions depend on where the child runs. Local foreground children are sessions inside the parent Pi process and never load the parent's ambient extensions; otherwise the parent would start a second copy of each ambient extension, including this one. Background children are sessions inside the detached runner process and load the ambient extensions unless the agent sets `extensions` or the capability ceiling denies extensions. Local foreground children do inherit the providers the parent's extensions registered (`pi.registerProvider`), so their models resolve without loading those extensions again. Pane-native remote foreground children instead use the remote machine's provider discovery and configuration. Agents that need MCP tools from an ambient adapter such as pi-mcp-adapter (including `mcp:` entries the adapter resolves) must therefore run as background children (`async: true`). A foreground launch of such an agent fails with a diagnostic that says exactly that.
|
|
520
|
+
Ambient extensions depend on where the child runs. Local foreground children are sessions inside the parent Pi process and never load the parent's ambient extensions; otherwise the parent would start a second copy of each ambient extension, including this one. Background children are sessions inside the detached runner process and load the ambient extensions unless the agent sets `extensions` or the capability ceiling denies extensions. Local foreground children do inherit the providers the parent's extensions registered (`pi.registerProvider`), so their models resolve without loading those extensions again. The child gets the provider but not the registering extension's session hooks, so a provider that relies on its own hooks (for example to record each session's system prompt) can fail the child's first request; the foreground error then says so. Use `async: true` or list that extension in the agent's `subagentOnlyExtensions` or `extensions`. Pane-native remote foreground children instead use the remote machine's provider discovery and configuration. Agents that need MCP tools from an ambient adapter such as pi-mcp-adapter (including `mcp:` entries the adapter resolves) must therefore run as background children (`async: true`). A foreground launch of such an agent fails with a diagnostic that says exactly that.
|
|
458
521
|
|
|
459
522
|
More rules:
|
|
460
523
|
|
|
@@ -472,10 +535,14 @@ Examples:
|
|
|
472
535
|
- `allowNestedSubagents: true` with `tools` omitted: normal builtin tools (and, for background children, ambient extensions) remain inherited, and the child-safe nested `subagent` runtime is added.
|
|
473
536
|
- `tools: read, fixture_search` plus `subagentOnlyExtensions: ./tools/fixture-search.ts`: the provider loads only in this agent's child sessions, and the registered `fixture_search` name survives the strict allowlist.
|
|
474
537
|
|
|
538
|
+
### MCP tools
|
|
539
|
+
|
|
475
540
|
When [pi-mcp-adapter](https://github.com/nicobailon/pi-mcp-adapter) is not installed and Pi has built-in MCP (Pi 0.99 or later), `mcp:server` and `mcp:server/tool` entries resolve against Pi's built-in MCP. Name the server and tool as the server reports them: `mcp:my-docs/get-item` selects the tool Pi registers as `mcp__my_docs__get_item`. The server part may also use the `-`→`_` form of its name that Pi's MCP namespace uses, such as `mcp:my_docs`. The child connects the servers in Pi's `mcp.json` (the project's `.pi/mcp.json` only when the parent trusts the project) and gets only the selected tools, as direct tools, whatever exposure the server is configured with; tools configured as `hidden` cannot be selected. Servers that an extension adds with `pi.registerMcpServer()` work in background children, because the registering extension loads there too. They do not work in foreground children, which load no ambient extensions, so a foreground launch that selects one fails and says to use `async: true`. The launch fails if a selected tool does not register in the child within 10 seconds.
|
|
476
541
|
|
|
477
542
|
When pi-mcp-adapter is installed, it keeps priority and provides the direct MCP tools. Subagents only receive direct MCP tools when `mcp:` entries are listed in their frontmatter; global `directTools: true` in the adapter's MCP config is not enough by itself. The generic `mcp` proxy tool can still be used for discovery when available. The adapter caches tool metadata at startup, so after connecting a new MCP server for the first time, restart Pi before relying on direct tools. Server `includeTools` and `excludeTools` policies are enforced while resolving cached metadata for children: both accept exact names and `*`/`?` glob patterns against raw, generated-resource, and server/short/mcp/none-prefixed names, with `excludeTools` taking precedence. `mcp:` entries must name servers from the adapter's configuration files. A server that exists only in the adapter's runtime snapshot (registered at runtime, not persisted) cannot be provided to a child: children are pi sessions inside the parent or the runner process, not `pi` processes that could receive an MCP config argument, so such a launch fails with an error saying that MCP tools must come from an ambient adapter extension in a background child. An `mcp:` entry named `subagent` does not authorize nested fanout; declare the builtin `subagent` tool or set `allowNestedSubagents: true`. If a resolved direct MCP name is missing from the child registry, pi-subagents keeps the launch failed under the strict allowlist and reports the registration mismatch; check the resolved names against what the host or pi-mcp-adapter actually registers before child startup.
|
|
478
543
|
|
|
544
|
+
### Extension loading
|
|
545
|
+
|
|
479
546
|
`extensions` controls child extension loading:
|
|
480
547
|
|
|
481
548
|
```yaml
|
|
@@ -546,7 +613,7 @@ Agent-local `skillPath` candidates never enter Pi's parent/global skills catalog
|
|
|
546
613
|
|
|
547
614
|
## The bundled pi-subagents skill
|
|
548
615
|
|
|
549
|
-
The package bundles a `pi-subagents` skill that is automatically available to the parent agent when the extension is installed. Availability is not automatic routing or permission to delegate: the parent works directly unless the operator requests delegation in the current request or through applicable user/project instructions. Once authorized, use the smallest bounded child or workflow whose evidence, independent review, specialization, parallelism, or isolation benefit earns its overhead. It is for the orchestrating parent only: child subagents never receive it, and
|
|
616
|
+
The package bundles a `pi-subagents` skill that is automatically available to the parent agent when the extension is installed. Availability is not automatic routing or permission to delegate: the parent works directly unless the operator requests delegation in the current request or through applicable user/project instructions. Once authorized, use the smallest bounded child or workflow whose evidence, independent review, specialization, parallelism, or isolation benefit earns its overhead. It is for the orchestrating parent only: child subagents never receive it, and a child's own context is filtered to strip parent-only orchestration instructions. A forked child keeps the history it inherited as the parent sent it, so its first request can reuse the parent's prompt cache.
|
|
550
617
|
|
|
551
618
|
What it covers:
|
|
552
619
|
|
|
@@ -80,7 +80,7 @@ A local Pi child whose selected model is a virtual model (`pi.registerVirtualMod
|
|
|
80
80
|
|
|
81
81
|
## Tool activation lifecycle
|
|
82
82
|
|
|
83
|
-
On Pi 0.86.1 or newer, when the model can take a new tool mid-conversation (see [`toolActivation`](#toolactivation)), a fresh unrestricted parent starts with `subagents_enable`, `bg_wait`, and `subagent_supervisor` active while `subagent` stays registered but inactive. Calling `subagents_enable({})` preserves unrelated active tools and exposes `subagent` on the next model request. It does not launch a child or infer authority from prompt keywords. With other models, a fresh parent starts with `subagent`, `bg_wait`, and `subagent_supervisor` active and no `subagents_enable`.
|
|
83
|
+
On Pi 0.86.1 or newer, when the model can take a new tool mid-conversation (see [`toolActivation`](#toolactivation)), a fresh unrestricted parent starts with `subagents_enable`, `bg_wait`, and `subagent_supervisor` active while `subagent` stays registered but inactive. Calling `subagents_enable({})` preserves unrelated active tools and exposes `subagent` on the next model request. It does not launch a child or infer authority from prompt keywords. With other models, a fresh parent starts with `subagent`, `bg_wait`, and `subagent_supervisor` active and no `subagents_enable`. `contact_supervisor` is active whenever `subagent` is, with the definition children use, so a forked child declares the same tools as its parent and can reuse its prompt cache; called in a session that is not a subagent, it returns an error.
|
|
84
84
|
|
|
85
85
|
The recorded native `subagent` selection is restored on resume, reload, and tree navigation, so an activated session stays activated and a cold session stays cold. With the default `toolActivation`, the recorded `subagents_enable` selection is restored too, so a session that started without the loader never gets it later. Older history without tool-selection records keeps eager `subagent` availability. If Pi's allowlist or exclusions remove the loader, the extension does not hide `subagent`; if they remove `subagent`, the loader reports it unavailable. Hosts whose extension API lacks `getAllTools`, `getActiveTools`, or `setActiveTools` keep eager behavior and log one compatibility warning. The host version is not read from disk, so in-process hosts such as pi-web activate the same way as the Pi CLI.
|
|
86
86
|
|
|
@@ -106,9 +106,17 @@ The choice is made at session start or tree navigation, and only for a session w
|
|
|
106
106
|
{ "toolDescriptionMode": "compact" }
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
Controls the parent-facing `subagent` tool description registered at startup. The default registers the
|
|
109
|
+
Controls the parent-facing `subagent` tool description registered at startup. The default registers the short execution/safety description, which states the delegation authorization rule, plus a one-line `promptSnippet`. Explicit `"compact"` uses the same description without the snippet; `"full"` adds workflow and management detail, also without the snippet. All modes retain the same flat parameter schema. Extended examples and recipes are available on demand through `action:"guide"` and the bundled pi-subagents skill; full mode is not an exhaustive manual. Count the default snippet as well as the tool definition when comparing prompt footprints.
|
|
110
110
|
|
|
111
|
-
`custom` reads `subagent-tool-description.md` from the project config directory, then from `~/.pi/agent/subagent-tool-description.md`. Missing, empty, unreadable, or oversized custom files fall back to the full description. Custom templates may use `{{fullDescription}}`, `{{compactDescription}}`, `{{safetyGuidance}}`, `{{agentDir}}`, and `{{projectConfigDir}}`; the safety guidance is always present so custom prose cannot remove the runtime guardrails. Restart Pi after changing the mode or custom file.
|
|
111
|
+
`custom` reads `subagent-tool-description.md` from the project config directory, then from `~/.pi/agent/subagent-tool-description.md`. Missing, empty, unreadable, or oversized custom files fall back to the full description. Custom templates may use `{{fullDescription}}`, `{{compactDescription}}`, `{{safetyGuidance}}`, `{{agentDir}}`, and `{{projectConfigDir}}`; the safety guidance is always present so custom prose cannot remove the runtime guardrails. Restart Pi after changing the mode or custom file. The change applies to new sessions; a resumed session keeps the tool definition and prompt text it already declared, so its prompt cache stays valid. To apply it to resumed sessions too, set [`pinToolDeclarations`](#pintooldeclarations) to `false`.
|
|
112
|
+
|
|
113
|
+
## `pinToolDeclarations`
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{ "pinToolDeclarations": false }
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Pi records each tool definition and prompt section a session declares, and declares any difference again before the next request; a changed definition makes the provider read the whole conversation again without its prompt cache. So by default (`true`) a resumed or reloaded session keeps the `subagent`, `bg_wait`, and `subagents_enable` definitions and the pi-subagents prompt text it already declared, and only a session that never declared a tool gets its current definition. With `false`, every parent session gets the current definitions (subagent children stay pinned): a long-lived session picks up an upgrade, a changed `toolDescriptionMode`, `disabledFeatures`, or an edited custom description on the next restart, and pays one cache miss on its next request. Restart Pi after changing it.
|
|
112
120
|
|
|
113
121
|
## `disabledFeatures`
|
|
114
122
|
|
|
@@ -116,7 +124,7 @@ Controls the parent-facing `subagent` tool description registered at startup. Th
|
|
|
116
124
|
{ "disabledFeatures": ["watchdog", "panes", "preflight", "lane-metadata", "gates"] }
|
|
117
125
|
```
|
|
118
126
|
|
|
119
|
-
Removes feature groups you do not use from the `subagent` tool. Each listed feature loses its parameters from the model-facing schema, and any request that still uses one of its parameters or actions fails with an error naming this setting. The check covers the parent tool, fanout-child tools, RPC, slash commands, prompt templates, scheduled launches, delegated launches, and workflow `runs.run`/`runs.all`/`runs.lanes` children, which are rejected before they launch. The built-in tool descriptions, the unknown-action list, the fanout-child tool description, and RPC `ping` no longer mention disabled features, and `{ action: "guide", topic: "tool-reference" }` starts with a notice listing what is disabled. Custom tool descriptions are not changed. Nothing is disabled by default, and the default schema and description are unchanged. An unknown or duplicate feature name fails config loading rather than silently re-enabling every feature.
|
|
127
|
+
Removes feature groups you do not use from the `subagent` tool. Each listed feature loses its top-level parameters from the model-facing schema and its `options` keys are rejected, and any request that still uses one of its parameters or actions fails with an error naming this setting. The check covers the parent tool, fanout-child tools, RPC, slash commands, prompt templates, scheduled launches, delegated launches, and workflow `runs.run`/`runs.all`/`runs.lanes` children, which are rejected before they launch. The built-in tool descriptions, the unknown-action list, the fanout-child tool description, and RPC `ping` no longer mention disabled features, and `{ action: "guide", options: { topic: "tool-reference" } }` starts with a notice listing what is disabled. Custom tool descriptions are not changed. Nothing is disabled by default, and the default schema and description are unchanged. An unknown or duplicate feature name fails config loading rather than silently re-enabling every feature.
|
|
120
128
|
|
|
121
129
|
| Feature | Parameters removed | Actions rejected |
|
|
122
130
|
|---|---|---|
|
|
@@ -136,7 +144,7 @@ Removes feature groups you do not use from the `subagent` tool. Each listed feat
|
|
|
136
144
|
| `external-machines` | `machine` | |
|
|
137
145
|
| `workflow-scripts` | `workflow`, `args`, `preflight`, `globalConcurrencyLimit`, `maxSubagentSpawnsPerRun` | `validate` |
|
|
138
146
|
|
|
139
|
-
Disabling a per-call option removes only the per-call override. Configured defaults such as `toolBudget`, `usageBudget`, and `control` in this file still apply, the watchdog still follows its own settings, missions still attach automatically when [`missions`](#missions) enables them, and agents with a `machine` in their definition still run there. Operator screens that do not go through the `subagent` executor, such as `/subagents-admin`, are unchanged. With every feature and [`scheduledRuns.enabled`](#scheduledruns) disabled, the default `subagent` tool declaration (name, description, and parameter schema as JSON) shrinks from 18,239 to 10,263 characters (80 to 41 parameters). Restart Pi after changing this setting.
|
|
147
|
+
Disabling a per-call option removes only the per-call override. Configured defaults such as `toolBudget`, `usageBudget`, and `control` in this file still apply, the watchdog still follows its own settings, missions still attach automatically when [`missions`](#missions) enables them, and agents with a `machine` in their definition still run there. Operator screens that do not go through the `subagent` executor, such as `/subagents-admin`, are unchanged. With every feature and [`scheduledRuns.enabled`](#scheduledruns) disabled, the default `subagent` tool declaration (name, description, and parameter schema as JSON) shrinks from 18,239 to 10,263 characters (80 to 41 parameters). Restart Pi after changing this setting. The smaller declaration applies to new sessions; a resumed session keeps the tool declaration it already sent, so its prompt cache stays valid. Disabled options and actions are still rejected in every session.
|
|
140
148
|
|
|
141
149
|
### Chain and tasks without workflow scripts
|
|
142
150
|
|
|
@@ -226,6 +234,25 @@ Set `enabled` to `false` (or remove the block) as a kill switch. In that state,
|
|
|
226
234
|
|
|
227
235
|
Workflow script calls use background execution when the request omits `async`. Set `asyncByDefault` to `false` to restore foreground-by-default behavior for tool launches that still use the internal single-run primitive. Callers can still force foreground with `async: false` unless `forceTopLevelAsync` is enabled.
|
|
228
236
|
|
|
237
|
+
## `runnerLaunchers`
|
|
238
|
+
|
|
239
|
+
```json
|
|
240
|
+
{
|
|
241
|
+
"runnerLaunchers": {
|
|
242
|
+
"net": ["nono", "run", "--profile", "net", "--"]
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Named command prefixes that wrap a background runner, for example to run some agents in a different sandbox from the parent. An agent selects one by name with `launcher: net` in its frontmatter; the runner then starts as `<launcher argv> <resolved runner command>`. Agents without `launcher` are unaffected.
|
|
248
|
+
|
|
249
|
+
- This key is read only from this user config file. Project settings, agent files, and tool calls cannot define a launcher command; an agent file can only name one defined here.
|
|
250
|
+
- Names must match `^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$`.
|
|
251
|
+
- Each value is a non-empty array of non-blank strings without NUL characters. It is passed to the operating system as an argument list, never through a shell, so quoting and whitespace inside an entry are kept as written.
|
|
252
|
+
- An invalid entry makes config loading fail with an error instead of falling back to defaults. If the file is not valid JSON at all, no launchers are defined, so every agent that names a launcher fails to launch.
|
|
253
|
+
|
|
254
|
+
See [Sandboxing background children with a launcher](agents.md#sandboxing-background-children-with-a-launcher) for the agent field, the requirements a wrapper must meet, and its limits.
|
|
255
|
+
|
|
229
256
|
## `defaultSubagentContext`
|
|
230
257
|
|
|
231
258
|
```json
|
|
@@ -304,6 +331,44 @@ Controls the under-editor widget for active background runs. It defaults to `tru
|
|
|
304
331
|
|
|
305
332
|
Starts each newly mounted under-editor async widget in its one-line folded state. It defaults to `false`. A header click still toggles the widget, and the folded state still resets when the widget is removed or Pi reloads.
|
|
306
333
|
|
|
334
|
+
## `asyncWidgetLayout`
|
|
335
|
+
|
|
336
|
+
```json
|
|
337
|
+
{ "asyncWidgetLayout": "rows" }
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Sets the layout of the unfolded under-editor async widget. Defaults to `"adaptive"`; valid values are `"adaptive"` and `"rows"`.
|
|
341
|
+
|
|
342
|
+
`"adaptive"` gives each run its own detail rows while the terminal has room, and switches to one line per run on a short terminal. `"rows"` shows a header line and one line per run even when the terminal has room for detail rows. It uses no more rows than the adaptive layout may: runs that do not fit are counted on a `+N more` line, and a workflow's lanes fill any rows left over. In both layouts, a header click and `asyncWidgetCollapsed` fold the widget to its count line, and Pi's expand key shows the detailed layout.
|
|
343
|
+
|
|
344
|
+
## `programStatus`
|
|
345
|
+
|
|
346
|
+
```json
|
|
347
|
+
{ "programStatus": false }
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
Reports each background run's state to the terminal with [OSC 7501, the Program Status Protocol](https://www.superlogical.com/rex/docs/build/program-status), so a terminal that supports it (Ghostty and Rex, for example) can show which runs are working, waiting on you, finished, or failed. It defaults to `true`; set it to `false` to send nothing. Terminals that don't support OSC 7501 ignore it, so turn it off only if your terminal prints unknown escape sequences.
|
|
351
|
+
|
|
352
|
+
Reports are sent only from an interactive TUI session whose standard output is a terminal and whose `TERM` is not `dumb`, and only when a record changes. `PI_PROGRAM_STATUS=0`, Pi's own switch for its OSC 7501 reports, turns these off too. Each run gets its own record under `subagents/`: `subagents/<run>` for a run, where `<run>` is the first 12 characters of its run id, and `subagents/<workflow-run>.<key>` for a background workflow child. A key made only of letters, digits, `_`, `+` and `-`, and at most 19 characters long, is used as is; any other key becomes its first 12 characters (other characters replaced by `-`) plus a short hash of the full key, so different keys never share an id. Workflow children are siblings of their workflow's record, not nested under it, so clearing a finished workflow never removes a running child. The root record belongs to Pi itself, so this extension never writes it.
|
|
353
|
+
|
|
354
|
+
| Run | Reported state |
|
|
355
|
+
|---|---|
|
|
356
|
+
| queued or running | `working` |
|
|
357
|
+
| running, with a `contact_supervisor` question the parent left unanswered when it finished its turn | `blocked` (`kind=question`) |
|
|
358
|
+
| complete | `done` |
|
|
359
|
+
| failed, partial, or rejected | `error` |
|
|
360
|
+
| stopped or paused | `idle` |
|
|
361
|
+
|
|
362
|
+
Each record's `title` is the agent names or workflow key, and its `msg` is the current tool while working, or the outcome. Neither includes the task text. Finished runs keep their `done`, `error`, or `idle` record after they leave the async widget, for as long as they are in Fleet's recent history (the last 20 finished runs). Records of runs this session no longer tracks, for example after switching sessions, are cleared. At most 64 records are shown: running and waiting runs first, then finished ones, most recently updated first; older finished records are cleared to make room. When the extension is reloaded or the session is replaced, it clears every record it sent and the new session reports the runs it still tracks. Pi 1.1 and later reports its own state on the root record and clears every record, these included, when it quits, suspends with Ctrl+Z, or opens an external editor. After a suspend, this extension sends its records again; after an external editor, each record comes back the next time it changes. Foreground runs are not reported, and tmux drops these sequences unless you configure passthrough.
|
|
363
|
+
|
|
364
|
+
## `activeRunsPrompt`
|
|
365
|
+
|
|
366
|
+
```json
|
|
367
|
+
{ "activeRunsPrompt": true }
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
Adds a short `active_subagents` section to the parent's system prompt while this session has queued or running background runs, so the model remembers work it launched earlier instead of starting it again. Off by default. Each run gets one line, for example `- <run id> researcher (chain, step 2/3)`, built from in-memory run state with no file reads; at most 10 runs are listed, then a `+N more` line. The line holds only the run id, agents, mode, and chain step (task text is redacted at launch), so the section changes only when a run starts, finishes, or moves to another chain step. Pi sends such a change as a mid-conversation system update where the provider supports it; on other providers it rebuilds the system prompt, so the prompt cache starts over on those turns. Nothing is added when no run is active.
|
|
371
|
+
|
|
307
372
|
## `waitTool`
|
|
308
373
|
|
|
309
374
|
```json
|
|
@@ -312,7 +377,7 @@ Starts each newly mounted under-editor async widget in its one-line folded state
|
|
|
312
377
|
|
|
313
378
|
`defaultTimeoutMs` sets the blocking window used when a `bg_wait` call omits `timeoutMs`; explicit call values win, followed by this setting, then the 30-minute fallback. `bg_wait` is the only registered wait tool. When the window elapses, the tool returns a non-error `window_elapsed` result with the still-active work identities, and that work keeps running. Set `enabled` to `false` to make direct calls return immediately instead of blocking. The default is enabled. You can also set `"waitTool": false`; set `PI_SUBAGENT_WAIT_TOOL_ENABLED=false` (or `0`, `off`, `disabled`) to override config for one process. The effective enabled and default-timeout values are passed explicitly to child runtimes. Headless `agent_end` auto-drain retains its own strict deadline and fails if required work remains unresolved. Invalid config or environment values fail instead of being coerced.
|
|
314
379
|
|
|
315
|
-
Blocking `bg_wait({ id: "..." })` keeps the current tool call open until that run changes. By default it returns when a run needs attention. Use `bg_wait({ stopOnAttention: false })` only for run-to-completion flows that should wait through idle or long-thinking attention; supervisor/contact requests still stop the wait. In a long-lived interactive parent session, `bg_wait({ id: "...", nonBlocking: true })` instead resolves the prefix once, persists the exact run identity, returns a subscription token immediately, and wakes that session on completion, failure, attention, reconciliation failure, or timeout. Use it for provider, detached, or other background work without a native completion notification; ordinary async subagent runs notify the parent natively and do not need a wait subscription. Armed subscriptions appear in ordinary `subagent({ action: "status" })` output and are not counted as active child work. Native completion notifications wake the session through the Pi process that launched the run, while that process is still running; a session reopened in a new process does not get that wake and should read the result with `subagent({ action: "status" })`. `nonBlocking` subscriptions need a host with a UI context, such as interactive or RPC mode; plain SDK embedding without a UI context rejects them.
|
|
380
|
+
Blocking `bg_wait({ id: "..." })` keeps the current tool call open until that run changes. By default it returns when a run needs attention. Use `bg_wait({ stopOnAttention: false })` only for run-to-completion flows that should wait through idle or long-thinking attention; supervisor/contact requests still stop the wait. A steer or follow-up the operator sends while a blocking wait is open also ends it, with a non-error `user_input` result listing the still-active work, so the message reaches the model without waiting out the window. In a long-lived interactive parent session, `bg_wait({ id: "...", nonBlocking: true })` instead resolves the prefix once, persists the exact run identity, returns a subscription token immediately, and wakes that session on completion, failure, attention, reconciliation failure, or timeout. Use it for provider, detached, or other background work without a native completion notification; ordinary async subagent runs notify the parent natively and do not need a wait subscription. Armed subscriptions appear in ordinary `subagent({ action: "status" })` output and are not counted as active child work. Native completion notifications wake the session through the Pi process that launched the run, while that process is still running; a session reopened in a new process does not get that wake and should read the result with `subagent({ action: "status" })`. `nonBlocking` subscriptions need a host with a UI context, such as interactive or RPC mode; plain SDK embedding without a UI context rejects them.
|
|
316
381
|
|
|
317
382
|
This is different from `waitTool.enabled=false`, which returns immediately without registering any future wake. Provider items remain available only to blocking fleet-wide waits; non-blocking subscriptions require one async or remembered detached foreground run id.
|
|
318
383
|
|
|
@@ -388,7 +453,7 @@ Inline or file-backed top-level workflow calls may set a positive safe-integer `
|
|
|
388
453
|
|
|
389
454
|
Optionally caps the total number of child subagent launches during one parent session, including completed and failed children, parallel task counts, static chain steps, and bounded dynamic fanout children. Sessions are unlimited by default. Set this value to `0` to disable a configured cap. `PI_SUBAGENT_MAX_SPAWNS_PER_SESSION` overrides the config for a process and follows the same positive-cap/zero-unlimited semantics.
|
|
390
455
|
|
|
391
|
-
`subagent({ action: "status" })`, fleet status, and `subagent({ action: "doctor" })` expose used, effective limit, remaining capacity, grants, and the remaining grant allowance for this budget. A user may explicitly call `subagent({ action: "grant-spawn-budget", additional: 10 })` from the root interactive parent after all children settle and confirm the native prompt. Grants are additive: they never erase cumulative usage, are rejected for unlimited sessions and child/headless callers, and total granted capacity cannot exceed the original configured cap. Compaction remains part of the same logical parent session and does not reset usage or grants; starting a new parent session does.
|
|
456
|
+
`subagent({ action: "status" })`, fleet status, and `subagent({ action: "doctor" })` expose used, effective limit, remaining capacity, grants, and the remaining grant allowance for this budget. A user may explicitly call `subagent({ action: "grant-spawn-budget", options: { additional: 10 } })` from the root interactive parent after all children settle and confirm the native prompt. Grants are additive: they never erase cumulative usage, are rejected for unlimited sessions and child/headless callers, and total granted capacity cannot exceed the original configured cap. Compaction remains part of the same logical parent session and does not reset usage or grants; starting a new parent session does.
|
|
392
457
|
|
|
393
458
|
## `maxSubagentSpawnsPerRun`
|
|
394
459
|
|
|
@@ -410,7 +475,7 @@ The budget counts single launches, expanded `tasks`/`count`, static chain steps
|
|
|
410
475
|
|
|
411
476
|
Optionally caps concurrently active top-level async runs owned by one parent session. Unset or `0` keeps the existing unlimited behavior. A positive integer reserves one slot before an async single, parallel, chain, or workflow creates run artifacts or starts children. Foreground runs and nested/workflow children do not reserve another slot.
|
|
412
477
|
|
|
413
|
-
Queued, running, paused, and needs-attention runs retain capacity. Runner-backed slots release only after terminal logical state and matching observed process-terminal proof from #1030. Missing, malformed, or unknown cleanup proof retains the slot. A terminal async workflow releases after its controller is gone and every launched child is accounted for: awaited foreground children are covered by workflow settlement, while actual background children still require observed process-terminal proof.
|
|
478
|
+
Queued, running, paused, and needs-attention runs retain capacity. Runner-backed slots release only after terminal logical state and matching observed process-terminal proof from #1030. Missing, malformed, or unknown cleanup proof retains the slot. A terminal async workflow releases after its controller is gone and every launched child is accounted for: awaited foreground children are covered by workflow settlement, while actual background children still require observed process-terminal proof. Three cases release without that proof: a run whose runner failed before child startup, recorded as `not-started` with an error; an async workflow child whose launch failed before any runner existed, recorded as a failed roster step with an error and no status or runner files in its run directory; and the abandoned-slot policy below. Resume transfers the source slot without a second charge. Dismissal and history cleanup do not release capacity.
|
|
414
479
|
|
|
415
480
|
When the runner is gone but process cleanup proof remains unknown, configure a bounded policy reclaim under `capacity.abandonedSlotReleaseAfterMs`:
|
|
416
481
|
|
|
@@ -418,9 +483,9 @@ When the runner is gone but process cleanup proof remains unknown, configure a b
|
|
|
418
483
|
{ "maxActiveAsyncRunsPerSession": 4, "capacity": { "abandonedSlotReleaseAfterMs": 1200000 } }
|
|
419
484
|
```
|
|
420
485
|
|
|
421
|
-
The default is `1200000` milliseconds (20 minutes).
|
|
486
|
+
The default is `1200000` milliseconds (20 minutes). For a top-level run, the policy releases only a failed terminal run whose runner PID is dead and whose last activity is older than the threshold (workflow children follow the rule below). A live or unknown PID, a top-level run in a non-failed terminal state, a recent run, or missing activity timestamp retains the slot. Set the value to `false` to keep strict retention. Valid configured durations range from 5 minutes through 24 hours. Policy release is reported as `abandoned-timeout` with `processProof: unknown`; it is not observed process-terminal proof and may reclaim capacity while an orphan child still exists.
|
|
422
487
|
|
|
423
|
-
A terminal workflow whose controller is gone uses the same policy when async children lack proof: the workflow must have ended longer ago than the threshold, and every async child without proof must
|
|
488
|
+
A terminal workflow whose controller is gone uses the same policy when async children lack proof: the workflow must have ended longer ago than the threshold, and every async child without proof must be a terminal run (failed, stopped, complete, partial or rejected, but not paused) with a dead runner PID in this PID namespace and old activity. A stopped or completed child counts too, because a child whose launching Pi process is gone never gets observed proof however it ended. Any other child without proof keeps the slot. The release event lists those children and their states under `abandonedChildren`.
|
|
424
489
|
|
|
425
490
|
This limit bounds current top-level async load. It is separate from cumulative `maxSubagentSpawnsPerSession`, `maxSubagentSpawnsPerRun`, and `globalConcurrencyLimit`.
|
|
426
491
|
|