@chankov/agent-fleet 2.0.8 → 2.0.10
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/pi-voice-stt/README.md +24 -5
- package/.pi/extensions/pi-voice-stt/examples/stt.json +4 -4
- 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/return-contract.js +34 -0
- package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +80 -18
- 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/changed-file-diagnostics.ts +642 -0
- 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.10/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.10/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/fleet.ts +216 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/flow.ts +137 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/flow-command.ts +93 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +133 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/wf-scout.ts +38 -0
- package/.versions/2.0.10/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.10/.pi/agents/model-profiles.yaml +83 -0
- package/.versions/2.0.10/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.10/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.10/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.10/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.10/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.10/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.10/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.10/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.10/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.10/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.10/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.10/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.10/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.10/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.10/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.10/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.10/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.10/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.10/.pi/extensions/package.json +9 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/README.md +1217 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/acceptance.ts +62 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/budget-recovery.ts +97 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/capability-packs.ts +180 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/context.ts +43 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/config/agents.ts +177 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/config/model-profiles.ts +216 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/config/overrides.ts +153 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +213 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context/budgets.ts +202 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context-window.js +106 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/delegate.ts +446 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-coms.ts +237 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-native-complete.ts +154 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +156 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +193 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-native-types.ts +230 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-native.ts +213 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/drift-watchdog.js +218 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/fixtures/registration-surface.json +57 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/helpers.ts +266 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/hub-state-audit.js +64 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/index.ts +2132 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/input/completions.ts +76 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +123 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/no-progress.ts +76 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/policy/work-mode.ts +119 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/prompts/context.ts +47 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/prompts/fragments.ts +115 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/prompts/system-prompt.ts +112 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/research/runtime.ts +192 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/research/spawn-run.ts +156 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/return-contract.js +327 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/return-extract.js +75 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/review-findings.js +102 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/run-budget.js +537 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/run-namespace.js +87 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/scope-gate.js +123 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/spawn.ts +404 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/timeline.ts +54 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/action-executors.ts +149 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/context.ts +134 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +82 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +335 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/set-task-tier.ts +29 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/spawn-research.ts +62 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/verification-contract.ts +77 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/types.ts +63 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/activity-dots.ts +16 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/context-budget.ts +86 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/detail-panel.ts +178 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/fleet-actions.ts +76 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +99 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/fleet-source.ts +157 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/grid.ts +154 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/zoom.ts +204 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/work-mode.ts +167 -0
- package/.versions/2.0.10/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.10/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.10/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.10/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.10/.pi/harnesses/ask-user-remote/runtime-ask.ts +43 -0
- package/.versions/2.0.10/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.10/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.10/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.10/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.10/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.10/.pi/harnesses/damage-control-continue/index.ts +541 -0
- package/.versions/2.0.10/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.10/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.10/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.10/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.10/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.10/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.10/.pi/harnesses/lib/context-budget-child-prompt.ts +180 -0
- package/.versions/2.0.10/.pi/harnesses/lib/context-budget-hub-prompt.ts +114 -0
- package/.versions/2.0.10/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.10/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.10/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-dashboard-view.ts +134 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-detail-view.ts +247 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-read-model.ts +213 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-strip-controller.ts +74 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-strip-view.ts +132 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.10/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.10/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.10/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.10/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.10/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.10/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.10/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.10/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.10/.pi/harnesses/lib/spawned-peers.js +190 -0
- package/.versions/2.0.10/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.10/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.10/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.10/.pi/prompts/af-build.md +24 -0
- package/.versions/2.0.10/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.10/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.10/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.10/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.10/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.10/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.10/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.10/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.10/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.10/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.10/.version +1 -0
- package/.versions/2.0.10/agents/architect.md +25 -0
- package/.versions/2.0.10/agents/bowser.md +28 -0
- package/.versions/2.0.10/agents/builder.md +56 -0
- package/.versions/2.0.10/agents/code-reviewer.md +210 -0
- package/.versions/2.0.10/agents/deep-researcher.md +33 -0
- package/.versions/2.0.10/agents/documenter.md +23 -0
- package/.versions/2.0.10/agents/orchestrator.md +23 -0
- package/.versions/2.0.10/agents/plan-reviewer.md +84 -0
- package/.versions/2.0.10/agents/planner.md +106 -0
- package/.versions/2.0.10/agents/releaser.md +25 -0
- package/.versions/2.0.10/agents/researcher.md +31 -0
- package/.versions/2.0.10/agents/security-auditor.md +168 -0
- package/.versions/2.0.10/agents/test-engineer.md +154 -0
- package/.versions/2.0.10/agents/web-debugger.md +44 -0
- package/.versions/2.0.10/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.10/bin/catalog/harness-runtime-closure.json +32 -0
- package/.versions/2.0.10/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.10/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.10/docs/ARCHITECTURE.md +416 -0
- package/.versions/2.0.10/docs/agent-fleet-setup.md +586 -0
- package/.versions/2.0.10/docs/claude-code-coms-bridge.md +134 -0
- package/.versions/2.0.10/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.10/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.10/docs/getting-started.md +126 -0
- package/.versions/2.0.10/docs/npm-install.md +383 -0
- package/.versions/2.0.10/docs/pi-extensions.md +449 -0
- package/.versions/2.0.10/docs/pi-setup.md +92 -0
- package/.versions/2.0.10/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.10/install-manifest.json +2991 -0
- package/.versions/2.0.10/justfile +247 -0
- package/.versions/2.0.10/manifest-meta.json +970 -0
- package/.versions/2.0.10/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.10/references/communication-contract.md +26 -0
- package/.versions/2.0.10/references/definition-of-done.md +67 -0
- package/.versions/2.0.10/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.10/references/observability-checklist.md +92 -0
- package/.versions/2.0.10/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.10/references/performance-checklist.md +236 -0
- package/.versions/2.0.10/references/prompting-patterns.md +380 -0
- package/.versions/2.0.10/references/security-checklist.md +245 -0
- package/.versions/2.0.10/references/testing-patterns.md +235 -0
- package/.versions/2.0.10/references/workflow-authoring.md +304 -0
- package/.versions/2.0.10/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.10/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.10/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.10/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.10/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.10/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.10/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.10/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.10/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.10/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.10/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.10/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.10/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.10/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.10/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.10/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.10/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.10/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.10/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.10/skills/incremental-implementation/SKILL.md +302 -0
- package/.versions/2.0.10/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.10/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.10/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.10/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.10/skills/planning-and-task-breakdown/SKILL.md +289 -0
- package/.versions/2.0.10/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.10/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.10/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -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 +35 -0
- package/agents/architect.md +1 -1
- package/agents/bowser.md +1 -1
- package/agents/builder.md +1 -1
- package/agents/code-reviewer.md +1 -1
- package/agents/deep-researcher.md +1 -1
- package/agents/documenter.md +1 -1
- package/agents/orchestrator.md +1 -1
- package/agents/plan-reviewer.md +1 -1
- package/agents/planner.md +1 -1
- package/agents/releaser.md +1 -1
- package/agents/researcher.md +1 -1
- package/agents/security-auditor.md +1 -1
- package/agents/test-engineer.md +1 -1
- package/agents/web-debugger.md +1 -1
- package/agents/web-performance-auditor.md +1 -1
- package/bin/cli.js +8 -5
- package/bin/lib/path-boundaries.js +5 -6
- package/bin/lib/stt-wizard.js +154 -23
- package/docs/agent-fleet-setup.md +26 -8
- package/docs/npm-install.md +29 -2
- package/docs/pi-extensions.md +3 -0
- package/docs/pi-setup.md +16 -0
- package/install-manifest.json +1 -1
- package/package.json +45 -13
- package/skills/orchestration-verification/SKILL.md +1 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { FleetRow } from "./fleet-read-model.ts";
|
|
2
2
|
import { moveSelection, type Selection } from "./fleet-selection.ts";
|
|
3
|
+
import { confirmFleetAction, type FleetConfirmation } from "./fleet-dashboard-ops.ts";
|
|
4
|
+
import { safeTerminalText, treePrefix, type TextMetrics } from "./fleet-strip-view.ts";
|
|
3
5
|
|
|
4
6
|
export interface ThemeLike { fg(color: string, text: string): string; bold(text: string): string; bg?(color: string, text: string): string; }
|
|
5
7
|
export const FLEET_CHROME_ROWS = 4;
|
|
@@ -14,61 +16,46 @@ export interface FleetViewModel {
|
|
|
14
16
|
comsLines?: readonly string[];
|
|
15
17
|
}
|
|
16
18
|
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
/** Truncate terminal-styled text without cutting an ANSI sequence; close SGR styling when clipped. */
|
|
20
|
-
const ellipsis = (text: string, width: number) => {
|
|
21
|
-
if (visibleWidth(text) <= width) return text;
|
|
22
|
-
if (width <= 0) return "";
|
|
23
|
-
let out = "", visible = 0, i = 0, styled = false;
|
|
24
|
-
const limit = Math.max(0, width - 1);
|
|
25
|
-
while (i < text.length && visible < limit) {
|
|
26
|
-
if (text[i] === "\x1b") {
|
|
27
|
-
const match = text.slice(i).match(/^\x1b\[[0-?]*[ -/]*[@-~]/);
|
|
28
|
-
if (match) { out += match[0]; styled = match[0] !== "\x1b[0m"; i += match[0].length; continue; }
|
|
29
|
-
}
|
|
30
|
-
const char = String.fromCodePoint(text.codePointAt(i)!);
|
|
31
|
-
out += char; visible++; i += char.length;
|
|
32
|
-
}
|
|
33
|
-
return `${out}${width > 1 ? "…" : ""}${styled ? "\x1b[0m" : ""}`;
|
|
34
|
-
};
|
|
19
|
+
const fit = (text: string, width: number, metrics: TextMetrics) => metrics.truncateToWidth(text, Math.max(0, width));
|
|
20
|
+
const padCells = (text: string, width: number, metrics: TextMetrics) => text + " ".repeat(Math.max(0, width - metrics.visibleWidth(text)));
|
|
35
21
|
const duration = (ms: number) => ms < 60_000 ? `${Math.round(ms / 1000)}s` : `${Math.floor(ms / 60_000)}:${String(Math.round(ms / 1000) % 60).padStart(2, "0")}`;
|
|
36
22
|
const tokens = (n: number | null) => n == null ? "—" : n >= 1000 ? `${Math.round(n / 1000)}k` : String(n);
|
|
37
23
|
const glyph = (row: FleetRow) => row.status === "running" ? "●" : row.status === "done" ? "✓" : row.status === "error" ? "✗" : row.status === "pending" ? "◌" : row.status === "stale" ? "○" : "▪";
|
|
38
24
|
const context = (pct: number | null) => pct == null ? "[automatic] —" : `[${"#".repeat(Math.max(0, Math.min(10, Math.round(pct / 10))))}${"·".repeat(Math.max(0, 10 - Math.round(pct / 10)))}] ${Math.round(pct)}%`;
|
|
39
25
|
|
|
40
26
|
/** Render a constant-height, width-bounded fleet list without pi runtime dependencies. */
|
|
41
|
-
export function renderFleetDashboard(vm: FleetViewModel, width: number, bodyHeight: number, theme: ThemeLike): string[] {
|
|
27
|
+
export function renderFleetDashboard(vm: FleetViewModel, width: number, bodyHeight: number, theme: ThemeLike, metrics: TextMetrics): string[] {
|
|
42
28
|
const w = Math.max(1, width), body = Math.max(0, bodyHeight);
|
|
43
29
|
const summary = `${vm.summary.running} running · ${vm.summary.done} done${vm.summary.failed ? ` · ${vm.summary.failed} failed` : ""} · ${duration(vm.summary.wallMs)} · ${tokens(vm.summary.totalTokens)} tok`;
|
|
44
|
-
const
|
|
45
|
-
const
|
|
30
|
+
const title = ` Fleet ${vm.filterQuery ? `· filter: ${safeTerminalText(vm.filterQuery)}` : ""}`;
|
|
31
|
+
const header = fit(title, Math.max(1, w - metrics.visibleWidth(summary) - 1), metrics);
|
|
32
|
+
const lines: string[] = [fit(theme.bold(header) + " " + theme.fg("dim", summary), w, metrics), theme.fg("dim", "╭" + "─".repeat(Math.max(0, w - 2)) + "╮")];
|
|
46
33
|
if (vm.rows.length === 0) {
|
|
47
34
|
const message = "no agents dispatched yet";
|
|
48
|
-
lines.push(...Array.from({ length: body }, (_, i) => i === Math.floor(body / 2) ?
|
|
35
|
+
lines.push(...Array.from({ length: body }, (_, i) => i === Math.floor(body / 2) ? fit(theme.fg("dim", " ".repeat(Math.max(0, Math.floor((w - metrics.visibleWidth(message)) / 2))) + message), w, metrics) : ""));
|
|
49
36
|
} else {
|
|
50
37
|
const offset = Math.max(0, Math.min(vm.scrollOffset ?? 0, Math.max(0, vm.rows.length - body)));
|
|
51
38
|
for (let i = 0; i < body; i++) {
|
|
52
39
|
const row = vm.rows[offset + i];
|
|
53
40
|
if (!row) { lines.push(""); continue; }
|
|
54
41
|
const selected = offset + i === vm.selection.index;
|
|
55
|
-
const indent = row.
|
|
56
|
-
const name = `${selected ? "❯" : " "} ${glyph(row)} ${
|
|
57
|
-
const parts = [name, row.kind, row.model
|
|
42
|
+
const indent = treePrefix(row.lastAtDepth, row.depth);
|
|
43
|
+
const name = `${selected ? "❯" : " "} ${indent}${glyph(row)} ${safeTerminalText(row.name)}`;
|
|
44
|
+
const parts = [name, row.kind, `${row.backend === "coms" ? "⇄ " : ""}${safeTerminalText(row.model)}`, context(row.contextPct), tokens(row.contextTokens), duration(row.elapsed), row.toolCount == null ? "—" : String(row.toolCount), safeTerminalText(row.lastWork)];
|
|
58
45
|
const count = w < 80 ? 4 : w < 105 ? 6 : 8;
|
|
59
|
-
const line =
|
|
60
|
-
lines.push(selected && theme.bg ? theme.bg("selectedBg", line
|
|
46
|
+
const line = fit(parts.slice(0, count).join(" "), w, metrics);
|
|
47
|
+
lines.push(selected && theme.bg ? theme.bg("selectedBg", padCells(line, w, metrics)) : line);
|
|
61
48
|
}
|
|
62
49
|
}
|
|
63
50
|
lines.push(theme.fg("dim", "╰" + "─".repeat(Math.max(0, w - 2)) + "╯"));
|
|
64
|
-
lines.push(
|
|
51
|
+
lines.push(fit(theme.fg("dim", vm.confirmation ?? "↑↓ select · Enter open · h history · m substitute · x kill · r restart · f filter · a all · q close"), w, metrics));
|
|
65
52
|
const coms = vm.comsLines ?? [];
|
|
66
53
|
lines.push(...coms);
|
|
67
54
|
const total = body + FLEET_CHROME_ROWS + coms.length;
|
|
68
55
|
return lines.slice(0, total).concat(Array(Math.max(0, total - lines.length)).fill(""));
|
|
69
56
|
}
|
|
70
57
|
|
|
71
|
-
export type DashboardConfirm =
|
|
58
|
+
export type DashboardConfirm = FleetConfirmation;
|
|
72
59
|
export interface DashboardControllerState {
|
|
73
60
|
selection: Selection;
|
|
74
61
|
scrollOffset: number;
|
|
@@ -90,7 +77,7 @@ export type DashboardIntent =
|
|
|
90
77
|
export function dashboardTransition(
|
|
91
78
|
input: string,
|
|
92
79
|
state: DashboardControllerState,
|
|
93
|
-
rows: readonly { key: string }[],
|
|
80
|
+
rows: readonly { key: string; runToken?: string }[],
|
|
94
81
|
bodyHeight: number,
|
|
95
82
|
now = Date.now(),
|
|
96
83
|
): DashboardIntent {
|
|
@@ -108,6 +95,7 @@ export function dashboardTransition(
|
|
|
108
95
|
return null;
|
|
109
96
|
}
|
|
110
97
|
const selected = rows[state.selection.index];
|
|
98
|
+
if (input !== "x" && input !== "r") state.confirm = null;
|
|
111
99
|
if (input === "\u001b[A" || input === "k" || input === "\u001b[B" || input === "j") {
|
|
112
100
|
moveSelection(state.selection, rows, input === "\u001b[A" || input === "k" ? -1 : 1);
|
|
113
101
|
const viewport = Math.max(1, bodyHeight);
|
|
@@ -136,12 +124,10 @@ export function dashboardTransition(
|
|
|
136
124
|
if (input === "x" || input === "r") {
|
|
137
125
|
if (!selected) return null;
|
|
138
126
|
const action = input === "x" ? "kill" : "restart";
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
state.confirm = { action, key: selected.key, until: now + 2000 };
|
|
144
|
-
return null;
|
|
127
|
+
const result = confirmFleetAction(state.confirm, action, selected, now);
|
|
128
|
+
state.confirm = result.confirmation;
|
|
129
|
+
if (!result.confirmed) return null;
|
|
130
|
+
return action === "kill" ? { kill: selected.key } : { restart: selected.key };
|
|
145
131
|
}
|
|
146
132
|
if (input === "\u001b" || input === "q") return "close";
|
|
147
133
|
return null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type FleetKind = "specialist" | "research" | "delegate" | "peer";
|
|
2
2
|
export type FleetStatus = "idle" | "running" | "done" | "error" | "pending" | "stale";
|
|
3
|
+
export type FleetTimingKind = "run" | "wait" | "unknown";
|
|
3
4
|
|
|
4
5
|
export interface FleetRow {
|
|
5
6
|
key: string;
|
|
@@ -14,21 +15,29 @@ export interface FleetRow {
|
|
|
14
15
|
contextTokens: number | null;
|
|
15
16
|
elapsed: number;
|
|
16
17
|
startedAt?: number;
|
|
18
|
+
endedAt?: number;
|
|
19
|
+
timingKind?: FleetTimingKind;
|
|
20
|
+
runToken?: string;
|
|
21
|
+
aliasKeys?: readonly string[];
|
|
22
|
+
peerPresence?: "present" | "pending" | "stale";
|
|
17
23
|
toolCount: number | null;
|
|
18
24
|
lastWork: string;
|
|
19
25
|
hasTimeline: boolean;
|
|
20
26
|
colorHex?: string;
|
|
27
|
+
lastAtDepth?: readonly boolean[];
|
|
28
|
+
/** Included only to preserve the path to an eligible descendant. */
|
|
29
|
+
structuralOnly?: boolean;
|
|
21
30
|
}
|
|
22
31
|
|
|
23
|
-
export interface DelegateInput extends Omit<FleetRow, "kind" | "parentKey" | "depth" | "backend" | "hasTimeline"> {
|
|
32
|
+
export interface DelegateInput extends Omit<FleetRow, "kind" | "parentKey" | "depth" | "backend" | "hasTimeline" | "lastAtDepth" | "structuralOnly"> {
|
|
24
33
|
children?: readonly DelegateInput[];
|
|
25
34
|
}
|
|
26
|
-
export interface SpecialistInput extends Omit<FleetRow, "kind" | "parentKey" | "depth"> {
|
|
35
|
+
export interface SpecialistInput extends Omit<FleetRow, "kind" | "parentKey" | "depth" | "lastAtDepth" | "structuralOnly"> {
|
|
27
36
|
delegates?: readonly DelegateInput[];
|
|
28
37
|
}
|
|
29
|
-
export interface ResearchInput extends Omit<FleetRow, "kind" | "parentKey" | "depth"> {}
|
|
30
|
-
export interface PeerInput extends Omit<FleetRow, "kind" | "parentKey" | "depth" | "backend" | "hasTimeline" | "status" | "contextPct" | "contextTokens" | "toolCount" | "elapsed"> {
|
|
31
|
-
/** Registry-only entries have not answered a ping. */
|
|
38
|
+
export interface ResearchInput extends Omit<FleetRow, "kind" | "parentKey" | "depth" | "lastAtDepth" | "structuralOnly"> {}
|
|
39
|
+
export interface PeerInput extends Omit<FleetRow, "kind" | "parentKey" | "depth" | "backend" | "hasTimeline" | "status" | "contextPct" | "contextTokens" | "toolCount" | "elapsed" | "lastAtDepth" | "structuralOnly"> {
|
|
40
|
+
/** Registry-only entries have not answered a ping; this is presence, not a task queue. */
|
|
32
41
|
pending?: boolean;
|
|
33
42
|
staleCount?: number;
|
|
34
43
|
status?: FleetStatus;
|
|
@@ -40,16 +49,16 @@ export interface FleetSource {
|
|
|
40
49
|
peers: readonly PeerInput[];
|
|
41
50
|
}
|
|
42
51
|
export interface FleetFilter { showFinished: boolean; query?: string; }
|
|
52
|
+
export interface WidgetSelectionPin { key: string; runToken?: string; }
|
|
43
53
|
|
|
44
54
|
/** Convert an authoritative run interval into row timing without re-anchoring completed work. */
|
|
45
|
-
export function fleetTiming(interval: { startedAt: number; endedAt: number | null } | undefined, now = Date.now()): Pick<FleetRow, "startedAt" | "elapsed"> {
|
|
46
|
-
if (!interval) return { startedAt: undefined, elapsed: 0 };
|
|
55
|
+
export function fleetTiming(interval: { startedAt: number; endedAt: number | null } | undefined, now = Date.now()): Pick<FleetRow, "startedAt" | "endedAt" | "elapsed" | "timingKind"> {
|
|
56
|
+
if (!interval) return { startedAt: undefined, endedAt: undefined, elapsed: 0, timingKind: "unknown" };
|
|
47
57
|
const endedAt = interval.endedAt ?? now;
|
|
48
|
-
return { startedAt: interval.startedAt, elapsed: Math.max(0, endedAt - interval.startedAt) };
|
|
58
|
+
return { startedAt: interval.startedAt, endedAt: interval.endedAt ?? undefined, elapsed: Math.max(0, endedAt - interval.startedAt), timingKind: "run" };
|
|
49
59
|
}
|
|
50
60
|
|
|
51
61
|
const statusOrder: Record<FleetStatus, number> = { running: 0, pending: 1, error: 2, done: 3, idle: 3, stale: 3 };
|
|
52
|
-
// A roster member is idle until dispatched, not finished; keep it visible by default.
|
|
53
62
|
const hiddenWhenFinished = new Set<FleetStatus>(["done", "stale"]);
|
|
54
63
|
|
|
55
64
|
function compareRows(a: FleetRow, b: FleetRow): number {
|
|
@@ -64,6 +73,27 @@ function matches(row: FleetRow, query: string): boolean {
|
|
|
64
73
|
|
|
65
74
|
interface FleetNode { row: FleetRow; children: FleetNode[]; }
|
|
66
75
|
|
|
76
|
+
/** Add branch metadata after filtering, preserving the supplied pre-order. */
|
|
77
|
+
export function withTreeMetadata(rows: readonly FleetRow[]): FleetRow[] {
|
|
78
|
+
const included = new Set(rows.map(row => row.key));
|
|
79
|
+
const children = new Map<string | undefined, FleetRow[]>();
|
|
80
|
+
for (const row of rows) {
|
|
81
|
+
const parent = row.parentKey && included.has(row.parentKey) ? row.parentKey : undefined;
|
|
82
|
+
const list = children.get(parent) ?? [];
|
|
83
|
+
list.push(row);
|
|
84
|
+
children.set(parent, list);
|
|
85
|
+
}
|
|
86
|
+
const out: FleetRow[] = [];
|
|
87
|
+
const emit = (row: FleetRow, path: readonly boolean[]) => {
|
|
88
|
+
out.push({ ...row, depth: path.length, parentKey: row.parentKey && included.has(row.parentKey) ? row.parentKey : undefined, lastAtDepth: path });
|
|
89
|
+
const nested = children.get(row.key) ?? [];
|
|
90
|
+
nested.forEach((child, index) => emit(child, [...path, index === nested.length - 1]));
|
|
91
|
+
};
|
|
92
|
+
const roots = children.get(undefined) ?? [];
|
|
93
|
+
roots.forEach(row => emit(row, []));
|
|
94
|
+
return out;
|
|
95
|
+
}
|
|
96
|
+
|
|
67
97
|
/** Collapse local specialists, delegate trees, research, and coms peers into stable display rows. */
|
|
68
98
|
export function buildFleetRows(src: FleetSource, filter: FleetFilter): FleetRow[] {
|
|
69
99
|
const query = filter.query?.trim().toLowerCase() ?? "";
|
|
@@ -78,8 +108,9 @@ export function buildFleetRows(src: FleetSource, filter: FleetFilter): FleetRow[
|
|
|
78
108
|
});
|
|
79
109
|
for (const input of src.research) roots.push({ row: { ...input, kind: "research", depth: 0 }, children: [] });
|
|
80
110
|
for (const input of src.peers) {
|
|
81
|
-
const
|
|
82
|
-
|
|
111
|
+
const stale = (input.staleCount ?? 0) >= 3;
|
|
112
|
+
const status: FleetStatus = input.status ?? (input.pending ? "pending" : stale ? "stale" : "idle");
|
|
113
|
+
roots.push({ row: { ...input, kind: "peer", depth: 0, status, backend: "coms", contextPct: null, contextTokens: null, toolCount: null, elapsed: input.elapsed ?? 0, timingKind: input.timingKind ?? "unknown", peerPresence: input.peerPresence ?? (input.pending ? "pending" : stale ? "stale" : "present"), hasTimeline: false }, children: [] });
|
|
83
114
|
}
|
|
84
115
|
roots.sort((a, b) => compareRows(a.row, b.row));
|
|
85
116
|
const visible = (node: FleetNode): boolean => {
|
|
@@ -89,34 +120,85 @@ export function buildFleetRows(src: FleetSource, filter: FleetFilter): FleetRow[
|
|
|
89
120
|
return own || children.length > 0;
|
|
90
121
|
};
|
|
91
122
|
const out: FleetRow[] = [];
|
|
92
|
-
const emit = (node: FleetNode) => {
|
|
93
|
-
out.push(node.row);
|
|
94
|
-
for (const child of node.children) emit(child);
|
|
95
|
-
};
|
|
123
|
+
const emit = (node: FleetNode) => { out.push(node.row); for (const child of node.children) emit(child); };
|
|
96
124
|
for (const root of roots) if (visible(root)) emit(root);
|
|
97
|
-
return out;
|
|
125
|
+
return withTreeMetadata(out);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Select widget rows using a single snapshot clock and exact terminal retention. */
|
|
129
|
+
export function selectWidgetRows(rows: readonly FleetRow[], now: number, pin?: WidgetSelectionPin): FleetRow[] {
|
|
130
|
+
const byKey = new Map(rows.map(row => [row.key, row]));
|
|
131
|
+
const include = new Set<string>();
|
|
132
|
+
for (const row of rows) {
|
|
133
|
+
const activeTask = row.kind !== "peer" && (row.status === "running" || row.status === "pending");
|
|
134
|
+
const activePeer = row.kind === "peer" && row.status === "running";
|
|
135
|
+
const retained = row.kind !== "peer" && (row.status === "done" || row.status === "error") && row.endedAt != null && now < row.endedAt + 10_000;
|
|
136
|
+
const pinned = !!pin && row.key === pin.key && (row.status === "done" || row.status === "error") && row.runToken === pin.runToken;
|
|
137
|
+
if (activeTask || activePeer || retained || pinned) include.add(row.key);
|
|
138
|
+
}
|
|
139
|
+
for (const key of [...include]) {
|
|
140
|
+
let row = byKey.get(key);
|
|
141
|
+
const seen = new Set<string>();
|
|
142
|
+
while (row?.parentKey && !seen.has(row.parentKey)) {
|
|
143
|
+
seen.add(row.parentKey); include.add(row.parentKey); row = byKey.get(row.parentKey);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return withTreeMetadata(rows.filter(row => include.has(row.key)).map(row => ({ ...row, structuralOnly: !(
|
|
147
|
+
(row.kind !== "peer" && (row.status === "running" || row.status === "pending")) ||
|
|
148
|
+
(row.kind === "peer" && row.status === "running") ||
|
|
149
|
+
(row.kind !== "peer" && (row.status === "done" || row.status === "error") && row.endedAt != null && now < row.endedAt + 10_000) ||
|
|
150
|
+
(!!pin && row.key === pin.key && row.runToken === pin.runToken)
|
|
151
|
+
) })));
|
|
98
152
|
}
|
|
99
153
|
|
|
100
154
|
/** Total covered length of possibly overlapping intervals. */
|
|
101
155
|
export function unionMs(intervals: readonly [number, number][]): number {
|
|
102
156
|
if (intervals.length === 0) return 0;
|
|
103
157
|
const sorted = intervals.slice().sort((a, b) => a[0] - b[0]);
|
|
104
|
-
let total = 0;
|
|
105
|
-
let start = sorted[0][0];
|
|
106
|
-
let end = sorted[0][1];
|
|
158
|
+
let total = 0, start = sorted[0][0], end = sorted[0][1];
|
|
107
159
|
for (let i = 1; i < sorted.length; i++) {
|
|
108
160
|
const [nextStart, nextEnd] = sorted[i];
|
|
109
|
-
if (nextStart > end) {
|
|
110
|
-
|
|
111
|
-
[start, end] = [nextStart, nextEnd];
|
|
112
|
-
} else if (nextEnd > end) {
|
|
113
|
-
end = nextEnd;
|
|
114
|
-
}
|
|
161
|
+
if (nextStart > end) { total += end - start; [start, end] = [nextStart, nextEnd]; }
|
|
162
|
+
else if (nextEnd > end) end = nextEnd;
|
|
115
163
|
}
|
|
116
164
|
return total + end - start;
|
|
117
165
|
}
|
|
118
166
|
|
|
119
|
-
|
|
167
|
+
export interface StripSummary {
|
|
168
|
+
running: number;
|
|
169
|
+
peerActive: number;
|
|
170
|
+
done: number;
|
|
171
|
+
failed: number;
|
|
172
|
+
contextMax: number | null;
|
|
173
|
+
contextKnown: number;
|
|
174
|
+
contextTotal: number;
|
|
175
|
+
wallMs: number;
|
|
176
|
+
wallKnown: number;
|
|
177
|
+
wallTotal: number;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** Aggregate the whole eligible widget set, excluding peer waits and structural context. */
|
|
181
|
+
export function summariseWidget(rows: readonly FleetRow[]): StripSummary {
|
|
182
|
+
let running = 0, peerActive = 0, done = 0, failed = 0, contextMax: number | null = null, contextKnown = 0, contextTotal = 0, wallKnown = 0, wallTotal = 0;
|
|
183
|
+
const intervals: Array<[number, number]> = [];
|
|
184
|
+
for (const row of rows) {
|
|
185
|
+
if (row.structuralOnly) continue;
|
|
186
|
+
if (row.kind === "peer") { if (row.status === "running") peerActive++; continue; }
|
|
187
|
+
if (row.status === "running") {
|
|
188
|
+
running++; contextTotal++;
|
|
189
|
+
if (row.contextPct != null && Number.isFinite(row.contextPct)) { contextKnown++; contextMax = Math.max(contextMax ?? -Infinity, row.contextPct); }
|
|
190
|
+
}
|
|
191
|
+
if (row.status === "done") done++;
|
|
192
|
+
if (row.status === "error") failed++;
|
|
193
|
+
if (["running", "done", "error"].includes(row.status)) {
|
|
194
|
+
wallTotal++;
|
|
195
|
+
if (row.timingKind === "run" && row.startedAt != null) { wallKnown++; intervals.push([row.startedAt, row.endedAt ?? row.startedAt + Math.max(0, row.elapsed)]); }
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return { running, peerActive, done, failed, contextMax, contextKnown, contextTotal, wallMs: unionMs(intervals), wallKnown, wallTotal };
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** Backward-compatible dashboard aggregate. */
|
|
120
202
|
export function summarise(rows: readonly FleetRow[]): { running: number; done: number; failed: number; totalTokens: number; intervals: Array<[number, number]> } {
|
|
121
203
|
const intervals: Array<[number, number]> = [];
|
|
122
204
|
let running = 0, done = 0, failed = 0, totalTokens = 0;
|
|
@@ -125,7 +207,7 @@ export function summarise(rows: readonly FleetRow[]): { running: number; done: n
|
|
|
125
207
|
if (row.status === "done") done++;
|
|
126
208
|
if (row.status === "error") failed++;
|
|
127
209
|
if (row.contextTokens != null) totalTokens += row.contextTokens;
|
|
128
|
-
if (row.startedAt != null) intervals.push([row.startedAt, row.startedAt + Math.max(0, row.elapsed)]);
|
|
210
|
+
if (row.timingKind !== "wait" && row.startedAt != null) intervals.push([row.startedAt, row.endedAt ?? row.startedAt + Math.max(0, row.elapsed)]);
|
|
129
211
|
}
|
|
130
212
|
return { running, done, failed, totalTokens, intervals };
|
|
131
213
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { confirmFleetAction, type FleetConfirmation } from "./fleet-dashboard-ops.ts";
|
|
2
|
+
import type { FleetRow } from "./fleet-read-model.ts";
|
|
3
|
+
|
|
4
|
+
export interface FleetStripState {
|
|
5
|
+
active: boolean;
|
|
6
|
+
selectedKey?: string;
|
|
7
|
+
index: number;
|
|
8
|
+
offset: number;
|
|
9
|
+
confirmation: FleetConfirmation;
|
|
10
|
+
pendingAction: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface FleetStripGate {
|
|
13
|
+
interactiveAvailable: boolean;
|
|
14
|
+
focused: boolean;
|
|
15
|
+
editorEmpty: boolean;
|
|
16
|
+
autocomplete: boolean;
|
|
17
|
+
modal: boolean;
|
|
18
|
+
bodyRows: number;
|
|
19
|
+
}
|
|
20
|
+
export interface FleetStripInput { data: string; keyRelease?: boolean; paste?: boolean; }
|
|
21
|
+
export type FleetStripIntent = { type: "open" | "kill" | "restart"; key: string; runToken?: string };
|
|
22
|
+
export interface FleetStripTransition { state: FleetStripState; consume: boolean; intent?: FleetStripIntent; }
|
|
23
|
+
|
|
24
|
+
export function initialFleetStripState(): FleetStripState {
|
|
25
|
+
return { active: false, index: 0, offset: 0, confirmation: null, pendingAction: false };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function reconcileStripState(state: FleetStripState, rows: readonly FleetRow[], bodyRows: number): FleetStripState {
|
|
29
|
+
const next = { ...state };
|
|
30
|
+
let index = next.selectedKey ? rows.findIndex(row => row.key === next.selectedKey || row.aliasKeys?.includes(next.selectedKey!)) : -1;
|
|
31
|
+
if (index < 0) index = Math.max(0, Math.min(next.index, Math.max(0, rows.length - 1)));
|
|
32
|
+
next.index = index;
|
|
33
|
+
next.selectedKey = rows[index]?.key;
|
|
34
|
+
const body = Math.max(0, bodyRows);
|
|
35
|
+
if (body === 0) {
|
|
36
|
+
next.active = false;
|
|
37
|
+
next.confirmation = null;
|
|
38
|
+
next.offset = 0;
|
|
39
|
+
} else {
|
|
40
|
+
if (index < next.offset) next.offset = index;
|
|
41
|
+
else if (index >= next.offset + body) next.offset = index - body + 1;
|
|
42
|
+
next.offset = Math.max(0, Math.min(next.offset, Math.max(0, rows.length - body)));
|
|
43
|
+
}
|
|
44
|
+
if (!rows.some(row => row.key === next.confirmation?.key && row.runToken === next.confirmation?.runToken)) next.confirmation = null;
|
|
45
|
+
return next;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const gateOpen = (gate: FleetStripGate, rows: readonly FleetRow[]) => gate.interactiveAvailable && gate.focused && gate.editorEmpty && !gate.autocomplete && !gate.modal && gate.bodyRows > 0 && rows.length > 0;
|
|
49
|
+
|
|
50
|
+
/** Pure focused-editor keyboard controller. Unknown input always passes through once. */
|
|
51
|
+
export function fleetStripTransition(input: FleetStripInput, state: FleetStripState, rows: readonly FleetRow[], gate: FleetStripGate, now: number): FleetStripTransition {
|
|
52
|
+
let next = reconcileStripState(state, rows, gate.bodyRows);
|
|
53
|
+
if (input.keyRelease || input.paste || !gateOpen(gate, rows)) return { state: { ...next, active: false, confirmation: null }, consume: false };
|
|
54
|
+
const data = input.data;
|
|
55
|
+
if (data === "toggle") return { state: { ...next, active: !next.active, confirmation: null }, consume: true };
|
|
56
|
+
if (!next.active) return { state: next, consume: false };
|
|
57
|
+
if (data === "\u001b") return { state: { ...next, active: false, confirmation: null }, consume: true };
|
|
58
|
+
const direction = data === "k" ? -1 : data === "j" ? 1 : 0;
|
|
59
|
+
if (direction) {
|
|
60
|
+
const index = Math.max(0, Math.min(rows.length - 1, next.index + direction));
|
|
61
|
+
next = reconcileStripState({ ...next, index, selectedKey: rows[index]?.key, confirmation: null }, rows, gate.bodyRows);
|
|
62
|
+
return { state: next, consume: true };
|
|
63
|
+
}
|
|
64
|
+
const selected = rows[next.index];
|
|
65
|
+
if (data === "\r" && selected) return { state: { ...next, active: false, confirmation: null }, consume: true, intent: { type: "open", key: selected.key, runToken: selected.runToken } };
|
|
66
|
+
if ((data === "x" || data === "r") && selected) {
|
|
67
|
+
if (next.pendingAction) return { state: next, consume: true };
|
|
68
|
+
const action = data === "x" ? "kill" : "restart";
|
|
69
|
+
const result = confirmFleetAction(next.confirmation, action, selected, now);
|
|
70
|
+
next = { ...next, confirmation: result.confirmation };
|
|
71
|
+
return result.confirmed ? { state: { ...next, pendingAction: true }, consume: true, intent: { type: action, key: selected.key, runToken: selected.runToken } } : { state: next, consume: true };
|
|
72
|
+
}
|
|
73
|
+
return { state: { ...next, active: false, confirmation: null }, consume: false };
|
|
74
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { FleetRow, StripSummary } from "./fleet-read-model.ts";
|
|
2
|
+
import type { ThemeLike } from "./fleet-dashboard-view.ts";
|
|
3
|
+
|
|
4
|
+
export interface TextMetrics {
|
|
5
|
+
visibleWidth(text: string): number;
|
|
6
|
+
truncateToWidth(text: string, width: number): string;
|
|
7
|
+
}
|
|
8
|
+
export interface StripWindow {
|
|
9
|
+
rows: readonly FleetRow[];
|
|
10
|
+
offset: number;
|
|
11
|
+
above: number;
|
|
12
|
+
below: number;
|
|
13
|
+
activeAbove: number;
|
|
14
|
+
activeBelow: number;
|
|
15
|
+
ancestorPath: readonly string[];
|
|
16
|
+
}
|
|
17
|
+
export interface StripViewModel {
|
|
18
|
+
active: boolean;
|
|
19
|
+
interactiveAvailable: boolean;
|
|
20
|
+
selectedKey?: string;
|
|
21
|
+
summary: StripSummary;
|
|
22
|
+
window: StripWindow;
|
|
23
|
+
maxRows: number;
|
|
24
|
+
confirmation?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function treePrefix(lastAtDepth: readonly boolean[] | undefined, depth = 0): string {
|
|
28
|
+
if (!lastAtDepth) return " ".repeat(Math.max(0, depth));
|
|
29
|
+
if (!lastAtDepth.length) return "";
|
|
30
|
+
return lastAtDepth.slice(0, -1).map(last => last ? " " : "│ ").join("") + (lastAtDepth.at(-1) ? "└─ " : "├─ ");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const active = (row: FleetRow) => row.status === "running" || (row.status === "pending" && row.kind !== "peer");
|
|
34
|
+
|
|
35
|
+
/** A bounded contiguous pre-order viewport; selection and offset are already reconciled. */
|
|
36
|
+
export function visibleWindow(rows: readonly FleetRow[], selectedIndex: number, offset: number, bodyRows: number): StripWindow {
|
|
37
|
+
const body = Math.max(0, Math.floor(bodyRows));
|
|
38
|
+
if (!body || !rows.length) return { rows: [], offset: 0, above: 0, below: rows.length, activeAbove: 0, activeBelow: rows.filter(active).length, ancestorPath: [] };
|
|
39
|
+
const selected = Math.max(0, Math.min(rows.length - 1, selectedIndex));
|
|
40
|
+
let start = Math.max(0, Math.min(Math.floor(offset), Math.max(0, rows.length - body)));
|
|
41
|
+
if (selected < start) start = selected;
|
|
42
|
+
else if (selected >= start + body) start = selected - body + 1;
|
|
43
|
+
start = Math.max(0, Math.min(start, Math.max(0, rows.length - body)));
|
|
44
|
+
const slice = rows.slice(start, start + body);
|
|
45
|
+
const byKey = new Map(rows.map(row => [row.key, row]));
|
|
46
|
+
const ancestors: string[] = [];
|
|
47
|
+
let cursor = slice[0];
|
|
48
|
+
const seen = new Set<string>();
|
|
49
|
+
while (cursor?.parentKey && !seen.has(cursor.parentKey)) {
|
|
50
|
+
seen.add(cursor.parentKey);
|
|
51
|
+
const parent = byKey.get(cursor.parentKey);
|
|
52
|
+
if (!parent) break;
|
|
53
|
+
if (rows.indexOf(parent) < start) ancestors.unshift(parent.name);
|
|
54
|
+
cursor = parent;
|
|
55
|
+
}
|
|
56
|
+
const below = Math.max(0, rows.length - start - slice.length);
|
|
57
|
+
return {
|
|
58
|
+
rows: slice, offset: start, above: start, below,
|
|
59
|
+
activeAbove: rows.slice(0, start).filter(active).length,
|
|
60
|
+
activeBelow: rows.slice(start + slice.length).filter(active).length,
|
|
61
|
+
ancestorPath: ancestors,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Remove hostile terminal controls and force arbitrary source fields onto one line. */
|
|
66
|
+
export function safeTerminalText(value: unknown): string {
|
|
67
|
+
return String(value ?? "")
|
|
68
|
+
.replace(/\x1b\][^\x07]*(?:\x07|\x1b\\)/g, "")
|
|
69
|
+
.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, "")
|
|
70
|
+
.replace(/[\x00-\x1f\x7f-\x9f]+/g, " ")
|
|
71
|
+
.replace(/\s+/g, " ").trim();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const duration = (row: FleetRow) => row.timingKind === "unknown" || row.startedAt == null ? "—" : row.elapsed < 60_000 ? `${Math.floor(row.elapsed / 1000)}s` : `${Math.floor(row.elapsed / 60_000)}m${String(Math.floor(row.elapsed / 1000) % 60).padStart(2, "0")}s`;
|
|
75
|
+
const glyph = (row: FleetRow) => row.status === "running" ? "●" : row.status === "pending" ? "◦" : row.status === "done" ? "✓" : row.status === "error" ? "✗" : row.status === "stale" ? "○" : "▪";
|
|
76
|
+
const ctx = (row: FleetRow) => row.contextPct == null ? "ctx —" : `ctx ${Math.round(row.contextPct)}%`;
|
|
77
|
+
function padLeft(value: string, width: number, metrics: TextMetrics): string { return " ".repeat(Math.max(0, width - metrics.visibleWidth(value))) + value; }
|
|
78
|
+
function fit(value: string, width: number, metrics: TextMetrics): string { return metrics.truncateToWidth(value, Math.max(0, width)); }
|
|
79
|
+
|
|
80
|
+
export function summaryFields(summary: StripSummary): string[] {
|
|
81
|
+
const fields = [`${summary.running} running`, `${summary.peerActive} peer active`];
|
|
82
|
+
const wallPartial = summary.wallKnown < summary.wallTotal ? ` (${summary.wallKnown}/${summary.wallTotal} known)` : "";
|
|
83
|
+
fields.push(`wall ${summary.wallKnown ? Math.floor(summary.wallMs / 1000) + "s" : "—"}${wallPartial}`);
|
|
84
|
+
const contextPartial = summary.contextKnown < summary.contextTotal ? ` (${summary.contextKnown}/${summary.contextTotal} known)` : "";
|
|
85
|
+
fields.push(`ctx max ${summary.contextMax == null ? "—" : Math.round(summary.contextMax) + "%"}${contextPartial}`);
|
|
86
|
+
return fields;
|
|
87
|
+
}
|
|
88
|
+
export function summaryText(summary: StripSummary): string { return summaryFields(summary).join(" · "); }
|
|
89
|
+
|
|
90
|
+
function collapsedSummary(summary: StripSummary, width: number, hint: string, metrics: TextMetrics): string {
|
|
91
|
+
const fields = summaryFields(summary);
|
|
92
|
+
for (let count = fields.length; count > 0; count--) {
|
|
93
|
+
const candidate = ` ${fields.slice(0, count).join(" · ")}${hint}`;
|
|
94
|
+
if (metrics.visibleWidth(candidate) <= width) return candidate;
|
|
95
|
+
}
|
|
96
|
+
return fit(` ${fields[0] ?? ""}`, width, metrics);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Pure, display-cell bounded widget rendering. */
|
|
100
|
+
export function renderFleetStrip(vm: StripViewModel, width: number, theme: ThemeLike, metrics: TextMetrics): string[] {
|
|
101
|
+
const budget = Math.max(0, Math.floor(vm.maxRows));
|
|
102
|
+
const w = Math.max(0, Math.floor(width));
|
|
103
|
+
if (!budget || !w || (!vm.window.rows.length && vm.summary.running + vm.summary.peerActive === 0)) return [];
|
|
104
|
+
const hint = vm.interactiveAvailable ? " · Alt+I inspect" : "";
|
|
105
|
+
const collapsed = fit(theme.fg("dim", collapsedSummary(vm.summary, w, hint, metrics)), w, metrics);
|
|
106
|
+
if (!vm.active || budget < 4) return [collapsed].slice(0, budget);
|
|
107
|
+
const body = Math.max(0, budget - 3);
|
|
108
|
+
const windowRows = vm.window.rows.slice(0, body);
|
|
109
|
+
const help = vm.confirmation ?? "j/k select · Alt+I collapse · enter open · x/r confirm · esc back";
|
|
110
|
+
const breadcrumb = vm.window.ancestorPath.length ? ` · ${safeTerminalText(vm.window.ancestorPath.join(" / "))}` : "";
|
|
111
|
+
const above = vm.window.above ? `↑ ${vm.window.above} more · ${vm.window.activeAbove} active${breadcrumb}` : "";
|
|
112
|
+
const below = vm.window.below ? `↓ ${vm.window.below} more · ${vm.window.activeBelow} active` : "";
|
|
113
|
+
const lines = [fit(theme.fg("dim", help), w, metrics), fit(theme.fg("dim", above), w, metrics)];
|
|
114
|
+
for (const row of windowRows) {
|
|
115
|
+
const marker = row.key === vm.selectedKey ? "❯" : " ";
|
|
116
|
+
const backend = row.backend === "coms" ? "⇄ " : "";
|
|
117
|
+
const identity = `${treePrefix(row.lastAtDepth, row.depth)}${glyph(row)} ${safeTerminalText(row.name)}`;
|
|
118
|
+
const elapsed = padLeft(duration(row), 6, metrics);
|
|
119
|
+
let line: string;
|
|
120
|
+
if (w < 80) line = `${marker} ${identity} ${elapsed}`;
|
|
121
|
+
else if (w < 105) line = `${marker} ${identity} ${backend}${safeTerminalText(row.model)} ${ctx(row)} ${elapsed}`;
|
|
122
|
+
else line = `${marker} ${identity} ${backend}${safeTerminalText(row.model)} ${elapsed} ${row.toolCount == null ? "—" : row.toolCount} tools ${ctx(row)} ${safeTerminalText(row.lastWork)}`;
|
|
123
|
+
line = fit(line, w, metrics);
|
|
124
|
+
if (row.key === vm.selectedKey && theme.bg) {
|
|
125
|
+
const cells = metrics.visibleWidth(line);
|
|
126
|
+
line = theme.bg("selectedBg", line + " ".repeat(Math.max(0, w - cells)));
|
|
127
|
+
}
|
|
128
|
+
lines.push(line);
|
|
129
|
+
}
|
|
130
|
+
lines.push(fit(theme.fg("dim", below), w, metrics));
|
|
131
|
+
return lines.slice(0, budget);
|
|
132
|
+
}
|