@chankov/agent-fleet 0.0.5 → 0.0.6
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/.pi/extensions/agent-fleet-update-check/README.md +4 -4
- package/.pi/extensions/btw/README.md +10 -10
- package/.pi/extensions/btw/index.ts +11 -11
- package/.pi/extensions/chrome-devtools-mcp/README.md +2 -2
- package/.pi/extensions/chrome-devtools-mcp/index.ts +1 -0
- package/.pi/extensions/compact-and-continue/README.md +2 -2
- package/.pi/extensions/pi-voice-stt/README.md +7 -7
- package/.pi/extensions/pi-voice-stt/index.ts +4 -4
- package/.pi/harnesses/agent-hub/README.md +58 -58
- package/.pi/harnesses/agent-hub/backend-policy.js +1 -1
- package/.pi/harnesses/agent-hub/delegate.ts +3 -3
- package/.pi/harnesses/agent-hub/drift-watchdog.js +1 -1
- package/.pi/harnesses/agent-hub/index.ts +248 -248
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/run-budget.js +1 -1
- package/.pi/harnesses/coms/README.md +2 -2
- package/.pi/harnesses/coms/index.ts +13 -13
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/README.md +9 -9
- package/.pi/harnesses/damage-control-continue/index.ts +11 -11
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/prompts/{doctor-agent-fleet.md → af-doctor-agent-fleet.md} +1 -1
- package/.pi/prompts/{setup-agent-fleet.md → af-setup-agent-fleet.md} +1 -1
- package/.versions/0.0.6/.claude/commands/build.md +44 -0
- package/.versions/0.0.6/.claude/commands/code-simplify.md +22 -0
- package/.versions/0.0.6/.claude/commands/design-agent.md +14 -0
- package/.versions/0.0.6/.claude/commands/doctor-agent-fleet.md +17 -0
- package/.versions/0.0.6/.claude/commands/orchestrate.md +112 -0
- package/.versions/0.0.6/.claude/commands/plan.md +16 -0
- package/.versions/0.0.6/.claude/commands/prime.md +22 -0
- package/.versions/0.0.6/.claude/commands/review.md +16 -0
- package/.versions/0.0.6/.claude/commands/set-hermes-telegram.md +15 -0
- package/.versions/0.0.6/.claude/commands/setup-agent-fleet.md +25 -0
- package/.versions/0.0.6/.claude/commands/ship.md +72 -0
- package/.versions/0.0.6/.claude/commands/spec.md +15 -0
- package/.versions/0.0.6/.claude/commands/test.md +19 -0
- package/.versions/0.0.6/.claude/commands/webperf.md +32 -0
- package/.versions/0.0.6/.claude/orchestrate-teams.yaml +24 -0
- package/.versions/0.0.6/.opencode/commands/af-build.md +17 -0
- package/.versions/0.0.6/.opencode/commands/af-code-simplify.md +16 -0
- package/.versions/0.0.6/.opencode/commands/af-compound.md +16 -0
- package/.versions/0.0.6/.opencode/commands/af-design-agent.md +15 -0
- package/.versions/0.0.6/.opencode/commands/af-doctor-agent-fleet.md +17 -0
- package/.versions/0.0.6/.opencode/commands/af-orchestrate.md +112 -0
- package/.versions/0.0.6/.opencode/commands/af-plan.md +16 -0
- package/.versions/0.0.6/.opencode/commands/af-prime.md +22 -0
- package/.versions/0.0.6/.opencode/commands/af-review.md +15 -0
- package/.versions/0.0.6/.opencode/commands/af-set-hermes-telegram.md +15 -0
- package/.versions/0.0.6/.opencode/commands/af-setup-agent-fleet.md +15 -0
- package/.versions/0.0.6/.opencode/commands/af-ship.md +16 -0
- package/.versions/0.0.6/.opencode/commands/af-spec.md +16 -0
- package/.versions/0.0.6/.opencode/commands/af-test.md +21 -0
- package/.versions/0.0.6/.opencode/commands/af-webperf.md +32 -0
- package/.versions/0.0.6/.opencode/orchestrate-teams.yaml +24 -0
- package/.versions/0.0.6/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/0.0.6/.pi/agents/model-profiles.yaml +20 -0
- package/.versions/0.0.6/.pi/agents/peers.yaml +146 -0
- package/.versions/0.0.6/.pi/agents/teams.yaml +39 -0
- package/.versions/0.0.6/.pi/damage-control-rules.yaml +297 -0
- package/.versions/0.0.6/.pi/extensions/agent-fleet-update-check/README.md +58 -0
- package/.versions/0.0.6/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
- package/.versions/0.0.6/.pi/extensions/agent-fleet-update-check/package.json +6 -0
- package/.versions/0.0.6/.pi/extensions/btw/README.md +118 -0
- package/.versions/0.0.6/.pi/extensions/btw/index.ts +917 -0
- package/.versions/0.0.6/.pi/extensions/btw/package.json +6 -0
- package/.versions/0.0.6/.pi/extensions/btw/state.js +179 -0
- package/.versions/0.0.6/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
- package/.versions/0.0.6/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/0.0.6/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/0.0.6/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/0.0.6/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/0.0.6/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/0.0.6/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/0.0.6/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/0.0.6/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/0.0.6/.pi/extensions/package-lock.json +1143 -0
- package/.versions/0.0.6/.pi/extensions/package.json +9 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/README.md +201 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/0.0.6/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/README.md +798 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/artifacts.js +92 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/backend-policy.js +153 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/delegate.ts +386 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/drift-watchdog.js +165 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/footer.ts +29 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/helpers.ts +214 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/index.ts +8045 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/monitor-session-bridge.ts +11 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/research-retention.js +34 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/return-contract.js +215 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/run-budget.js +155 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/scope-gate.js +103 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/spawn.ts +246 -0
- package/.versions/0.0.6/.pi/harnesses/agent-hub/version.ts +18 -0
- package/.versions/0.0.6/.pi/harnesses/ask-user-remote/README.md +19 -0
- package/.versions/0.0.6/.pi/harnesses/ask-user-remote/index.ts +321 -0
- package/.versions/0.0.6/.pi/harnesses/ask-user-remote/race-core.js +106 -0
- package/.versions/0.0.6/.pi/harnesses/coms/README.md +92 -0
- package/.versions/0.0.6/.pi/harnesses/coms/index.ts +1745 -0
- package/.versions/0.0.6/.pi/harnesses/coms/package.json +7 -0
- package/.versions/0.0.6/.pi/harnesses/coms/version.ts +18 -0
- package/.versions/0.0.6/.pi/harnesses/damage-control-continue/README.md +117 -0
- package/.versions/0.0.6/.pi/harnesses/damage-control-continue/index.ts +536 -0
- package/.versions/0.0.6/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/0.0.6/.pi/harnesses/damage-control-continue/version.ts +18 -0
- package/.versions/0.0.6/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/0.0.6/.pi/harnesses/lib/herdr-client.ts +458 -0
- package/.versions/0.0.6/.pi/harnesses/lib/herdr-presence.ts +288 -0
- package/.versions/0.0.6/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/0.0.6/.pi/harnesses/lib/hermes-monitor-model.ts +9 -0
- package/.versions/0.0.6/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/0.0.6/.pi/harnesses/lib/hermes-monitor-socket.ts +118 -0
- package/.versions/0.0.6/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/0.0.6/.pi/harnesses/package-lock.json +35 -0
- package/.versions/0.0.6/.pi/harnesses/package.json +9 -0
- package/.versions/0.0.6/.pi/prompts/af-build.md +24 -0
- package/.versions/0.0.6/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/0.0.6/.pi/prompts/af-doctor-agent-fleet.md +15 -0
- package/.versions/0.0.6/.pi/prompts/af-plan.md +16 -0
- package/.versions/0.0.6/.pi/prompts/af-review.md +16 -0
- package/.versions/0.0.6/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/0.0.6/.pi/prompts/af-setup-agent-fleet.md +27 -0
- package/.versions/0.0.6/.pi/prompts/af-ship.md +17 -0
- package/.versions/0.0.6/.pi/prompts/af-spec.md +15 -0
- package/.versions/0.0.6/.pi/prompts/af-test.md +19 -0
- package/.versions/0.0.6/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/0.0.6/.version +1 -0
- package/.versions/0.0.6/agents/architect.md +23 -0
- package/.versions/0.0.6/agents/bowser.md +26 -0
- package/.versions/0.0.6/agents/builder.md +53 -0
- package/.versions/0.0.6/agents/code-reviewer.md +205 -0
- package/.versions/0.0.6/agents/deep-researcher.md +31 -0
- package/.versions/0.0.6/agents/documenter.md +18 -0
- package/.versions/0.0.6/agents/orchestrator.md +54 -0
- package/.versions/0.0.6/agents/plan-reviewer.md +60 -0
- package/.versions/0.0.6/agents/planner.md +69 -0
- package/.versions/0.0.6/agents/releaser.md +24 -0
- package/.versions/0.0.6/agents/researcher.md +28 -0
- package/.versions/0.0.6/agents/security-auditor.md +166 -0
- package/.versions/0.0.6/agents/test-engineer.md +151 -0
- package/.versions/0.0.6/agents/web-debugger.md +42 -0
- package/.versions/0.0.6/agents/web-performance-auditor.md +192 -0
- package/.versions/0.0.6/codex/CONDUCTOR.md +148 -0
- package/.versions/0.0.6/docs/ARCHITECTURE.md +210 -0
- package/.versions/0.0.6/docs/agent-fleet-setup.md +366 -0
- package/.versions/0.0.6/docs/claude-code-coms-bridge.md +103 -0
- package/.versions/0.0.6/docs/codex-remote-conductor.md +170 -0
- package/.versions/0.0.6/docs/coms-hermes-bridge.md +179 -0
- package/.versions/0.0.6/docs/getting-started.md +183 -0
- package/.versions/0.0.6/docs/npm-install.md +337 -0
- package/.versions/0.0.6/docs/opencode-setup.md +249 -0
- package/.versions/0.0.6/docs/pi-extensions.md +293 -0
- package/.versions/0.0.6/docs/pi-setup.md +476 -0
- package/.versions/0.0.6/docs/skill-anatomy.md +150 -0
- package/.versions/0.0.6/hermes/README.md +231 -0
- package/.versions/0.0.6/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/0.0.6/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +15 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +19 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +13 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +11 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +9 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +17 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +34 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +151 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +39 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +12 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/0.0.6/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +22 -0
- package/.versions/0.0.6/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/0.0.6/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/0.0.6/hooks/SIMPLIFY-IGNORE.md +90 -0
- package/.versions/0.0.6/hooks/coms-stop-hook.mjs +73 -0
- package/.versions/0.0.6/hooks/hooks.json +14 -0
- package/.versions/0.0.6/hooks/session-start.sh +74 -0
- package/.versions/0.0.6/hooks/simplify-ignore.sh +302 -0
- package/.versions/0.0.6/justfile +245 -0
- package/.versions/0.0.6/references/accessibility-checklist.md +160 -0
- package/.versions/0.0.6/references/definition-of-done.md +67 -0
- package/.versions/0.0.6/references/fleet-coordination-patterns.md +151 -0
- package/.versions/0.0.6/references/observability-checklist.md +91 -0
- package/.versions/0.0.6/references/orchestration-patterns.md +370 -0
- package/.versions/0.0.6/references/performance-checklist.md +153 -0
- package/.versions/0.0.6/references/prompting-patterns.md +380 -0
- package/.versions/0.0.6/references/security-checklist.md +179 -0
- package/.versions/0.0.6/references/testing-patterns.md +236 -0
- package/.versions/0.0.6/scripts/codex-conductor.ts +41 -0
- package/.versions/0.0.6/scripts/codex-remote-control.ts +167 -0
- package/.versions/0.0.6/scripts/coms-claude-bridge.ts +286 -0
- package/.versions/0.0.6/scripts/coms-cli.ts +484 -0
- package/.versions/0.0.6/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/0.0.6/scripts/fleet.ts +141 -0
- package/.versions/0.0.6/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/0.0.6/scripts/hermes-monitor-scenario.ts +7 -0
- package/.versions/0.0.6/scripts/lib/claude-bridge-core.ts +100 -0
- package/.versions/0.0.6/scripts/lib/codex-conductor.ts +88 -0
- package/.versions/0.0.6/scripts/lib/codex-remote-control.ts +480 -0
- package/.versions/0.0.6/scripts/lib/coms-envelope.ts +539 -0
- package/.versions/0.0.6/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/0.0.6/scripts/lib/fleet-command.ts +109 -0
- package/.versions/0.0.6/scripts/lib/herdr-layout.ts +263 -0
- package/.versions/0.0.6/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/0.0.6/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/0.0.6/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/0.0.6/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/0.0.6/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/0.0.6/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/0.0.6/scripts/lib/persona-banner.ts +62 -0
- package/.versions/0.0.6/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/0.0.6/scripts/lib/team-project.ts +191 -0
- package/.versions/0.0.6/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/0.0.6/scripts/peer-banner.ts +40 -0
- package/.versions/0.0.6/scripts/team-snapshot.ts +237 -0
- package/.versions/0.0.6/scripts/team-up.ts +351 -0
- package/.versions/0.0.6/skills/_internal/grilling.md +11 -0
- package/.versions/0.0.6/skills/browser-testing-with-devtools/SKILL.md +352 -0
- package/.versions/0.0.6/skills/code-review-and-quality/SKILL.md +381 -0
- package/.versions/0.0.6/skills/compound-learning/SKILL.md +137 -0
- package/.versions/0.0.6/skills/context-engineering/SKILL.md +291 -0
- package/.versions/0.0.6/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/0.0.6/skills/designing-agents/SKILL.md +394 -0
- package/.versions/0.0.6/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/0.0.6/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/0.0.6/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/0.0.6/skills/guided-workspace-setup/SKILL.md +544 -0
- package/.versions/0.0.6/skills/guided-workspace-setup/companion-manifest.json +35 -0
- package/.versions/0.0.6/skills/idea-refine/SKILL.md +182 -0
- package/.versions/0.0.6/skills/idea-refine/examples.md +238 -0
- package/.versions/0.0.6/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.0.6/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.0.6/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.0.6/skills/incremental-implementation/SKILL.md +287 -0
- package/.versions/0.0.6/skills/interview-me/SKILL.md +226 -0
- package/.versions/0.0.6/skills/orchestration-verification/SKILL.md +181 -0
- package/.versions/0.0.6/skills/peer-coms/SKILL.md +90 -0
- package/.versions/0.0.6/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.0.6/skills/planning-and-task-breakdown/SKILL.md +236 -0
- package/.versions/0.0.6/skills/security-and-hardening/SKILL.md +461 -0
- package/.versions/0.0.6/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/0.0.6/skills/using-agent-skills/SKILL.md +199 -0
- package/.versions/0.0.6/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/README.md +11 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
- package/.versions/0.0.6/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
- package/CHANGELOG.md +6 -0
- package/README.md +24 -23
- package/agents/documenter.md +1 -1
- package/agents/releaser.md +1 -1
- package/bin/cli.js +20 -20
- package/bin/lib/bootstrap.js +16 -16
- package/bin/lib/doctor.js +1 -1
- package/docs/ARCHITECTURE.md +4 -4
- package/docs/agent-fleet-setup.md +11 -11
- package/docs/coms-hermes-bridge.md +8 -8
- package/docs/npm-install.md +21 -21
- package/docs/pi-extensions.md +7 -7
- package/docs/pi-setup.md +51 -47
- package/hermes/README.md +1 -1
- package/package.json +1 -1
- package/references/fleet-coordination-patterns.md +2 -2
- package/skills/browser-testing-with-devtools/SKILL.md +1 -1
- package/skills/compound-learning/SKILL.md +3 -3
- package/skills/guided-workspace-setup/SKILL.md +16 -14
- /package/.pi/prompts/{build.md → af-build.md} +0 -0
- /package/.pi/prompts/{code-simplify.md → af-code-simplify.md} +0 -0
- /package/.pi/prompts/{plan.md → af-plan.md} +0 -0
- /package/.pi/prompts/{review.md → af-review.md} +0 -0
- /package/.pi/prompts/{set-hermes-telegram.md → af-set-hermes-telegram.md} +0 -0
- /package/.pi/prompts/{ship.md → af-ship.md} +0 -0
- /package/.pi/prompts/{spec.md → af-spec.md} +0 -0
- /package/.pi/prompts/{test.md → af-test.md} +0 -0
|
@@ -2,46 +2,46 @@
|
|
|
2
2
|
* Agent Hub — Dispatcher orchestrator + embedded coms peer-to-peer layer
|
|
3
3
|
*
|
|
4
4
|
* The merged harness (plan: docs/plans/agent-hub-multi-agent-harness.md). It is
|
|
5
|
-
* `agent-team` (dispatcher grid + per-agent model + kill/restart + /zoom +
|
|
5
|
+
* `agent-team` (dispatcher grid + per-agent model + kill/restart + /af-zoom +
|
|
6
6
|
* read-only research helpers + dispatcher persona gate) with the `coms` P2P layer
|
|
7
7
|
* EMBEDDED in the same extension — not stacked as a second `-e`, which would
|
|
8
8
|
* double-register the --name/--purpose/... CLI flags and abort startup.
|
|
9
9
|
*
|
|
10
10
|
* So the dispatcher is ALSO a coms peer: it can use another long-lived peer as a
|
|
11
11
|
* subagent (coms_send + coms_await), hand the whole session off to a peer
|
|
12
|
-
* (/handoff), and be addressed by other peers as a subagent itself. If the coms
|
|
12
|
+
* (/af-handoff), and be addressed by other peers as a subagent itself. If the coms
|
|
13
13
|
* endpoint fails to bind, the harness degrades to a coms-less dispatcher
|
|
14
14
|
* (comsReady=false withholds the coms_* tools).
|
|
15
15
|
*
|
|
16
16
|
* Commands:
|
|
17
|
-
* /agents-team — switch active team
|
|
18
|
-
* /agents-list — list loaded agents
|
|
19
|
-
* /agents-history — timeline of agent execution (durations + grand total)
|
|
20
|
-
* /agent-model <persona>[.<role>] — switch a team or research persona's (or
|
|
17
|
+
* /af-agents-team — switch active team
|
|
18
|
+
* /af-agents-list — list loaded agents
|
|
19
|
+
* /af-agents-history — timeline of agent execution (durations + grand total)
|
|
20
|
+
* /af-agent-model <persona>[.<role>] — switch a team or research persona's (or
|
|
21
21
|
* delegate sub-role's) model from its declared candidates
|
|
22
|
-
* /agent-model-thinking <persona> — switch a team or research persona's thinking
|
|
22
|
+
* /af-agent-model-thinking <persona> — switch a team or research persona's thinking
|
|
23
23
|
* level (off|minimal|low|medium|high|xhigh)
|
|
24
|
-
* /models [profile] — apply a named model profile (.pi/agents/model-profiles.yaml)
|
|
25
|
-
* /agent-models-substitute <source> <target> — swap one model across all personas
|
|
26
|
-
* /dispatch-policy — show which members route to coms peers (.pi/agents/dispatch-policy.yaml)
|
|
27
|
-
* /agents-kill <name|rN|all> — SIGTERM a frozen specialist (and its delegation
|
|
24
|
+
* /af-models [profile] — apply a named model profile (.pi/agents/model-profiles.yaml)
|
|
25
|
+
* /af-agent-models-substitute <source> <target> — swap one model across all personas
|
|
26
|
+
* /af-dispatch-policy — show which members route to coms peers (.pi/agents/dispatch-policy.yaml)
|
|
27
|
+
* /af-agents-kill <name|rN|all> — SIGTERM a frozen specialist (and its delegation
|
|
28
28
|
* tree); on a research helper it kills AND removes the
|
|
29
29
|
* card + session ("all" clears every research helper)
|
|
30
|
-
* (aliases: /research-rm rN, /research-clear)
|
|
31
|
-
* /agents-restart <name|rN> — kill + re-run its last task fresh (research: must
|
|
30
|
+
* (aliases: /af-research-rm rN, /af-research-clear)
|
|
31
|
+
* /af-agents-restart <name|rN> — kill + re-run its last task fresh (research: must
|
|
32
32
|
* be finished; runs on a fresh session)
|
|
33
|
-
* /zoom <name|rN|child> — scrollable read-only view of an agent's stream
|
|
33
|
+
* /af-zoom <name|rN|child> — scrollable read-only view of an agent's stream
|
|
34
34
|
* (team member, research helper rN, or delegate child id)
|
|
35
|
-
* /research <task> — spawn a read-only research helper (@persona, --model)
|
|
36
|
-
* /agents-cont rN ... — resume a finished research helper (alias: /research-cont)
|
|
35
|
+
* /af-research <task> — spawn a read-only research helper (@persona, --model)
|
|
36
|
+
* /af-agents-cont rN ... — resume a finished research helper (alias: /af-research-cont)
|
|
37
37
|
*
|
|
38
38
|
* Finished research helpers are auto-pruned: auto-research pipe helpers as soon
|
|
39
39
|
* as they finish (findings persist as files under findings/), manual/persona
|
|
40
40
|
* helpers beyond the `research-keep` most recent (default 4, overrides file).
|
|
41
|
-
* /persona — select/reset the dispatcher persona
|
|
42
|
-
* /handoff <peer> — hand the session off to a coms peer (summarized brief)
|
|
43
|
-
* /coms — refresh the coms peer pool (--all / --project <name>)
|
|
44
|
-
* /compound [focus] — end-of-session compound-learning pass: confirm this
|
|
41
|
+
* /af-persona — select/reset the dispatcher persona
|
|
42
|
+
* /af-handoff <peer> — hand the session off to a coms peer (summarized brief)
|
|
43
|
+
* /af-coms — refresh the coms peer pool (--all / --project <name>)
|
|
44
|
+
* /af-compound [focus] — end-of-session compound-learning pass: confirm this
|
|
45
45
|
* session's lessons with the user, then dispatch the
|
|
46
46
|
* documenter to land them in the project's rules/docs
|
|
47
47
|
*
|
|
@@ -123,7 +123,7 @@ interface AgentDef {
|
|
|
123
123
|
description: string;
|
|
124
124
|
tools: string;
|
|
125
125
|
model?: string;
|
|
126
|
-
// Allowed switch targets for /agent-model and model profiles (frontmatter
|
|
126
|
+
// Allowed switch targets for /af-agent-model and model profiles (frontmatter
|
|
127
127
|
// `models:` list). The default `model:` is implicitly a candidate too.
|
|
128
128
|
models?: string[];
|
|
129
129
|
// Mid-turn delegation (injected delegate tool): the sub-roles this persona
|
|
@@ -137,7 +137,7 @@ interface AgentDef {
|
|
|
137
137
|
// surfaced once at session start.
|
|
138
138
|
warnings?: string[];
|
|
139
139
|
kind?: string;
|
|
140
|
-
// Per-agent thinking level for `/zoom` debugging. A pi --thinking level
|
|
140
|
+
// Per-agent thinking level for `/af-zoom` debugging. A pi --thinking level
|
|
141
141
|
// (off|minimal|low|medium|high|xhigh), default off. When non-off, thinking
|
|
142
142
|
// deltas are captured into the zoom timeline.
|
|
143
143
|
thinking?: string;
|
|
@@ -157,7 +157,7 @@ interface TimelineEntry {
|
|
|
157
157
|
|
|
158
158
|
// A delegate child (or grandchild) of a dispatched specialist, reconstructed
|
|
159
159
|
// from the JSONL events delegate.ts appends to the dispatch's delegation dir.
|
|
160
|
-
// Satisfies Zoomable (def/status/timeline/zoomRender) so /zoom <child-id>
|
|
160
|
+
// Satisfies Zoomable (def/status/timeline/zoomRender) so /af-zoom <child-id>
|
|
161
161
|
// opens the same overlay specialists get; `parent` is "root" for direct
|
|
162
162
|
// children or another child's id for sub-sub-agents.
|
|
163
163
|
interface DelegationChild {
|
|
@@ -175,7 +175,7 @@ interface DelegationChild {
|
|
|
175
175
|
elapsed: number;
|
|
176
176
|
timeline: TimelineEntry[];
|
|
177
177
|
zoomRender?: (force?: boolean) => void;
|
|
178
|
-
// The /agents-history node for this delegate child, set on its spawn event so
|
|
178
|
+
// The /af-agents-history node for this delegate child, set on its spawn event so
|
|
179
179
|
// the exit event can close it. Lets a delegating specialist's row subtract the
|
|
180
180
|
// time it spent awaiting its own sub-sub-agents.
|
|
181
181
|
histEntry?: HistoryEntry;
|
|
@@ -204,32 +204,32 @@ interface AgentState {
|
|
|
204
204
|
timer?: ReturnType<typeof setInterval>;
|
|
205
205
|
// Mid-turn delegation (delegate tool). Children parsed live from the event
|
|
206
206
|
// file, keyed by child id; rendered as nested rows under the card and kept
|
|
207
|
-
// after completion for post-hoc /zoom. Reset on each dispatch.
|
|
207
|
+
// after completion for post-hoc /af-zoom. Reset on each dispatch.
|
|
208
208
|
delegations?: Map<string, DelegationChild>;
|
|
209
209
|
delegationsWatcher?: { close(): void };
|
|
210
210
|
// Kill / restart (Phase 2). The live child is stored so a frozen specialist
|
|
211
211
|
// can be SIGTERM'd. `killedByOperator` tells the close handler the exit was an
|
|
212
212
|
// operator kill (so it returns a "do not auto-retry" message instead of a
|
|
213
213
|
// normal error); `restarting` distinguishes a kill-for-restart from a plain
|
|
214
|
-
// kill; `onTerminate` lets /agents-restart await the kill before re-dispatching.
|
|
214
|
+
// kill; `onTerminate` lets /af-agents-restart await the kill before re-dispatching.
|
|
215
215
|
proc?: ChildProcess;
|
|
216
216
|
killedByOperator?: boolean;
|
|
217
217
|
restarting?: boolean;
|
|
218
218
|
onTerminate?: () => void;
|
|
219
219
|
// Zoom timeline (Phase 3). A structured, persisted record of the specialist's
|
|
220
220
|
// stream — coalesced assistant text, tool calls (name + args), and thinking
|
|
221
|
-
// deltas when the persona opts in. `/zoom` renders this; it survives completion
|
|
221
|
+
// deltas when the persona opts in. `/af-zoom` renders this; it survives completion
|
|
222
222
|
// so post-hoc zoom works without reading the session file. `zoomRender` is set
|
|
223
|
-
// while a `/zoom` overlay is open so the stream parser can refresh it live
|
|
223
|
+
// while a `/af-zoom` overlay is open so the stream parser can refresh it live
|
|
224
224
|
// (throttled; pass force=true for the final frame).
|
|
225
225
|
timeline: TimelineEntry[];
|
|
226
226
|
zoomRender?: (force?: boolean) => void;
|
|
227
|
-
// The /agents-history node for the current dispatch, so delegate children parsed
|
|
227
|
+
// The /af-agents-history node for the current dispatch, so delegate children parsed
|
|
228
228
|
// from the event file can attach to it as the root parent of their subtree.
|
|
229
229
|
histEntry?: HistoryEntry;
|
|
230
230
|
// Coms-backed dispatch (dispatch-policy.yaml): which backend served the last
|
|
231
|
-
// run, the peer's model for the card badge, and the abandon hook /agents-kill
|
|
232
|
-
// and /agents-restart use instead of a SIGTERM — the standing peer itself
|
|
231
|
+
// run, the peer's model for the card badge, and the abandon hook /af-agents-kill
|
|
232
|
+
// and /af-agents-restart use instead of a SIGTERM — the standing peer itself
|
|
233
233
|
// cannot be killed from the hub, only the wait can be released.
|
|
234
234
|
lastBackend?: "native" | "coms";
|
|
235
235
|
comsPeerModel?: string;
|
|
@@ -242,8 +242,8 @@ interface AgentState {
|
|
|
242
242
|
// construction: session files live under the same dir as team sessions and are wiped
|
|
243
243
|
// on session_start; finished helpers are auto-pruned per the retention policy
|
|
244
244
|
// (research-retention.js — auto-pipe helpers immediately, older manual ones beyond
|
|
245
|
-
// the `research-keep` cap); `/agents-kill rN` (alias `/research-rm`) kills AND
|
|
246
|
-
// removes one by hand. Resumable via `/agents-cont` (alias `/research-cont`,
|
|
245
|
+
// the `research-keep` cap); `/af-agents-kill rN` (alias `/af-research-rm`) kills AND
|
|
246
|
+
// removes one by hand. Resumable via `/af-agents-cont` (alias `/af-research-cont`,
|
|
247
247
|
// subcont-style, bumping turnCount) while retained.
|
|
248
248
|
interface ResearchState {
|
|
249
249
|
id: number;
|
|
@@ -267,7 +267,7 @@ interface ResearchState {
|
|
|
267
267
|
zoomRender?: (force?: boolean) => void;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
// The subset of state `/zoom` needs. Both AgentState (standing team) and ResearchState
|
|
270
|
+
// The subset of state `/af-zoom` needs. Both AgentState (standing team) and ResearchState
|
|
271
271
|
// (read-only helpers) satisfy it, so the same ZoomUI overlay renders either one.
|
|
272
272
|
interface Zoomable {
|
|
273
273
|
def: { name: string };
|
|
@@ -276,10 +276,10 @@ interface Zoomable {
|
|
|
276
276
|
zoomRender?: (force?: boolean) => void;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
// One node in the /agents-history tree: an orchestrator (dispatcher) turn, a
|
|
279
|
+
// One node in the /af-agents-history tree: an orchestrator (dispatcher) turn, a
|
|
280
280
|
// dispatched specialist, a research helper, or a delegate sub-sub-agent. `parent`
|
|
281
281
|
// links a node to the one that launched it (null = top level — an orchestrator
|
|
282
|
-
// turn, or a turn-less manual /research). `endedAt` is null while the node is still
|
|
282
|
+
// turn, or a turn-less manual /af-research). `endedAt` is null while the node is still
|
|
283
283
|
// running, so the overlay can tick its duration live. Parallelism is derived at
|
|
284
284
|
// render time from overlapping [startedAt, endedAt] ranges among siblings.
|
|
285
285
|
type HistoryKind = "orchestrator" | "agent" | "research" | "delegate";
|
|
@@ -296,7 +296,7 @@ interface HistoryEntry {
|
|
|
296
296
|
awaitIntervals?: Array<[number, number]>;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
// Format a millisecond duration the way /agents-history shows it: plain seconds
|
|
299
|
+
// Format a millisecond duration the way /af-agents-history shows it: plain seconds
|
|
300
300
|
// under a minute ("42sec"), m:ss above it ("10:20min" for 620s). Used for every
|
|
301
301
|
// per-agent row and the footer total.
|
|
302
302
|
function fmtDuration(ms: number): string {
|
|
@@ -398,7 +398,7 @@ function extractNeedsResearch(output: string): string[] {
|
|
|
398
398
|
// doc folders. Specialists and research helpers read the
|
|
399
399
|
// ones relevant to their task; context, not compliance.
|
|
400
400
|
// research-keep: <n>|all — how many finished manual/persona research helpers
|
|
401
|
-
// to retain for /agents-cont resume (LRU, default 4);
|
|
401
|
+
// to retain for /af-agents-cont resume (LRU, default 4);
|
|
402
402
|
// "all" disables pruning. Auto-research pipe helpers
|
|
403
403
|
// are always pruned as soon as they finish.
|
|
404
404
|
// recon-search-timeout-s: <1..3600>|off — parent-side deadline for each
|
|
@@ -768,7 +768,7 @@ function parseAgentFile(filePath: string): AgentDef | null {
|
|
|
768
768
|
// ── Thinking level + timeline helpers (Phase 3) ──
|
|
769
769
|
|
|
770
770
|
// pi --thinking levels, off→xhigh. Single source of truth for the validator, the
|
|
771
|
-
// /agent-model-thinking picker, and the display badge.
|
|
771
|
+
// /af-agent-model-thinking picker, and the display badge.
|
|
772
772
|
const THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh"] as const;
|
|
773
773
|
const VALID_THINKING_LEVELS = new Set<string>(THINKING_LEVELS);
|
|
774
774
|
|
|
@@ -1010,7 +1010,7 @@ class ZoomUI {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
|
-
// Read-only scrollable overlay for /agents-history. Renders the execution log as a
|
|
1013
|
+
// Read-only scrollable overlay for /af-agents-history. Renders the execution log as a
|
|
1014
1014
|
// timeline: orchestrator (dispatcher) turns at depth 0, the specialists they
|
|
1015
1015
|
// dispatched indented beneath, and parallel siblings deeper still with a "│→"
|
|
1016
1016
|
// connector. Every row shows a live duration; the footer carries the grand total.
|
|
@@ -1800,7 +1800,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1800
1800
|
let comsPurposeExplicit = false;
|
|
1801
1801
|
|
|
1802
1802
|
// ── Damage-control exemptions + access escalation state ──
|
|
1803
|
-
// exemptionsFile is the session-scoped shared exemptions file: /allow
|
|
1803
|
+
// exemptionsFile is the session-scoped shared exemptions file: /af-allow
|
|
1804
1804
|
// session grants (via the co-loaded damage-control-continue) and approved
|
|
1805
1805
|
// escalations land here, and spawned children read it through the
|
|
1806
1806
|
// AGENT_HUB_EXEMPTIONS_FILE env plumbing.
|
|
@@ -1822,7 +1822,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1822
1822
|
// for "all"). Ephemeral auto-pipe helpers ignore the cap: pruned on finish.
|
|
1823
1823
|
let researchKeep = DEFAULT_RESEARCH_KEEP;
|
|
1824
1824
|
|
|
1825
|
-
// ── Execution history (/agents-history) ──────────
|
|
1825
|
+
// ── Execution history (/af-agents-history) ──────────
|
|
1826
1826
|
// A tree of every dispatch: orchestrator (dispatcher) turns, the specialists they
|
|
1827
1827
|
// dispatch, research helpers, and delegate sub-sub-agents. Orchestrator entries
|
|
1828
1828
|
// are created lazily — only when a turn actually dispatches something — so
|
|
@@ -1850,7 +1850,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1850
1850
|
}
|
|
1851
1851
|
|
|
1852
1852
|
// Lazily open (and return) the orchestrator entry for the active turn. Returns
|
|
1853
|
-
// null outside a turn (e.g. a manual /research), so that helper renders as a
|
|
1853
|
+
// null outside a turn (e.g. a manual /af-research), so that helper renders as a
|
|
1854
1854
|
// top-level, turn-less row instead of attaching to a stale dispatcher entry.
|
|
1855
1855
|
function ensureOrchestratorEntry(): HistoryEntry | null {
|
|
1856
1856
|
if (!turnActive) return null;
|
|
@@ -1905,7 +1905,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1905
1905
|
let teams: Record<string, string[]> = {};
|
|
1906
1906
|
// Named model profiles from .pi/agents/model-profiles.yaml (validated at
|
|
1907
1907
|
// session start) and the session-lifetime per-persona model overrides set by
|
|
1908
|
-
// /agent-model and /models (lowercase persona name → pi model spec). Overrides
|
|
1908
|
+
// /af-agent-model and /af-models (lowercase persona name → pi model spec). Overrides
|
|
1909
1909
|
// reset on session_start; profiles make re-applying cheap.
|
|
1910
1910
|
let modelProfiles: Record<string, Record<string, string>> = {};
|
|
1911
1911
|
// Backend routing policy (.pi/agents/dispatch-policy.yaml): per dispatch, a
|
|
@@ -1921,14 +1921,14 @@ export default function (pi: ExtensionAPI) {
|
|
|
1921
1921
|
const comsMissNotified = new Set<string>();
|
|
1922
1922
|
const modelOverrides = new Map<string, string>();
|
|
1923
1923
|
// Session-lifetime per-persona thinking-level overrides set by
|
|
1924
|
-
// /agent-model-thinking (lowercase persona name → pi --thinking level). Wins
|
|
1924
|
+
// /af-agent-model-thinking (lowercase persona name → pi --thinking level). Wins
|
|
1925
1925
|
// over the persona's frontmatter `thinking:`; resets on session_start; takes
|
|
1926
|
-
// effect on the persona's next dispatch (/agents-restart applies it now).
|
|
1926
|
+
// effect on the persona's next dispatch (/af-agents-restart applies it now).
|
|
1927
1927
|
const thinkingOverrides = new Map<string, string>();
|
|
1928
1928
|
// Session-lifetime model overrides for delegate sub-roles, set by
|
|
1929
|
-
// /agent-model <persona>.<role>. Keyed "<persona>.<role>" (lowercase); applied
|
|
1929
|
+
// /af-agent-model <persona>.<role>. Keyed "<persona>.<role>" (lowercase); applied
|
|
1930
1930
|
// when the dispatch serializes AGENT_HUB_DELEGATE_CONFIG, so nested children
|
|
1931
|
-
// inherit them. Resets on session_start. /models profiles never touch these.
|
|
1931
|
+
// inherit them. Resets on session_start. /af-models profiles never touch these.
|
|
1932
1932
|
const subagentModelOverrides = new Map<string, string>();
|
|
1933
1933
|
let activeTeamName = "";
|
|
1934
1934
|
let gridCols = 2;
|
|
@@ -1938,7 +1938,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1938
1938
|
// in compact mode, so an idle session shows nothing but the prompt + footer.
|
|
1939
1939
|
let viewMode: "dashboard" | "compact" = "dashboard";
|
|
1940
1940
|
// Compact-view agent switcher: the key of the marked subagent (lowercase persona
|
|
1941
|
-
// name for team specialists, `rN` for research helpers — matching /zoom
|
|
1941
|
+
// name for team specialists, `rN` for research helpers — matching /af-zoom
|
|
1942
1942
|
// resolution), or null when nothing is marked. main is never listed (it is the
|
|
1943
1943
|
// session under the input box). Alt+]/Alt+[ move it; Alt+\ zooms it.
|
|
1944
1944
|
let markedAgent: string | null = null;
|
|
@@ -2005,7 +2005,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
2005
2005
|
// whole-run bound is separate: the turn budget's agentTurnMs (run-budget.js).
|
|
2006
2006
|
let reconSearchTimeoutMs: number | null = 120_000;
|
|
2007
2007
|
// ── Execution mode & per-turn budgets (run-budget.js) ──
|
|
2008
|
-
// hubMode: overrides-file default, switchable live via /hub-mode (session-
|
|
2008
|
+
// hubMode: overrides-file default, switchable live via /af-hub-mode (session-
|
|
2009
2009
|
// lifetime). Budgets are per USER TURN: counters reset in before_agent_start,
|
|
2010
2010
|
// so exhaustion means "stop, summarize, ask" and the next user message opens
|
|
2011
2011
|
// a fresh window. currentTurnStartedAt (above) doubles as the wall-clock base.
|
|
@@ -2018,11 +2018,11 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
2018
2018
|
// assumes DEFAULT_TASK_TIER outside strict mode. Caps = min(mode, tier).
|
|
2019
2019
|
let turnTaskTier: string | null = null;
|
|
2020
2020
|
// Duplicate-dispatch guard: fingerprints of (agent, task) already dispatched
|
|
2021
|
-
// THIS turn. Auto-research resumes and /agents-restart call dispatchAgent
|
|
2021
|
+
// THIS turn. Auto-research resumes and /af-agents-restart call dispatchAgent
|
|
2022
2022
|
// directly, so only real dispatcher tool calls are guarded.
|
|
2023
2023
|
const turnDispatchFingerprints = new Set<string>();
|
|
2024
2024
|
// ── Drift watchdog (drift-watchdog.js) ──
|
|
2025
|
-
// Hub-wide setting from the overrides file, live-switchable via /watchdog;
|
|
2025
|
+
// Hub-wide setting from the overrides file, live-switchable via /af-watchdog;
|
|
2026
2026
|
// per-agent overrides ("on"/"off") win over it; a dispatch_agent `watchdog`
|
|
2027
2027
|
// param wins over both.
|
|
2028
2028
|
let watchdogSetting: string = DEFAULT_WATCHDOG_SETTING;
|
|
@@ -2036,7 +2036,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
2036
2036
|
widgetCtx?.ui?.setStatus("hub-mode", budgetStatusLine(hubMode, { dispatches: turnDispatchCount, research: turnResearchCount }, currentBudget(), turnTaskTier));
|
|
2037
2037
|
} catch {}
|
|
2038
2038
|
}
|
|
2039
|
-
// ── Per-turn cost report (/hub-report) ──
|
|
2039
|
+
// ── Per-turn cost report (/af-hub-report) ──
|
|
2040
2040
|
interface TurnReport {
|
|
2041
2041
|
startedAt: number;
|
|
2042
2042
|
tier: string | null;
|
|
@@ -2140,7 +2140,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
2140
2140
|
}
|
|
2141
2141
|
|
|
2142
2142
|
// The raw thinking value a persona would dispatch with right now: session
|
|
2143
|
-
// override (/agent-model-thinking) → frontmatter `thinking:`. Pass through
|
|
2143
|
+
// override (/af-agent-model-thinking) → frontmatter `thinking:`. Pass through
|
|
2144
2144
|
// resolveThinkingLevel before use to get a valid pi --thinking level.
|
|
2145
2145
|
function resolvedThinking(def: AgentDef): string | undefined {
|
|
2146
2146
|
return thinkingOverrides.get(def.name.toLowerCase()) ?? def.thinking;
|
|
@@ -2148,7 +2148,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
2148
2148
|
|
|
2149
2149
|
// Resolve a model/thinking-switchable persona def by its (lowercased) name:
|
|
2150
2150
|
// a live team member's def first, then a research persona (researcher /
|
|
2151
|
-
// deep-researcher). Lets /agent-model and /agent-model-thinking target
|
|
2151
|
+
// deep-researcher). Lets /af-agent-model and /af-agent-model-thinking target
|
|
2152
2152
|
// research helpers exactly like standard team members — the override maps
|
|
2153
2153
|
// are keyed by name, so the switch is honored on the helper's next spawn.
|
|
2154
2154
|
function switchablePersonaDef(name: string): AgentDef | undefined {
|
|
@@ -2415,7 +2415,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
2415
2415
|
recomputeGrid();
|
|
2416
2416
|
}
|
|
2417
2417
|
|
|
2418
|
-
// ── Dynamic roster (add/drop/save; /agents-add, /agents-drop, team_adjust) ──
|
|
2418
|
+
// ── Dynamic roster (add/drop/save; /af-agents-add, /af-agents-drop, team_adjust) ──
|
|
2419
2419
|
// The system prompt is rebuilt every turn from agentStates, so a roster
|
|
2420
2420
|
// change takes effect on the dispatcher's next turn with no restart.
|
|
2421
2421
|
|
|
@@ -2442,7 +2442,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
2442
2442
|
return { ok: false, message: `"${name}" is not in the active team (${Array.from(agentStates.values()).map(s => s.def.name).join(", ") || "empty"})` };
|
|
2443
2443
|
}
|
|
2444
2444
|
if (state.status === "running") {
|
|
2445
|
-
return { ok: false, message: `${displayName(state.def.name)} is running — wait for it to finish or /agents-kill it first` };
|
|
2445
|
+
return { ok: false, message: `${displayName(state.def.name)} is running — wait for it to finish or /af-agents-kill it first` };
|
|
2446
2446
|
}
|
|
2447
2447
|
if (agentStates.size <= 1) {
|
|
2448
2448
|
return { ok: false, message: `${displayName(state.def.name)} is the last team member — add a replacement before dropping it` };
|
|
@@ -2813,7 +2813,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
2813
2813
|
// one line each — idle/done agents are omitted.
|
|
2814
2814
|
// Ordered list of switchable subagents for the compact-view marker: running team
|
|
2815
2815
|
// specialists then running research helpers. main is the session under the input
|
|
2816
|
-
// box, so it is never listed. Each entry's `key` matches /zoom resolution
|
|
2816
|
+
// box, so it is never listed. Each entry's `key` matches /af-zoom resolution
|
|
2817
2817
|
// (lowercase persona name for team, `rN` for research), so Alt+\ can resolve it.
|
|
2818
2818
|
function switchableAgents(): { key: string; name: string; ctx: number; ctxWarn: boolean; model: string; status: { color: string; text: string } }[] {
|
|
2819
2819
|
return [
|
|
@@ -2869,7 +2869,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
2869
2869
|
// delegate.ts (running inside the specialist) appends JSONL events to
|
|
2870
2870
|
// <sessionDir>/delegations/<agentKey>/events.jsonl. The hub tails that file
|
|
2871
2871
|
// (fs.watch for responsiveness + a 1s poll fallback) and rebuilds child
|
|
2872
|
-
// states for the nested card rows, /zoom, and the spend rollup.
|
|
2872
|
+
// states for the nested card rows, /af-zoom, and the spend rollup.
|
|
2873
2873
|
|
|
2874
2874
|
function formatTokens(n: number): string {
|
|
2875
2875
|
if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(1)}M`;
|
|
@@ -2887,7 +2887,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
2887
2887
|
if (e.t === "spawn") {
|
|
2888
2888
|
const startedAt = e.ts || Date.now();
|
|
2889
2889
|
const parentId = typeof e.parent === "string" ? e.parent : "root";
|
|
2890
|
-
// Attach to the /agents-history tree: a "root" child hangs off the
|
|
2890
|
+
// Attach to the /af-agents-history tree: a "root" child hangs off the
|
|
2891
2891
|
// specialist's own dispatch node; a deeper grandchild hangs off the
|
|
2892
2892
|
// already-recorded parent child. Falls back to the specialist node.
|
|
2893
2893
|
const parentEntry = parentId !== "root"
|
|
@@ -3085,7 +3085,7 @@ You are serving a dispatched task as a standing peer; the dispatcher only receiv
|
|
|
3085
3085
|
// best-effort
|
|
3086
3086
|
}
|
|
3087
3087
|
|
|
3088
|
-
// /agents-kill and /agents-restart on a coms-backed run only abandon the
|
|
3088
|
+
// /af-agents-kill and /af-agents-restart on a coms-backed run only abandon the
|
|
3089
3089
|
// wait — the standing peer keeps running its turn in its own pane.
|
|
3090
3090
|
let abandoned = false;
|
|
3091
3091
|
const abortPromise = new Promise<{ error: string }>(res => {
|
|
@@ -3284,7 +3284,7 @@ You are serving a dispatched task as a standing peer; the dispatcher only receiv
|
|
|
3284
3284
|
state.lastBackend = "native";
|
|
3285
3285
|
state.comsPeerModel = undefined;
|
|
3286
3286
|
|
|
3287
|
-
// Per-agent model: a session override (/agent-model, /models) wins;
|
|
3287
|
+
// Per-agent model: a session override (/af-agent-model, /af-models) wins;
|
|
3288
3288
|
// otherwise the persona's frontmatter `model:` (a full pi spec, e.g.
|
|
3289
3289
|
// anthropic/claude-opus-4-7). Falls back to the dispatcher's model.
|
|
3290
3290
|
const model = resolvedModel(state.def)
|
|
@@ -3354,7 +3354,7 @@ for decisions a human must make; use NEEDS_RESEARCH for facts that can be looked
|
|
|
3354
3354
|
// declared roles/budgets serialized into AGENT_HUB_DELEGATE_CONFIG. The
|
|
3355
3355
|
// hub pre-creates and tails the dispatch's delegation event dir for the
|
|
3356
3356
|
// nested card rows. Personas without `subagents:` spawn exactly as before.
|
|
3357
|
-
// Effective roles: each role's model replaced by its /agent-model
|
|
3357
|
+
// Effective roles: each role's model replaced by its /af-agent-model
|
|
3358
3358
|
// "<persona>.<role>" session override when one exists. Serialized into the
|
|
3359
3359
|
// delegate config, so nested children inherit the switch for free.
|
|
3360
3360
|
const subagentRoles = state.def.subagents && Object.keys(state.def.subagents).length > 0
|
|
@@ -3416,14 +3416,14 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
3416
3416
|
const appendedSystemPrompt = state.def.systemPrompt + clarificationProtocol + rulesProtocol + docsProtocol + delegationProtocol + deliverableProtocol;
|
|
3417
3417
|
|
|
3418
3418
|
// Per-agent thinking: the persona's `thinking:` frontmatter (or a
|
|
3419
|
-
// /agent-model-thinking session override) sets the pi --thinking reasoning
|
|
3420
|
-
// level. Non-off also enables thinking deltas in the JSON stream so `/zoom`
|
|
3419
|
+
// /af-agent-model-thinking session override) sets the pi --thinking reasoning
|
|
3420
|
+
// level. Non-off also enables thinking deltas in the JSON stream so `/af-zoom`
|
|
3421
3421
|
// can show the reasoning.
|
|
3422
3422
|
const thinkingLevel = resolveThinkingLevel(resolvedThinking(state.def));
|
|
3423
3423
|
const wantThinking = thinkingLevel !== "off";
|
|
3424
3424
|
|
|
3425
3425
|
// ── Drift watchdog: layer-1 rules on the live stream, judge on escalation ──
|
|
3426
|
-
// Precedence: dispatch param > per-agent /watchdog override > hub setting.
|
|
3426
|
+
// Precedence: dispatch param > per-agent /af-watchdog override > hub setting.
|
|
3427
3427
|
const watchdogArmed = resolveWatchdogActive(watchdogParam, watchdogAgentOverrides.get(key), watchdogSetting);
|
|
3428
3428
|
const driftMonitor = watchdogArmed ? createDriftMonitor({ scopeGlobs }) : null;
|
|
3429
3429
|
let driftControl: PiRunControl | undefined;
|
|
@@ -3448,7 +3448,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
3448
3448
|
|
|
3449
3449
|
// Spawn via the shared helper — first run creates the session, subsequent
|
|
3450
3450
|
// runs resume it (-c). Stream events drive the card + zoom timeline.
|
|
3451
|
-
// `detached` puts the specialist in its own process group so /agents-kill
|
|
3451
|
+
// `detached` puts the specialist in its own process group so /af-agents-kill
|
|
3452
3452
|
// can SIGTERM the whole delegation tree (killPiTree).
|
|
3453
3453
|
let fullText = "";
|
|
3454
3454
|
let runBilled = 0;
|
|
@@ -3523,7 +3523,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
3523
3523
|
state.elapsed = Date.now() - startTime;
|
|
3524
3524
|
state.proc = undefined;
|
|
3525
3525
|
// Stop tailing the delegation event file (one final drain inside close,
|
|
3526
|
-
// so trailing exit/usage events land). Child states stay for /zoom.
|
|
3526
|
+
// so trailing exit/usage events land). Child states stay for /af-zoom.
|
|
3527
3527
|
state.delegationsWatcher?.close();
|
|
3528
3528
|
state.delegationsWatcher = undefined;
|
|
3529
3529
|
|
|
@@ -3580,7 +3580,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
3580
3580
|
? `was stopped by the drift watchdog. Rule "${driftStop?.rule || "unknown"}" fired (${driftStop?.detail || "no detail"}); ` +
|
|
3581
3581
|
`judge verdict ${(driftStop?.verdict || "drifting").toUpperCase()}: ${driftStop?.reason || "(no reason given)"}. ` +
|
|
3582
3582
|
`Re-dispatch ONCE with a corrected, NARROWED task that addresses this verdict — never repeat the same task unchanged. ` +
|
|
3583
|
-
`If you believe the watchdog is wrong, tell the user; they can disable it with /watchdog ${key} off`
|
|
3583
|
+
`If you believe the watchdog is wrong, tell the user; they can disable it with /af-watchdog ${key} off`
|
|
3584
3584
|
: "was cancelled by its caller";
|
|
3585
3585
|
return {
|
|
3586
3586
|
output: `${reason}: agent ${displayName(state.def.name)} ${explanation}; terminationConfirmed=${res.termination.confirmed}.` +
|
|
@@ -3592,14 +3592,14 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
3592
3592
|
};
|
|
3593
3593
|
}
|
|
3594
3594
|
|
|
3595
|
-
// Operator kill (Phase 2). The exit was a SIGTERM from /agents-kill or
|
|
3596
|
-
// /agents-restart, not a real completion: free the card (status → idle),
|
|
3595
|
+
// Operator kill (Phase 2). The exit was a SIGTERM from /af-agents-kill or
|
|
3596
|
+
// /af-agents-restart, not a real completion: free the card (status → idle),
|
|
3597
3597
|
// fire any restart waiter, and return a message that tells the dispatcher
|
|
3598
|
-
// LLM not to auto-retry. /agents-restart handles the fresh re-dispatch.
|
|
3598
|
+
// LLM not to auto-retry. /af-agents-restart handles the fresh re-dispatch.
|
|
3599
3599
|
if (state.killedByOperator) {
|
|
3600
3600
|
await monitorStart?.then(task => monitorBridge?.finalizeChildFor(task, "operator killed run", "cancelled"));
|
|
3601
3601
|
// !! (not `=== true`): TS otherwise narrows the field to the `false`
|
|
3602
|
-
// assigned during setup — the concurrent /agents-restart mutation that
|
|
3602
|
+
// assigned during setup — the concurrent /af-agents-restart mutation that
|
|
3603
3603
|
// makes this true is invisible to the checker across the await.
|
|
3604
3604
|
const wasRestart = !!state.restarting;
|
|
3605
3605
|
state.killedByOperator = false;
|
|
@@ -3642,7 +3642,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
3642
3642
|
);
|
|
3643
3643
|
|
|
3644
3644
|
// Let a restart waiter proceed even when the agent finished naturally
|
|
3645
|
-
// between the operator's /agents-restart and the kill landing.
|
|
3645
|
+
// between the operator's /af-agents-restart and the kill landing.
|
|
3646
3646
|
const onTerminate = state.onTerminate;
|
|
3647
3647
|
state.onTerminate = undefined;
|
|
3648
3648
|
onTerminate?.();
|
|
@@ -3690,7 +3690,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
3690
3690
|
}
|
|
3691
3691
|
|
|
3692
3692
|
// Resolve the model for a research helper: an explicit --model wins, then the
|
|
3693
|
-
// persona's resolved model (session override via /agent-model → frontmatter
|
|
3693
|
+
// persona's resolved model (session override via /af-agent-model → frontmatter
|
|
3694
3694
|
// default), then the dispatcher's model (the default for anon helpers).
|
|
3695
3695
|
function resolveResearchModel(def: AgentDef, explicit: string | undefined, ctx: any): string {
|
|
3696
3696
|
if (explicit) return explicit;
|
|
@@ -3726,7 +3726,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
3726
3726
|
// handles are never resumed) and finished durable helpers beyond the
|
|
3727
3727
|
// `research-keep` most recent — so the research row doesn't grow without
|
|
3728
3728
|
// bound. Running helpers are untouched; ids stay monotonic (no handle reuse).
|
|
3729
|
-
// /agents-history is unaffected: the timeline holds its own entries.
|
|
3729
|
+
// /af-agents-history is unaffected: the timeline holds its own entries.
|
|
3730
3730
|
function pruneResearch() {
|
|
3731
3731
|
const ids = selectResearchPrunable(Array.from(researchStates.values()), researchKeep);
|
|
3732
3732
|
if (ids.length === 0) return;
|
|
@@ -3751,7 +3751,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
3751
3751
|
// Spawn (or resume) a read-only research helper. Mirrors dispatchAgent's stream
|
|
3752
3752
|
// handling but is forced read-only (RESEARCH_TOOLS), drives the research widget, and
|
|
3753
3753
|
// resolves with the findings — the CALLER decides what to do with them (the
|
|
3754
|
-
// spawn_research tool returns them inline; the /research command delivers a follow-up).
|
|
3754
|
+
// spawn_research tool returns them inline; the /af-research command delivers a follow-up).
|
|
3755
3755
|
async function spawnResearch(
|
|
3756
3756
|
state: ResearchState,
|
|
3757
3757
|
prompt: string,
|
|
@@ -3879,7 +3879,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
3879
3879
|
};
|
|
3880
3880
|
}
|
|
3881
3881
|
|
|
3882
|
-
// Operator kill (via /agents-kill rN|all or its research-* aliases).
|
|
3882
|
+
// Operator kill (via /af-agents-kill rN|all or its research-* aliases).
|
|
3883
3883
|
// Resolve gracefully so a spawn_research tool call awaiting this helper
|
|
3884
3884
|
// doesn't hang.
|
|
3885
3885
|
if (state.killedByOperator) {
|
|
@@ -3925,7 +3925,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
3925
3925
|
return { output, exitCode: code ?? 1, elapsed: state.elapsed };
|
|
3926
3926
|
}
|
|
3927
3927
|
|
|
3928
|
-
// Deliver a /research result back to the dispatcher as a follow-up turn (the human
|
|
3928
|
+
// Deliver a /af-research result back to the dispatcher as a follow-up turn (the human
|
|
3929
3929
|
// kicked it off via slash command, so there is no awaiting tool call to return to).
|
|
3930
3930
|
function deliverResearchFollowUp(state: ResearchState, result: { output: string; exitCode: number; elapsed: number }) {
|
|
3931
3931
|
const truncated = result.output.length > 8000
|
|
@@ -4403,10 +4403,10 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
4403
4403
|
|
|
4404
4404
|
// The peers currently in scope — exactly what the coms pool widget shows: live
|
|
4405
4405
|
// (pruned) registry entries in the displayed project (displayProject, or the home
|
|
4406
|
-
// project; "*" only when the human widened via /coms --project *), excluding self
|
|
4407
|
-
// and — unless /coms --all set includeExplicit — explicit peers. This is the
|
|
4406
|
+
// project; "*" only when the human widened via /af-coms --project *), excluding self
|
|
4407
|
+
// and — unless /af-coms --all set includeExplicit — explicit peers. This is the
|
|
4408
4408
|
// SECURITY BOUNDARY for every coms op: list, send, and handoff resolve only within
|
|
4409
|
-
// it. Widening it is a deliberate human action via /coms, never something the LLM
|
|
4409
|
+
// it. Widening it is a deliberate human action via /af-coms, never something the LLM
|
|
4410
4410
|
// can do on its own. Single source of truth — reused by the widget refresh, the
|
|
4411
4411
|
// handoff completions, coms_list, and resolveTarget so they can never diverge.
|
|
4412
4412
|
function peersInScope(): RegistryEntry[] {
|
|
@@ -4467,7 +4467,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
4467
4467
|
// Scoped to the connected pool only (peersInScope): you can reach exactly the
|
|
4468
4468
|
// peers the widget shows. Match by name first (preferred, human-facing), then by
|
|
4469
4469
|
// session_id. A peer outside the current scope is intentionally NOT resolved — the
|
|
4470
|
-
// human must widen scope via /coms --project / --all first. This closes the old
|
|
4470
|
+
// human must widen scope via /af-coms --project / --all first. This closes the old
|
|
4471
4471
|
// cross-project leak where a name match fell through to scanning every project.
|
|
4472
4472
|
const scope = peersInScope();
|
|
4473
4473
|
const byName = scope.find((e) => e.name === target);
|
|
@@ -4486,7 +4486,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
4486
4486
|
task: Type.String({ description: "Task description for the agent to execute" }),
|
|
4487
4487
|
artifacts: Type.Optional(Type.Array(Type.String({ description: "Optional repo-relative or session-artifact-relative input artifact path. The hub injects only path + one-line preview; the specialist must read the file itself." }))),
|
|
4488
4488
|
scope: Type.Optional(Type.Array(Type.String({ description: "Optional advisory file scope globs for writable agents. Changes outside are reported in details.scopeViolations; nothing is auto-reverted. Also arms the drift watchdog's live out-of-scope rule." }))),
|
|
4489
|
-
watchdog: Type.Optional(Type.Boolean({ description: "Force the drift watchdog on/off for THIS dispatch (default: per-agent /watchdog override, then the hub-wide setting)." })),
|
|
4489
|
+
watchdog: Type.Optional(Type.Boolean({ description: "Force the drift watchdog on/off for THIS dispatch (default: per-agent /af-watchdog override, then the hub-wide setting)." })),
|
|
4490
4490
|
}),
|
|
4491
4491
|
|
|
4492
4492
|
async execute(_toolCallId, params, _signal, onUpdate, ctx) {
|
|
@@ -4669,7 +4669,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
4669
4669
|
|
|
4670
4670
|
const returnPathNotice = returnPath ? `\n\nFull specialist output: ${returnPath}` : "";
|
|
4671
4671
|
const contextNotice = state && contextPressure(state.contextPct)
|
|
4672
|
-
? `\n\n⚠ ${displayName(state.def.name)} context at ${Math.ceil(state.contextPct)}% — consider /agents-restart ${state.def.name} (state lives in the artifacts/ledger, a restart is cheap).`
|
|
4672
|
+
? `\n\n⚠ ${displayName(state.def.name)} context at ${Math.ceil(state.contextPct)}% — consider /af-agents-restart ${state.def.name} (state lives in the artifacts/ledger, a restart is cheap).`
|
|
4673
4673
|
: "";
|
|
4674
4674
|
const scopeNotice = scopeNoticeText(scopeViolations);
|
|
4675
4675
|
const contractNotice = contractNoticeText(contractNotices);
|
|
@@ -4777,7 +4777,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
4777
4777
|
const { task, persona, model, artifacts } = params as { task: string; persona?: string; model?: string; artifacts?: string[] };
|
|
4778
4778
|
|
|
4779
4779
|
// Turn-budget gate (dispatcher-initiated research only — the auto-research
|
|
4780
|
-
// pipe and the /research command are exempt).
|
|
4780
|
+
// pipe and the /af-research command are exempt).
|
|
4781
4781
|
const budgetRefusal = checkTurnBudget(
|
|
4782
4782
|
"research",
|
|
4783
4783
|
{ dispatches: turnDispatchCount, research: turnResearchCount },
|
|
@@ -4952,7 +4952,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
4952
4952
|
name: "team_adjust",
|
|
4953
4953
|
label: "Team Adjust",
|
|
4954
4954
|
description:
|
|
4955
|
-
"Add or drop a specialist persona in the ACTIVE team (the roster you can dispatch to). Use sparingly, when the current roster genuinely cannot serve the task (e.g. add security-auditor for a security-sensitive change, drop an unused specialist). Not available in fast mode. The human sees every change and can revert with /agents-add
|
|
4955
|
+
"Add or drop a specialist persona in the ACTIVE team (the roster you can dispatch to). Use sparingly, when the current roster genuinely cannot serve the task (e.g. add security-auditor for a security-sensitive change, drop an unused specialist). Not available in fast mode. The human sees every change and can revert with /af-agents-add /af-agents-drop.",
|
|
4956
4956
|
parameters: Type.Object({
|
|
4957
4957
|
action: Type.String({ description: "add | drop" }),
|
|
4958
4958
|
agent: Type.String({ description: "Persona name (case-insensitive), e.g. security-auditor" }),
|
|
@@ -4963,7 +4963,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
4963
4963
|
const act = String(action || "").trim().toLowerCase();
|
|
4964
4964
|
if (hubMode === "fast") {
|
|
4965
4965
|
return {
|
|
4966
|
-
content: [{ type: "text" as const, text: "team_adjust is disabled in fast mode — a single-specialist path never needs roster changes. Ask the user to /hub-mode standard if the task outgrew fast mode." }],
|
|
4966
|
+
content: [{ type: "text" as const, text: "team_adjust is disabled in fast mode — a single-specialist path never needs roster changes. Ask the user to /af-hub-mode standard if the task outgrew fast mode." }],
|
|
4967
4967
|
details: { status: "refused" },
|
|
4968
4968
|
};
|
|
4969
4969
|
}
|
|
@@ -4972,7 +4972,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
4972
4972
|
}
|
|
4973
4973
|
if (act === "add" && agentStates.size >= TEAM_ADJUST_ROSTER_CAP) {
|
|
4974
4974
|
return {
|
|
4975
|
-
content: [{ type: "text" as const, text: `Roster cap reached (${TEAM_ADJUST_ROSTER_CAP}) — drop an unused member first, or ask the user to /agents-add manually.` }],
|
|
4975
|
+
content: [{ type: "text" as const, text: `Roster cap reached (${TEAM_ADJUST_ROSTER_CAP}) — drop an unused member first, or ask the user to /af-agents-add manually.` }],
|
|
4976
4976
|
details: { status: "refused" },
|
|
4977
4977
|
};
|
|
4978
4978
|
}
|
|
@@ -5142,10 +5142,10 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5142
5142
|
description:
|
|
5143
5143
|
"List the peer agents in your current coms pool — the ones shown in the pool widget. Returns " +
|
|
5144
5144
|
"names, models, and live context-window usage. Discovery is scoped to what the human displays " +
|
|
5145
|
-
"via /coms; you CANNOT widen it to other projects or reveal --explicit peers yourself.",
|
|
5145
|
+
"via /af-coms; you CANNOT widen it to other projects or reveal --explicit peers yourself.",
|
|
5146
5146
|
parameters: Type.Object({
|
|
5147
|
-
project: Type.Optional(Type.String({ description: "Narrow to a project WITHIN the current pool scope. Cannot widen beyond what /coms displays — a widening request is ignored." })),
|
|
5148
|
-
include_explicit: Type.Optional(Type.Boolean({ description: "Only narrows: pass false to hide explicit peers. Cannot reveal them unless the human ran /coms --all." })),
|
|
5147
|
+
project: Type.Optional(Type.String({ description: "Narrow to a project WITHIN the current pool scope. Cannot widen beyond what /af-coms displays — a widening request is ignored." })),
|
|
5148
|
+
include_explicit: Type.Optional(Type.Boolean({ description: "Only narrows: pass false to hide explicit peers. Cannot reveal them unless the human ran /af-coms --all." })),
|
|
5149
5149
|
}),
|
|
5150
5150
|
async execute(_callId, params) {
|
|
5151
5151
|
if (!identity) {
|
|
@@ -5155,9 +5155,9 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5155
5155
|
};
|
|
5156
5156
|
}
|
|
5157
5157
|
// Clamp discovery to the human-set pool scope (displayProject + includeExplicit,
|
|
5158
|
-
// driven by /coms). The LLM's project/include_explicit may NARROW within that
|
|
5158
|
+
// driven by /af-coms). The LLM's project/include_explicit may NARROW within that
|
|
5159
5159
|
// scope but can never widen it — cross-project or explicit discovery requires a
|
|
5160
|
-
// deliberate /coms --project / --all from the human. So coms_list returns exactly
|
|
5160
|
+
// deliberate /af-coms --project / --all from the human. So coms_list returns exactly
|
|
5161
5161
|
// the pool, the same boundary coms_send enforces.
|
|
5162
5162
|
const scopeProject = displayProject ?? identity.project;
|
|
5163
5163
|
let projects: string[];
|
|
@@ -5169,7 +5169,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5169
5169
|
if (params.project && params.project !== scopeProject) widened = true;
|
|
5170
5170
|
}
|
|
5171
5171
|
// include_explicit may only narrow (turn OFF); it cannot reveal explicit peers
|
|
5172
|
-
// unless the human already did via /coms --all.
|
|
5172
|
+
// unless the human already did via /af-coms --all.
|
|
5173
5173
|
const includeExp = includeExplicit && params.include_explicit !== false;
|
|
5174
5174
|
if (params.include_explicit === true && !includeExplicit) widened = true;
|
|
5175
5175
|
|
|
@@ -5204,7 +5204,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5204
5204
|
const notice = widened
|
|
5205
5205
|
? `\n\n(Discovery is scoped to "${scopeProject}"${includeExplicit ? "" : ", explicit peers hidden"}. ` +
|
|
5206
5206
|
`Widening to other projects or revealing --explicit peers is a human action via ` +
|
|
5207
|
-
`/coms --project <name> or /coms --all.)`
|
|
5207
|
+
`/af-coms --project <name> or /af-coms --all.)`
|
|
5208
5208
|
: "";
|
|
5209
5209
|
|
|
5210
5210
|
const lines = agents.length === 0
|
|
@@ -5252,9 +5252,9 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5252
5252
|
"Use coms_get (non-blocking) or coms_await (blocking) with the msg_id to retrieve the response. " +
|
|
5253
5253
|
"Throws if the receiver is unreachable or rejects the envelope.",
|
|
5254
5254
|
parameters: Type.Object({
|
|
5255
|
-
target: Type.String({ description: "Peer name (preferred) or session_id — must be a peer currently in your coms pool (shown in the widget). Out-of-pool targets are refused; ask the human to widen scope with /coms --project or /coms --all." }),
|
|
5255
|
+
target: Type.String({ description: "Peer name (preferred) or session_id — must be a peer currently in your coms pool (shown in the widget). Out-of-pool targets are refused; ask the human to widen scope with /af-coms --project or /af-coms --all." }),
|
|
5256
5256
|
prompt: Type.String({ description: "The prompt to send." }),
|
|
5257
|
-
handoff_token: Type.Optional(Type.String({ description: "Internal /handoff token. Only include when the /handoff follow-up explicitly gives you one; it authorizes the machine-appended ledger/artifact appendix." })),
|
|
5257
|
+
handoff_token: Type.Optional(Type.String({ description: "Internal /af-handoff token. Only include when the /af-handoff follow-up explicitly gives you one; it authorizes the machine-appended ledger/artifact appendix." })),
|
|
5258
5258
|
conversation_id: Type.Optional(Type.String()),
|
|
5259
5259
|
response_schema: Type.Optional(Type.Any({ description: "Optional JSON Schema describing the expected response shape." })),
|
|
5260
5260
|
}),
|
|
@@ -5271,7 +5271,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5271
5271
|
throw new Error(
|
|
5272
5272
|
`coms: no connected peer "${params.target}" in your pool (project ${scope}). ` +
|
|
5273
5273
|
`Only peers shown in the coms pool are reachable. If you expected this peer, ask the ` +
|
|
5274
|
-
`human to widen scope with /coms --project <name> or /coms --all, then retry.`,
|
|
5274
|
+
`human to widen scope with /af-coms --project <name> or /af-coms --all, then retry.`,
|
|
5275
5275
|
);
|
|
5276
5276
|
}
|
|
5277
5277
|
const hops = currentInbound ? currentInbound.hops + 1 : 0;
|
|
@@ -5700,7 +5700,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5700
5700
|
|
|
5701
5701
|
// ── Commands ─────────────────────────────────
|
|
5702
5702
|
|
|
5703
|
-
pi.registerCommand("agents-team", {
|
|
5703
|
+
pi.registerCommand("af-agents-team", {
|
|
5704
5704
|
description: "Select a team to work with",
|
|
5705
5705
|
handler: async (_args, ctx) => {
|
|
5706
5706
|
widgetCtx = ctx;
|
|
@@ -5727,7 +5727,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5727
5727
|
},
|
|
5728
5728
|
});
|
|
5729
5729
|
|
|
5730
|
-
pi.registerCommand("agents-list", {
|
|
5730
|
+
pi.registerCommand("af-agents-list", {
|
|
5731
5731
|
description: "List all loaded agents",
|
|
5732
5732
|
handler: async (_args, _ctx) => {
|
|
5733
5733
|
widgetCtx = _ctx;
|
|
@@ -5753,7 +5753,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5753
5753
|
},
|
|
5754
5754
|
});
|
|
5755
5755
|
|
|
5756
|
-
// Open the read-only /agents-history overlay. Mirrors openZoom's chrome and adds
|
|
5756
|
+
// Open the read-only /af-agents-history overlay. Mirrors openZoom's chrome and adds
|
|
5757
5757
|
// a 1s tick so running durations advance live; `historyRender` lets a new
|
|
5758
5758
|
// dispatch refresh the panel the instant it starts/ends.
|
|
5759
5759
|
async function openHistory(ctx: any): Promise<void> {
|
|
@@ -5779,7 +5779,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5779
5779
|
historyRender = null;
|
|
5780
5780
|
}
|
|
5781
5781
|
|
|
5782
|
-
pi.registerCommand("agents-history", {
|
|
5782
|
+
pi.registerCommand("af-agents-history", {
|
|
5783
5783
|
description: "Timeline of agent execution — orchestrator turns, dispatches, research helpers, durations, and a grand total",
|
|
5784
5784
|
handler: async (_args, ctx) => {
|
|
5785
5785
|
widgetCtx = ctx;
|
|
@@ -5787,11 +5787,11 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5787
5787
|
},
|
|
5788
5788
|
});
|
|
5789
5789
|
|
|
5790
|
-
// ── /hub-mode: execution mode (fast|standard|strict) ──
|
|
5790
|
+
// ── /af-hub-mode: execution mode (fast|standard|strict) ──
|
|
5791
5791
|
// Session-lifetime switch over the overrides-file default. Budgets bind on
|
|
5792
5792
|
// the NEXT tool call (counters are per user turn and keep running); the
|
|
5793
5793
|
// dispatcher prompt rebuilds with the new mode on the next turn.
|
|
5794
|
-
pi.registerCommand("hub-mode", {
|
|
5794
|
+
pi.registerCommand("af-hub-mode", {
|
|
5795
5795
|
description: "Show or set the execution mode: fast (single specialist) | standard (batched, default) | strict (full Verification Contract)",
|
|
5796
5796
|
handler: async (args, ctx) => {
|
|
5797
5797
|
widgetCtx = ctx;
|
|
@@ -5801,7 +5801,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5801
5801
|
const cap = (n: number | null) => (n == null ? "∞" : String(n));
|
|
5802
5802
|
ctx.ui.notify(
|
|
5803
5803
|
`Execution mode: ${hubMode}\nThis turn: ${turnDispatchCount}/${cap(b.maxDispatches)} dispatches, ` +
|
|
5804
|
-
`${turnResearchCount}/${cap(b.maxResearch)} research\nSwitch with /hub-mode ${HUB_MODES.join("|")}`,
|
|
5804
|
+
`${turnResearchCount}/${cap(b.maxResearch)} research\nSwitch with /af-hub-mode ${HUB_MODES.join("|")}`,
|
|
5805
5805
|
"info",
|
|
5806
5806
|
);
|
|
5807
5807
|
return;
|
|
@@ -5817,8 +5817,8 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5817
5817
|
},
|
|
5818
5818
|
});
|
|
5819
5819
|
|
|
5820
|
-
pi.registerCommand("watchdog", {
|
|
5821
|
-
description: "Drift watchdog: /watchdog [on|off|auto] hub-wide, /watchdog <agent> [on|off|clear] per agent, no args to show",
|
|
5820
|
+
pi.registerCommand("af-watchdog", {
|
|
5821
|
+
description: "Drift watchdog: /af-watchdog [on|off|auto] hub-wide, /af-watchdog <agent> [on|off|clear] per agent, no args to show",
|
|
5822
5822
|
handler: async (args, ctx) => {
|
|
5823
5823
|
widgetCtx = ctx;
|
|
5824
5824
|
const parts = (args || "").trim().split(/\s+/).filter(Boolean);
|
|
@@ -5829,7 +5829,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5829
5829
|
ctx.ui.notify(
|
|
5830
5830
|
`Drift watchdog: ${watchdogSetting} (hub-wide)\nPer-agent overrides: ${perAgent}\n` +
|
|
5831
5831
|
`Judge model: ${watchdogJudgeModel || "(researcher persona's, else dispatcher's)"}\n` +
|
|
5832
|
-
`Usage: /watchdog on|off|auto — or /watchdog <agent> on|off|clear`,
|
|
5832
|
+
`Usage: /af-watchdog on|off|auto — or /af-watchdog <agent> on|off|clear`,
|
|
5833
5833
|
"info",
|
|
5834
5834
|
);
|
|
5835
5835
|
return;
|
|
@@ -5837,7 +5837,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5837
5837
|
if (parts.length === 1) {
|
|
5838
5838
|
const setting = normalizeWatchdogSetting(parts[0]);
|
|
5839
5839
|
if (!setting) {
|
|
5840
|
-
ctx.ui.notify(`Unknown setting "${parts[0]}" — expected one of: ${WATCHDOG_SETTINGS.join(", ")} (or /watchdog <agent> on|off|clear)`, "error");
|
|
5840
|
+
ctx.ui.notify(`Unknown setting "${parts[0]}" — expected one of: ${WATCHDOG_SETTINGS.join(", ")} (or /af-watchdog <agent> on|off|clear)`, "error");
|
|
5841
5841
|
return;
|
|
5842
5842
|
}
|
|
5843
5843
|
watchdogSetting = setting;
|
|
@@ -5864,8 +5864,8 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5864
5864
|
},
|
|
5865
5865
|
});
|
|
5866
5866
|
|
|
5867
|
-
pi.registerCommand("agents-add", {
|
|
5868
|
-
description: "Add persona(s) to the active team without switching teams: /agents-add <name> [<name>…]",
|
|
5867
|
+
pi.registerCommand("af-agents-add", {
|
|
5868
|
+
description: "Add persona(s) to the active team without switching teams: /af-agents-add <name> [<name>…]",
|
|
5869
5869
|
handler: async (args, ctx) => {
|
|
5870
5870
|
widgetCtx = ctx;
|
|
5871
5871
|
const names = (args || "").trim().split(/\s+/).filter(Boolean);
|
|
@@ -5873,7 +5873,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5873
5873
|
const available = allAgentDefs
|
|
5874
5874
|
.filter(d => !agentStates.has(d.name.toLowerCase()))
|
|
5875
5875
|
.map(d => d.name).sort().join(", ") || "(all personas are already in the team)";
|
|
5876
|
-
ctx.ui.notify(`Usage: /agents-add <persona> [<persona>…]\nNot in the team yet: ${available}`, "info");
|
|
5876
|
+
ctx.ui.notify(`Usage: /af-agents-add <persona> [<persona>…]\nNot in the team yet: ${available}`, "info");
|
|
5877
5877
|
return;
|
|
5878
5878
|
}
|
|
5879
5879
|
const results = names.map(n => rosterAdd(n));
|
|
@@ -5883,13 +5883,13 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5883
5883
|
},
|
|
5884
5884
|
});
|
|
5885
5885
|
|
|
5886
|
-
pi.registerCommand("agents-drop", {
|
|
5887
|
-
description: "Drop persona(s) from the active team: /agents-drop <name> [<name>…]",
|
|
5886
|
+
pi.registerCommand("af-agents-drop", {
|
|
5887
|
+
description: "Drop persona(s) from the active team: /af-agents-drop <name> [<name>…]",
|
|
5888
5888
|
handler: async (args, ctx) => {
|
|
5889
5889
|
widgetCtx = ctx;
|
|
5890
5890
|
const names = (args || "").trim().split(/\s+/).filter(Boolean);
|
|
5891
5891
|
if (names.length === 0) {
|
|
5892
|
-
ctx.ui.notify(`Usage: /agents-drop <persona> [<persona>…]\nActive team: ${Array.from(agentStates.values()).map(s => s.def.name).join(", ")}`, "info");
|
|
5892
|
+
ctx.ui.notify(`Usage: /af-agents-drop <persona> [<persona>…]\nActive team: ${Array.from(agentStates.values()).map(s => s.def.name).join(", ")}`, "info");
|
|
5893
5893
|
return;
|
|
5894
5894
|
}
|
|
5895
5895
|
const results = names.map(n => rosterDrop(n));
|
|
@@ -5899,13 +5899,13 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5899
5899
|
},
|
|
5900
5900
|
});
|
|
5901
5901
|
|
|
5902
|
-
pi.registerCommand("agents-save", {
|
|
5903
|
-
description: "Persist the CURRENT roster as a named team in .pi/agents/teams.yaml: /agents-save <team-name>",
|
|
5902
|
+
pi.registerCommand("af-agents-save", {
|
|
5903
|
+
description: "Persist the CURRENT roster as a named team in .pi/agents/teams.yaml: /af-agents-save <team-name>",
|
|
5904
5904
|
handler: async (args, ctx) => {
|
|
5905
5905
|
widgetCtx = ctx;
|
|
5906
5906
|
const name = (args || "").trim();
|
|
5907
5907
|
if (!/^[A-Za-z0-9][A-Za-z0-9_-]*$/.test(name)) {
|
|
5908
|
-
ctx.ui.notify("Usage: /agents-save <team-name> (letters, digits, hyphens, underscores)", "error");
|
|
5908
|
+
ctx.ui.notify("Usage: /af-agents-save <team-name> (letters, digits, hyphens, underscores)", "error");
|
|
5909
5909
|
return;
|
|
5910
5910
|
}
|
|
5911
5911
|
const members = Array.from(agentStates.values()).map(s => s.def.name);
|
|
@@ -5930,7 +5930,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5930
5930
|
},
|
|
5931
5931
|
});
|
|
5932
5932
|
|
|
5933
|
-
pi.registerCommand("hub-report", {
|
|
5933
|
+
pi.registerCommand("af-hub-report", {
|
|
5934
5934
|
description: "Per-turn cost report: dispatches, research, tokens, recycles, drift stops (last turn + session totals)",
|
|
5935
5935
|
handler: async (_args, ctx) => {
|
|
5936
5936
|
widgetCtx = ctx;
|
|
@@ -5976,7 +5976,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
5976
5976
|
});
|
|
5977
5977
|
|
|
5978
5978
|
// Compact-view agent switcher. Alt+] / Alt+[ move the marker through the running
|
|
5979
|
-
// subagents; Alt+\ zooms the marked one (same overlay as /zoom). main is never a
|
|
5979
|
+
// subagents; Alt+\ zooms the marked one (same overlay as /af-zoom). main is never a
|
|
5980
5980
|
// target — it is the session under the input, which always takes typed prompts.
|
|
5981
5981
|
// Keys verified free of pi's reserved editor bindings (keybindings.d.ts): alt+up/
|
|
5982
5982
|
// down/left/right and ctrl+] / ctrl+alt+] are reserved, but alt+[ / alt+] / alt+\
|
|
@@ -6054,7 +6054,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6054
6054
|
return null;
|
|
6055
6055
|
}
|
|
6056
6056
|
|
|
6057
|
-
// Completions for /zoom: team member names, research handles (rN), and
|
|
6057
|
+
// Completions for /af-zoom: team member names, research handles (rN), and
|
|
6058
6058
|
// delegate child ids nested under their parent specialist.
|
|
6059
6059
|
const zoomCompletions = (prefix: string): AutocompleteItem[] | null => {
|
|
6060
6060
|
const teamItems = Array.from(agentStates.values()).map(s => ({
|
|
@@ -6077,7 +6077,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6077
6077
|
return filtered.length > 0 ? filtered : items;
|
|
6078
6078
|
};
|
|
6079
6079
|
|
|
6080
|
-
// Open the read-only zoom overlay over a live timeline. Shared by /zoom and the
|
|
6080
|
+
// Open the read-only zoom overlay over a live timeline. Shared by /af-zoom and the
|
|
6081
6081
|
// compact-view Alt+\ switcher. While open, `target.zoomRender` lets the stream
|
|
6082
6082
|
// parser refresh it on new events (throttled to ~12fps; force=true pushes the
|
|
6083
6083
|
// final frame on completion).
|
|
@@ -6106,8 +6106,8 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6106
6106
|
target.zoomRender = undefined;
|
|
6107
6107
|
}
|
|
6108
6108
|
|
|
6109
|
-
pi.registerCommand("zoom", {
|
|
6110
|
-
description: "Scrollable read-only view of an agent's stream: /zoom <name|rN>",
|
|
6109
|
+
pi.registerCommand("af-zoom", {
|
|
6110
|
+
description: "Scrollable read-only view of an agent's stream: /af-zoom <name|rN>",
|
|
6111
6111
|
getArgumentCompletions: zoomCompletions,
|
|
6112
6112
|
handler: async (args, ctx) => {
|
|
6113
6113
|
widgetCtx = ctx;
|
|
@@ -6127,14 +6127,14 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6127
6127
|
const childKnown = Array.from(agentStates.values())
|
|
6128
6128
|
.flatMap(s => Array.from(s.delegations?.keys() || [])).join(", ");
|
|
6129
6129
|
const known = [teamKnown, researchKnown, childKnown].filter(Boolean).join(", ");
|
|
6130
|
-
ctx.ui.notify(`Usage: /zoom <name|rN|child-id>. Known: ${known || "none"}`, "error");
|
|
6130
|
+
ctx.ui.notify(`Usage: /af-zoom <name|rN|child-id>. Known: ${known || "none"}`, "error");
|
|
6131
6131
|
return;
|
|
6132
6132
|
}
|
|
6133
6133
|
await openZoom(target, ctx);
|
|
6134
6134
|
},
|
|
6135
6135
|
});
|
|
6136
6136
|
|
|
6137
|
-
// Completions for /agent-model: persona names plus a `persona.role` entry per
|
|
6137
|
+
// Completions for /af-agent-model: persona names plus a `persona.role` entry per
|
|
6138
6138
|
// declared delegate sub-role, labeled with the model currently in effect.
|
|
6139
6139
|
const agentModelCompletions = (prefix: string): AutocompleteItem[] | null => {
|
|
6140
6140
|
const personaItems = Array.from(agentStates.values()).map(s => ({
|
|
@@ -6162,14 +6162,14 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6162
6162
|
return filtered.length > 0 ? filtered : items;
|
|
6163
6163
|
};
|
|
6164
6164
|
|
|
6165
|
-
// /agent-model <persona>[.<role>] — switch a persona's model among its
|
|
6165
|
+
// /af-agent-model <persona>[.<role>] — switch a persona's model among its
|
|
6166
6166
|
// declared candidates (frontmatter `model:` + `models:`), or a delegate
|
|
6167
6167
|
// sub-role's model among its declared default + the parent persona's
|
|
6168
6168
|
// candidates. Session-lifetime: the choice resets on session_start and takes
|
|
6169
|
-
// effect on the persona's NEXT dispatch (/agents-restart applies it
|
|
6169
|
+
// effect on the persona's NEXT dispatch (/af-agents-restart applies it
|
|
6170
6170
|
// immediately). Nothing outside the declared lists is ever selectable.
|
|
6171
|
-
pi.registerCommand("agent-model", {
|
|
6172
|
-
description: "Switch a persona's or sub-role's model from its declared candidates: /agent-model <persona>[.<role>]",
|
|
6171
|
+
pi.registerCommand("af-agent-model", {
|
|
6172
|
+
description: "Switch a persona's or sub-role's model from its declared candidates: /af-agent-model <persona>[.<role>]",
|
|
6173
6173
|
getArgumentCompletions: agentModelCompletions,
|
|
6174
6174
|
handler: async (args, ctx) => {
|
|
6175
6175
|
widgetCtx = ctx;
|
|
@@ -6233,7 +6233,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6233
6233
|
...Array.from(agentStates.values()).map(s => s.def.name),
|
|
6234
6234
|
...researchPersonas.map(d => d.name),
|
|
6235
6235
|
].join(", ");
|
|
6236
|
-
ctx.ui.notify(`Usage: /agent-model <persona>[.<role>]. Known: ${known || "none"}`, "error");
|
|
6236
|
+
ctx.ui.notify(`Usage: /af-agent-model <persona>[.<role>]. Known: ${known || "none"}`, "error");
|
|
6237
6237
|
return;
|
|
6238
6238
|
}
|
|
6239
6239
|
if (!def.models || def.models.length === 0) {
|
|
@@ -6272,8 +6272,8 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6272
6272
|
// Research helpers spawn fresh each time, so the switch lands on their
|
|
6273
6273
|
// next spawn; team members apply on next dispatch (restartable now).
|
|
6274
6274
|
const applyHint = (def.kind || "").toLowerCase() === "research"
|
|
6275
|
-
? "applies on next /research or spawn_research"
|
|
6276
|
-
: `applies on next dispatch; /agents-restart ${def.name} to apply now`;
|
|
6275
|
+
? "applies on next /af-research or spawn_research"
|
|
6276
|
+
: `applies on next dispatch; /af-agents-restart ${def.name} to apply now`;
|
|
6277
6277
|
ctx.ui.notify(`${displayName(def.name)} → ${picked} (${applyHint})`, "success");
|
|
6278
6278
|
if ((dispatchPolicy.substitutions[name]?.prefer ?? dispatchPolicy.default) === "coms") {
|
|
6279
6279
|
ctx.ui.notify(
|
|
@@ -6284,7 +6284,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6284
6284
|
},
|
|
6285
6285
|
});
|
|
6286
6286
|
|
|
6287
|
-
// Completions for /agent-model-thinking: persona names labeled with the
|
|
6287
|
+
// Completions for /af-agent-model-thinking: persona names labeled with the
|
|
6288
6288
|
// thinking level currently in effect.
|
|
6289
6289
|
const agentThinkingCompletions = (prefix: string): AutocompleteItem[] | null => {
|
|
6290
6290
|
const items = [
|
|
@@ -6302,13 +6302,13 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6302
6302
|
return filtered.length > 0 ? filtered : items;
|
|
6303
6303
|
};
|
|
6304
6304
|
|
|
6305
|
-
// /agent-model-thinking <persona> — switch a persona's reasoning effort among
|
|
6305
|
+
// /af-agent-model-thinking <persona> — switch a persona's reasoning effort among
|
|
6306
6306
|
// pi's --thinking levels (off|minimal|low|medium|high|xhigh). Session-lifetime:
|
|
6307
6307
|
// the choice resets on session_start and takes effect on the persona's NEXT
|
|
6308
|
-
// dispatch (/agents-restart applies it immediately). Selecting the frontmatter
|
|
6308
|
+
// dispatch (/af-agents-restart applies it immediately). Selecting the frontmatter
|
|
6309
6309
|
// default clears the override.
|
|
6310
|
-
pi.registerCommand("agent-model-thinking", {
|
|
6311
|
-
description: "Switch a persona's thinking level from pi's --thinking levels: /agent-model-thinking <persona>",
|
|
6310
|
+
pi.registerCommand("af-agent-model-thinking", {
|
|
6311
|
+
description: "Switch a persona's thinking level from pi's --thinking levels: /af-agent-model-thinking <persona>",
|
|
6312
6312
|
getArgumentCompletions: agentThinkingCompletions,
|
|
6313
6313
|
handler: async (args, ctx) => {
|
|
6314
6314
|
widgetCtx = ctx;
|
|
@@ -6320,7 +6320,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6320
6320
|
...Array.from(agentStates.values()).map(s => s.def.name),
|
|
6321
6321
|
...researchPersonas.map(d => d.name),
|
|
6322
6322
|
].join(", ");
|
|
6323
|
-
ctx.ui.notify(`Usage: /agent-model-thinking <persona>. Known: ${known || "none"}`, "error");
|
|
6323
|
+
ctx.ui.notify(`Usage: /af-agent-model-thinking <persona>. Known: ${known || "none"}`, "error");
|
|
6324
6324
|
return;
|
|
6325
6325
|
}
|
|
6326
6326
|
const defaultLevel = resolveThinkingLevel(def.thinking);
|
|
@@ -6346,13 +6346,13 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6346
6346
|
// Research helpers spawn fresh each time, so the switch lands on their
|
|
6347
6347
|
// next spawn; team members apply on next dispatch (restartable now).
|
|
6348
6348
|
const applyHint = (def.kind || "").toLowerCase() === "research"
|
|
6349
|
-
? "applies on next /research or spawn_research"
|
|
6350
|
-
: `applies on next dispatch; /agents-restart ${def.name} to apply now`;
|
|
6349
|
+
? "applies on next /af-research or spawn_research"
|
|
6350
|
+
: `applies on next dispatch; /af-agents-restart ${def.name} to apply now`;
|
|
6351
6351
|
ctx.ui.notify(`${displayName(def.name)} thinking → ${picked} (${applyHint})`, "success");
|
|
6352
6352
|
},
|
|
6353
6353
|
});
|
|
6354
6354
|
|
|
6355
|
-
// Completions for /models: profile names with their persona → model summary.
|
|
6355
|
+
// Completions for /af-models: profile names with their persona → model summary.
|
|
6356
6356
|
const modelProfileCompletions = (prefix: string): AutocompleteItem[] | null => {
|
|
6357
6357
|
const items = Object.entries(modelProfiles).map(([name, entries]) => ({
|
|
6358
6358
|
value: name,
|
|
@@ -6363,10 +6363,10 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6363
6363
|
return filtered.length > 0 ? filtered : items;
|
|
6364
6364
|
};
|
|
6365
6365
|
|
|
6366
|
-
// /models [profile] — apply a named model profile (a validated macro over the
|
|
6367
|
-
// personas' declared candidates). Bare /models opens a picker.
|
|
6368
|
-
pi.registerCommand("models", {
|
|
6369
|
-
description: "Apply a model profile to the team: /models [profile]",
|
|
6366
|
+
// /af-models [profile] — apply a named model profile (a validated macro over the
|
|
6367
|
+
// personas' declared candidates). Bare /af-models opens a picker.
|
|
6368
|
+
pi.registerCommand("af-models", {
|
|
6369
|
+
description: "Apply a model profile to the team: /af-models [profile]",
|
|
6370
6370
|
getArgumentCompletions: modelProfileCompletions,
|
|
6371
6371
|
handler: async (args, ctx) => {
|
|
6372
6372
|
widgetCtx = ctx;
|
|
@@ -6403,7 +6403,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6403
6403
|
});
|
|
6404
6404
|
|
|
6405
6405
|
// All known model strings across every persona (allowedModels union), deduped
|
|
6406
|
-
// preserving first-seen order. Used for /agent-models-substitute autocomplete.
|
|
6406
|
+
// preserving first-seen order. Used for /af-agent-models-substitute autocomplete.
|
|
6407
6407
|
function allKnownModels(): string[] {
|
|
6408
6408
|
const seen = new Set<string>();
|
|
6409
6409
|
const out: string[] = [];
|
|
@@ -6415,7 +6415,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6415
6415
|
return out;
|
|
6416
6416
|
}
|
|
6417
6417
|
|
|
6418
|
-
// Completions for /agent-models-substitute: a flat list of known models.
|
|
6418
|
+
// Completions for /af-agent-models-substitute: a flat list of known models.
|
|
6419
6419
|
// Free text allowed too — we just suggest, never restrict, so ad-hoc targets
|
|
6420
6420
|
// (e.g. a model a persona does not declare) still produce a clean "skipped"
|
|
6421
6421
|
// report at apply time.
|
|
@@ -6427,22 +6427,22 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6427
6427
|
return filtered.length > 0 ? filtered : items;
|
|
6428
6428
|
};
|
|
6429
6429
|
|
|
6430
|
-
// /agent-models-substitute <source> <target> — replace one model across all
|
|
6430
|
+
// /af-agent-models-substitute <source> <target> — replace one model across all
|
|
6431
6431
|
// personas (team members + research + orchestrator; never the dispatcher).
|
|
6432
6432
|
// Per-persona validity: target must be in that persona's allowedModels.
|
|
6433
|
-
// Applies session-lifetime (same lifetime as /agent-model); takes effect on
|
|
6434
|
-
// the persona's NEXT dispatch (/agents-restart applies it immediately).
|
|
6433
|
+
// Applies session-lifetime (same lifetime as /af-agent-model); takes effect on
|
|
6434
|
+
// the persona's NEXT dispatch (/af-agents-restart applies it immediately).
|
|
6435
6435
|
// One-step flow: dry-run summary is shown up front, then the swap is
|
|
6436
6436
|
// applied unconditionally — the operator runs the command to commit.
|
|
6437
|
-
pi.registerCommand("agent-models-substitute", {
|
|
6438
|
-
description: "Replace one model across all personas: /agent-models-substitute <source> <target>",
|
|
6437
|
+
pi.registerCommand("af-agent-models-substitute", {
|
|
6438
|
+
description: "Replace one model across all personas: /af-agent-models-substitute <source> <target>",
|
|
6439
6439
|
getArgumentCompletions: substituteCompletions,
|
|
6440
6440
|
handler: async (args, ctx) => {
|
|
6441
6441
|
widgetCtx = ctx;
|
|
6442
6442
|
const tokens = (args || "").trim().split(/\s+/).filter(Boolean);
|
|
6443
6443
|
if (tokens.length !== 2) {
|
|
6444
6444
|
ctx.ui.notify(
|
|
6445
|
-
`Usage: /agent-models-substitute <source> <target>. ` +
|
|
6445
|
+
`Usage: /af-agent-models-substitute <source> <target>. ` +
|
|
6446
6446
|
`Both must be model specs (e.g. openai-codex/gpt-5.3-codex-spark).`,
|
|
6447
6447
|
"error",
|
|
6448
6448
|
);
|
|
@@ -6468,7 +6468,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6468
6468
|
continue;
|
|
6469
6469
|
}
|
|
6470
6470
|
if (!allowedModels(def).includes(target)) {
|
|
6471
|
-
skipped.push({ def, reason: `target ${target} not in declared candidates (model:/models: in ${def.file})` });
|
|
6471
|
+
skipped.push({ def, reason: `target ${target} not in declared candidates (model:/af-models: in ${def.file})` });
|
|
6472
6472
|
continue;
|
|
6473
6473
|
}
|
|
6474
6474
|
matches.push({ def, current });
|
|
@@ -6488,7 +6488,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6488
6488
|
// Apply: for every match, if the persona's frontmatter default IS the
|
|
6489
6489
|
// target, clear any existing override (so it tracks frontmatter
|
|
6490
6490
|
// updates); otherwise record target in modelOverrides. Mirrors
|
|
6491
|
-
// /agent-model and /models.
|
|
6491
|
+
// /af-agent-model and /af-models.
|
|
6492
6492
|
const applied: string[] = [];
|
|
6493
6493
|
for (const { def } of matches) {
|
|
6494
6494
|
const key = def.name.toLowerCase();
|
|
@@ -6505,14 +6505,14 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6505
6505
|
`Substitution ${source} → ${target}:`,
|
|
6506
6506
|
` Affected: ${applied.length}${applied.length ? ` (${applied.join(", ")})` : ""}`,
|
|
6507
6507
|
` Skipped: ${skipped.length}${skipped.length ? ` (${skipDetails.join("; ")})` : ""}`,
|
|
6508
|
-
` Applies on next dispatch (/agents-restart to apply now).`,
|
|
6508
|
+
` Applies on next dispatch (/af-agents-restart to apply now).`,
|
|
6509
6509
|
].join("\n");
|
|
6510
6510
|
updateWidget();
|
|
6511
6511
|
ctx.ui.notify(summary, applied.length > 0 ? "success" : "info");
|
|
6512
6512
|
},
|
|
6513
6513
|
});
|
|
6514
6514
|
|
|
6515
|
-
// Completions for /research: research-persona names prefixed with @.
|
|
6515
|
+
// Completions for /af-research: research-persona names prefixed with @.
|
|
6516
6516
|
const researchPersonaCompletions = (prefix: string): AutocompleteItem[] | null => {
|
|
6517
6517
|
const items = researchPersonas.map(d => ({
|
|
6518
6518
|
value: `@${d.name}`,
|
|
@@ -6524,10 +6524,10 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6524
6524
|
return filtered.length > 0 ? filtered : items;
|
|
6525
6525
|
};
|
|
6526
6526
|
|
|
6527
|
-
// /research [@persona] [--model <spec>] <task> — spawn a read-only helper. Fire-and-
|
|
6527
|
+
// /af-research [@persona] [--model <spec>] <task> — spawn a read-only helper. Fire-and-
|
|
6528
6528
|
// forget: the result is delivered to the dispatcher as a follow-up turn.
|
|
6529
|
-
pi.registerCommand("research", {
|
|
6530
|
-
description: "Spawn a read-only research helper: /research [@persona] [--model <spec>] <task>",
|
|
6529
|
+
pi.registerCommand("af-research", {
|
|
6530
|
+
description: "Spawn a read-only research helper: /af-research [@persona] [--model <spec>] <task>",
|
|
6531
6531
|
getArgumentCompletions: researchPersonaCompletions,
|
|
6532
6532
|
handler: async (args, ctx) => {
|
|
6533
6533
|
widgetCtx = ctx;
|
|
@@ -6557,7 +6557,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6557
6557
|
|
|
6558
6558
|
const task = rest;
|
|
6559
6559
|
if (!task) {
|
|
6560
|
-
ctx.ui.notify("Usage: /research [@persona] [--model <spec>] <task>", "error");
|
|
6560
|
+
ctx.ui.notify("Usage: /af-research [@persona] [--model <spec>] <task>", "error");
|
|
6561
6561
|
return;
|
|
6562
6562
|
}
|
|
6563
6563
|
|
|
@@ -6599,28 +6599,28 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6599
6599
|
|
|
6600
6600
|
// ── Unified subagent commands ────────────────
|
|
6601
6601
|
// Team specialists are addressed by persona name, research helpers by their rN
|
|
6602
|
-
// handle — one command family covers both (mirroring /zoom's target resolution).
|
|
6602
|
+
// handle — one command family covers both (mirroring /af-zoom's target resolution).
|
|
6603
6603
|
// The research-* commands remain as aliases of their agents-* counterparts.
|
|
6604
6604
|
|
|
6605
|
-
// Resume a finished helper on its existing session. Shared by /agents-cont and
|
|
6606
|
-
// its /research-cont alias.
|
|
6605
|
+
// Resume a finished helper on its existing session. Shared by /af-agents-cont and
|
|
6606
|
+
// its /af-research-cont alias.
|
|
6607
6607
|
const researchContHandler = async (args: string | undefined, ctx: any) => {
|
|
6608
6608
|
widgetCtx = ctx;
|
|
6609
6609
|
const trimmed = (args ?? "").trim();
|
|
6610
6610
|
const sp = trimmed.indexOf(" ");
|
|
6611
6611
|
if (sp === -1) {
|
|
6612
|
-
ctx.ui.notify("Usage: /agents-cont rN <prompt>", "error");
|
|
6612
|
+
ctx.ui.notify("Usage: /af-agents-cont rN <prompt>", "error");
|
|
6613
6613
|
return;
|
|
6614
6614
|
}
|
|
6615
6615
|
const rid = parseResearchHandle(trimmed.slice(0, sp));
|
|
6616
6616
|
const prompt = trimmed.slice(sp + 1).trim();
|
|
6617
6617
|
const state = rid != null ? researchStates.get(rid) : undefined;
|
|
6618
6618
|
if (!state) {
|
|
6619
|
-
ctx.ui.notify(`No research helper "${trimmed.slice(0, sp)}". Use /research to start one.`, "error");
|
|
6619
|
+
ctx.ui.notify(`No research helper "${trimmed.slice(0, sp)}". Use /af-research to start one.`, "error");
|
|
6620
6620
|
return;
|
|
6621
6621
|
}
|
|
6622
6622
|
if (!prompt) {
|
|
6623
|
-
ctx.ui.notify("Usage: /agents-cont rN <prompt>", "error");
|
|
6623
|
+
ctx.ui.notify("Usage: /af-agents-cont rN <prompt>", "error");
|
|
6624
6624
|
return;
|
|
6625
6625
|
}
|
|
6626
6626
|
if (state.status === "running") {
|
|
@@ -6633,14 +6633,14 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6633
6633
|
spawnResearch(state, prompt, ctx).then(result => deliverResearchFollowUp(state, result));
|
|
6634
6634
|
};
|
|
6635
6635
|
|
|
6636
|
-
pi.registerCommand("agents-cont", {
|
|
6637
|
-
description: "Continue a finished research helper: /agents-cont rN <prompt>",
|
|
6636
|
+
pi.registerCommand("af-agents-cont", {
|
|
6637
|
+
description: "Continue a finished research helper: /af-agents-cont rN <prompt>",
|
|
6638
6638
|
getArgumentCompletions: researchHandleCompletions,
|
|
6639
6639
|
handler: researchContHandler,
|
|
6640
6640
|
});
|
|
6641
6641
|
|
|
6642
|
-
pi.registerCommand("research-cont", {
|
|
6643
|
-
description: "Continue a finished research helper (alias of /agents-cont): /research-cont rN <prompt>",
|
|
6642
|
+
pi.registerCommand("af-research-cont", {
|
|
6643
|
+
description: "Continue a finished research helper (alias of /af-agents-cont): /af-research-cont rN <prompt>",
|
|
6644
6644
|
getArgumentCompletions: researchHandleCompletions,
|
|
6645
6645
|
handler: researchContHandler,
|
|
6646
6646
|
});
|
|
@@ -6660,7 +6660,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6660
6660
|
updateResearchWidget();
|
|
6661
6661
|
}
|
|
6662
6662
|
|
|
6663
|
-
// Remove all helpers (SIGTERM any running). Shared by /agents-kill all and /research-clear.
|
|
6663
|
+
// Remove all helpers (SIGTERM any running). Shared by /af-agents-kill all and /af-research-clear.
|
|
6664
6664
|
function clearResearchHelpers(ctx: any) {
|
|
6665
6665
|
let killed = 0;
|
|
6666
6666
|
const total = researchStates.size;
|
|
@@ -6681,32 +6681,32 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6681
6681
|
ctx.ui.notify(msg, total === 0 ? "info" : "success");
|
|
6682
6682
|
}
|
|
6683
6683
|
|
|
6684
|
-
// /research-rm — alias of /agents-kill rN (kill on a research handle removes).
|
|
6685
|
-
pi.registerCommand("research-rm", {
|
|
6686
|
-
description: "Remove a research helper (alias of /agents-kill rN): /research-rm rN",
|
|
6684
|
+
// /af-research-rm — alias of /af-agents-kill rN (kill on a research handle removes).
|
|
6685
|
+
pi.registerCommand("af-research-rm", {
|
|
6686
|
+
description: "Remove a research helper (alias of /af-agents-kill rN): /af-research-rm rN",
|
|
6687
6687
|
getArgumentCompletions: researchHandleCompletions,
|
|
6688
6688
|
handler: async (args, ctx) => {
|
|
6689
6689
|
widgetCtx = ctx;
|
|
6690
6690
|
const rid = parseResearchHandle((args ?? "").trim());
|
|
6691
6691
|
const state = rid != null ? researchStates.get(rid) : undefined;
|
|
6692
6692
|
if (!state) {
|
|
6693
|
-
ctx.ui.notify(`Usage: /research-rm rN. Known: ${Array.from(researchStates.values()).map(s => `r${s.id}`).join(", ") || "none"}`, "error");
|
|
6693
|
+
ctx.ui.notify(`Usage: /af-research-rm rN. Known: ${Array.from(researchStates.values()).map(s => `r${s.id}`).join(", ") || "none"}`, "error");
|
|
6694
6694
|
return;
|
|
6695
6695
|
}
|
|
6696
6696
|
removeResearchHelper(state, ctx);
|
|
6697
6697
|
},
|
|
6698
6698
|
});
|
|
6699
6699
|
|
|
6700
|
-
// /research-clear — alias of /agents-kill all.
|
|
6701
|
-
pi.registerCommand("research-clear", {
|
|
6702
|
-
description: "Remove all research helpers (alias of /agents-kill all)",
|
|
6700
|
+
// /af-research-clear — alias of /af-agents-kill all.
|
|
6701
|
+
pi.registerCommand("af-research-clear", {
|
|
6702
|
+
description: "Remove all research helpers (alias of /af-agents-kill all)",
|
|
6703
6703
|
handler: async (_args, ctx) => {
|
|
6704
6704
|
widgetCtx = ctx;
|
|
6705
6705
|
clearResearchHelpers(ctx);
|
|
6706
6706
|
},
|
|
6707
6707
|
});
|
|
6708
6708
|
|
|
6709
|
-
pi.registerCommand("dispatch-policy", {
|
|
6709
|
+
pi.registerCommand("af-dispatch-policy", {
|
|
6710
6710
|
description: "Show dispatch backend routing (dispatch-policy.yaml) for the active team",
|
|
6711
6711
|
handler: async (_args, ctx) => {
|
|
6712
6712
|
widgetCtx = ctx;
|
|
@@ -6723,15 +6723,15 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6723
6723
|
const src = existsSync(policyPath) ? ".pi/agents/dispatch-policy.yaml" : "(no dispatch-policy.yaml — all native)";
|
|
6724
6724
|
ctx.ui.notify(
|
|
6725
6725
|
`Dispatch backends — ${src}, default: ${dispatchPolicy.default}\n${lines.join("\n") || "(no active team)"}\n` +
|
|
6726
|
-
`Routing is decided per dispatch against the live coms pool (/coms to refresh).`,
|
|
6726
|
+
`Routing is decided per dispatch against the live coms pool (/af-coms to refresh).`,
|
|
6727
6727
|
"info",
|
|
6728
6728
|
);
|
|
6729
6729
|
},
|
|
6730
6730
|
});
|
|
6731
6731
|
|
|
6732
6732
|
// Completions over both target kinds: team persona names + research handles
|
|
6733
|
-
// (rN), each annotated with status — for the unified /agents-kill and
|
|
6734
|
-
// /agents-restart.
|
|
6733
|
+
// (rN), each annotated with status — for the unified /af-agents-kill and
|
|
6734
|
+
// /af-agents-restart.
|
|
6735
6735
|
const subagentTargetCompletions = (prefix: string): AutocompleteItem[] | null => {
|
|
6736
6736
|
const items = [...(agentNameCompletions("") ?? []), ...(researchHandleCompletions("") ?? [])];
|
|
6737
6737
|
if (items.length === 0) return null;
|
|
@@ -6739,7 +6739,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6739
6739
|
return filtered.length > 0 ? filtered : items;
|
|
6740
6740
|
};
|
|
6741
6741
|
|
|
6742
|
-
// /agents-kill completions additionally offer "all" (research helpers only).
|
|
6742
|
+
// /af-agents-kill completions additionally offer "all" (research helpers only).
|
|
6743
6743
|
const agentsKillCompletions = (prefix: string): AutocompleteItem[] | null => {
|
|
6744
6744
|
const targets = subagentTargetCompletions("") ?? [];
|
|
6745
6745
|
const items = researchStates.size > 0
|
|
@@ -6750,8 +6750,8 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6750
6750
|
return filtered.length > 0 ? filtered : items;
|
|
6751
6751
|
};
|
|
6752
6752
|
|
|
6753
|
-
pi.registerCommand("agents-kill", {
|
|
6754
|
-
description: "Kill a running specialist, or kill & remove research helper(s): /agents-kill <name|rN|all>",
|
|
6753
|
+
pi.registerCommand("af-agents-kill", {
|
|
6754
|
+
description: "Kill a running specialist, or kill & remove research helper(s): /af-agents-kill <name|rN|all>",
|
|
6755
6755
|
getArgumentCompletions: agentsKillCompletions,
|
|
6756
6756
|
handler: async (args, ctx) => {
|
|
6757
6757
|
widgetCtx = ctx;
|
|
@@ -6782,7 +6782,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6782
6782
|
...Array.from(agentStates.values()).map(s => displayName(s.def.name)),
|
|
6783
6783
|
...Array.from(researchStates.values()).map(s => `r${s.id}`),
|
|
6784
6784
|
].join(", ");
|
|
6785
|
-
ctx.ui.notify(`Usage: /agents-kill <name|rN|all>. Known: ${known || "none"}`, "error");
|
|
6785
|
+
ctx.ui.notify(`Usage: /af-agents-kill <name|rN|all>. Known: ${known || "none"}`, "error");
|
|
6786
6786
|
return;
|
|
6787
6787
|
}
|
|
6788
6788
|
if (state.status !== "running" || (!state.proc && !state.comsAbort)) {
|
|
@@ -6805,16 +6805,16 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6805
6805
|
},
|
|
6806
6806
|
});
|
|
6807
6807
|
|
|
6808
|
-
pi.registerCommand("agents-restart", {
|
|
6809
|
-
description: "Kill and re-run a specialist's (or re-run a finished research helper's) last task fresh: /agents-restart <name|rN>",
|
|
6808
|
+
pi.registerCommand("af-agents-restart", {
|
|
6809
|
+
description: "Kill and re-run a specialist's (or re-run a finished research helper's) last task fresh: /af-agents-restart <name|rN>",
|
|
6810
6810
|
getArgumentCompletions: subagentTargetCompletions,
|
|
6811
6811
|
handler: async (args, ctx) => {
|
|
6812
6812
|
widgetCtx = ctx;
|
|
6813
6813
|
const name = args?.trim();
|
|
6814
6814
|
// An rN handle re-runs a finished helper's last task on a fresh session
|
|
6815
|
-
// (unlike /agents-cont, which resumes the existing one). A running helper
|
|
6815
|
+
// (unlike /af-agents-cont, which resumes the existing one). A running helper
|
|
6816
6816
|
// can't be restarted mid-flight — spawnResearch's promise is held by its
|
|
6817
|
-
// original caller, and /agents-kill removes the helper outright.
|
|
6817
|
+
// original caller, and /af-agents-kill removes the helper outright.
|
|
6818
6818
|
const rid = name ? parseResearchHandle(name) : null;
|
|
6819
6819
|
if (rid != null) {
|
|
6820
6820
|
const rState = researchStates.get(rid);
|
|
@@ -6824,7 +6824,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6824
6824
|
return;
|
|
6825
6825
|
}
|
|
6826
6826
|
if (rState.status === "running") {
|
|
6827
|
-
ctx.ui.notify(`Research r${rState.id} is still running — wait for it to finish (or /agents-kill r${rState.id} to discard it and /research the task again).`, "warning");
|
|
6827
|
+
ctx.ui.notify(`Research r${rState.id} is still running — wait for it to finish (or /af-agents-kill r${rState.id} to discard it and /af-research the task again).`, "warning");
|
|
6828
6828
|
return;
|
|
6829
6829
|
}
|
|
6830
6830
|
if (!rState.task) {
|
|
@@ -6844,7 +6844,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6844
6844
|
...Array.from(agentStates.values()).map(s => displayName(s.def.name)),
|
|
6845
6845
|
...Array.from(researchStates.values()).map(s => `r${s.id}`),
|
|
6846
6846
|
].join(", ");
|
|
6847
|
-
ctx.ui.notify(`Usage: /agents-restart <name|rN>. Known: ${known || "none"}`, "error");
|
|
6847
|
+
ctx.ui.notify(`Usage: /af-agents-restart <name|rN>. Known: ${known || "none"}`, "error");
|
|
6848
6848
|
return;
|
|
6849
6849
|
}
|
|
6850
6850
|
const task = state.task;
|
|
@@ -6886,7 +6886,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6886
6886
|
},
|
|
6887
6887
|
});
|
|
6888
6888
|
|
|
6889
|
-
pi.registerCommand("persona", {
|
|
6889
|
+
pi.registerCommand("af-persona", {
|
|
6890
6890
|
description: "Select or reset the dispatcher persona (orchestrator flavor)",
|
|
6891
6891
|
handler: async (_args, ctx) => {
|
|
6892
6892
|
widgetCtx = ctx;
|
|
@@ -6919,9 +6919,9 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6919
6919
|
},
|
|
6920
6920
|
});
|
|
6921
6921
|
|
|
6922
|
-
// ── Embedded coms: /coms + /handoff ──
|
|
6922
|
+
// ── Embedded coms: /af-coms + /af-handoff ──
|
|
6923
6923
|
|
|
6924
|
-
// Completions over live peer names for /handoff.
|
|
6924
|
+
// Completions over live peer names for /af-handoff.
|
|
6925
6925
|
const comsPeerCompletions = (prefix: string): AutocompleteItem[] | null => {
|
|
6926
6926
|
// Same pool scope as coms_send/handoff resolution — only offer peers you can reach.
|
|
6927
6927
|
const entries = peersInScope();
|
|
@@ -6932,7 +6932,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6932
6932
|
return filtered.length > 0 ? filtered : items;
|
|
6933
6933
|
};
|
|
6934
6934
|
|
|
6935
|
-
pi.registerCommand("coms", {
|
|
6935
|
+
pi.registerCommand("af-coms", {
|
|
6936
6936
|
description: "Force-refresh the coms pool widget (or filter with --all / --project <name>)",
|
|
6937
6937
|
handler: async (args, ctx) => {
|
|
6938
6938
|
if (!comsReady) { ctx.ui.notify("coms is not active in this session.", "warning"); return; }
|
|
@@ -6972,22 +6972,22 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
6972
6972
|
}
|
|
6973
6973
|
});
|
|
6974
6974
|
|
|
6975
|
-
// /handoff <peer> — hand the session off to a coms peer. Per decision G1 we do NOT
|
|
6975
|
+
// /af-handoff <peer> — hand the session off to a coms peer. Per decision G1 we do NOT
|
|
6976
6976
|
// extract the compaction summary; instead we ask the dispatcher LLM (next turn) to
|
|
6977
6977
|
// compose a SELF-CONTAINED brief and coms_send it, then await + relay the reply.
|
|
6978
|
-
pi.registerCommand("handoff", {
|
|
6979
|
-
description: "Hand the session off to a coms peer (the dispatcher composes a self-contained brief): /handoff <peer>",
|
|
6978
|
+
pi.registerCommand("af-handoff", {
|
|
6979
|
+
description: "Hand the session off to a coms peer (the dispatcher composes a self-contained brief): /af-handoff <peer>",
|
|
6980
6980
|
getArgumentCompletions: comsPeerCompletions,
|
|
6981
6981
|
handler: async (args, ctx) => {
|
|
6982
|
-
if (!comsReady) { ctx.ui.notify("coms is not active in this session — /handoff unavailable.", "warning"); return; }
|
|
6982
|
+
if (!comsReady) { ctx.ui.notify("coms is not active in this session — /af-handoff unavailable.", "warning"); return; }
|
|
6983
6983
|
const target = (args ?? "").trim();
|
|
6984
6984
|
if (!target) {
|
|
6985
|
-
ctx.ui.notify("Usage: /handoff <peer>. See the coms pool for live peer names.", "error");
|
|
6985
|
+
ctx.ui.notify("Usage: /af-handoff <peer>. See the coms pool for live peer names.", "error");
|
|
6986
6986
|
return;
|
|
6987
6987
|
}
|
|
6988
6988
|
const peer = resolveTarget(target);
|
|
6989
6989
|
if (!peer) {
|
|
6990
|
-
ctx.ui.notify(`coms: no live peer "${target}". Use /coms to refresh the pool.`, "error");
|
|
6990
|
+
ctx.ui.notify(`coms: no live peer "${target}". Use /af-coms to refresh the pool.`, "error");
|
|
6991
6991
|
return;
|
|
6992
6992
|
}
|
|
6993
6993
|
const handoffToken = crypto.randomBytes(8).toString("hex");
|
|
@@ -7007,18 +7007,18 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
7007
7007
|
},
|
|
7008
7008
|
});
|
|
7009
7009
|
|
|
7010
|
-
// /compound [focus] — end-of-session compound-learning pass. Mirrors /handoff's
|
|
7010
|
+
// /af-compound [focus] — end-of-session compound-learning pass. Mirrors /af-handoff's
|
|
7011
7011
|
// shape: the dispatcher LLM (which saw the whole session) composes the
|
|
7012
7012
|
// candidate-lessons brief itself, gates it on the user, then dispatches the
|
|
7013
7013
|
// documenter to land the approved lessons per skills/compound-learning/SKILL.md.
|
|
7014
7014
|
// The rules/docs targets come from the overrides file; artifacts travel as
|
|
7015
7015
|
// paths through the dispatch's `artifacts` array, never as pasted bodies.
|
|
7016
|
-
pi.registerCommand("compound", {
|
|
7017
|
-
description: "Capture this session's lessons into the project's rules/docs via the documenter: /compound [focus]",
|
|
7016
|
+
pi.registerCommand("af-compound", {
|
|
7017
|
+
description: "Capture this session's lessons into the project's rules/docs via the documenter: /af-compound [focus]",
|
|
7018
7018
|
handler: async (args, ctx) => {
|
|
7019
7019
|
if (!agentStates.has("documenter")) {
|
|
7020
7020
|
ctx.ui.notify(
|
|
7021
|
-
"compound: the documenter persona is not in the active team — switch with /agents-team (e.g. default or release), then re-run /compound.",
|
|
7021
|
+
"compound: the documenter persona is not in the active team — switch with /af-agents-team (e.g. default or release), then re-run /af-compound.",
|
|
7022
7022
|
"warning",
|
|
7023
7023
|
);
|
|
7024
7024
|
return;
|
|
@@ -7053,9 +7053,9 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
7053
7053
|
},
|
|
7054
7054
|
});
|
|
7055
7055
|
|
|
7056
|
-
// ── ask_user wait tracking (for /agents-history real-work) ──
|
|
7056
|
+
// ── ask_user wait tracking (for /af-agents-history real-work) ──
|
|
7057
7057
|
// pi-ask-user blocks the dispatcher turn while the human answers. Bracket each
|
|
7058
|
-
// ask_user call with its tool_execution start/end so /agents-history can subtract
|
|
7058
|
+
// ask_user call with its tool_execution start/end so /af-agents-history can subtract
|
|
7059
7059
|
// that "away from keyboard" time from the dispatcher's real work.
|
|
7060
7060
|
pi.on("tool_execution_start", async (event) => {
|
|
7061
7061
|
if (event.toolName === "ask_user") askUserStarts.set(event.toolCallId, Date.now());
|
|
@@ -7075,7 +7075,7 @@ Finish with the artifact-relative path plus a digest of no more than 10 lines. I
|
|
|
7075
7075
|
// ── System Prompt Override ───────────────────
|
|
7076
7076
|
|
|
7077
7077
|
pi.on("before_agent_start", async (_event, _ctx) => {
|
|
7078
|
-
// Open a fresh dispatcher turn for /agents-history. The orchestrator entry is
|
|
7078
|
+
// Open a fresh dispatcher turn for /af-agents-history. The orchestrator entry is
|
|
7079
7079
|
// created lazily (only if this turn actually dispatches), so chat-only turns
|
|
7080
7080
|
// add no history rows. Defensively close any entry a prior turn left open
|
|
7081
7081
|
// (e.g. an aborted turn where agent_end never fired).
|
|
@@ -7220,7 +7220,7 @@ to how interesting the work is.
|
|
|
7220
7220
|
|
|
7221
7221
|
## Execution mode: ${hubMode}${turnTaskTier ? ` · tier: ${turnTaskTier}` : ""}
|
|
7222
7222
|
Budgets for THIS user turn (enforced by the hub — exhausted budgets make dispatch_agent/
|
|
7223
|
-
spawn_research refuse; a new user message opens a fresh window; /hub-mode switches mode):
|
|
7223
|
+
spawn_research refuse; a new user message opens a fresh window; /af-hub-mode switches mode):
|
|
7224
7224
|
- dispatch_agent calls: ${cap(budget.maxDispatches)} · spawn_research calls: ${cap(budget.maxResearch)}
|
|
7225
7225
|
- turn wall clock: ${capMin(budget.wallMs)} · per-run deadline: ${capMin(budget.agentTurnMs)}
|
|
7226
7226
|
Plan within the budget: batch related work into ONE dispatch (a coherent slice of 4–6
|
|
@@ -7238,7 +7238,7 @@ ${hubMode === "fast"
|
|
|
7238
7238
|
verification and report back.
|
|
7239
7239
|
- Nested delegation is disabled; do not commission inventories or parity audits.
|
|
7240
7240
|
- If the task turns out to be larger than fast mode fits, say so and ask the user to
|
|
7241
|
-
switch modes (/hub-mode standard) instead of burning the budget.`
|
|
7241
|
+
switch modes (/af-hub-mode standard) instead of burning the budget.`
|
|
7242
7242
|
: hubMode === "standard"
|
|
7243
7243
|
? `STANDARD mode rules: rigor where it pays, batching everywhere else.
|
|
7244
7244
|
- At most ONE reconnaissance pass before building (skip it for familiar code); prefer the
|
|
@@ -7303,12 +7303,12 @@ You are ALSO a peer on the coms mesh — project "${identity.project}", name "${
|
|
|
7303
7303
|
your own team you can talk to the peers in your coms POOL — the agents shown in the pool widget:
|
|
7304
7304
|
- \`coms_list\` — discover the peers in your pool (names, models, live context usage). The pool is
|
|
7305
7305
|
scoped to YOUR project and excludes private (explicit) peers. You CANNOT widen this — only the human
|
|
7306
|
-
can, with \`/coms --project <name>\` or \`/coms --all\`. Do not ask coms_list for other projects.
|
|
7306
|
+
can, with \`/af-coms --project <name>\` or \`/af-coms --all\`. Do not ask coms_list for other projects.
|
|
7307
7307
|
- \`coms_send\` returns a msg_id; then \`coms_await\` (blocking) or \`coms_get\` (poll) reads the reply.
|
|
7308
7308
|
This lets you use a peer as an on-demand subagent: send a SELF-CONTAINED task, await it, and fold the
|
|
7309
7309
|
result into your plan. A peer does NOT share your context — spell out everything it needs.
|
|
7310
|
-
- Only peers in your pool are reachable. \`coms_send\`/\`/handoff\` to anyone outside it is refused. If
|
|
7311
|
-
you need a peer that is not in the pool, ASK THE HUMAN to widen scope (\`/coms --project\`/\`--all\`),
|
|
7310
|
+
- Only peers in your pool are reachable. \`coms_send\`/\`/af-handoff\` to anyone outside it is refused. If
|
|
7311
|
+
you need a peer that is not in the pool, ASK THE HUMAN to widen scope (\`/af-coms --project\`/\`--all\`),
|
|
7312
7312
|
then retry. Do not pass cross-project context to a peer unless the human approved that reach.
|
|
7313
7313
|
- Prefer \`dispatch_agent\`/\`spawn_research\` for in-team work; reach for coms when a task needs another
|
|
7314
7314
|
STANDING agent already in your pool (a human-driven peer, a specialist outside this team).
|
|
@@ -7328,8 +7328,8 @@ ${languageLines}
|
|
|
7328
7328
|
## Active Team: ${activeTeamName}
|
|
7329
7329
|
Members: ${teamMembers}
|
|
7330
7330
|
You can ONLY dispatch to agents listed below. Do not attempt to dispatch to agents
|
|
7331
|
-
outside this team. The roster CAN change mid-session: the human via /agents-add,
|
|
7332
|
-
/agents-drop, /agents-team — or you via \`team_adjust\` (add/drop with a reason)
|
|
7331
|
+
outside this team. The roster CAN change mid-session: the human via /af-agents-add,
|
|
7332
|
+
/af-agents-drop, /af-agents-team — or you via \`team_adjust\` (add/drop with a reason)
|
|
7333
7333
|
when the current roster genuinely cannot serve the task. Use it sparingly; more
|
|
7334
7334
|
personas is usually the wrong answer.
|
|
7335
7335
|
|
|
@@ -7419,7 +7419,7 @@ ${researchCatalog}`;
|
|
|
7419
7419
|
}
|
|
7420
7420
|
researchStates.clear();
|
|
7421
7421
|
nextResearchId = 1;
|
|
7422
|
-
// Wipe the /agents-history log from any previous session.
|
|
7422
|
+
// Wipe the /af-agents-history log from any previous session.
|
|
7423
7423
|
executionHistory.length = 0;
|
|
7424
7424
|
currentOrchestratorEntry = null;
|
|
7425
7425
|
turnActive = false;
|
|
@@ -7640,7 +7640,7 @@ ${researchCatalog}`;
|
|
|
7640
7640
|
|
|
7641
7641
|
// ── Damage-control shared exemptions file ──
|
|
7642
7642
|
// One per hub session (solo mode included). Exporting the path on our own
|
|
7643
|
-
// process.env lets the co-loaded damage-control-continue mirror /allow
|
|
7643
|
+
// process.env lets the co-loaded damage-control-continue mirror /af-allow
|
|
7644
7644
|
// session grants into the same file the spawned children read.
|
|
7645
7645
|
if (!exemptionsFile) {
|
|
7646
7646
|
exemptionsFile = exemptionsFilePath(identity?.session_id ?? `hub-solo-${process.pid}`);
|
|
@@ -7737,7 +7737,7 @@ ${researchCatalog}`;
|
|
|
7737
7737
|
if (!def) {
|
|
7738
7738
|
profileErrors.push(`profile "${profileName}": unknown persona "${persona}"`);
|
|
7739
7739
|
} else if (!allowedModels(def).includes(model)) {
|
|
7740
|
-
profileErrors.push(`profile "${profileName}": ${persona} does not declare ${model} (model:/models: in ${def.file})`);
|
|
7740
|
+
profileErrors.push(`profile "${profileName}": ${persona} does not declare ${model} (model:/af-models: in ${def.file})`);
|
|
7741
7741
|
}
|
|
7742
7742
|
}
|
|
7743
7743
|
}
|
|
@@ -7763,13 +7763,13 @@ ${researchCatalog}`;
|
|
|
7763
7763
|
// least one orchestrator persona exists, so it never blocks with nothing to pick.
|
|
7764
7764
|
orchestratorPersonas = allAgentDefs.filter(d => (d.kind || "").toLowerCase() === "orchestrator");
|
|
7765
7765
|
// Research personas (kind: research) — spawnable read-only via spawn_research and
|
|
7766
|
-
// the /research command, independent of team membership.
|
|
7766
|
+
// the /af-research command, independent of team membership.
|
|
7767
7767
|
researchPersonas = allAgentDefs.filter(d => (d.kind || "").toLowerCase() === "research");
|
|
7768
7768
|
dispatcherPersona = null;
|
|
7769
7769
|
personaGateEnabled = overrides.personaGate && orchestratorPersonas.length > 0;
|
|
7770
7770
|
personaGateSatisfied = !personaGateEnabled;
|
|
7771
7771
|
|
|
7772
|
-
// Default to first team — use /agents-team to switch
|
|
7772
|
+
// Default to first team — use /af-agents-team to switch
|
|
7773
7773
|
const teamNames = Object.keys(teams);
|
|
7774
7774
|
if (teamNames.length > 0) {
|
|
7775
7775
|
activateTeam(teamNames[0]);
|
|
@@ -7807,7 +7807,7 @@ ${researchCatalog}`;
|
|
|
7807
7807
|
? "off (no `kind: orchestrator` personas found)"
|
|
7808
7808
|
: "off (set `persona-gate: on` to enable)";
|
|
7809
7809
|
const comsLabel = comsReady && identity
|
|
7810
|
-
? `📡 ${identity.name}@${identity.project} — peers via coms_list; /handoff <peer> to delegate`
|
|
7810
|
+
? `📡 ${identity.name}@${identity.project} — peers via coms_list; /af-handoff <peer> to delegate`
|
|
7811
7811
|
: soloMode
|
|
7812
7812
|
? "off (--solo: fixed specialists + research only)"
|
|
7813
7813
|
: "off (endpoint bind failed — coms tools disabled)";
|
|
@@ -7818,9 +7818,9 @@ ${researchCatalog}`;
|
|
|
7818
7818
|
.filter(([, s]) => s.prefer === "coms")
|
|
7819
7819
|
.map(([n]) => n);
|
|
7820
7820
|
const dispatchLabel = dispatchPolicy.default === "coms"
|
|
7821
|
-
? "coms default — any member with a live same-name pool peer is served by it (/dispatch-policy)"
|
|
7821
|
+
? "coms default — any member with a live same-name pool peer is served by it (/af-dispatch-policy)"
|
|
7822
7822
|
: comsPreferred.length > 0
|
|
7823
|
-
? `coms-preferred: ${comsPreferred.join(", ")} (live peer wins, /dispatch-policy for status)`
|
|
7823
|
+
? `coms-preferred: ${comsPreferred.join(", ")} (live peer wins, /af-dispatch-policy for status)`
|
|
7824
7824
|
: "all native (no substitutions in .pi/agents/dispatch-policy.yaml)";
|
|
7825
7825
|
_ctx.ui.notify(
|
|
7826
7826
|
`Team: ${activeTeamName} (${members})\n` +
|
|
@@ -7831,25 +7831,25 @@ ${researchCatalog}`;
|
|
|
7831
7831
|
`Persona gate: ${personaGateLabel}\n` +
|
|
7832
7832
|
`Coms: ${comsLabel}\n` +
|
|
7833
7833
|
`Fleet: ${fleetLabel}\n\n` +
|
|
7834
|
-
`/agents-team Select a team\n` +
|
|
7835
|
-
`/agents-list List active agents and status\n` +
|
|
7836
|
-
`/agents-history Timeline of agent runs — durations, parallel markers, grand total\n` +
|
|
7837
|
-
`/agent-model <persona>[.<role>] Switch a persona's or sub-role's model\n` +
|
|
7838
|
-
`/agent-model-thinking <persona> Switch a persona's thinking level\n` +
|
|
7839
|
-
`/models [profile] Apply a named model profile to the team\n` +
|
|
7840
|
-
`/agent-models-substitute <src> <tgt> Swap one model across all personas\n` +
|
|
7841
|
-
`/dispatch-policy Show which members route to coms peers (dispatch-policy.yaml)\n` +
|
|
7842
|
-
`/agents-kill <name> SIGTERM a frozen specialist (and its delegate children)\n` +
|
|
7843
|
-
`/agents-restart <name> Kill + re-run its last task fresh\n` +
|
|
7844
|
-
`/zoom <name|rN|child> Scrollable view of an agent / research / delegate-child stream\n` +
|
|
7845
|
-
`/research <task> Spawn a read-only research helper (@persona, --model)\n` +
|
|
7846
|
-
`/research-cont rN ... Resume a finished research helper\n` +
|
|
7847
|
-
`/research-rm rN Remove a research helper (kill if running)\n` +
|
|
7848
|
-
`/research-clear Remove all research helpers\n` +
|
|
7849
|
-
`/persona Select/reset the dispatcher persona\n` +
|
|
7850
|
-
`/coms [--all|--project N] Refresh the coms peer pool\n` +
|
|
7851
|
-
`/handoff <peer> Hand the session off to a coms peer\n` +
|
|
7852
|
-
`/compound [focus] Capture session lessons into the project rules/docs`,
|
|
7834
|
+
`/af-agents-team Select a team\n` +
|
|
7835
|
+
`/af-agents-list List active agents and status\n` +
|
|
7836
|
+
`/af-agents-history Timeline of agent runs — durations, parallel markers, grand total\n` +
|
|
7837
|
+
`/af-agent-model <persona>[.<role>] Switch a persona's or sub-role's model\n` +
|
|
7838
|
+
`/af-agent-model-thinking <persona> Switch a persona's thinking level\n` +
|
|
7839
|
+
`/af-models [profile] Apply a named model profile to the team\n` +
|
|
7840
|
+
`/af-agent-models-substitute <src> <tgt> Swap one model across all personas\n` +
|
|
7841
|
+
`/af-dispatch-policy Show which members route to coms peers (dispatch-policy.yaml)\n` +
|
|
7842
|
+
`/af-agents-kill <name> SIGTERM a frozen specialist (and its delegate children)\n` +
|
|
7843
|
+
`/af-agents-restart <name> Kill + re-run its last task fresh\n` +
|
|
7844
|
+
`/af-zoom <name|rN|child> Scrollable view of an agent / research / delegate-child stream\n` +
|
|
7845
|
+
`/af-research <task> Spawn a read-only research helper (@persona, --model)\n` +
|
|
7846
|
+
`/af-research-cont rN ... Resume a finished research helper\n` +
|
|
7847
|
+
`/af-research-rm rN Remove a research helper (kill if running)\n` +
|
|
7848
|
+
`/af-research-clear Remove all research helpers\n` +
|
|
7849
|
+
`/af-persona Select/reset the dispatcher persona\n` +
|
|
7850
|
+
`/af-coms [--all|--project N] Refresh the coms peer pool\n` +
|
|
7851
|
+
`/af-handoff <peer> Hand the session off to a coms peer\n` +
|
|
7852
|
+
`/af-compound [focus] Capture session lessons into the project rules/docs`,
|
|
7853
7853
|
"info",
|
|
7854
7854
|
);
|
|
7855
7855
|
_ctx.ui.setStatus("dispatcher-persona", personaGateEnabled ? "Persona: (pick one)" : "Persona: Default");
|
|
@@ -7878,7 +7878,7 @@ ${researchCatalog}`;
|
|
|
7878
7878
|
|
|
7879
7879
|
const left = renderHubFooterLeft(theme, HARNESS_VERSION, model, think, activeTeamName);
|
|
7880
7880
|
const hint = theme.fg("muted", "Alt+A ") + theme.fg("dim", `view:${viewMode}`);
|
|
7881
|
-
// The btw extension flips this global the first time a /btw command or
|
|
7881
|
+
// The btw extension flips this global the first time a /af-btw command or
|
|
7882
7882
|
// Alt+' is used; surface its reopen shortcut right next to the Alt+A hint.
|
|
7883
7883
|
const btwHint = (globalThis as { __btwActivated?: boolean }).__btwActivated
|
|
7884
7884
|
? theme.fg("muted", " · Alt+' ") + theme.fg("dim", "btw")
|
|
@@ -7910,7 +7910,7 @@ ${researchCatalog}`;
|
|
|
7910
7910
|
// When this agent was addressed by a peer (an inbound prompt in the queue), the
|
|
7911
7911
|
// turn's final assistant text becomes the response we ship back to the sender.
|
|
7912
7912
|
pi.on("agent_end", async (_event, ctx) => {
|
|
7913
|
-
// Close the /agents-history dispatcher turn (if this turn opened one). The
|
|
7913
|
+
// Close the /af-agents-history dispatcher turn (if this turn opened one). The
|
|
7914
7914
|
// orchestrator entry's span covers all of its dispatches plus the wrap-up.
|
|
7915
7915
|
turnActive = false;
|
|
7916
7916
|
if (currentOrchestratorEntry) {
|