@chankov/agent-fleet 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/harnesses/agent-hub/README.md +74 -10
- package/.pi/harnesses/agent-hub/acceptance.ts +62 -0
- package/.pi/harnesses/agent-hub/artifacts.js +1 -1
- package/.pi/harnesses/agent-hub/budget-continuation.ts +0 -60
- package/.pi/harnesses/agent-hub/budget-recovery.ts +97 -0
- package/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.pi/harnesses/agent-hub/commands/context.ts +2 -0
- package/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.pi/harnesses/agent-hub/config/agents.ts +3 -9
- package/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +7 -5
- package/.pi/harnesses/agent-hub/context/budgets.ts +8 -14
- package/.pi/harnesses/agent-hub/debate-command.ts +2 -2
- package/.pi/harnesses/agent-hub/dispatch-coms.ts +4 -1
- package/.pi/harnesses/agent-hub/dispatch-native-complete.ts +37 -18
- package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +5 -5
- package/.pi/harnesses/agent-hub/dispatch-native-types.ts +22 -0
- package/.pi/harnesses/agent-hub/dispatch-native.ts +25 -11
- package/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.pi/harnesses/agent-hub/hub-state-audit.js +5 -0
- package/.pi/harnesses/agent-hub/index.ts +79 -43
- package/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +2 -0
- package/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +9 -30
- package/.pi/harnesses/agent-hub/monitor-control.ts +1 -1
- package/.pi/harnesses/agent-hub/no-progress.ts +76 -0
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/policy/roster.ts +16 -1
- package/.pi/harnesses/agent-hub/policy/work-mode.ts +3 -2
- package/.pi/harnesses/agent-hub/poll-command.ts +2 -2
- package/.pi/harnesses/agent-hub/prompts/context.ts +1 -0
- package/.pi/harnesses/agent-hub/prompts/system-prompt.ts +3 -1
- package/.pi/harnesses/agent-hub/research/runtime.ts +17 -2
- package/.pi/harnesses/agent-hub/research/spawn-run.ts +14 -6
- package/.pi/harnesses/agent-hub/scope-gate.js +50 -30
- package/.pi/harnesses/agent-hub/tools/context.ts +2 -0
- package/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +6 -3
- package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +65 -24
- package/.pi/harnesses/agent-hub/types.ts +1 -0
- package/.pi/harnesses/agent-hub/ui/pool.ts +6 -1
- package/.pi/harnesses/agent-hub/work-mode-controls.ts +1 -1
- package/.pi/harnesses/ask-user-remote/README.md +8 -2
- package/.pi/harnesses/ask-user-remote/index.ts +40 -14
- package/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.pi/harnesses/ask-user-remote/race-core.js +23 -5
- package/.pi/harnesses/ask-user-remote/runtime-ask.ts +43 -0
- package/.pi/harnesses/coms/README.md +1 -1
- package/.pi/harnesses/coms/index.ts +7 -1
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/README.md +11 -0
- package/.pi/harnesses/damage-control-continue/index.ts +5 -0
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/context-budget-child-prompt.ts +5 -4
- package/.pi/harnesses/lib/fleet-dashboard-view.ts +1 -1
- package/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.6/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.6/.pi/agents/model-profiles.yaml +83 -0
- package/.versions/2.0.6/.pi/agents/peers.yaml +145 -0
- package/.versions/2.0.6/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.6/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.6/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.6/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.6/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.6/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.6/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.6/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.6/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.6/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.6/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.6/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.6/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.6/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.6/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.6/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.6/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.6/.pi/extensions/package.json +9 -0
- package/.versions/2.0.6/.pi/extensions/pi-voice-stt/README.md +205 -0
- package/.versions/2.0.6/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.6/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.6/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.6/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.6/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.6/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/README.md +1203 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/acceptance.ts +62 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/budget-recovery.ts +97 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/capability-packs.ts +180 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/context.ts +43 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/config/agents.ts +173 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/config/model-profiles.ts +216 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/config/overrides.ts +153 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +213 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/context/budgets.ts +202 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/context-window.js +106 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/delegate.ts +446 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/dispatch-coms.ts +237 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/dispatch-native-complete.ts +154 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +156 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +193 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/dispatch-native-types.ts +230 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/dispatch-native.ts +213 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/drift-watchdog.js +218 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/fixtures/registration-surface.json +57 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/helpers.ts +266 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/hub-state-audit.js +64 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/index.ts +2151 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/input/completions.ts +76 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/input/shortcuts.ts +18 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +123 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/no-progress.ts +76 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/policy/work-mode.ts +119 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/prompts/context.ts +47 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/prompts/fragments.ts +115 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/prompts/system-prompt.ts +112 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/research/runtime.ts +192 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/research/spawn-run.ts +156 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/return-contract.js +293 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/return-extract.js +75 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/review-findings.js +102 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/run-budget.js +537 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/run-namespace.js +87 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/scope-gate.js +123 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/spawn.ts +404 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/timeline.ts +54 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/tools/action-executors.ts +149 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/tools/context.ts +134 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +82 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +273 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/tools/fleet-tools.ts +202 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/tools/set-task-tier.ts +29 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/tools/spawn-research.ts +62 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/tools/verification-contract.ts +77 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/types.ts +63 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/ui/activity-dots.ts +16 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/ui/context-budget.ts +86 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/ui/detail-panel.ts +178 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +125 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/ui/grid.ts +42 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/ui/running-strip.ts +139 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/ui/zoom.ts +204 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.6/.pi/harnesses/agent-hub/work-mode.ts +167 -0
- package/.versions/2.0.6/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.6/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.6/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.6/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.6/.pi/harnesses/ask-user-remote/runtime-ask.ts +43 -0
- package/.versions/2.0.6/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.6/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.6/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.6/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.6/.pi/harnesses/damage-control-continue/README.md +124 -0
- package/.versions/2.0.6/.pi/harnesses/damage-control-continue/index.ts +536 -0
- package/.versions/2.0.6/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.6/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.6/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.6/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.6/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.6/.pi/harnesses/lib/context-budget-child-prompt.ts +180 -0
- package/.versions/2.0.6/.pi/harnesses/lib/context-budget-hub-prompt.ts +114 -0
- package/.versions/2.0.6/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.6/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.6/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.6/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.6/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.6/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.6/.pi/harnesses/lib/fleet-dashboard-ops.ts +161 -0
- package/.versions/2.0.6/.pi/harnesses/lib/fleet-dashboard-view.ts +148 -0
- package/.versions/2.0.6/.pi/harnesses/lib/fleet-detail-view.ts +247 -0
- package/.versions/2.0.6/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.6/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.6/.pi/harnesses/lib/fleet-read-model.ts +131 -0
- package/.versions/2.0.6/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.6/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.6/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.6/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.6/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.6/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.6/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.6/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.6/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.6/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.6/.pi/harnesses/lib/spawned-peers.js +190 -0
- package/.versions/2.0.6/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.6/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.6/.pi/prompts/af-build.md +24 -0
- package/.versions/2.0.6/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.6/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.6/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.6/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.6/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.6/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.6/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.6/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.6/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.6/.version +1 -0
- package/.versions/2.0.6/agents/architect.md +25 -0
- package/.versions/2.0.6/agents/bowser.md +28 -0
- package/.versions/2.0.6/agents/builder.md +56 -0
- package/.versions/2.0.6/agents/code-reviewer.md +210 -0
- package/.versions/2.0.6/agents/deep-researcher.md +33 -0
- package/.versions/2.0.6/agents/documenter.md +23 -0
- package/.versions/2.0.6/agents/orchestrator.md +23 -0
- package/.versions/2.0.6/agents/plan-reviewer.md +84 -0
- package/.versions/2.0.6/agents/planner.md +106 -0
- package/.versions/2.0.6/agents/releaser.md +25 -0
- package/.versions/2.0.6/agents/researcher.md +31 -0
- package/.versions/2.0.6/agents/security-auditor.md +168 -0
- package/.versions/2.0.6/agents/test-engineer.md +154 -0
- package/.versions/2.0.6/agents/web-debugger.md +44 -0
- package/.versions/2.0.6/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.6/bin/catalog/harness-runtime-closure.json +31 -0
- package/.versions/2.0.6/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.6/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.6/docs/ARCHITECTURE.md +407 -0
- package/.versions/2.0.6/docs/agent-fleet-setup.md +561 -0
- package/.versions/2.0.6/docs/claude-code-coms-bridge.md +133 -0
- package/.versions/2.0.6/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.6/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.6/docs/getting-started.md +126 -0
- package/.versions/2.0.6/docs/npm-install.md +301 -0
- package/.versions/2.0.6/docs/pi-extensions.md +446 -0
- package/.versions/2.0.6/docs/pi-setup.md +76 -0
- package/.versions/2.0.6/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.6/hermes/README.md +347 -0
- package/.versions/2.0.6/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.6/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.6/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.6/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.6/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.6/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.6/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.6/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.6/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.6/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.6/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.6/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.6/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.6/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.6/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.6/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.6/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.6/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.6/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.6/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.6/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.6/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.6/install-manifest.json +2924 -0
- package/.versions/2.0.6/justfile +247 -0
- package/.versions/2.0.6/manifest-meta.json +976 -0
- package/.versions/2.0.6/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.6/references/communication-contract.md +26 -0
- package/.versions/2.0.6/references/definition-of-done.md +67 -0
- package/.versions/2.0.6/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.6/references/observability-checklist.md +91 -0
- package/.versions/2.0.6/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.6/references/performance-checklist.md +153 -0
- package/.versions/2.0.6/references/prompting-patterns.md +380 -0
- package/.versions/2.0.6/references/security-checklist.md +179 -0
- package/.versions/2.0.6/references/testing-patterns.md +236 -0
- package/.versions/2.0.6/references/workflow-authoring.md +304 -0
- package/.versions/2.0.6/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.6/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.6/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.6/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.6/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.6/scripts/fleet-codex-read.py +146 -0
- package/.versions/2.0.6/scripts/fleet.ts +216 -0
- package/.versions/2.0.6/scripts/flow.ts +137 -0
- package/.versions/2.0.6/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.6/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.6/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.6/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.6/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.6/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.6/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.6/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.6/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.6/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.6/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.6/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.6/scripts/lib/flow-command.ts +93 -0
- package/.versions/2.0.6/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.6/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.6/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.6/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.6/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.6/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.6/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.6/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.6/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.6/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.6/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.6/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.6/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.6/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.6/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.6/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.6/scripts/package-lock.json +35 -0
- package/.versions/2.0.6/scripts/package.json +9 -0
- package/.versions/2.0.6/scripts/peer-banner.ts +40 -0
- package/.versions/2.0.6/scripts/peer-launch.ts +285 -0
- package/.versions/2.0.6/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.6/scripts/team-up.ts +378 -0
- package/.versions/2.0.6/scripts/workflows/lib/agent-phase.ts +133 -0
- package/.versions/2.0.6/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.6/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.6/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.6/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.6/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.6/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.6/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.6/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.6/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.6/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.6/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.6/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.6/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.6/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.6/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.6/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.6/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.6/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.6/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.6/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.6/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.6/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.6/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.6/scripts/workflows/wf-scout.ts +38 -0
- package/.versions/2.0.6/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.6/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.6/skills/code-review-and-quality/SKILL.md +381 -0
- package/.versions/2.0.6/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.6/skills/context-engineering/SKILL.md +291 -0
- package/.versions/2.0.6/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/2.0.6/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.6/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.6/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.6/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.6/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.6/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.6/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.6/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.6/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.6/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.6/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.6/skills/incremental-implementation/SKILL.md +298 -0
- package/.versions/2.0.6/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.6/skills/orchestration-verification/SKILL.md +181 -0
- package/.versions/2.0.6/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.6/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/2.0.6/skills/planning-and-task-breakdown/SKILL.md +265 -0
- package/.versions/2.0.6/skills/security-and-hardening/SKILL.md +461 -0
- package/.versions/2.0.6/skills/spec-driven-development/SKILL.md +256 -0
- package/.versions/2.0.6/skills/using-agent-skills/SKILL.md +197 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/README.md +11 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
- package/.versions/2.0.6/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
- package/.versions/2.0.7/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.7/.pi/agents/model-profiles.yaml +83 -0
- package/.versions/2.0.7/.pi/agents/peers.yaml +145 -0
- package/.versions/2.0.7/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.7/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.7/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.7/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.7/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.7/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.7/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.7/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.7/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.7/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.7/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.7/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.7/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.7/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.7/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.7/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.7/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.7/.pi/extensions/package.json +9 -0
- package/.versions/2.0.7/.pi/extensions/pi-voice-stt/README.md +205 -0
- package/.versions/2.0.7/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.7/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.7/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.7/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.7/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.7/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/README.md +1203 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/acceptance.ts +62 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/budget-recovery.ts +97 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/capability-packs.ts +180 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/context.ts +43 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/config/agents.ts +173 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/config/model-profiles.ts +216 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/config/overrides.ts +153 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +213 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/context/budgets.ts +202 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/context-window.js +106 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/delegate.ts +446 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/dispatch-coms.ts +237 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/dispatch-native-complete.ts +154 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +156 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +193 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/dispatch-native-types.ts +230 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/dispatch-native.ts +213 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/drift-watchdog.js +218 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/fixtures/registration-surface.json +57 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/helpers.ts +266 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/hub-state-audit.js +64 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/index.ts +2151 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/input/completions.ts +76 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/input/shortcuts.ts +18 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +123 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/no-progress.ts +76 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/policy/work-mode.ts +119 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/prompts/context.ts +47 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/prompts/fragments.ts +115 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/prompts/system-prompt.ts +112 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/research/runtime.ts +192 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/research/spawn-run.ts +156 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/return-contract.js +293 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/return-extract.js +75 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/review-findings.js +102 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/run-budget.js +537 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/run-namespace.js +87 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/scope-gate.js +123 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/spawn.ts +404 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/timeline.ts +54 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/tools/action-executors.ts +149 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/tools/context.ts +134 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +82 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +273 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/tools/fleet-tools.ts +202 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/tools/set-task-tier.ts +29 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/tools/spawn-research.ts +62 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/tools/verification-contract.ts +77 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/types.ts +63 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/ui/activity-dots.ts +16 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/ui/context-budget.ts +86 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/ui/detail-panel.ts +178 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +125 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/ui/grid.ts +42 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/ui/running-strip.ts +139 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/ui/zoom.ts +204 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.7/.pi/harnesses/agent-hub/work-mode.ts +167 -0
- package/.versions/2.0.7/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.7/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.7/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.7/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.7/.pi/harnesses/ask-user-remote/runtime-ask.ts +43 -0
- package/.versions/2.0.7/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.7/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.7/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.7/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.7/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.7/.pi/harnesses/damage-control-continue/index.ts +541 -0
- package/.versions/2.0.7/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.7/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.7/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.7/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.7/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.7/.pi/harnesses/lib/context-budget-child-prompt.ts +180 -0
- package/.versions/2.0.7/.pi/harnesses/lib/context-budget-hub-prompt.ts +114 -0
- package/.versions/2.0.7/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.7/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.7/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.7/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.7/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.7/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.7/.pi/harnesses/lib/fleet-dashboard-ops.ts +161 -0
- package/.versions/2.0.7/.pi/harnesses/lib/fleet-dashboard-view.ts +148 -0
- package/.versions/2.0.7/.pi/harnesses/lib/fleet-detail-view.ts +247 -0
- package/.versions/2.0.7/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.7/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.7/.pi/harnesses/lib/fleet-read-model.ts +131 -0
- package/.versions/2.0.7/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.7/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.7/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.7/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.7/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.7/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.7/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.7/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.7/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.7/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.7/.pi/harnesses/lib/spawned-peers.js +190 -0
- package/.versions/2.0.7/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.7/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.7/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.7/.pi/prompts/af-build.md +24 -0
- package/.versions/2.0.7/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.7/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.7/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.7/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.7/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.7/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.7/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.7/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.7/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.7/.version +1 -0
- package/.versions/2.0.7/agents/architect.md +25 -0
- package/.versions/2.0.7/agents/bowser.md +28 -0
- package/.versions/2.0.7/agents/builder.md +56 -0
- package/.versions/2.0.7/agents/code-reviewer.md +210 -0
- package/.versions/2.0.7/agents/deep-researcher.md +33 -0
- package/.versions/2.0.7/agents/documenter.md +23 -0
- package/.versions/2.0.7/agents/orchestrator.md +23 -0
- package/.versions/2.0.7/agents/plan-reviewer.md +84 -0
- package/.versions/2.0.7/agents/planner.md +106 -0
- package/.versions/2.0.7/agents/releaser.md +25 -0
- package/.versions/2.0.7/agents/researcher.md +31 -0
- package/.versions/2.0.7/agents/security-auditor.md +168 -0
- package/.versions/2.0.7/agents/test-engineer.md +154 -0
- package/.versions/2.0.7/agents/web-debugger.md +44 -0
- package/.versions/2.0.7/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.7/bin/catalog/harness-runtime-closure.json +31 -0
- package/.versions/2.0.7/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.7/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.7/docs/ARCHITECTURE.md +407 -0
- package/.versions/2.0.7/docs/agent-fleet-setup.md +561 -0
- package/.versions/2.0.7/docs/claude-code-coms-bridge.md +133 -0
- package/.versions/2.0.7/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.7/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.7/docs/getting-started.md +126 -0
- package/.versions/2.0.7/docs/npm-install.md +327 -0
- package/.versions/2.0.7/docs/pi-extensions.md +446 -0
- package/.versions/2.0.7/docs/pi-setup.md +76 -0
- package/.versions/2.0.7/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.7/hermes/README.md +347 -0
- package/.versions/2.0.7/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.7/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.7/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.7/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.7/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.7/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.7/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.7/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.7/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.7/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.7/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.7/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.7/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.7/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.7/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.7/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.7/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.7/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.7/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.7/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.7/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.7/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.7/install-manifest.json +2886 -0
- package/.versions/2.0.7/justfile +247 -0
- package/.versions/2.0.7/manifest-meta.json +958 -0
- package/.versions/2.0.7/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.7/references/communication-contract.md +26 -0
- package/.versions/2.0.7/references/definition-of-done.md +67 -0
- package/.versions/2.0.7/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.7/references/observability-checklist.md +91 -0
- package/.versions/2.0.7/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.7/references/performance-checklist.md +153 -0
- package/.versions/2.0.7/references/prompting-patterns.md +380 -0
- package/.versions/2.0.7/references/security-checklist.md +179 -0
- package/.versions/2.0.7/references/testing-patterns.md +236 -0
- package/.versions/2.0.7/references/workflow-authoring.md +304 -0
- package/.versions/2.0.7/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.7/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.7/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.7/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.7/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.7/scripts/fleet-codex-read.py +146 -0
- package/.versions/2.0.7/scripts/fleet.ts +216 -0
- package/.versions/2.0.7/scripts/flow.ts +137 -0
- package/.versions/2.0.7/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.7/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.7/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.7/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.7/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.7/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.7/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.7/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.7/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.7/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.7/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.7/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.7/scripts/lib/flow-command.ts +93 -0
- package/.versions/2.0.7/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.7/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.7/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.7/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.7/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.7/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.7/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.7/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.7/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.7/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.7/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.7/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.7/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.7/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.7/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.7/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.7/scripts/package-lock.json +35 -0
- package/.versions/2.0.7/scripts/package.json +9 -0
- package/.versions/2.0.7/scripts/peer-banner.ts +40 -0
- package/.versions/2.0.7/scripts/peer-launch.ts +285 -0
- package/.versions/2.0.7/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.7/scripts/team-up.ts +378 -0
- package/.versions/2.0.7/scripts/workflows/lib/agent-phase.ts +133 -0
- package/.versions/2.0.7/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.7/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.7/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.7/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.7/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.7/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.7/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.7/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.7/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.7/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.7/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.7/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.7/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.7/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.7/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.7/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.7/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.7/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.7/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.7/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.7/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.7/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.7/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.7/scripts/workflows/wf-scout.ts +38 -0
- package/.versions/2.0.7/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.7/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.7/skills/code-review-and-quality/SKILL.md +381 -0
- package/.versions/2.0.7/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.7/skills/context-engineering/SKILL.md +291 -0
- package/.versions/2.0.7/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/2.0.7/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.7/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.7/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.7/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.7/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.7/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.7/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.7/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.7/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.7/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.7/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.7/skills/incremental-implementation/SKILL.md +298 -0
- package/.versions/2.0.7/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.7/skills/orchestration-verification/SKILL.md +181 -0
- package/.versions/2.0.7/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.7/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/2.0.7/skills/planning-and-task-breakdown/SKILL.md +265 -0
- package/.versions/2.0.7/skills/security-and-hardening/SKILL.md +461 -0
- package/.versions/2.0.7/skills/spec-driven-development/SKILL.md +256 -0
- package/.versions/2.0.7/skills/using-agent-skills/SKILL.md +197 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/README.md +11 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
- package/.versions/2.0.7/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
- package/CHANGELOG.md +31 -0
- package/README.md +26 -21
- package/bin/catalog/harness-runtime-closure.json +1 -6
- package/bin/cli.js +149 -78
- package/bin/lib/apply.js +53 -62
- package/bin/lib/desired.js +2 -2
- package/bin/lib/features.js +10 -3
- package/bin/lib/public-plan.js +17 -0
- package/bin/lib/purge.js +9 -3
- package/bin/lib/reconcile.js +4 -10
- package/bin/lib/repair-desired.js +73 -0
- package/bin/lib/stt-wizard.js +25 -11
- package/bin/lib/transaction.js +118 -108
- package/bin/lib/tui.js +70 -65
- package/bin/lib/update-notifier.js +2 -2
- package/bin/lib/workspace-safety.js +72 -0
- package/bin/snapshot-version.js +1 -2
- package/codex/fleet-session-client/SKILL.md +34 -0
- package/codex/fleet-session-client.zip +0 -0
- package/docs/ARCHITECTURE.md +4 -4
- package/docs/MIGRATION-agent-fleet.md +2 -2
- package/docs/assets/branding/README.md +33 -0
- package/docs/assets/branding/agent-fleet-logo-v1.png +0 -0
- package/docs/assets/branding/agent-fleet-logo-white-v1.png +0 -0
- package/docs/codex-session-bridge.md +219 -0
- package/docs/coms-hermes-bridge.md +4 -5
- package/docs/getting-started.md +2 -0
- package/docs/npm-install.md +44 -16
- package/docs/pi-extensions.md +3 -3
- package/docs/pi-setup.md +4 -2
- package/hermes/README.md +1 -1
- package/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +19 -16
- package/install-manifest.json +54 -110
- package/justfile +3 -45
- package/manifest-meta.json +52 -63
- package/package.json +10 -7
- package/scripts/coms-cli.ts +2 -61
- package/scripts/fleet-codex-client.ts +69 -0
- package/scripts/fleet-codex-read.py +146 -0
- package/scripts/fleet.ts +1 -7
- package/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/scripts/lib/fleet-codex-operations.ts +190 -0
- package/scripts/lib/fleet-codex-session.ts +166 -0
- package/scripts/lib/fleet-codex-transport.ts +124 -0
- package/scripts/lib/fleet-command.ts +5 -23
- package/scripts/lib/team-project.ts +15 -50
- package/scripts/team-up.ts +6 -34
- package/codex/CONDUCTOR.md +0 -148
- package/docs/codex-remote-conductor.md +0 -170
- package/scripts/codex-conductor.ts +0 -41
- package/scripts/codex-remote-control.ts +0 -167
- package/scripts/lib/codex-conductor.ts +0 -88
- package/scripts/lib/codex-remote-control.ts +0 -482
- package/systemd/user/agent-fleet-codex-remote-control.service.in +0 -23
- /package/{.pi → .versions/2.0.6/.pi}/extensions/agent-fleet-update-check/README.md +0 -0
- /package/{.pi → .versions/2.0.6/.pi}/extensions/agent-fleet-update-check/index.ts +0 -0
- /package/{.pi → .versions/2.0.6/.pi}/extensions/agent-fleet-update-check/package.json +0 -0
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { registerRetry } from "./commands/retry.ts";
|
|
2
|
+
import { createNoProgressGuard } from "./no-progress.ts";
|
|
3
|
+
import { closeEvidenceSession, pruneEvidenceSessions } from "./execution-evidence.ts";
|
|
1
4
|
import { isCompleteProfile, dispatcherSelection, type ModelProfiles } from './config/model-profiles.ts';
|
|
2
5
|
import { createProfileActivation } from './policy/profile-activation.ts';
|
|
3
6
|
import { readActiveProfile, profileWorkInFlight, withProfileWork, assertProfileModel, profilePeerGate } from './policy/profile-runtime.ts';
|
|
@@ -87,8 +90,11 @@ import { createToolExecutionOrchestration } from "./tools/execution-orchestratio
|
|
|
87
90
|
import { latestPersistedCapabilityState, type ContextState, type PendingOperation } from "./capability-packs.ts";
|
|
88
91
|
import { contextPressureDiagnostic, createContextPressureState, transitionContextPressure, type ContextPressureState } from "./context-pressure.ts";
|
|
89
92
|
import { confirmationOutcome, capabilityConfirmationPack, capabilityConfirmationQuestion, type ConfirmableCapabilityPack } from "./capability-confirmation.ts";
|
|
90
|
-
import {
|
|
93
|
+
import { createBudgetRecovery } from "./budget-recovery.ts";
|
|
94
|
+
import { requestRuntimeAsk } from "../ask-user-remote/runtime-ask.ts";
|
|
95
|
+
import { registerBudgetContinue } from "./commands/budget-continue.ts";
|
|
91
96
|
import { observeAskUserResults } from "../ask-user-remote/index.ts";
|
|
97
|
+
import { handleQuestionEnvelope, registerQuestionPeer } from "../ask-user-remote/questions.ts";
|
|
92
98
|
import { buildHubPeerSpawnPlan, launchHubPeerInPane } from "./peer-spawn-plan.ts";
|
|
93
99
|
import { RESEARCH_TOOLS, createResearchRuntime, parseResearchHandle } from "./research/runtime.ts";
|
|
94
100
|
import { requireSafetyHarness, resolveSafetyHarness } from "./safety-routing.ts";
|
|
@@ -117,7 +123,7 @@ import { registerInputShortcuts } from "./input/shortcuts.ts";
|
|
|
117
123
|
import { createCompletionPresentation } from "./input/completions.ts";
|
|
118
124
|
import { createResearchControls } from "./research/controls.ts";
|
|
119
125
|
import { createContextPressureLifecycle, createContextPressureRootState } from "./lifecycle/context-pressure.ts";
|
|
120
|
-
import { createTurnLifecycleHandlers } from "./lifecycle/turn-handlers.ts";
|
|
126
|
+
import { createTurnLifecycleHandlers, registerTurnPresence } from "./lifecycle/turn-handlers.ts";
|
|
121
127
|
import { createMonitorSession } from "./lifecycle/monitor-session.ts";
|
|
122
128
|
import { applySessionOverrides, registerSessionOrchestration, resetHubSession } from "./lifecycle/session-orchestration.ts";
|
|
123
129
|
import { openZoom, type TimelineEntry, type Zoomable } from "./ui/zoom.ts";
|
|
@@ -175,11 +181,16 @@ export default function (pi: ExtensionAPI) {
|
|
|
175
181
|
? "orchestrator roster recovery required"
|
|
176
182
|
: null,
|
|
177
183
|
handleCustomEnvelope: (socket, envelope) => {
|
|
184
|
+
if (handleQuestionEnvelope(socket, envelope)) return true;
|
|
178
185
|
if (envelope.type !== "access_request") return false;
|
|
179
186
|
void accessApprovalRouter.handle(socket, envelope as AccessRequest);
|
|
180
187
|
return true;
|
|
181
188
|
},
|
|
182
189
|
});
|
|
190
|
+
const unregisterQuestions = registerQuestionPeer(() => coms.ready && coms.identity ? {
|
|
191
|
+
project: coms.identity.project, peer: coms.identity.name,
|
|
192
|
+
sessionId: coms.identity.session_id, startedAt: coms.identity.started_at,
|
|
193
|
+
} : null);
|
|
183
194
|
let identity: ComsIdentity | null = null;
|
|
184
195
|
const peerCards = coms.peerCards;
|
|
185
196
|
const pendingReplies = coms.pendingReplies;
|
|
@@ -356,9 +367,6 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
356
367
|
// Human wait time is not fleet work. Track it separately from history UI
|
|
357
368
|
// intervals so a continuation can rebase the budget without erasing history.
|
|
358
369
|
let turnBudgetAskUserWaitMs = 0;
|
|
359
|
-
type PendingBudgetContinuation = { kind: BudgetContinuationKind; reason: string };
|
|
360
|
-
let pendingBudgetContinuation: PendingBudgetContinuation | null = null;
|
|
361
|
-
const budgetContinuationAsks = new Map<string, { kind: BudgetContinuationKind; reason: string; params: { context?: unknown; options?: unknown } }>();
|
|
362
370
|
let taskContinuationCount = 0;
|
|
363
371
|
let turnContinuationCount = 0;
|
|
364
372
|
// ── Task-scoped budget & tier (run-budget.js) ──
|
|
@@ -421,12 +429,14 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
421
429
|
// surfaced in the status line. Resets on session_start.
|
|
422
430
|
let delegatedTokens = 0;
|
|
423
431
|
|
|
432
|
+
const noProgress = createNoProgressGuard();
|
|
424
433
|
const budgetCtx = createBudgetContext({
|
|
425
434
|
getBudgetOverrides: () => budgetOverrides,
|
|
426
435
|
getTurnDispatchCount: () => turnDispatchCount, setTurnDispatchCount: value => { turnDispatchCount = value; },
|
|
427
436
|
getTurnResearchCount: () => turnResearchCount, setTurnResearchCount: value => { turnResearchCount = value; },
|
|
428
437
|
getTurnBudgetAskUserWaitMs: () => turnBudgetAskUserWaitMs, setTurnBudgetAskUserWaitMs: value => { turnBudgetAskUserWaitMs = value; },
|
|
429
|
-
|
|
438
|
+
resetBudgetRecovery: () => budgetRecovery.reset(),
|
|
439
|
+
resetNoProgress: () => noProgress.reset(),
|
|
430
440
|
getTaskContinuationCount: () => taskContinuationCount, setTaskContinuationCount: value => { taskContinuationCount = value; },
|
|
431
441
|
getTurnContinuationCount: () => turnContinuationCount, setTurnContinuationCount: value => { turnContinuationCount = value; },
|
|
432
442
|
getTaskDispatchCount: () => taskDispatchCount, setTaskDispatchCount: value => { taskDispatchCount = value; },
|
|
@@ -448,10 +458,32 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
448
458
|
});
|
|
449
459
|
const {
|
|
450
460
|
currentBudget, currentTaskBudget, taskCounters, taskActiveElapsedMs, turnBudgetActiveElapsedMs,
|
|
451
|
-
|
|
461
|
+
renewTurnBudgetWindow, continueTaskBudgetWindow, closeTurnActiveTime, resetTaskWindow,
|
|
452
462
|
hubAuditIdentity, hubLocationSuffix, taskResetSnapshot, budgetContinuationSnapshot,
|
|
453
463
|
appendTaskResetEntry, appendBudgetContinuationEntry, updateModeStatus, ensureTaskTier,
|
|
454
464
|
} = budgetCtx;
|
|
465
|
+
const budgetRecovery = createBudgetRecovery({
|
|
466
|
+
check: operation => {
|
|
467
|
+
const task = checkTaskBudget(operation, taskCounters(), currentTaskBudget(), taskActiveElapsedMs(), taskTier);
|
|
468
|
+
if (task) return { ...task, kind: "task" };
|
|
469
|
+
const turn = checkTurnBudget(operation, { dispatches: turnDispatchCount, research: turnResearchCount }, currentBudget(), turnBudgetActiveElapsedMs(), taskTier);
|
|
470
|
+
return turn ? { ...turn, kind: "turn" } : null;
|
|
471
|
+
},
|
|
472
|
+
language: () => userLanguage,
|
|
473
|
+
ask: (id, params, ctx, signal) => requestRuntimeAsk(pi.events, id, params, ctx, signal),
|
|
474
|
+
startWait: id => executionHistory.startAskUser(id),
|
|
475
|
+
endWait: (id, sameTask) => {
|
|
476
|
+
const wait = executionHistory.endAskUser(id, Date.now());
|
|
477
|
+
if (!sameTask) return;
|
|
478
|
+
if (wait > 0) taskClock = addTaskClockWait(taskClock, wait);
|
|
479
|
+
turnBudgetAskUserWaitMs += wait;
|
|
480
|
+
},
|
|
481
|
+
renew: (refusal, correlation, ctx) => {
|
|
482
|
+
const at = Date.now(), prior = budgetContinuationSnapshot(refusal.kind, at);
|
|
483
|
+
if (refusal.kind === "task") continueTaskBudgetWindow(at); else renewTurnBudgetWindow(at);
|
|
484
|
+
appendBudgetContinuationEntry(refusal.kind, refusal.reason, prior, ctx, correlation);
|
|
485
|
+
},
|
|
486
|
+
});
|
|
455
487
|
|
|
456
488
|
// ── Verification Contract: assertion ledger (advisory) ──
|
|
457
489
|
// Mutable ownership remains here; the extracted runtime receives explicit ports.
|
|
@@ -524,6 +556,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
524
556
|
}
|
|
525
557
|
|
|
526
558
|
function loadAgents(cwd: string): void {
|
|
559
|
+
if (sessionDir) closeEvidenceSession(sessionDir);
|
|
527
560
|
loadAgentConfiguration(cwd, {
|
|
528
561
|
setSessionDir: hubStateCtx.setSessionDir, getSessionDir: hubStateCtx.getSessionDir,
|
|
529
562
|
archivePreviousRun, ensureArtifactsLayout, resetAssertions: () => { assertions = []; },
|
|
@@ -531,6 +564,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
531
564
|
setModelProfiles: value => { modelProfiles = value; }, setModelProfileErrors: errors => { modelProfileErrors=errors; }, setDispatchPolicy: value => { dispatchPolicy = value; },
|
|
532
565
|
setDispatchPolicyWarnings: value => { dispatchPolicyWarnings = value; },
|
|
533
566
|
});
|
|
567
|
+
pruneEvidenceSessions(sessionDir, runHistoryKeep);
|
|
534
568
|
}
|
|
535
569
|
|
|
536
570
|
const agentStateFactory = createAgentStateFactory(() => sessionDir);
|
|
@@ -817,6 +851,14 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
817
851
|
}
|
|
818
852
|
const workModePolicy = createWorkModePolicy({
|
|
819
853
|
getBaselineTools: () => baselineTools, getRosterSize: () => agentStates.size,
|
|
854
|
+
activateFallbackRoster: ctx => {
|
|
855
|
+
if (!rosterPolicy.activateFirstValidTeam()) return;
|
|
856
|
+
workModePolicy.clearRosterRecovery();
|
|
857
|
+
persistActiveRoster();
|
|
858
|
+
setTimeout(replayDeferredRecoveryInputs, 0);
|
|
859
|
+
updateWidget();
|
|
860
|
+
ctx.ui.setStatus("agent-team", `Team: ${activeTeamName} (${agentStates.size})`);
|
|
861
|
+
},
|
|
820
862
|
getActiveTeamName: () => activeTeamName, getComsReady: () => comsReady,
|
|
821
863
|
getHerdrReady: () => herdrFleetReady, getAskUserAvailable: () => askUserAvailable,
|
|
822
864
|
getIdentityLabel: () => identity ? `${identity.name}@${identity.project}` : null,
|
|
@@ -850,7 +892,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
850
892
|
getActiveWritableDispatches: () => activeWritableDispatches, setActiveWritableDispatches: value => { activeWritableDispatches = value; },
|
|
851
893
|
getWritableOverlapCounter: () => writableOverlapCounter, setWritableOverlapCounter: value => { writableOverlapCounter = value; },
|
|
852
894
|
},
|
|
853
|
-
budget: budgetCtx, artifacts: assertionsArtifactsCtx, research: researchRuntime,
|
|
895
|
+
budget: budgetCtx, budgetRecovery, noProgress, artifacts: assertionsArtifactsCtx, research: researchRuntime,
|
|
854
896
|
provisionalCapabilityRefusal, dispatchAgent, runReturnExtraction,
|
|
855
897
|
extractNeedsResearch, extractAskUserQuestions, contextPressure: percent => percent >= CONTEXT_WARN_THRESHOLD, displayName,
|
|
856
898
|
},
|
|
@@ -888,15 +930,15 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
888
930
|
runtime: researchRuntime,
|
|
889
931
|
refresh: () => {},
|
|
890
932
|
getAgents: () => agentStates, displayName, modelWorkBlocked: modelWorkBlockedByRosterRecovery,
|
|
891
|
-
cancelWait: (state, kind) => cancelLocalWaitOnly({ abort: state.comsAbort, monitorBridge, monitorKey: monitorKeyForAgent(state.def.name, state.runCount), event: { kind } }),
|
|
892
|
-
cancelOwned: state => cancelLocalOwnedProcess({ process: state.proc, monitorBridge, monitorKey: monitorKeyForAgent(state.def.name, state.runCount), treeKill: killPiTree }),
|
|
933
|
+
cancelWait: (state, kind) => cancelLocalWaitOnly({ abort: state.comsAbort, monitorBridge, monitorKey: monitorKeyForAgent(state.def.name, state.dispatchId ?? state.runCount), event: { kind } }),
|
|
934
|
+
cancelOwned: state => cancelLocalOwnedProcess({ process: state.proc, monitorBridge, monitorKey: monitorKeyForAgent(state.def.name, state.dispatchId ?? state.runCount), treeKill: killPiTree }),
|
|
893
935
|
restartSpecialist: async (state: AgentState, ctx) => {
|
|
894
936
|
if (state.status === "running" && (state.proc || state.comsAbort)) {
|
|
895
937
|
let resolveTermination!: () => void;
|
|
896
938
|
const terminated = new Promise<void>(resolve => { resolveTermination = resolve; });
|
|
897
939
|
state.onTerminate = resolveTermination;
|
|
898
940
|
if (state.proc) { state.killedByOperator = true; state.restarting = true; killPiTree(state.proc); }
|
|
899
|
-
else await cancelLocalWaitOnly({ abort: state.comsAbort, monitorBridge, monitorKey: monitorKeyForAgent(state.def.name, state.runCount), event: { kind: "restart" } });
|
|
941
|
+
else await cancelLocalWaitOnly({ abort: state.comsAbort, monitorBridge, monitorKey: monitorKeyForAgent(state.def.name, state.dispatchId ?? state.runCount), event: { kind: "restart" } });
|
|
900
942
|
await terminated;
|
|
901
943
|
}
|
|
902
944
|
state.sessionFile = null;
|
|
@@ -927,6 +969,13 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
927
969
|
applyWorkModeSelection,
|
|
928
970
|
getWorkModeStatusText: workModeStatusText,
|
|
929
971
|
openWorkModePicker,
|
|
972
|
+
handleBudgetContinue: async ctx => { await budgetRecovery.resume(ctx); },
|
|
973
|
+
handleRetry: async (args, ctx) => {
|
|
974
|
+
const dispatchId = args?.trim();
|
|
975
|
+
if (!dispatchId || !noProgress.authorize(dispatchId)) { ctx.ui.notify("Unknown, stale or already authorized failure. Use /af-retry <dispatchId> from the no-progress refusal.", "error"); return; }
|
|
976
|
+
pi.appendEntry("agent-hub-retry-authorized", { dispatchId, identity: hubAuditIdentity(ctx) });
|
|
977
|
+
ctx.ui.notify(`One retry authorized for ${dispatchId}. Budget and safety gates still apply; no operation was dispatched.`, "info");
|
|
978
|
+
},
|
|
930
979
|
handleAgentsTeam: async (_args, ctx) => {
|
|
931
980
|
widgetCtx = ctx;
|
|
932
981
|
const teamNames = Object.keys(teams);
|
|
@@ -1447,10 +1496,10 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1447
1496
|
}
|
|
1448
1497
|
return null;
|
|
1449
1498
|
},
|
|
1450
|
-
checkBudget: () => {
|
|
1499
|
+
checkBudget: async () => {
|
|
1451
1500
|
ensureTaskTier();
|
|
1452
|
-
const
|
|
1453
|
-
return
|
|
1501
|
+
const blocked = await budgetRecovery.ensure("dispatch", args ?? "model panel", ctx);
|
|
1502
|
+
return blocked?.message ?? null;
|
|
1454
1503
|
},
|
|
1455
1504
|
chargeBudget: () => {
|
|
1456
1505
|
turnDispatchCount += 1;
|
|
@@ -1546,10 +1595,10 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1546
1595
|
}
|
|
1547
1596
|
return null;
|
|
1548
1597
|
},
|
|
1549
|
-
checkBudget: () => {
|
|
1598
|
+
checkBudget: async () => {
|
|
1550
1599
|
ensureTaskTier();
|
|
1551
|
-
const
|
|
1552
|
-
return
|
|
1600
|
+
const blocked = await budgetRecovery.ensure("dispatch", args ?? "model panel", ctx);
|
|
1601
|
+
return blocked?.message ?? null;
|
|
1553
1602
|
},
|
|
1554
1603
|
chargeBudget: () => {
|
|
1555
1604
|
turnDispatchCount += 1;
|
|
@@ -1644,6 +1693,8 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1644
1693
|
registerHandoff(pi, commandCtx);
|
|
1645
1694
|
registerCompound(pi, commandCtx);
|
|
1646
1695
|
registerPoll(pi, commandCtx);
|
|
1696
|
+
registerBudgetContinue(pi, commandCtx);
|
|
1697
|
+
registerRetry(pi, commandCtx);
|
|
1647
1698
|
registerDebate(pi, commandCtx);
|
|
1648
1699
|
|
|
1649
1700
|
const detailPanel = createDetailPanel<AgentDef, AgentState, ResearchState>({
|
|
@@ -1688,7 +1739,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1688
1739
|
modelWorkBlocked: modelWorkBlockedByRosterRecovery,
|
|
1689
1740
|
restartSpecialist: researchControls.restartSpecialist,
|
|
1690
1741
|
removeResearch: researchControls.remove,
|
|
1691
|
-
killSpecialistProcess: state => cancelLocalOwnedProcess({ process: state.proc, monitorBridge, monitorKey: monitorKeyForAgent(state.def.name, state.runCount), treeKill: killPiTree }),
|
|
1742
|
+
killSpecialistProcess: state => cancelLocalOwnedProcess({ process: state.proc, monitorBridge, monitorKey: monitorKeyForAgent(state.def.name, state.dispatchId ?? state.runCount), treeKill: killPiTree }),
|
|
1692
1743
|
abortComs: state => { state.comsAbort?.(); },
|
|
1693
1744
|
getComsLines: (width, theme) => poolPresentation.render(width, theme),
|
|
1694
1745
|
});
|
|
@@ -1746,8 +1797,10 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1746
1797
|
});
|
|
1747
1798
|
|
|
1748
1799
|
// Root owns subscription order; lifecycle modules own handler bodies.
|
|
1749
|
-
pi
|
|
1750
|
-
|
|
1800
|
+
registerTurnPresence(pi, {
|
|
1801
|
+
beforeAgentPresence: () => turnHandlers.beforeAgentPresence(),
|
|
1802
|
+
agentEndPresence: () => turnHandlers.agentEndPresence(),
|
|
1803
|
+
});
|
|
1751
1804
|
|
|
1752
1805
|
// /af-handoff <peer> — hand the session off to a coms peer. Per decision G1 we do NOT
|
|
1753
1806
|
// extract the compaction summary; instead we ask the dispatcher LLM (next turn) to
|
|
@@ -1782,6 +1835,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1782
1835
|
|
|
1783
1836
|
|
|
1784
1837
|
const hubPromptCtx: HubPromptContext = {
|
|
1838
|
+
getArtifactRoot: () => sessionDir ? artifactsRoot() : null,
|
|
1785
1839
|
getCapabilityResolution,
|
|
1786
1840
|
getActiveTools: () => pi.getActiveTools(),
|
|
1787
1841
|
getAgents: () => Array.from(agentStates.values()).map(state => ({
|
|
@@ -1837,17 +1891,11 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1837
1891
|
finishMonitorTurn: () => { if (monitorBridge && monitorTurnId) { monitorBridge.finishParent(monitorTurnId, "completed"); monitorTurnId = null; } },
|
|
1838
1892
|
startMonitorTurn: () => { if (monitorBridge && monitorHubId) { monitorTurnId = `hub-turn-${monitorHubId}-${crypto.randomUUID()}`; monitorBridge.startParent({ id: monitorTurnId, hubInstanceId: monitorHubId, checkoutId: currentCtx?.cwd || process.cwd() }); } },
|
|
1839
1893
|
startAskUser: id => executionHistory.startAskUser(id), endAskUser: (id, at) => executionHistory.endAskUser(id, at),
|
|
1840
|
-
continuationKind: budgetContinuationKind, getPendingContinuation: () => pendingBudgetContinuation,
|
|
1841
|
-
setPendingContinuation: value => { pendingBudgetContinuation = value; },
|
|
1842
|
-
getContinuationAsk: id => budgetContinuationAsks.get(id), setContinuationAsk: (id, value) => budgetContinuationAsks.set(id, value), deleteContinuationAsk: id => budgetContinuationAsks.delete(id),
|
|
1843
1894
|
acknowledgeExternalBlocker: () => { externalBlockerAcknowledged = true; externalBlockerRefusedOnce = false; },
|
|
1844
1895
|
addAskUserWait: waitMs => { if (waitMs > 0) taskClock = addTaskClockWait(taskClock, waitMs); turnBudgetAskUserWaitMs += waitMs; },
|
|
1845
|
-
continuationOutcome: budgetContinuationOutcome, continuationSnapshot: budgetContinuationSnapshot,
|
|
1846
|
-
continueBudget: (kind, at) => { if (kind === "task") continueTaskBudgetWindow(at); else renewTurnBudgetWindow(at); },
|
|
1847
|
-
appendContinuation: appendBudgetContinuationEntry, getCurrentContext: () => currentCtx, getWidgetContext: () => widgetCtx,
|
|
1848
1896
|
applyWorkMode: applyWorkModeTools, closeTurnActiveTime, openTaskClock: at => { taskClock = openTaskClock(taskClock, at); }, startHistoryTurn: at => executionHistory.startTurn(at),
|
|
1849
1897
|
resetTurnBudgetState: () => {
|
|
1850
|
-
turnBudgetAskUserWaitMs = 0;
|
|
1898
|
+
turnBudgetAskUserWaitMs = 0; // budgetRecovery is task-scoped: prose/new turns cannot clear a declined confirmation.
|
|
1851
1899
|
turnDispatchCount = 0; turnResearchCount = 0; turnDispatchFingerprints.clear(); externalBlockerAcknowledged = true; externalBlockerRefusedOnce = false;
|
|
1852
1900
|
if (turnReport.dispatches.length > 0 || turnReport.research > 0 || turnReport.refusals > 0) { lastTurnReport = turnReport; sessionTotals.turns++; }
|
|
1853
1901
|
turnReport = freshTurnReport();
|
|
@@ -1894,7 +1942,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1894
1942
|
resetAccessApproval: accessApprovalRouter.reset,
|
|
1895
1943
|
terminateResearch: () => { for (const st of researchStates.values()) if (st.proc && st.status === "running") { st.killedByOperator = true; st.proc.kill("SIGTERM"); } },
|
|
1896
1944
|
resetResearch: researchRuntime.reset, resetHistory: executionHistory.reset,
|
|
1897
|
-
resetBudgets: () => { taskClock = createTaskClock(); turnBudgetAskUserWaitMs = 0; turnContinuationCount = 0; taskContinuationCount = 0;
|
|
1945
|
+
resetBudgets: () => { taskClock = createTaskClock(); turnBudgetAskUserWaitMs = 0; turnContinuationCount = 0; taskContinuationCount = 0; budgetRecovery.reset(); noProgress.reset(); },
|
|
1898
1946
|
clearWidgets: ctx => { if (widgetCtx) { ctx.ui.setWidget("agent-team", undefined); } },
|
|
1899
1947
|
closeDelegationWatchers: () => { for (const st of agentStates.values()) { st.delegationsWatcher?.close(); st.delegationsWatcher = undefined; } },
|
|
1900
1948
|
resetSessionState: ctx => { delegatedTokens = 0; hubSpawnedPeers.clear(); widgetCtx = ctx; contextWindow = ctx.model?.contextWindow || 0; },
|
|
@@ -1933,20 +1981,7 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
1933
1981
|
}
|
|
1934
1982
|
},
|
|
1935
1983
|
loadAgents: (_ctx) => {
|
|
1936
|
-
//
|
|
1937
|
-
const sessDir = safePathWithin(_ctx.cwd, ".pi", "agent-sessions");
|
|
1938
|
-
if (existsSync(sessDir)) {
|
|
1939
|
-
for (const f of readdirSync(sessDir)) {
|
|
1940
|
-
if (f.endsWith(".json")) {
|
|
1941
|
-
try { unlinkSync(join(sessDir, f)); } catch {}
|
|
1942
|
-
}
|
|
1943
|
-
}
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
// Per-project overrides are parsed BEFORE loadAgents: loadAgents archives the
|
|
1947
|
-
// previous session's artifacts, and that archive has to honor this project's
|
|
1948
|
-
// `run-history-keep` — reading it afterwards would apply the retention one
|
|
1949
|
-
// session late. Everything else the overrides drive is assigned below.
|
|
1984
|
+
// Allocate a fresh namespace; shared legacy files belong to prior/live sessions.
|
|
1950
1985
|
sessionOverrides = parseAgentTeamOverrides(_ctx.cwd);
|
|
1951
1986
|
runHistoryKeep = sessionOverrides.runHistoryKeep;
|
|
1952
1987
|
|
|
@@ -2093,7 +2128,8 @@ APIs, commands, structure), say so in your final response so the docs can be upd
|
|
|
2093
2128
|
}));
|
|
2094
2129
|
},
|
|
2095
2130
|
}, {
|
|
2096
|
-
|
|
2131
|
+
finishEvidence: () => { if (sessionDir) closeEvidenceSession(sessionDir); },
|
|
2132
|
+
shutdownComs: () => { unregisterQuestions(); return coms.shutdown(); }, shutdownMonitor: () => monitorSession.shutdown(),
|
|
2097
2133
|
removeExemptions: () => {
|
|
2098
2134
|
if (!exemptionsFile) return;
|
|
2099
2135
|
try { fs.unlinkSync(exemptionsFile); } catch {}
|
|
@@ -116,6 +116,7 @@ export function applySessionOverrides<TDef extends AgentDef>(ctx: ExtensionConte
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
export interface ShutdownPorts {
|
|
119
|
+
finishEvidence(): void;
|
|
119
120
|
shutdownComs(): Promise<void>;
|
|
120
121
|
shutdownMonitor(): Promise<void>;
|
|
121
122
|
removeExemptions(): void;
|
|
@@ -134,6 +135,7 @@ export function registerSessionOrchestration(pi: ExtensionAPI, steps: SessionSta
|
|
|
134
135
|
shutdown.removeExemptions();
|
|
135
136
|
shutdown.terminateChildren();
|
|
136
137
|
shutdown.clearPoolWidget();
|
|
138
|
+
shutdown.finishEvidence();
|
|
137
139
|
};
|
|
138
140
|
pi.on("session_shutdown", cleanShutdown);
|
|
139
141
|
process.on("SIGINT", () => { void cleanShutdown(); });
|
|
@@ -1,30 +1,13 @@
|
|
|
1
1
|
import type { ExtensionContext } from "@mariozechner/pi-coding-agent";
|
|
2
2
|
|
|
3
|
-
export interface AskContinuation {
|
|
4
|
-
kind: "task" | "turn";
|
|
5
|
-
reason: string;
|
|
6
|
-
params: any;
|
|
7
|
-
}
|
|
8
3
|
export interface TurnLifecyclePorts {
|
|
9
4
|
setTurnState(state: "working" | "idle"): Promise<void>;
|
|
10
5
|
startMonitorTurn(): void;
|
|
11
6
|
finishMonitorTurn(): void;
|
|
12
7
|
startAskUser(id: string): void;
|
|
13
8
|
endAskUser(id: string, endedAt: number): number;
|
|
14
|
-
continuationKind(context: unknown): "task" | "turn" | null;
|
|
15
|
-
getPendingContinuation(): { kind: "task" | "turn"; reason: string } | null;
|
|
16
|
-
setPendingContinuation(value: { kind: "task" | "turn"; reason: string } | null): void;
|
|
17
|
-
getContinuationAsk(id: string): AskContinuation | undefined;
|
|
18
|
-
setContinuationAsk(id: string, value: AskContinuation): void;
|
|
19
|
-
deleteContinuationAsk(id: string): void;
|
|
20
9
|
acknowledgeExternalBlocker(): void;
|
|
21
10
|
addAskUserWait(waitMs: number): void;
|
|
22
|
-
continuationOutcome(params: any, result: unknown): "continue" | "stop" | null;
|
|
23
|
-
continuationSnapshot(kind: "task" | "turn", endedAt: number): unknown;
|
|
24
|
-
continueBudget(kind: "task" | "turn", endedAt: number): void;
|
|
25
|
-
appendContinuation(kind: "task" | "turn", reason: string, prior: unknown, ctx?: ExtensionContext): void;
|
|
26
|
-
getCurrentContext(): ExtensionContext | null;
|
|
27
|
-
getWidgetContext(): ExtensionContext | null;
|
|
28
11
|
applyWorkMode(): void;
|
|
29
12
|
closeTurnActiveTime(now: number): void;
|
|
30
13
|
openTaskClock(now: number): void;
|
|
@@ -62,25 +45,12 @@ export function createTurnLifecycleHandlers(ports: TurnLifecyclePorts): TurnLife
|
|
|
62
45
|
toolStart(event) {
|
|
63
46
|
if (event.toolName !== "ask_user") return;
|
|
64
47
|
ports.startAskUser(event.toolCallId);
|
|
65
|
-
const kind = ports.continuationKind(event.args?.context);
|
|
66
|
-
const pending = ports.getPendingContinuation();
|
|
67
|
-
if (kind && pending?.kind === kind) ports.setContinuationAsk(event.toolCallId, { kind, reason: pending.reason, params: event.args });
|
|
68
48
|
ports.acknowledgeExternalBlocker();
|
|
69
49
|
},
|
|
70
50
|
toolEnd(event) {
|
|
71
51
|
if (event.toolName !== "ask_user") return;
|
|
72
52
|
const endedAt = Date.now();
|
|
73
53
|
ports.addAskUserWait(ports.endAskUser(event.toolCallId, endedAt));
|
|
74
|
-
const confirmation = ports.getContinuationAsk(event.toolCallId);
|
|
75
|
-
ports.deleteContinuationAsk(event.toolCallId);
|
|
76
|
-
if (!confirmation) return;
|
|
77
|
-
const outcome = ports.continuationOutcome(confirmation.params, event.result);
|
|
78
|
-
if (outcome) ports.setPendingContinuation(null);
|
|
79
|
-
if (outcome !== "continue") return;
|
|
80
|
-
const prior = ports.continuationSnapshot(confirmation.kind, endedAt);
|
|
81
|
-
ports.continueBudget(confirmation.kind, endedAt);
|
|
82
|
-
ports.appendContinuation(confirmation.kind, confirmation.reason, prior, ports.getCurrentContext() ?? undefined);
|
|
83
|
-
ports.getWidgetContext()?.ui?.notify(confirmation.kind === "task" ? "Task budget continued; task tier, assertions, capabilities, and progress were preserved." : "Turn budget continued; continuing without another message.", "success");
|
|
84
54
|
},
|
|
85
55
|
beforeAgentStart() { resetTurn(); return ports.buildPrompt(); },
|
|
86
56
|
async agentEnd(ctx) {
|
|
@@ -93,3 +63,12 @@ export function createTurnLifecycleHandlers(ports: TurnLifecyclePorts): TurnLife
|
|
|
93
63
|
},
|
|
94
64
|
};
|
|
95
65
|
}
|
|
66
|
+
|
|
67
|
+
/** Custom coms messages skip before_agent_start, but every run emits agent_start. */
|
|
68
|
+
export function registerTurnPresence(
|
|
69
|
+
events: {on(event: "agent_start" | "agent_end", handler: () => Promise<void>): unknown},
|
|
70
|
+
handlers: Pick<TurnLifecycleHandlers, "beforeAgentPresence" | "agentEndPresence">,
|
|
71
|
+
): void {
|
|
72
|
+
events.on("agent_start", () => handlers.beforeAgentPresence());
|
|
73
|
+
events.on("agent_end", () => handlers.agentEndPresence());
|
|
74
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import { safeAgentKey } from "./helpers.ts";
|
|
3
3
|
|
|
4
|
-
export function monitorKeyForAgent(name:string,runCount:number){return`${safeAgentKey(name)}:${runCount}`;}
|
|
4
|
+
export function monitorKeyForAgent(name:string,runCount:number|string){return`${safeAgentKey(name)}:${runCount}`;}
|
|
5
5
|
export function cancelLocalOwnedProcess(input:any){try{void Promise.resolve(input.monitorBridge?.markCancelling(input.monitorKey)).catch(()=>{});}catch{}input.treeKill(input.process);}
|
|
6
6
|
export async function cancelLocalWaitOnly(input:any){input.abort?.();try{await input.monitorBridge?.cancelWaitOnly(input.monitorKey,input.event);}catch{}}
|
|
7
7
|
export function linuxProcessIdentity(proc:any){try{if(!Number.isInteger(proc?.pid)||proc.pid<=0)return null;const stat=fs.readFileSync(`/proc/${proc.pid}/stat`,"utf8");const close=stat.lastIndexOf(")");const fields=stat.slice(close+2).trim().split(/\s+/);const starttime=fields[19];return starttime?{pid:proc.pid,starttime}:null;}catch{return null;}}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
import { worktreeRevision } from "./scope-gate.js";
|
|
5
|
+
import type { DispatchExecutorDeps } from "./tools/dispatch-execution.ts";
|
|
6
|
+
import type { ToolExecutor, DispatchAgentParams, SpawnResearchParams } from "./tools/context.ts";
|
|
7
|
+
|
|
8
|
+
interface Failure { dispatchId: string; reason: string; evidencePath?: string; }
|
|
9
|
+
interface Ticket { allowed: boolean; key: string; generation: object; id: object; failure?: Failure; stopParent?: boolean; }
|
|
10
|
+
|
|
11
|
+
export function createNoProgressGuard() {
|
|
12
|
+
let generation = {};
|
|
13
|
+
const pending = new Map<string, object>();
|
|
14
|
+
const refusals = new Map<string, number>();
|
|
15
|
+
const failures = new Map<string, { revision: string; failure: Failure; authorized: boolean }>();
|
|
16
|
+
return {
|
|
17
|
+
taskToken: () => generation,
|
|
18
|
+
begin(key: string, revision: string): Ticket {
|
|
19
|
+
const old = failures.get(key), id = {};
|
|
20
|
+
if (pending.has(key) || (old?.revision === revision && !old.authorized)) {
|
|
21
|
+
const count = (refusals.get(key) ?? 0) + 1; refusals.set(key, count);
|
|
22
|
+
return { allowed: false, key, generation, id, failure: old?.failure, stopParent: count >= 2 };
|
|
23
|
+
}
|
|
24
|
+
failures.delete(key); refusals.delete(key); pending.set(key, id);
|
|
25
|
+
return { allowed: true, key, generation, id };
|
|
26
|
+
},
|
|
27
|
+
finish(ticket: Ticket, revision: string, failure?: Failure) {
|
|
28
|
+
if (!ticket.allowed || ticket.generation !== generation || pending.get(ticket.key) !== ticket.id) return;
|
|
29
|
+
pending.delete(ticket.key);
|
|
30
|
+
if (failure) failures.set(ticket.key, { revision, failure, authorized: false });
|
|
31
|
+
},
|
|
32
|
+
authorize(dispatchId: string): boolean {
|
|
33
|
+
for (const entry of failures.values()) if (entry.failure.dispatchId === dispatchId && !entry.authorized) { entry.authorized = true; return true; }
|
|
34
|
+
return false;
|
|
35
|
+
},
|
|
36
|
+
reset() { generation = {}; pending.clear(); failures.clear(); refusals.clear(); },
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export type NoProgressGuard = ReturnType<typeof createNoProgressGuard>;
|
|
40
|
+
|
|
41
|
+
/** Wording is intentionally absent: prose cannot manufacture new execution inputs. */
|
|
42
|
+
export function withNoProgress<P extends DispatchAgentParams | SpawnResearchParams>(d: Pick<DispatchExecutorDeps, "noProgress" | "artifacts">, kind: "dispatch" | "research", execute: ToolExecutor<P>): ToolExecutor<P> {
|
|
43
|
+
return async (id, params, signal, onUpdate, ctx) => {
|
|
44
|
+
const cwd = ctx.cwd || process.cwd();
|
|
45
|
+
const scope = ("scope" in params ? params.scope ?? [] : []).map(path => path.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/+$/, "")).sort();
|
|
46
|
+
const actor = ("agent" in params ? params.agent : params.persona ?? "research").toLowerCase();
|
|
47
|
+
let inputs: { path: string }[];
|
|
48
|
+
try { inputs = d.artifacts.loadInputArtifacts(params.artifacts, ctx); }
|
|
49
|
+
catch { return execute(id, params, signal, onUpdate, ctx); } // Existing artifact preflight reports the exact path failure.
|
|
50
|
+
const revision = () => JSON.stringify([worktreeRevision(cwd, scope), inputs.map(input => {
|
|
51
|
+
try { return [input.path, createHash("sha256").update(readFileSync(input.path)).digest("hex")]; }
|
|
52
|
+
catch { return [input.path, "unreadable"]; }
|
|
53
|
+
}).sort(([a], [b]) => a.localeCompare(b))]);
|
|
54
|
+
const contract = "agent" in params ? [params.scope_mode ?? "existing", [...(params.deliverables ?? [])].sort()] : null;
|
|
55
|
+
const key = JSON.stringify([kind, resolve(cwd), actor, scope, inputs.map(input => input.path).sort(), contract]);
|
|
56
|
+
const ticket = d.noProgress.begin(key, revision());
|
|
57
|
+
if (!ticket.allowed) {
|
|
58
|
+
if (ticket.stopParent) ctx.abort?.();
|
|
59
|
+
const failure = ticket.failure;
|
|
60
|
+
const message = failure
|
|
61
|
+
? `No-progress refusal: unchanged inputs after ${failure.reason}. Previous attempt: ${failure.dispatchId}${failure.evidencePath ? ` (${failure.evidencePath})` : ""}. Rewording, another turn or renewed budget is not new evidence. Supply corrected scope/inputs or actual file changes. The human may authorize ONE retry with /af-retry ${failure.dispatchId}; prose is not authorization.`
|
|
62
|
+
: "No-progress stop: an operation with the same actor/scope is already in flight. Wait for its result; do not duplicate it.";
|
|
63
|
+
return { content: [{ type: "text", text: message }], details: { status: "no_progress_refused", reason: "unchanged_inputs", stopParent: ticket.stopParent === true, exitCode: 1, previousDispatchId: failure?.dispatchId, evidencePath: failure?.evidencePath } };
|
|
64
|
+
}
|
|
65
|
+
let failure: Failure | undefined;
|
|
66
|
+
try {
|
|
67
|
+
const result = await execute(id, params, signal, onUpdate, ctx);
|
|
68
|
+
const details = result.details as any;
|
|
69
|
+
if (details && ((details.exitCode !== 0 && (details.status === "error" || details.failurePath || details.evidencePath)) || details.acceptanceStatus === "deliverable_failed")) {
|
|
70
|
+
failure = { dispatchId: details.dispatchId ?? randomUUID(), evidencePath: details.evidencePath ?? details.failurePath ?? undefined, reason: details.diagnostics?.reason ?? details.status ?? "execution_failure" };
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
} catch (error) { failure = { dispatchId: randomUUID(), reason: "execution_exception" }; throw error; }
|
|
74
|
+
finally { d.noProgress.finish(ticket, revision(), failure); }
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { resolveSessionRoster } from "../work-mode.ts";
|
|
2
|
+
|
|
1
3
|
export interface RosterDef { name: string }
|
|
2
4
|
export interface RosterState<TDef extends RosterDef> { def: TDef; status: string }
|
|
3
5
|
export interface RosterMutationResult { ok: boolean; message: string }
|
|
@@ -22,6 +24,7 @@ export interface RosterPolicyPorts<TDef extends RosterDef, TState extends Roster
|
|
|
22
24
|
|
|
23
25
|
export interface RosterPolicy<TDef extends RosterDef> {
|
|
24
26
|
activateTeam(teamName: string): void;
|
|
27
|
+
activateFirstValidTeam(): boolean;
|
|
25
28
|
persistActiveRoster(): void;
|
|
26
29
|
add(name: string): RosterMutationResult;
|
|
27
30
|
drop(name: string): RosterMutationResult;
|
|
@@ -41,6 +44,18 @@ export function createRosterPolicy<TDef extends RosterDef, TState extends Roster
|
|
|
41
44
|
}
|
|
42
45
|
ports.recompute();
|
|
43
46
|
}
|
|
47
|
+
function activateFirstValidTeam(): boolean {
|
|
48
|
+
if (ports.getStates().size > 0) return true;
|
|
49
|
+
const teams = ports.getTeams();
|
|
50
|
+
const availablePersonas = ports.getAllDefs().map(def => def.name);
|
|
51
|
+
for (const name of Object.keys(teams)) {
|
|
52
|
+
const selected = resolveSessionRoster({ teams, entries: [], explicitRoster: name, availablePersonas });
|
|
53
|
+
if (!selected.roster) continue;
|
|
54
|
+
activateTeam(selected.roster.name);
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
44
59
|
function persistActiveRoster(): void {
|
|
45
60
|
const team = ports.getActiveTeamName();
|
|
46
61
|
if (team && ports.getStates().size > 0) ports.persist(team);
|
|
@@ -75,5 +90,5 @@ export function createRosterPolicy<TDef extends RosterDef, TState extends Roster
|
|
|
75
90
|
const note = health.usable ? " (its session file is kept for re-adding)" : health.quarantined ? ` (its session file was unusable — ${health.reason} — and was quarantined to ${health.quarantined}; re-adding starts clean)` : " (it has no session file; re-adding starts clean)";
|
|
76
91
|
return { ok: true, message: `${ports.displayName(state.def.name)} dropped from the active team${note}` };
|
|
77
92
|
}
|
|
78
|
-
return { activateTeam, persistActiveRoster, add, drop };
|
|
93
|
+
return { activateTeam, activateFirstValidTeam, persistActiveRoster, add, drop };
|
|
79
94
|
}
|
|
@@ -12,6 +12,7 @@ export interface PersistedCapabilityRestore { taskPacks: CapabilityPack[]; provi
|
|
|
12
12
|
export interface WorkModePolicyPorts {
|
|
13
13
|
getBaselineTools(): readonly string[];
|
|
14
14
|
getRosterSize(): number;
|
|
15
|
+
activateFallbackRoster(ctx: WorkModeUiPort): void;
|
|
15
16
|
getActiveTeamName(): string;
|
|
16
17
|
getComsReady(): boolean;
|
|
17
18
|
getHerdrReady(): boolean;
|
|
@@ -80,9 +81,10 @@ export function createWorkModePolicy(ports: WorkModePolicyPorts, initial: WorkMo
|
|
|
80
81
|
function statusText(): string {
|
|
81
82
|
return [`Work Mode: ${workMode}`, `Direct tools: ${workMode === "operator" ? "enabled" : "disabled"}`, `Native roster: ${ports.getActiveTeamName() || "(none)"} (${ports.getRosterSize()})`, `Coms: ${ports.getComsReady() ? `ready${ports.getIdentityLabel() ? ` (${ports.getIdentityLabel()})` : ""}` : "unavailable"}`, `Herdr: ${ports.getHerdrReady() ? "ready" : "unavailable"}`].join("\n");
|
|
82
83
|
}
|
|
83
|
-
function refusalMessage(): string { return "Orchestrator work mode requires at least one native specialist. Add one with /af-agents-add or select /af-agents-team
|
|
84
|
+
function refusalMessage(): string { return "Orchestrator work mode requires at least one native specialist. No valid configured team is available. Add one with /af-agents-add or fix .pi/agents/teams.yaml and select /af-agents-team."; }
|
|
84
85
|
function watchdogNote(next: WorkMode): string { return next === "orchestrator" ? ports.watchdogArmed(next) ? "\nDrift watchdog: armed (orchestrator auto). /af-watchdog off to disarm." : "\nDrift watchdog: off (explicit hub setting)." : ""; }
|
|
85
86
|
async function commit(next: WorkMode, ctx: WorkModeUiPort): Promise<"ok" | "unchanged" | "roster"> {
|
|
87
|
+
if (workModeChangeBlockedByRoster(workMode, next, ports.getRosterSize())) ports.activateFallbackRoster(ctx);
|
|
86
88
|
if (orchestratorNeedsRoster(next, ports.getRosterSize())) return "roster";
|
|
87
89
|
if (next === workMode) return "unchanged";
|
|
88
90
|
workMode = next;
|
|
@@ -91,7 +93,6 @@ export function createWorkModePolicy(ports: WorkModePolicyPorts, initial: WorkMo
|
|
|
91
93
|
return "ok";
|
|
92
94
|
}
|
|
93
95
|
async function applySelection(next: WorkMode, ctx: WorkModeUiPort): Promise<void> {
|
|
94
|
-
if (workModeChangeBlockedByRoster(workMode, next, ports.getRosterSize())) { ctx.ui.notify(refusalMessage(), "warning"); return; }
|
|
95
96
|
const result = await commit(next, ctx);
|
|
96
97
|
if (result === "roster") { ctx.ui.notify(refusalMessage(), "warning"); return; }
|
|
97
98
|
ctx.ui.notify(`${statusText()}\nPrompt and tools update on the next model call.${watchdogNote(next)}`, result === "ok" ? "success" : "info");
|
|
@@ -32,7 +32,7 @@ export interface AfPollHandleInput {
|
|
|
32
32
|
pollPanelOverride?: string | null;
|
|
33
33
|
listPanels: (cwd: string) => string[] | Promise<string[]>;
|
|
34
34
|
preflight?: (options: { panel: string; persona: string; cwd: string }) => string | null | Promise<string | null>;
|
|
35
|
-
checkBudget: () => string | null
|
|
35
|
+
checkBudget: () => string | null | Promise<string | null>;
|
|
36
36
|
chargeBudget: () => void;
|
|
37
37
|
onAccepted?: (info: { panel: string; persona: string; question: string }) => void | Promise<void>;
|
|
38
38
|
execute: (options: { panel: string; persona: string; question: string; cwd: string }) => Promise<AfPollDigestInput>;
|
|
@@ -162,7 +162,7 @@ export async function handleAfPoll(input: AfPollHandleInput): Promise<AfPollHand
|
|
|
162
162
|
if ("error" in panel) return { ok: false, message: panel.error };
|
|
163
163
|
const blocked = await input.preflight?.({ panel: panel.panel, persona: parsed.persona, cwd: input.cwd });
|
|
164
164
|
if (blocked) return { ok: false, message: blocked };
|
|
165
|
-
const budget = input.checkBudget();
|
|
165
|
+
const budget = await input.checkBudget();
|
|
166
166
|
if (budget) return { ok: false, message: budget };
|
|
167
167
|
input.chargeBudget();
|
|
168
168
|
try { await input.onAccepted?.({ panel: panel.panel, persona: parsed.persona, question: parsed.question }); } catch { /* progress is best-effort */ }
|
|
@@ -31,6 +31,7 @@ export interface HubPromptState {
|
|
|
31
31
|
|
|
32
32
|
/** Read-only prompt dependencies. Mutable Hub state remains owned by index.ts. */
|
|
33
33
|
export interface HubPromptContext {
|
|
34
|
+
getArtifactRoot?(): string | null;
|
|
34
35
|
getCapabilityResolution(): CapabilityResolution;
|
|
35
36
|
getActiveTools(): readonly string[];
|
|
36
37
|
getAgents(): readonly HubPromptAgent[];
|
|
@@ -60,7 +60,9 @@ export function buildHubSystemPrompt(ctx: HubPromptContext): BuiltHubSystemPromp
|
|
|
60
60
|
const languageLines = languageFragment(askUserAvailable, userLanguage);
|
|
61
61
|
const stateCapsule = stateCapsuleFragment(ctx.getPromptState(), resolution);
|
|
62
62
|
const stableModeSection = fleetActive ? TASK_TRIAGE_FRAGMENT : "";
|
|
63
|
-
const
|
|
63
|
+
const artifactRoot = ctx.getArtifactRoot?.();
|
|
64
|
+
const verificationSection = (verificationActive ? verificationFragment(MAX_OPEN_ASSERTIONS) : "") +
|
|
65
|
+
(artifactRoot && (verificationActive || fleetActive) ? `\n\nSession artifact root: ${artifactRoot}. Use this absolute root for read/write tools. Handoff paths artifacts/<kind>/... are relative to this root, not the repository. Legacy shared .pi/agent-sessions/artifacts paths belong to other sessions; do not overwrite them.` : "");
|
|
64
66
|
const comsSection = comsFragment(peerActive, ctx.isComsReady(), ctx.getIdentity());
|
|
65
67
|
const workModeText = workModePrompt(ctx.getWorkMode());
|
|
66
68
|
const herdrSection = workspaceActive && ctx.isHerdrFleetReady() ? HUB_HERDR_SECTION : "";
|