@chankov/agent-fleet 2.0.8 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/harnesses/agent-hub/README.md +20 -6
- package/.pi/harnesses/agent-hub/footer.ts +1 -1
- package/.pi/harnesses/agent-hub/index.ts +47 -66
- package/.pi/harnesses/agent-hub/input/shortcuts.ts +2 -0
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/ui/fleet-actions.ts +76 -0
- package/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +16 -42
- package/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.pi/harnesses/agent-hub/ui/fleet-source.ts +157 -0
- package/.pi/harnesses/agent-hub/ui/grid.ts +145 -33
- package/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -139
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/fleet-dashboard-ops.ts +17 -0
- package/.pi/harnesses/lib/fleet-dashboard-view.ts +22 -36
- package/.pi/harnesses/lib/fleet-read-model.ts +109 -27
- package/.pi/harnesses/lib/fleet-strip-controller.ts +74 -0
- package/.pi/harnesses/lib/fleet-strip-view.ts +132 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.9/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.9/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/fleet.ts +216 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/flow.ts +137 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/flow-command.ts +93 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +133 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.9/.pi/agent-fleet/scripts/workflows/wf-scout.ts +38 -0
- package/.versions/2.0.9/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.9/.pi/agents/model-profiles.yaml +83 -0
- package/.versions/2.0.9/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.9/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.9/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.9/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.9/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.9/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.9/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.9/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.9/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.9/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.9/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.9/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.9/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.9/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.9/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.9/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.9/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.9/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.9/.pi/extensions/package.json +9 -0
- package/.versions/2.0.9/.pi/extensions/pi-voice-stt/README.md +205 -0
- package/.versions/2.0.9/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.9/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.9/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.9/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.9/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.9/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/README.md +1217 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/acceptance.ts +62 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/budget-recovery.ts +97 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/capability-packs.ts +180 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/context.ts +43 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/config/agents.ts +177 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/config/model-profiles.ts +216 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/config/overrides.ts +153 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +213 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/context/budgets.ts +202 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/context-window.js +106 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/delegate.ts +446 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/dispatch-coms.ts +237 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/dispatch-native-complete.ts +154 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +156 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +193 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/dispatch-native-types.ts +230 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/dispatch-native.ts +213 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/drift-watchdog.js +218 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/fixtures/registration-surface.json +57 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/helpers.ts +266 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/hub-state-audit.js +64 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/index.ts +2132 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/input/completions.ts +76 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +123 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/no-progress.ts +76 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/policy/work-mode.ts +119 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/prompts/context.ts +47 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/prompts/fragments.ts +115 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/prompts/system-prompt.ts +112 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/research/runtime.ts +192 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/research/spawn-run.ts +156 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/return-contract.js +293 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/return-extract.js +75 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/review-findings.js +102 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/run-budget.js +537 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/run-namespace.js +87 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/scope-gate.js +123 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/spawn.ts +404 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/timeline.ts +54 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/tools/action-executors.ts +149 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/tools/context.ts +134 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +82 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +273 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/tools/set-task-tier.ts +29 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/tools/spawn-research.ts +62 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/tools/verification-contract.ts +77 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/types.ts +63 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/activity-dots.ts +16 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/context-budget.ts +86 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/detail-panel.ts +178 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/fleet-actions.ts +76 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +99 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/fleet-source.ts +157 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/grid.ts +154 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/ui/zoom.ts +204 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.9/.pi/harnesses/agent-hub/work-mode.ts +167 -0
- package/.versions/2.0.9/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.9/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.9/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.9/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.9/.pi/harnesses/ask-user-remote/runtime-ask.ts +43 -0
- package/.versions/2.0.9/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.9/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.9/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.9/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.9/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.9/.pi/harnesses/damage-control-continue/index.ts +541 -0
- package/.versions/2.0.9/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.9/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.9/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.9/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.9/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.9/.pi/harnesses/lib/context-budget-child-prompt.ts +180 -0
- package/.versions/2.0.9/.pi/harnesses/lib/context-budget-hub-prompt.ts +114 -0
- package/.versions/2.0.9/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.9/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.9/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fleet-dashboard-view.ts +134 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fleet-detail-view.ts +247 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fleet-read-model.ts +213 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fleet-strip-controller.ts +74 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fleet-strip-view.ts +132 -0
- package/.versions/2.0.9/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.9/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.9/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.9/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.9/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.9/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.9/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.9/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.9/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.9/.pi/harnesses/lib/spawned-peers.js +190 -0
- package/.versions/2.0.9/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.9/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.9/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.9/.pi/prompts/af-build.md +24 -0
- package/.versions/2.0.9/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.9/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.9/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.9/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.9/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.9/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.9/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.9/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.9/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.9/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.9/.version +1 -0
- package/.versions/2.0.9/agents/architect.md +25 -0
- package/.versions/2.0.9/agents/bowser.md +28 -0
- package/.versions/2.0.9/agents/builder.md +56 -0
- package/.versions/2.0.9/agents/code-reviewer.md +210 -0
- package/.versions/2.0.9/agents/deep-researcher.md +33 -0
- package/.versions/2.0.9/agents/documenter.md +23 -0
- package/.versions/2.0.9/agents/orchestrator.md +23 -0
- package/.versions/2.0.9/agents/plan-reviewer.md +84 -0
- package/.versions/2.0.9/agents/planner.md +106 -0
- package/.versions/2.0.9/agents/releaser.md +25 -0
- package/.versions/2.0.9/agents/researcher.md +31 -0
- package/.versions/2.0.9/agents/security-auditor.md +168 -0
- package/.versions/2.0.9/agents/test-engineer.md +154 -0
- package/.versions/2.0.9/agents/web-debugger.md +44 -0
- package/.versions/2.0.9/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.9/bin/catalog/harness-runtime-closure.json +32 -0
- package/.versions/2.0.9/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.9/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.9/docs/ARCHITECTURE.md +416 -0
- package/.versions/2.0.9/docs/agent-fleet-setup.md +568 -0
- package/.versions/2.0.9/docs/claude-code-coms-bridge.md +134 -0
- package/.versions/2.0.9/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.9/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.9/docs/getting-started.md +126 -0
- package/.versions/2.0.9/docs/npm-install.md +356 -0
- package/.versions/2.0.9/docs/pi-extensions.md +449 -0
- package/.versions/2.0.9/docs/pi-setup.md +76 -0
- package/.versions/2.0.9/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.9/install-manifest.json +2991 -0
- package/.versions/2.0.9/justfile +247 -0
- package/.versions/2.0.9/manifest-meta.json +970 -0
- package/.versions/2.0.9/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.9/references/communication-contract.md +26 -0
- package/.versions/2.0.9/references/definition-of-done.md +67 -0
- package/.versions/2.0.9/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.9/references/observability-checklist.md +92 -0
- package/.versions/2.0.9/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.9/references/performance-checklist.md +236 -0
- package/.versions/2.0.9/references/prompting-patterns.md +380 -0
- package/.versions/2.0.9/references/security-checklist.md +245 -0
- package/.versions/2.0.9/references/testing-patterns.md +235 -0
- package/.versions/2.0.9/references/workflow-authoring.md +304 -0
- package/.versions/2.0.9/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.9/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.9/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.9/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.9/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.9/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.9/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.9/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.9/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.9/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.9/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.9/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.9/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.9/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.9/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.9/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.9/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.9/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.9/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.9/skills/incremental-implementation/SKILL.md +302 -0
- package/.versions/2.0.9/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.9/skills/orchestration-verification/SKILL.md +181 -0
- package/.versions/2.0.9/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.9/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.9/skills/planning-and-task-breakdown/SKILL.md +289 -0
- package/.versions/2.0.9/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.9/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.9/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.9/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +24 -0
- package/docs/pi-extensions.md +3 -0
- package/install-manifest.json +1 -1
- package/package.json +34 -12
|
@@ -158,9 +158,9 @@ Every borrowed idea from another harness passes one test before it lands: *does
|
|
|
158
158
|
`kind: research` personas ship by default: `researcher` (`gpt-5.6-luna`, low thinking) for simple
|
|
159
159
|
reads and `deep-researcher` (`grok-4.6`, medium thinking) for hard, cross-cutting investigation.
|
|
160
160
|
The dispatcher routes by persona; each persona's model + thinking level is shown in its catalog.
|
|
161
|
-
Live helpers appear
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
Live helpers appear in the Fleet Dashboard (`Alt+A`) and bounded fleet widget while they are
|
|
162
|
+
running. On every terminal outcome (success, error, timeout, spawn/preflight failure, or operator
|
|
163
|
+
kill) the live `rN` handle is removed immediately.
|
|
164
164
|
Session, transcript, and `findings/*.md` files remain on disk for the requester, and
|
|
165
165
|
`/af-agents-history` keeps the audit/timing record. Finished helpers cannot be restarted; a new
|
|
166
166
|
request always creates a fresh helper. `rN` handles are never reused during a Hub session.
|
|
@@ -377,8 +377,20 @@ execution **tree**:
|
|
|
377
377
|
Navigate with `↑/↓`, press `G` to jump back to the live tail, and `Q`/`Esc` to close. The log resets
|
|
378
378
|
on each session start.
|
|
379
379
|
|
|
380
|
-
The default agent view
|
|
381
|
-
|
|
380
|
+
The default agent view includes a collapsed fleet summary below the editor. When the installed public
|
|
381
|
+
SDK editor contract can be positively verified, an empty focused editor can activate its bounded
|
|
382
|
+
inspection window with the registered `Alt+I` shortcut; the same chord collapses it, and `j`/`k`
|
|
383
|
+
select. Enter opens detail, while `x`/`r` use the same two-press confirmation and ownership checks as
|
|
384
|
+
the dashboard. Plain and Alt arrow keys remain editor input unchanged and exactly once. Existing
|
|
385
|
+
`Alt+M` and `Alt+A` shortcuts continue to open the work-mode picker and Fleet Dashboard exactly once
|
|
386
|
+
from either widget state. Autocomplete, paste, key release,
|
|
387
|
+
non-empty/unfocused editors, modal UI, RPC/print/headless modes, and unsupported custom editors do not
|
|
388
|
+
activate it; unsupported environments retain a noninteractive summary without a key hint. The window
|
|
389
|
+
uses at most `floor(terminal.rows / 3)` rows including chrome, retains completed/error runs for exactly
|
|
390
|
+
10 seconds (or while the same selected run is pinned), and separates active peers from task counts.
|
|
391
|
+
Both fleet surfaces scrub terminal controls and size Unicode by display cells. A confirmed coms kill
|
|
392
|
+
aborts only the local request—the confirmation explicitly notes that the peer pane keeps running.
|
|
393
|
+
The coms pool panel remains at the **bottom of the Fleet Dashboard**.
|
|
382
394
|
|
|
383
395
|
### Work Mode picker
|
|
384
396
|
|
|
@@ -391,7 +403,9 @@ terminal must send Option as Meta or Alt+M will not reach the Hub.
|
|
|
391
403
|
### Fleet Dashboard and detail
|
|
392
404
|
|
|
393
405
|
Press **`Alt+A`** or run **`/af-agents-list`** to open the full-screen **Fleet Dashboard**. It is a
|
|
394
|
-
live overlay
|
|
406
|
+
live overlay backed by the same fleet source as the compact widget and lists specialists, true nested
|
|
407
|
+
delegates, running research helpers, and coms peers. Dashboard filtering remains independent from the
|
|
408
|
+
widget, and `/af-zoom` continues to use an unfiltered key lookup.
|
|
395
409
|
The bordered **coms** panel is pinned to the bottom of this overlay. The dashboard shows status,
|
|
396
410
|
hierarchy, model, context/tokens, elapsed time, tool count, and recent work; its summary counts
|
|
397
411
|
running/done/failed rows, overlap-aware wall time, and visible token totals. Finished/idle/stale
|
|
@@ -16,7 +16,7 @@ export function composeHubFooterLeft(
|
|
|
16
16
|
|
|
17
17
|
export function composeFleetFooterHint(executionPair?: string): string {
|
|
18
18
|
const work = executionPair ? ` · Alt+M ${executionPair}` : "";
|
|
19
|
-
return `Alt+A fleet${work}`;
|
|
19
|
+
return `Alt+A fleet · Alt+I inspect${work}`;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export function renderHubFooterLeft(
|
|
@@ -114,7 +114,8 @@ import {
|
|
|
114
114
|
TIMEOUT_MS,
|
|
115
115
|
} from "../lib/coms-core.ts";
|
|
116
116
|
import { createGridUI } from "./ui/grid.ts";
|
|
117
|
-
import {
|
|
117
|
+
import { createFleetSource } from "./ui/fleet-source.ts";
|
|
118
|
+
import { createFleetActions } from "./ui/fleet-actions.ts";
|
|
118
119
|
import { createDetailPanel } from "./ui/detail-panel.ts";
|
|
119
120
|
import { createFleetDashboard } from "./ui/fleet-dashboard.ts";
|
|
120
121
|
import { createContextBudgetUi } from "./ui/context-budget.ts";
|
|
@@ -130,7 +131,7 @@ import { openZoom, type TimelineEntry, type Zoomable } from "./ui/zoom.ts";
|
|
|
130
131
|
import { openHistory } from "./ui/history.ts";
|
|
131
132
|
import { createExecutionHistoryStore, type HistoryEntry } from "./ui/history-store.ts";
|
|
132
133
|
import { createDispatchComs, createDispatchNative, createDispatchObservability, type DelegationChild } from "./dispatch-core.ts";
|
|
133
|
-
import {
|
|
134
|
+
import type { FleetRow } from "../lib/fleet-read-model.ts";
|
|
134
135
|
import { gridColumnsForSize } from "../lib/fleet-dashboard-ops.ts";
|
|
135
136
|
import { createFleetTranscriptStore } from "../lib/fleet-transcript-store.ts";
|
|
136
137
|
import type { ContextBudgetComponent } from "../lib/context-budget.ts";
|
|
@@ -173,10 +174,11 @@ export default function (pi: ExtensionAPI) {
|
|
|
173
174
|
|
|
174
175
|
// ── Embedded coms: shared peer state ──
|
|
175
176
|
let currentCtx: ExtensionContext | null = null;
|
|
177
|
+
let refreshFleetUi = () => {};
|
|
176
178
|
const coms = createComsPeer({
|
|
177
179
|
pi,
|
|
178
180
|
getContext: () => currentCtx,
|
|
179
|
-
onPeersChanged: () =>
|
|
181
|
+
onPeersChanged: () => refreshFleetUi(),
|
|
180
182
|
acceptInbound: () => currentCtx && modelWorkBlockedByRosterRecovery(currentCtx)
|
|
181
183
|
? "orchestrator roster recovery required"
|
|
182
184
|
: null,
|
|
@@ -606,70 +608,31 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
606
608
|
return shortModel(resolvedModel(def)) + thinkingSuffix(resolvedThinking(def));
|
|
607
609
|
}
|
|
608
610
|
|
|
609
|
-
// ──
|
|
611
|
+
// ── Shared fleet source + below-editor widget ───────────────────────────
|
|
612
|
+
const fleetSource = createFleetSource({
|
|
613
|
+
getAgents: () => agentStates,
|
|
614
|
+
getResearch: () => researchStates,
|
|
615
|
+
getPeerInputs: format => fleetPeerInputs(format),
|
|
616
|
+
getPeerCards: () => peerCards,
|
|
617
|
+
getPendingReplies: () => pendingReplies.values(),
|
|
618
|
+
displayName,
|
|
619
|
+
modelForAgent: state => state.lastBackend === "coms" ? shortModel(state.comsPeerModel) : modelWithThinking(state.def),
|
|
620
|
+
modelForResearch: state => shortModel(state.model) + thinkingSuffix(resolvedThinking(state.def)),
|
|
621
|
+
modelForPeer: abbreviateModel,
|
|
622
|
+
});
|
|
623
|
+
let fleetActions: ReturnType<typeof createFleetActions<AgentState, ResearchState>> | null = null;
|
|
624
|
+
let fleetUiGeneration = 0;
|
|
610
625
|
const gridUI = createGridUI({
|
|
611
626
|
getWidgetContext: () => widgetCtx,
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
elapsed: state.elapsed,
|
|
618
|
-
toolCount: state.toolCount,
|
|
619
|
-
messageCount: state.messageCount ?? 0,
|
|
620
|
-
delegations: Array.from(state.delegations?.values() ?? []).map(child => ({
|
|
621
|
-
role: child.role || child.id,
|
|
622
|
-
id: child.id,
|
|
623
|
-
status: child.status,
|
|
624
|
-
model: shortModel(child.model),
|
|
625
|
-
elapsed: child.elapsed,
|
|
626
|
-
startedAt: child.startedAt,
|
|
627
|
-
toolCount: child.toolCount,
|
|
628
|
-
messageCount: child.messageCount ?? 0,
|
|
629
|
-
})),
|
|
630
|
-
}));
|
|
631
|
-
const research = Array.from(researchStates.values()).map(state => ({
|
|
632
|
-
id: state.id,
|
|
633
|
-
persona: state.persona,
|
|
634
|
-
displayName: displayName(state.def.name),
|
|
635
|
-
status: state.status,
|
|
636
|
-
model: shortModel(state.model) + thinkingSuffix(resolvedThinking(state.def)),
|
|
637
|
-
elapsed: state.elapsed,
|
|
638
|
-
toolCount: state.toolCount,
|
|
639
|
-
messageCount: state.messageCount ?? 0,
|
|
640
|
-
}));
|
|
641
|
-
const pendingByName = new Map<string, { count: number; oldest: number }>();
|
|
642
|
-
for (const pending of coms.pendingReplies.values()) {
|
|
643
|
-
if (pending.result || !pending.target_name) continue;
|
|
644
|
-
const started = Date.parse(pending.created_at) || Date.now();
|
|
645
|
-
const prev = pendingByName.get(pending.target_name);
|
|
646
|
-
if (!prev) pendingByName.set(pending.target_name, { count: 1, oldest: started });
|
|
647
|
-
else pendingByName.set(pending.target_name, { count: prev.count + 1, oldest: Math.min(prev.oldest, started) });
|
|
648
|
-
}
|
|
649
|
-
const now = Date.now();
|
|
650
|
-
const comsRows = [];
|
|
651
|
-
const seen = new Set<string>();
|
|
652
|
-
for (const card of peerCards.values()) {
|
|
653
|
-
const pending = pendingByName.get(card.name);
|
|
654
|
-
const running = card.status === "working" || (card.queue_depth ?? 0) > 0 || !!pending;
|
|
655
|
-
if (!running) continue;
|
|
656
|
-
seen.add(card.name);
|
|
657
|
-
comsRows.push({
|
|
658
|
-
name: card.name,
|
|
659
|
-
model: abbreviateModel(card.model),
|
|
660
|
-
elapsed: pending ? now - pending.oldest : 0,
|
|
661
|
-
eventCount: (pending?.count ?? 0) + (card.queue_depth ?? 0),
|
|
662
|
-
running: true,
|
|
663
|
-
});
|
|
664
|
-
}
|
|
665
|
-
for (const [name, pending] of pendingByName) {
|
|
666
|
-
if (seen.has(name)) continue;
|
|
667
|
-
comsRows.push({ name, model: "", elapsed: now - pending.oldest, eventCount: pending.count, running: true });
|
|
668
|
-
}
|
|
669
|
-
return collectRunningStripItems({ specialists, research, coms: comsRows }, now);
|
|
627
|
+
getRows: now => fleetSource.rows(now, { showFinished: true }),
|
|
628
|
+
handleIntent: async intent => {
|
|
629
|
+
if (!fleetActions || !widgetCtx) return;
|
|
630
|
+
if (intent.type === "open") await gridUI.withSuspended(() => fleetActions!.open(intent.key, intent.runToken, widgetCtx!));
|
|
631
|
+
else await fleetActions.execute(intent.type, intent.key, intent.runToken, widgetCtx);
|
|
670
632
|
},
|
|
671
633
|
});
|
|
672
634
|
const { updateWidget } = gridUI;
|
|
635
|
+
refreshFleetUi = updateWidget;
|
|
673
636
|
|
|
674
637
|
// ── Delegation observability ─────────────────
|
|
675
638
|
const dispatchObservability = createDispatchObservability({
|
|
@@ -1715,16 +1678,31 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1715
1678
|
notify: (message, level) => ctx.ui.notify(message, level),
|
|
1716
1679
|
});
|
|
1717
1680
|
|
|
1681
|
+
fleetActions = createFleetActions<AgentState, ResearchState>({
|
|
1682
|
+
getRows: () => fleetSource.rows(Date.now(), { showFinished: true }),
|
|
1683
|
+
getAgents: () => agentStates,
|
|
1684
|
+
getResearch: () => researchStates,
|
|
1685
|
+
parseResearchHandle,
|
|
1686
|
+
displayName,
|
|
1687
|
+
modelWorkBlocked: modelWorkBlockedByRosterRecovery,
|
|
1688
|
+
restartSpecialist: researchControls.restartSpecialist,
|
|
1689
|
+
removeResearch: researchControls.remove,
|
|
1690
|
+
killSpecialistProcess: state => cancelLocalOwnedProcess({ process: state.proc, monitorBridge, monitorKey: monitorKeyForAgent(state.def.name, state.dispatchId ?? state.runCount), treeKill: killPiTree }),
|
|
1691
|
+
abortComs: state => { state.comsAbort?.(); },
|
|
1692
|
+
openDetail: openFleetDetail,
|
|
1693
|
+
generation: () => fleetUiGeneration,
|
|
1694
|
+
});
|
|
1718
1695
|
let fleetShowFinished = false;
|
|
1719
1696
|
let fleetFilter = "";
|
|
1720
1697
|
const fleetDashboard = createFleetDashboard<AgentDef, AgentState, ResearchState>({
|
|
1698
|
+
getFleetRows: (now, unfiltered) => fleetSource.rows(now, unfiltered ? { showFinished: true } : { showFinished: fleetShowFinished, query: fleetFilter }),
|
|
1699
|
+
actions: fleetActions,
|
|
1721
1700
|
getAgents: () => agentStates,
|
|
1722
1701
|
getResearch: () => researchStates,
|
|
1723
1702
|
getShowFinished: () => fleetShowFinished,
|
|
1724
1703
|
setShowFinished: value => { fleetShowFinished = value; },
|
|
1725
1704
|
getFilter: () => fleetFilter,
|
|
1726
1705
|
setFilter: value => { fleetFilter = value; },
|
|
1727
|
-
getPeerInputs: fleetPeerInputs,
|
|
1728
1706
|
parseResearchHandle,
|
|
1729
1707
|
displayName,
|
|
1730
1708
|
shortModel,
|
|
@@ -1743,7 +1721,8 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1743
1721
|
abortComs: state => { state.comsAbort?.(); },
|
|
1744
1722
|
getComsLines: (width, theme) => poolPresentation.render(width, theme),
|
|
1745
1723
|
});
|
|
1746
|
-
const { fleetRows, openFleetDashboard } = fleetDashboard;
|
|
1724
|
+
const { fleetRows, openFleetDashboard: openFleetDashboardRaw } = fleetDashboard;
|
|
1725
|
+
const openFleetDashboard = (ctx: any, startSubstitution = false) => gridUI.withSuspended(() => openFleetDashboardRaw(ctx, startSubstitution));
|
|
1747
1726
|
|
|
1748
1727
|
const contextBudgetUi = createContextBudgetUi<AgentDef, AgentState, ResearchState>({
|
|
1749
1728
|
getAgents: () => agentStates,
|
|
@@ -1793,6 +1772,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1793
1772
|
|
|
1794
1773
|
registerInputShortcuts(pi, {
|
|
1795
1774
|
setWidgetContext: ctx => { widgetCtx = ctx; }, openFleetDashboard,
|
|
1775
|
+
toggleFleetWidget: () => gridUI.toggle(),
|
|
1796
1776
|
workModeStatusText, openWorkModePicker,
|
|
1797
1777
|
});
|
|
1798
1778
|
|
|
@@ -1943,9 +1923,9 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1943
1923
|
terminateResearch: () => { for (const st of researchStates.values()) if (st.proc && st.status === "running") { st.killedByOperator = true; st.proc.kill("SIGTERM"); } },
|
|
1944
1924
|
resetResearch: researchRuntime.reset, resetHistory: executionHistory.reset,
|
|
1945
1925
|
resetBudgets: () => { taskClock = createTaskClock(); turnBudgetAskUserWaitMs = 0; turnContinuationCount = 0; taskContinuationCount = 0; budgetRecovery.reset(); noProgress.reset(); },
|
|
1946
|
-
clearWidgets:
|
|
1926
|
+
clearWidgets: _ctx => { fleetUiGeneration++; fleetActions?.reset(); gridUI.dispose(); },
|
|
1947
1927
|
closeDelegationWatchers: () => { for (const st of agentStates.values()) { st.delegationsWatcher?.close(); st.delegationsWatcher = undefined; } },
|
|
1948
|
-
resetSessionState: ctx => { delegatedTokens = 0; hubSpawnedPeers.clear(); widgetCtx = ctx; contextWindow = ctx.model?.contextWindow || 0; },
|
|
1928
|
+
resetSessionState: ctx => { delegatedTokens = 0; hubSpawnedPeers.clear(); widgetCtx = ctx; contextWindow = ctx.model?.contextWindow || 0; gridUI.reset(); },
|
|
1949
1929
|
resolveSafety: cwd => Boolean(safetyHarnessPath = resolveSafetyHarness(cwd)), resolveDelegate: cwd => { delegateExtPath = resolveDelegateExtension(cwd); },
|
|
1950
1930
|
}),
|
|
1951
1931
|
restartMonitor: _ctx => monitorSession.restart(_ctx),
|
|
@@ -2141,6 +2121,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
2141
2121
|
}
|
|
2142
2122
|
},
|
|
2143
2123
|
clearPoolWidget: () => {
|
|
2124
|
+
gridUI.dispose();
|
|
2144
2125
|
if (currentCtx?.hasUI) try { currentCtx.ui.setWidget("coms-pool", undefined); } catch {}
|
|
2145
2126
|
},
|
|
2146
2127
|
});
|
|
@@ -3,6 +3,7 @@ import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-age
|
|
|
3
3
|
export interface ShortcutPorts {
|
|
4
4
|
setWidgetContext(ctx: ExtensionContext): void;
|
|
5
5
|
openFleetDashboard(ctx: ExtensionContext): Promise<void>;
|
|
6
|
+
toggleFleetWidget(ctx: ExtensionContext): void;
|
|
6
7
|
workModeStatusText(): string;
|
|
7
8
|
openWorkModePicker(ctx: ExtensionContext): Promise<void>;
|
|
8
9
|
}
|
|
@@ -15,4 +16,5 @@ export function registerInputShortcuts(pi: ExtensionAPI, ports: ShortcutPorts):
|
|
|
15
16
|
if (!ctx.hasUI || typeof ctx.ui.select !== "function") { ctx.ui.notify(`${ports.workModeStatusText()}\nSwitch with /af-work-mode operator|orchestrator`, "info"); return; }
|
|
16
17
|
void ports.openWorkModePicker(ctx);
|
|
17
18
|
} });
|
|
19
|
+
pi.registerShortcut("alt+i", { description: "Toggle Fleet widget", handler: ctx => { withContext(ctx); ports.toggleFleetWidget(ctx); } });
|
|
18
20
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { ChildProcess } from "node:child_process";
|
|
2
|
+
import { resolveFleetKill, resolveFleetRestart, type FleetAction } from "../../lib/fleet-dashboard-ops.ts";
|
|
3
|
+
import type { FleetRow } from "../../lib/fleet-read-model.ts";
|
|
4
|
+
import type { DetailUiContext } from "./detail-panel.ts";
|
|
5
|
+
|
|
6
|
+
export interface FleetActionAgent {
|
|
7
|
+
def: { name: string };
|
|
8
|
+
task?: string;
|
|
9
|
+
proc?: ChildProcess;
|
|
10
|
+
comsAbort?: () => void;
|
|
11
|
+
killedByOperator?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface FleetActionsDeps<TAgent extends FleetActionAgent, TResearch> {
|
|
14
|
+
getRows(): readonly FleetRow[];
|
|
15
|
+
getAgents(): ReadonlyMap<string, TAgent>;
|
|
16
|
+
getResearch(): ReadonlyMap<number, TResearch>;
|
|
17
|
+
parseResearchHandle(value: string): number | null;
|
|
18
|
+
displayName(name: string): string;
|
|
19
|
+
modelWorkBlocked(ctx: DetailUiContext): boolean;
|
|
20
|
+
restartSpecialist(state: TAgent, ctx: DetailUiContext): Promise<void>;
|
|
21
|
+
removeResearch(state: TResearch, ctx: DetailUiContext): void;
|
|
22
|
+
killSpecialistProcess(state: TAgent): void;
|
|
23
|
+
abortComs(state: TAgent): void;
|
|
24
|
+
openDetail(row: FleetRow, ctx: DetailUiContext, verbose?: boolean): Promise<boolean>;
|
|
25
|
+
generation(): number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Shared dashboard/widget actions with fresh lookup, ownership checks and async deduplication. */
|
|
29
|
+
export function createFleetActions<TAgent extends FleetActionAgent, TResearch>(deps: FleetActionsDeps<TAgent, TResearch>) {
|
|
30
|
+
const pending = new Set<string>();
|
|
31
|
+
function fresh(key: string, runToken?: string): FleetRow | undefined {
|
|
32
|
+
return deps.getRows().find(row => row.key === key && (!runToken || row.runToken === runToken));
|
|
33
|
+
}
|
|
34
|
+
async function execute(action: FleetAction, key: string, runToken: string | undefined, ctx: DetailUiContext): Promise<void> {
|
|
35
|
+
const guard = `${action}:${key}:${runToken ?? ""}`;
|
|
36
|
+
if (pending.has(guard)) return;
|
|
37
|
+
const selected = fresh(key, runToken);
|
|
38
|
+
if (!selected || !runToken) { ctx.ui.notify("Selected fleet run is no longer available.", "warning"); return; }
|
|
39
|
+
const generation = deps.generation();
|
|
40
|
+
if (action === "restart") {
|
|
41
|
+
if (deps.modelWorkBlocked(ctx)) return;
|
|
42
|
+
const decision = resolveFleetRestart(selected, { specialistRestartable: candidate => !!deps.getAgents().get(candidate)?.task });
|
|
43
|
+
if (decision.action === "unsupported") { ctx.ui.notify(decision.message, decision.level); return; }
|
|
44
|
+
const state = deps.getAgents().get(selected.key);
|
|
45
|
+
if (!state?.task || !fresh(key, runToken)) { ctx.ui.notify(`${selected.name} is no longer restartable.`, "warning"); return; }
|
|
46
|
+
pending.add(guard);
|
|
47
|
+
try {
|
|
48
|
+
ctx.ui.notify(`Restarting ${deps.displayName(state.def.name)} (fresh)...`, "info");
|
|
49
|
+
await deps.restartSpecialist(state, ctx);
|
|
50
|
+
if (deps.generation() !== generation) return;
|
|
51
|
+
} finally { pending.delete(guard); }
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const decision = resolveFleetKill(selected, {
|
|
55
|
+
researchExists: candidate => { const id = deps.parseResearchHandle(candidate); return id != null && deps.getResearch().has(id); },
|
|
56
|
+
agentHandles: candidate => { const state = deps.getAgents().get(candidate); return state ? { proc: state.proc, comsAbort: state.comsAbort } : undefined; },
|
|
57
|
+
});
|
|
58
|
+
if (!fresh(key, runToken) || deps.generation() !== generation) return;
|
|
59
|
+
if (decision.action === "kill-research") {
|
|
60
|
+
const id = deps.parseResearchHandle(selected.key), state = id == null ? undefined : deps.getResearch().get(id);
|
|
61
|
+
if (state) { deps.removeResearch(state, ctx); ctx.ui.notify(decision.message, "info"); }
|
|
62
|
+
else ctx.ui.notify(`Research ${selected.name} is no longer available.`, "warning");
|
|
63
|
+
} else if (decision.action === "kill-proc") {
|
|
64
|
+
const state = deps.getAgents().get(selected.key);
|
|
65
|
+
if (state) { state.killedByOperator = true; deps.killSpecialistProcess(state); ctx.ui.notify(decision.message, "info"); }
|
|
66
|
+
} else if (decision.action === "coms-abort") {
|
|
67
|
+
const state = deps.getAgents().get(selected.key); if (state) deps.abortComs(state); ctx.ui.notify(decision.message, "info");
|
|
68
|
+
} else ctx.ui.notify(decision.message, decision.level);
|
|
69
|
+
}
|
|
70
|
+
async function open(key: string, runToken: string | undefined, ctx: DetailUiContext, verbose = false): Promise<boolean> {
|
|
71
|
+
const selected = fresh(key, runToken);
|
|
72
|
+
if (!selected) { ctx.ui.notify("Selected fleet run is no longer available.", "warning"); return verbose; }
|
|
73
|
+
return deps.openDetail(selected, ctx, verbose);
|
|
74
|
+
}
|
|
75
|
+
return { execute, open, pending: (action: FleetAction, key: string, runToken?: string) => pending.has(`${action}:${key}:${runToken ?? ""}`), reset: () => pending.clear() };
|
|
76
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Key, matchesKey } from "@mariozechner/pi-tui";
|
|
1
|
+
import { Key, matchesKey, truncateToWidth, visibleWidth } from "@mariozechner/pi-tui";
|
|
2
2
|
import type { ChildProcess } from "node:child_process";
|
|
3
3
|
import type { ModelPolicy } from "../policy/models.ts";
|
|
4
4
|
import type { ResearchState } from "../research/runtime.ts";
|
|
5
5
|
import type { DetailAgentDef, DetailAgentState, DetailUiContext } from "./detail-panel.ts";
|
|
6
6
|
import type { DelegationChild } from "../dispatch-core.ts";
|
|
7
|
-
import type { FleetRow
|
|
8
|
-
import {
|
|
9
|
-
import { attachFleetDashboardTicker
|
|
7
|
+
import type { FleetRow } from "../../lib/fleet-read-model.ts";
|
|
8
|
+
import { summarise, unionMs } from "../../lib/fleet-read-model.ts";
|
|
9
|
+
import { attachFleetDashboardTicker } from "../../lib/fleet-dashboard-ops.ts";
|
|
10
10
|
import { dashboardTransition, renderFleetDashboard, FLEET_CHROME_ROWS, type DashboardConfirm } from "../../lib/fleet-dashboard-view.ts";
|
|
11
11
|
import { modelPickerTransition, renderFleetSubstitutionPicker, type FleetModelChoice } from "../../lib/fleet-detail-view.ts";
|
|
12
12
|
import { FULLSCREEN_OVERLAY, bodyRows, clampScroll } from "../../lib/fleet-overlay.ts";
|
|
@@ -39,7 +39,11 @@ export interface FleetDashboardDeps<TDef extends DetailAgentDef, TAgent extends
|
|
|
39
39
|
setShowFinished(value: boolean): void;
|
|
40
40
|
getFilter(): string;
|
|
41
41
|
setFilter(value: string): void;
|
|
42
|
-
|
|
42
|
+
getFleetRows(now: number, unfiltered: boolean): FleetRow[];
|
|
43
|
+
actions: {
|
|
44
|
+
open(key: string, runToken: string | undefined, ctx: DetailUiContext, verbose?: boolean): Promise<boolean>;
|
|
45
|
+
execute(action: "kill" | "restart", key: string, runToken: string | undefined, ctx: DetailUiContext): Promise<void>;
|
|
46
|
+
};
|
|
43
47
|
parseResearchHandle(value: string): number | null;
|
|
44
48
|
displayName(name: string): string;
|
|
45
49
|
shortModel(model: string | undefined): string;
|
|
@@ -62,17 +66,8 @@ export interface FleetDashboardDeps<TDef extends DetailAgentDef, TAgent extends
|
|
|
62
66
|
type SubstitutionPicker = { stage: "source" | "target"; source?: string; choices: FleetModelChoice[]; index: number; scrollOffset: number };
|
|
63
67
|
|
|
64
68
|
export function createFleetDashboard<TDef extends DetailAgentDef, TAgent extends DashboardAgentState<TDef>, TResearch extends ResearchState<TDef>>(deps: FleetDashboardDeps<TDef, TAgent, TResearch>) {
|
|
65
|
-
function fleetRows(unfiltered = false): FleetRow[] {
|
|
66
|
-
|
|
67
|
-
key, name: deps.displayName(state.def.name), status: state.status,
|
|
68
|
-
model: state.lastBackend === "coms" ? `⇄ ${deps.shortModel(state.comsPeerModel)}` : deps.modelWithThinking(state.def), backend: state.lastBackend ?? "native",
|
|
69
|
-
contextPct: state.contextPct, contextTokens: state.contextTokens, ...fleetTiming(state.histEntry), toolCount: state.toolCount,
|
|
70
|
-
lastWork: state.lastWork || state.task || state.def.description, hasTimeline: true,
|
|
71
|
-
delegates: Array.from(state.delegations?.values() ?? []).map(child => ({ key: child.id, name: child.role || child.id, status: child.status, model: deps.shortModel(child.model), contextPct: null, contextTokens: child.tokens, elapsed: child.status === "running" ? Date.now() - child.startedAt : child.elapsed, startedAt: child.startedAt, toolCount: child.toolCount, lastWork: child.lastWork, children: [] })),
|
|
72
|
-
}));
|
|
73
|
-
const research: ResearchInput[] = Array.from(deps.getResearch().values()).map(state => ({ key: `r${state.id}`, name: `r${state.id} ${state.persona ? deps.displayName(state.def.name) : "research"}`, status: state.status, model: deps.shortModel(state.model) + deps.thinkingSuffix(deps.resolvedThinking(state.def)), backend: "native", contextPct: state.contextPct, contextTokens: null, ...fleetTiming(state.histEntry), toolCount: state.toolCount, lastWork: state.lastWork || state.task, hasTimeline: true }));
|
|
74
|
-
const peers = deps.getPeerInputs(model => `⇄ ${deps.abbreviatePeerModel(model)}`);
|
|
75
|
-
return buildFleetRows({ specialists, research, peers }, unfiltered ? { showFinished: true } : { showFinished: deps.getShowFinished(), query: deps.getFilter() });
|
|
69
|
+
function fleetRows(unfiltered = false, now = Date.now()): FleetRow[] {
|
|
70
|
+
return deps.getFleetRows(now, unfiltered);
|
|
76
71
|
}
|
|
77
72
|
|
|
78
73
|
function substitutionSourceChoices(): FleetModelChoice[] {
|
|
@@ -81,28 +76,7 @@ export function createFleetDashboard<TDef extends DetailAgentDef, TAgent extends
|
|
|
81
76
|
|
|
82
77
|
async function restartRow(selected: FleetRow, ctx: DetailUiContext): Promise<void> {
|
|
83
78
|
if (deps.modelWorkBlocked(ctx)) return;
|
|
84
|
-
|
|
85
|
-
specialistRestartable: key => !!deps.getAgents().get(key)?.task,
|
|
86
|
-
});
|
|
87
|
-
if (decision.action === "unsupported") { ctx.ui.notify(decision.message, decision.level); return; }
|
|
88
|
-
const state = deps.getAgents().get(selected.key);
|
|
89
|
-
if (!state?.task) { ctx.ui.notify(decision.message.replace("Restarting", "Cannot restart"), "warning"); return; }
|
|
90
|
-
ctx.ui.notify(decision.message.includes(deps.displayName(state.def.name)) ? decision.message : `Restarting ${deps.displayName(state.def.name)} (fresh)...`, "info");
|
|
91
|
-
await deps.restartSpecialist(state, ctx);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function killRow(selected: FleetRow, ctx: DetailUiContext): void {
|
|
95
|
-
const decision = resolveFleetKill(selected, {
|
|
96
|
-
researchExists: key => { const id = deps.parseResearchHandle(key); return id != null && deps.getResearch().has(id); },
|
|
97
|
-
agentHandles: key => { const agent = deps.getAgents().get(key); return agent ? { proc: agent.proc, comsAbort: agent.comsAbort } : undefined; },
|
|
98
|
-
});
|
|
99
|
-
if (decision.action === "kill-research") {
|
|
100
|
-
const id = deps.parseResearchHandle(selected.key), state = id == null ? undefined : deps.getResearch().get(id);
|
|
101
|
-
if (state) { deps.removeResearch(state, ctx); ctx.ui.notify(decision.message, "info"); } else ctx.ui.notify(`Research ${selected.name} is no longer available.`, "warning");
|
|
102
|
-
} else if (decision.action === "kill-proc") {
|
|
103
|
-
const state = deps.getAgents().get(selected.key)!; state.killedByOperator = true; deps.killSpecialistProcess(state); ctx.ui.notify(decision.message, "info");
|
|
104
|
-
} else if (decision.action === "coms-abort") { const state = deps.getAgents().get(selected.key); if (state) deps.abortComs(state); ctx.ui.notify(decision.message, "info"); }
|
|
105
|
-
else ctx.ui.notify(decision.message, decision.level);
|
|
79
|
+
await deps.actions.execute("restart", selected.key, selected.runToken, ctx);
|
|
106
80
|
}
|
|
107
81
|
|
|
108
82
|
async function openFleetDashboard(ctx: DetailUiContext, startSubstitution = false): Promise<void> {
|
|
@@ -112,11 +86,11 @@ export function createFleetDashboard<TDef extends DetailAgentDef, TAgent extends
|
|
|
112
86
|
const toInput = (data: string) => matchesKey(data, Key.up) ? "\u001b[A" : matchesKey(data, Key.down) ? "\u001b[B" : matchesKey(data, Key.pageUp) ? "\u001b[5~" : matchesKey(data, Key.pageDown) ? "\u001b[6~" : matchesKey(data, Key.enter) ? "\r" : matchesKey(data, Key.escape) ? "\u001b" : data;
|
|
113
87
|
try { await ctx.ui.custom((tui: any, theme: any, _kb: any, done: () => void) => {
|
|
114
88
|
attachFleetDashboardTicker(resources, () => tui.requestRender());
|
|
115
|
-
return { render: (w: number) => { const rows = fleetRows(); reconcileSelection(selection, rows); const comsLines = deps.getComsLines(w, theme); const body = bodyRows(tui.terminal?.rows, FLEET_CHROME_ROWS + comsLines.length); if (picker) return renderFleetSubstitutionPicker(picker.stage, picker.source, picker.choices, picker, w, body, theme); scrollOffset = clampScroll(scrollOffset, rows.length, body); const summary = summarise(rows); return renderFleetDashboard({ rows, selection, scrollOffset, filterQuery: deps.getFilter(), showFinished: deps.getShowFinished(), confirmation: confirm && confirm.until >
|
|
116
|
-
handleInput: async (data: string) => { const rows = fleetRows(); reconcileSelection(selection, rows); const body = bodyRows(tui.terminal?.rows, FLEET_CHROME_ROWS), input = toInput(data);
|
|
89
|
+
return { render: (w: number) => { const now = Date.now(), rows = fleetRows(false, now); reconcileSelection(selection, rows); const comsLines = deps.getComsLines(w, theme); const body = bodyRows(tui.terminal?.rows, FLEET_CHROME_ROWS + comsLines.length); if (picker) return renderFleetSubstitutionPicker(picker.stage, picker.source, picker.choices, picker, w, body, theme); scrollOffset = clampScroll(scrollOffset, rows.length, body); const summary = summarise(rows); return renderFleetDashboard({ rows, selection, scrollOffset, filterQuery: deps.getFilter(), showFinished: deps.getShowFinished(), confirmation: confirm && confirm.until > now ? `press ${confirm.action === "kill" ? "x" : "r"} again to ${confirm.action} ${rows.find(row => row.key === confirm!.key && row.runToken === confirm!.runToken)?.name ?? "agent"}` : undefined, summary: { ...summary, wallMs: unionMs(summary.intervals) }, comsLines }, w, body, theme, { visibleWidth, truncateToWidth }); },
|
|
90
|
+
handleInput: async (data: string) => { const now = Date.now(), rows = fleetRows(false, now); reconcileSelection(selection, rows); const body = bodyRows(tui.terminal?.rows, FLEET_CHROME_ROWS), input = toInput(data);
|
|
117
91
|
if (picker) { const action = modelPickerTransition(input, picker, picker.choices.length, body); if (action === "cancel") { if (picker.stage === "target") { const source = picker.source, choices = substitutionSourceChoices(), index = Math.max(0, choices.findIndex(choice => choice.spec === source)); picker = { stage: "source", choices, index, scrollOffset: index }; } else picker = null; } else if (action === "select") { const picked = picker.choices[picker.index]?.spec; if (picked && picker.stage === "source") { const targets = await deps.loadAvailableModels(ctx, deps.modelPolicy.getSubstitution(picked)); if (targets) { const current = deps.modelPolicy.getSubstitution(picked), index = Math.max(0, targets.findIndex(choice => choice.spec === current)); picker = { stage: "target", source: picked, choices: targets, index, scrollOffset: index }; } } else if (picked && picker.source) { await deps.modelPolicy.applySessionSubstitution(picker.source, picked, { loadAvailable: current => deps.loadAvailableModels(ctx, current), notify: (message, level) => ctx.ui.notify(message, level) }); picker = null; } } tui.requestRender(); return; }
|
|
118
|
-
const state = { selection, scrollOffset, filtering, filterQuery: deps.getFilter(), showFinished: deps.getShowFinished(), confirm }, intent = dashboardTransition(input, state, rows, body); ({ scrollOffset, filtering, confirm } = state); deps.setFilter(state.filterQuery); deps.setShowFinished(state.showFinished);
|
|
119
|
-
if (intent === "close") done(); else if (intent === "history") { await deps.openHistory(ctx); } else if (intent === "substitute") { const choices = substitutionSourceChoices(); if (!choices.length) ctx.ui.notify("No configured persona or sub-role models are available as substitution sources.", "warning"); else picker = { stage: "source", choices, index: 0, scrollOffset: 0 }; } else if (intent && typeof intent === "object" && "open" in intent) { const selected = rows.find(row => row.key === intent.open)
|
|
92
|
+
const state = { selection, scrollOffset, filtering, filterQuery: deps.getFilter(), showFinished: deps.getShowFinished(), confirm }, intent = dashboardTransition(input, state, rows, body, now); ({ scrollOffset, filtering, confirm } = state); deps.setFilter(state.filterQuery); deps.setShowFinished(state.showFinished);
|
|
93
|
+
if (intent === "close") done(); else if (intent === "history") { confirm = null; await deps.openHistory(ctx); } else if (intent === "substitute") { confirm = null; const choices = substitutionSourceChoices(); if (!choices.length) ctx.ui.notify("No configured persona or sub-role models are available as substitution sources.", "warning"); else picker = { stage: "source", choices, index: 0, scrollOffset: 0 }; } else if (intent && typeof intent === "object" && "open" in intent) { const selected = rows.find(row => row.key === intent.open); confirm = null; if (selected) detailVerbose = await deps.actions.open(selected.key, selected.runToken, ctx, detailVerbose); } else if (intent && typeof intent === "object" && "kill" in intent) { const selected = rows.find(row => row.key === intent.kill); if (selected) await deps.actions.execute("kill", selected.key, selected.runToken, ctx); else ctx.ui.notify("Selected fleet row no longer exists.", "warning"); } else if (intent && typeof intent === "object" && "restart" in intent) { const selected = rows.find(row => row.key === intent.restart); if (selected) await restartRow(selected, ctx); } tui.requestRender(); },
|
|
120
94
|
invalidate() {}, dispose: () => resources.dispose() };
|
|
121
95
|
}, FULLSCREEN_OVERLAY); } finally { resources.dispose(); }
|
|
122
96
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface FleetEditorLike {
|
|
2
|
+
getText(): string; setText(text: string): void; handleInput(data: string): void; render(width: number): string[]; invalidate(): void;
|
|
3
|
+
focused?: boolean; wantsKeyRelease?: boolean; isShowingAutocomplete?(): boolean; dispose?(): void;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}
|
|
6
|
+
export type FleetEditorFactory = (tui: any, theme: any, keybindings: any) => FleetEditorLike;
|
|
7
|
+
export type FleetEditorWrapper = FleetEditorLike;
|
|
8
|
+
export interface FleetEditorUi {
|
|
9
|
+
getEditorComponent(): FleetEditorFactory | undefined;
|
|
10
|
+
setEditorComponent(factory: FleetEditorFactory | undefined): void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Public-contract-only editor composition that preserves the actual editor object and receiver. */
|
|
14
|
+
export function installFleetEditor(ui: FleetEditorUi, createDefault: FleetEditorFactory, keyRelease: (data: string) => boolean, input: (data: string, meta: { paste: boolean; keyRelease: boolean }) => boolean) {
|
|
15
|
+
const previous = ui.getEditorComponent();
|
|
16
|
+
let current: FleetEditorLike | undefined, passive = false;
|
|
17
|
+
const factory: FleetEditorFactory = (tui, theme, keybindings) => {
|
|
18
|
+
const editor = previous ? previous.call(undefined, tui, theme, keybindings) : createDefault(tui, theme, keybindings);
|
|
19
|
+
const supported = editor && typeof editor.handleInput === "function" && typeof editor.getText === "function" && typeof editor.render === "function" && typeof editor.invalidate === "function" && typeof editor.isShowingAutocomplete === "function" && typeof editor.focused === "boolean";
|
|
20
|
+
if (!supported) { current = undefined; return editor; }
|
|
21
|
+
const baseHandleInput = editor.handleInput;
|
|
22
|
+
let pasteDepth = 0;
|
|
23
|
+
editor.handleInput = function(data: string) {
|
|
24
|
+
const starts = data.includes("\x1b[200~"), ends = data.includes("\x1b[201~");
|
|
25
|
+
if (starts) pasteDepth++;
|
|
26
|
+
const consumed = !passive && input(data, { paste: pasteDepth > 0, keyRelease: keyRelease(data) });
|
|
27
|
+
if (!consumed) baseHandleInput.call(editor, data);
|
|
28
|
+
if (ends) pasteDepth = Math.max(0, pasteDepth - 1);
|
|
29
|
+
};
|
|
30
|
+
current = editor;
|
|
31
|
+
return editor;
|
|
32
|
+
};
|
|
33
|
+
ui.setEditorComponent(factory);
|
|
34
|
+
return {
|
|
35
|
+
factory,
|
|
36
|
+
current: () => current,
|
|
37
|
+
interactiveAvailable: () => !!current,
|
|
38
|
+
dispose() {
|
|
39
|
+
passive = true;
|
|
40
|
+
if (ui.getEditorComponent() === factory) ui.setEditorComponent(previous);
|
|
41
|
+
current = undefined;
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|