@chankov/agent-fleet 2.0.14 → 2.0.16
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/agent-fleet/scripts/fleet.ts +2 -1
- package/.pi/extensions/compact-and-continue/README.md +2 -2
- package/.pi/harnesses/agent-hub/README.md +94 -11
- package/.pi/harnesses/agent-hub/budget-recovery.ts +2 -2
- package/.pi/harnesses/agent-hub/commands/context.ts +2 -0
- package/.pi/harnesses/agent-hub/commands/recover.ts +13 -4
- package/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.pi/harnesses/agent-hub/config/overrides.ts +1 -6
- package/.pi/harnesses/agent-hub/context/budgets.ts +9 -7
- package/.pi/harnesses/agent-hub/deterministic-fs.ts +51 -12
- package/.pi/harnesses/agent-hub/dispatch-native-complete.ts +4 -0
- package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +14 -3
- package/.pi/harnesses/agent-hub/dispatch-native-types.ts +3 -0
- package/.pi/harnesses/agent-hub/dispatch-native.ts +9 -1
- package/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +4 -15
- package/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +8 -6
- package/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +2 -0
- package/.pi/harnesses/agent-hub/dispatch-triage-state.ts +23 -5
- package/.pi/harnesses/agent-hub/docs-lane.js +2 -1
- package/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.pi/harnesses/agent-hub/filesystem-tool.ts +75 -11
- package/.pi/harnesses/agent-hub/index.ts +255 -24
- package/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +13 -5
- package/.pi/harnesses/agent-hub/no-progress.ts +232 -28
- package/.pi/harnesses/agent-hub/orchestration-activation.ts +112 -0
- package/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.pi/harnesses/agent-hub/orchestration-route.ts +76 -0
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/policy/work-mode.ts +14 -5
- package/.pi/harnesses/agent-hub/proactive-config.ts +11 -35
- package/.pi/harnesses/agent-hub/proactive-local.ts +1 -18
- package/.pi/harnesses/agent-hub/process-obligations.ts +116 -15
- package/.pi/harnesses/agent-hub/prompts/fragments.ts +9 -11
- package/.pi/harnesses/agent-hub/recover-policy.ts +18 -1
- package/.pi/harnesses/agent-hub/recover-state.ts +1 -1
- package/.pi/harnesses/agent-hub/recovery-contract.ts +70 -0
- package/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.pi/harnesses/agent-hub/research/runtime.ts +2 -0
- package/.pi/harnesses/agent-hub/research/spawn-run.ts +15 -6
- package/.pi/harnesses/agent-hub/return-contract.js +27 -5
- package/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.pi/harnesses/agent-hub/run-budget.js +12 -0
- package/.pi/harnesses/agent-hub/scope-gate.js +23 -2
- package/.pi/harnesses/agent-hub/session-audit.ts +94 -8
- package/.pi/harnesses/agent-hub/spawn.ts +10 -2
- package/.pi/harnesses/agent-hub/system1-activity.ts +116 -1
- package/.pi/harnesses/agent-hub/system1-communication-store.ts +47 -13
- package/.pi/harnesses/agent-hub/system1-report.ts +50 -0
- package/.pi/harnesses/agent-hub/system1-runtime.ts +8 -29
- package/.pi/harnesses/agent-hub/task-triage-authorization.ts +122 -0
- package/.pi/harnesses/agent-hub/task-triage-config.ts +29 -0
- package/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.pi/harnesses/agent-hub/task-triage-obligations.ts +104 -0
- package/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.pi/harnesses/agent-hub/task-triage-runtime.ts +125 -0
- package/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.pi/harnesses/agent-hub/tools/action-executors.ts +33 -10
- package/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +1 -1
- package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +86 -26
- package/.pi/harnesses/agent-hub/tools/herdr-executors.ts +9 -0
- package/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +9 -6
- package/.pi/harnesses/agent-hub/ui/fleet-source.ts +6 -2
- package/.pi/harnesses/agent-hub/ui/system1-communication.ts +1 -1
- package/.pi/harnesses/agent-hub/work-mode.ts +13 -8
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/context-budget-hub-prompt.ts +6 -1
- package/.pi/harnesses/lib/fleet-dashboard-view.ts +29 -4
- package/.pi/harnesses/lib/fleet-read-model.ts +73 -0
- package/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.pi/harnesses/lib/system1/config-loader.js +44 -0
- package/.pi/harnesses/lib/system1/config-proactive.js +57 -0
- package/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.pi/harnesses/lib/system1/config-v2.js +100 -0
- package/.pi/harnesses/lib/system1/config.js +7 -18
- package/.pi/harnesses/lib/system1/contracts.ts +4 -2
- package/.pi/harnesses/lib/system1/demo.ts +3 -14
- package/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.pi/prompts/af-build.md +9 -6
- package/.versions/2.0.15/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.15/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.15/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/fleet.ts +217 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/flow.ts +157 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.15/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.15/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.15/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.0.15/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.15/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.15/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.15/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.15/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.15/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.15/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.15/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.15/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.15/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.15/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.15/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.15/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.15/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.15/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.15/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.15/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.15/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.15/.pi/extensions/package.json +9 -0
- package/.versions/2.0.15/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.15/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.15/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.15/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.15/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.15/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.15/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/README.md +1448 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/acceptance.ts +199 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/context.ts +47 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/config/agents.ts +178 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/config/overrides.ts +160 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/context/budgets.ts +206 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/delegate.ts +467 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/deterministic-fs.ts +166 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +259 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +231 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native-types.ts +260 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-native.ts +234 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +38 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +76 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/filesystem-tool.ts +137 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/fixtures/registration-surface.json +64 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/index.ts +2597 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +133 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/no-progress.ts +563 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/orchestration-activation.ts +112 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/orchestration-route.ts +76 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/policy/work-mode.ts +135 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-config.ts +40 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-local.ts +88 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/process-obligations.ts +158 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/prompts/context.ts +54 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/prompts/fragments.ts +116 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/prompts/system-prompt.ts +122 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/recovery-contract.ts +150 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/research/runtime.ts +197 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/research/spawn-run.ts +183 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/return-contract.js +349 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/review-findings.js +104 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/run-budget.js +554 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/scope-gate.js +144 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/session-audit.ts +313 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/spawn.ts +534 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/system1-communication-store.ts +129 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/system1-runtime.ts +280 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-authorization.ts +122 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-config.ts +37 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-contract.ts +19 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-obligations.ts +104 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-runtime.ts +125 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/action-executors.ts +208 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/context.ts +144 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +558 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/herdr-executors.ts +95 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/work-mode.ts +179 -0
- package/.versions/2.0.15/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.15/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.15/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.15/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.15/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.15/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
- package/.versions/2.0.15/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.15/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.15/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.15/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.15/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.15/.pi/harnesses/damage-control-continue/index.ts +550 -0
- package/.versions/2.0.15/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.15/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.15/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.15/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.15/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.15/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.15/.pi/harnesses/lib/context-budget-child-prompt.ts +219 -0
- package/.versions/2.0.15/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
- package/.versions/2.0.15/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.15/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.15/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.15/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.0.15/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.15/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.15/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.15/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.15/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.15/.pi/harnesses/lib/system1/config.js +61 -0
- package/.versions/2.0.15/.pi/harnesses/lib/system1/contracts.ts +152 -0
- package/.versions/2.0.15/.pi/harnesses/lib/system1/demo.ts +104 -0
- package/.versions/2.0.15/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.15/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.0.15/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.15/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.15/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.15/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.15/.pi/prompts/af-build.md +27 -0
- package/.versions/2.0.15/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.15/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.15/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.15/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.15/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.15/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.15/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.15/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.15/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.15/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.15/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.15/.version +1 -0
- package/.versions/2.0.15/agents/architect.md +24 -0
- package/.versions/2.0.15/agents/bowser.md +28 -0
- package/.versions/2.0.15/agents/builder.md +55 -0
- package/.versions/2.0.15/agents/code-reviewer.md +209 -0
- package/.versions/2.0.15/agents/deep-researcher.md +32 -0
- package/.versions/2.0.15/agents/documenter.md +22 -0
- package/.versions/2.0.15/agents/orchestrator.md +22 -0
- package/.versions/2.0.15/agents/plan-reviewer.md +83 -0
- package/.versions/2.0.15/agents/planner.md +105 -0
- package/.versions/2.0.15/agents/releaser.md +24 -0
- package/.versions/2.0.15/agents/researcher.md +30 -0
- package/.versions/2.0.15/agents/security-auditor.md +167 -0
- package/.versions/2.0.15/agents/test-engineer.md +153 -0
- package/.versions/2.0.15/agents/web-debugger.md +44 -0
- package/.versions/2.0.15/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.15/bin/catalog/harness-runtime-closure.json +73 -0
- package/.versions/2.0.15/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.15/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.15/docs/ARCHITECTURE.md +829 -0
- package/.versions/2.0.15/docs/agent-fleet-setup.md +1090 -0
- package/.versions/2.0.15/docs/claude-code-coms-bridge.md +134 -0
- package/.versions/2.0.15/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.15/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.15/docs/getting-started.md +126 -0
- package/.versions/2.0.15/docs/npm-install.md +525 -0
- package/.versions/2.0.15/docs/pi-extensions.md +454 -0
- package/.versions/2.0.15/docs/pi-setup.md +92 -0
- package/.versions/2.0.15/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.15/install-manifest.json +3193 -0
- package/.versions/2.0.15/justfile +247 -0
- package/.versions/2.0.15/manifest-meta.json +1071 -0
- package/.versions/2.0.15/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.15/references/communication-contract.md +26 -0
- package/.versions/2.0.15/references/definition-of-done.md +67 -0
- package/.versions/2.0.15/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.15/references/observability-checklist.md +92 -0
- package/.versions/2.0.15/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.15/references/performance-checklist.md +236 -0
- package/.versions/2.0.15/references/prompting-patterns.md +380 -0
- package/.versions/2.0.15/references/security-checklist.md +245 -0
- package/.versions/2.0.15/references/testing-patterns.md +235 -0
- package/.versions/2.0.15/references/workflow-authoring.md +304 -0
- package/.versions/2.0.15/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.15/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.15/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.15/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.15/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.15/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.15/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.15/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.15/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.15/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.15/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.15/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.15/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.15/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.15/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.15/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.15/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.15/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.15/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.15/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.0.15/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.15/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.15/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.15/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.15/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.0.15/skills/repository-ai-setup/SKILL.md +117 -0
- package/.versions/2.0.15/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.0.15/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.0.15/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.0.15/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.0.15/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.0.15/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.15/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.15/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.15/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.16/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.16/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/fleet.ts +217 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/flow.ts +157 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.16/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.16/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.16/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.0.16/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.16/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.16/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.16/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.16/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.16/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.16/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.16/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.16/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.16/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.16/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.16/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.16/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.16/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.16/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.16/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.16/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.16/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.16/.pi/extensions/package.json +9 -0
- package/.versions/2.0.16/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.16/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.16/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.16/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.16/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.16/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.16/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/README.md +1452 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/acceptance.ts +199 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/context.ts +47 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/config/agents.ts +178 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/config/overrides.ts +155 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/context/budgets.ts +206 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/delegate.ts +467 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/deterministic-fs.ts +166 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +259 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +231 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native-types.ts +260 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-native.ts +234 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/filesystem-tool.ts +137 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/fixtures/registration-surface.json +64 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/index.ts +2601 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +133 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/no-progress.ts +563 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/orchestration-activation.ts +112 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/orchestration-route.ts +76 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/policy/work-mode.ts +135 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-config.ts +16 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-local.ts +71 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/process-obligations.ts +158 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/prompts/context.ts +54 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/prompts/fragments.ts +116 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/prompts/system-prompt.ts +122 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/recovery-contract.ts +150 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/research/runtime.ts +197 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/research/spawn-run.ts +183 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/return-contract.js +349 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/review-findings.js +104 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/run-budget.js +554 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/scope-gate.js +144 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/session-audit.ts +313 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/spawn.ts +534 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/system1-communication-store.ts +129 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/system1-runtime.ts +258 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-authorization.ts +122 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-config.ts +29 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-obligations.ts +104 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-runtime.ts +125 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/action-executors.ts +208 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/context.ts +144 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +558 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/herdr-executors.ts +95 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/work-mode.ts +179 -0
- package/.versions/2.0.16/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.16/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.16/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.16/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.16/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.16/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
- package/.versions/2.0.16/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.16/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.16/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.16/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.16/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.16/.pi/harnesses/damage-control-continue/index.ts +550 -0
- package/.versions/2.0.16/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.16/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.16/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.16/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.16/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.16/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.16/.pi/harnesses/lib/context-budget-child-prompt.ts +219 -0
- package/.versions/2.0.16/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
- package/.versions/2.0.16/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.16/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.16/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.16/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.0.16/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.16/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.16/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.16/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.16/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.16/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.versions/2.0.16/.pi/harnesses/lib/system1/config-loader.js +44 -0
- package/.versions/2.0.16/.pi/harnesses/lib/system1/config-proactive.js +57 -0
- package/.versions/2.0.16/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.versions/2.0.16/.pi/harnesses/lib/system1/config-v2.js +100 -0
- package/.versions/2.0.16/.pi/harnesses/lib/system1/config.js +50 -0
- package/.versions/2.0.16/.pi/harnesses/lib/system1/contracts.ts +154 -0
- package/.versions/2.0.16/.pi/harnesses/lib/system1/demo.ts +95 -0
- package/.versions/2.0.16/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.16/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.0.16/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.16/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.16/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.16/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.16/.pi/prompts/af-build.md +27 -0
- package/.versions/2.0.16/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.16/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.16/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.16/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.16/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.16/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.16/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.16/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.16/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.16/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.16/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.16/.version +1 -0
- package/.versions/2.0.16/agents/architect.md +24 -0
- package/.versions/2.0.16/agents/bowser.md +28 -0
- package/.versions/2.0.16/agents/builder.md +55 -0
- package/.versions/2.0.16/agents/code-reviewer.md +209 -0
- package/.versions/2.0.16/agents/deep-researcher.md +32 -0
- package/.versions/2.0.16/agents/documenter.md +22 -0
- package/.versions/2.0.16/agents/orchestrator.md +22 -0
- package/.versions/2.0.16/agents/plan-reviewer.md +83 -0
- package/.versions/2.0.16/agents/planner.md +105 -0
- package/.versions/2.0.16/agents/releaser.md +24 -0
- package/.versions/2.0.16/agents/researcher.md +30 -0
- package/.versions/2.0.16/agents/security-auditor.md +167 -0
- package/.versions/2.0.16/agents/test-engineer.md +153 -0
- package/.versions/2.0.16/agents/web-debugger.md +44 -0
- package/.versions/2.0.16/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.16/bin/catalog/harness-runtime-closure.json +73 -0
- package/.versions/2.0.16/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.16/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.16/docs/ARCHITECTURE.md +834 -0
- package/.versions/2.0.16/docs/agent-fleet-setup.md +1101 -0
- package/.versions/2.0.16/docs/claude-code-coms-bridge.md +134 -0
- package/.versions/2.0.16/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.16/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.16/docs/getting-started.md +126 -0
- package/.versions/2.0.16/docs/npm-install.md +530 -0
- package/.versions/2.0.16/docs/pi-extensions.md +454 -0
- package/.versions/2.0.16/docs/pi-setup.md +92 -0
- package/.versions/2.0.16/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.16/install-manifest.json +3193 -0
- package/.versions/2.0.16/justfile +247 -0
- package/.versions/2.0.16/manifest-meta.json +1071 -0
- package/.versions/2.0.16/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.16/references/communication-contract.md +26 -0
- package/.versions/2.0.16/references/definition-of-done.md +67 -0
- package/.versions/2.0.16/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.16/references/observability-checklist.md +92 -0
- package/.versions/2.0.16/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.16/references/performance-checklist.md +236 -0
- package/.versions/2.0.16/references/prompting-patterns.md +380 -0
- package/.versions/2.0.16/references/security-checklist.md +245 -0
- package/.versions/2.0.16/references/testing-patterns.md +235 -0
- package/.versions/2.0.16/references/workflow-authoring.md +304 -0
- package/.versions/2.0.16/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.16/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.16/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.16/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.16/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.16/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.16/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.16/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.16/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.16/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.16/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.16/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.16/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.16/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.16/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.16/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.16/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.16/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.16/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.16/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.0.16/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.16/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.16/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.16/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.16/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.0.16/skills/repository-ai-setup/SKILL.md +117 -0
- package/.versions/2.0.16/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.0.16/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.0.16/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.0.16/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.0.16/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.0.16/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.16/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.16/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.16/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/agents/builder.md +2 -2
- package/bin/cli.js +33 -2
- package/bin/lib/apply.js +5 -0
- package/bin/lib/doctor.js +113 -31
- package/bin/lib/reconcile.js +9 -1
- package/bin/lib/state.js +1 -0
- package/bin/lib/system1-migration.js +107 -0
- package/bin/lib/task-triage-setup.js +36 -0
- package/bin/lib/transaction.js +61 -16
- package/bin/lib/workspace-safety.js +3 -2
- package/docs/ARCHITECTURE.md +107 -27
- package/docs/agent-fleet-setup.md +196 -12
- package/docs/npm-install.md +72 -18
- package/docs/pi-extensions.md +1 -1
- package/docs/system1-config.md +83 -0
- package/install-manifest.json +15 -5
- package/manifest-meta.json +8 -2
- package/package.json +14 -5
- package/skills/incremental-implementation/SKILL.md +64 -13
- package/skills/planning-and-task-breakdown/SKILL.md +43 -14
- package/skills/using-agent-skills/SKILL.md +2 -2
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { parseCompleteProfile, agentSelection, childSelection, serviceSelection, type CompleteModelProfile } from '../config/model-profiles.ts';
|
|
2
|
+
export const PROFILE_ENV = 'AGENT_FLEET_ACTIVE_MODEL_PROFILE';
|
|
3
|
+
export interface ActiveModelProfile {
|
|
4
|
+
name: string;
|
|
5
|
+
profile: CompleteModelProfile;
|
|
6
|
+
}
|
|
7
|
+
let activeRuns = 0;
|
|
8
|
+
export function profileWorkInFlight(): number { return activeRuns; }
|
|
9
|
+
export async function withProfileWork<T>(run: () => Promise<T>): Promise<T> { activeRuns++; try {
|
|
10
|
+
return await run();
|
|
11
|
+
}
|
|
12
|
+
finally {
|
|
13
|
+
activeRuns--;
|
|
14
|
+
} }
|
|
15
|
+
export function readActiveProfile(env: NodeJS.ProcessEnv = process.env): ActiveModelProfile | undefined {
|
|
16
|
+
const raw = env[PROFILE_ENV];
|
|
17
|
+
if (!raw)
|
|
18
|
+
return undefined;
|
|
19
|
+
try {
|
|
20
|
+
const value = JSON.parse(raw);
|
|
21
|
+
if (typeof value.name !== 'string' || !value.name)
|
|
22
|
+
throw new Error('missing name');
|
|
23
|
+
return { name: value.name, profile: parseCompleteProfile(value.profile) };
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
throw new Error(`Invalid active model profile: ${error instanceof Error ? error.message : String(error)}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function setActiveProfile(active: ActiveModelProfile | undefined, env: NodeJS.ProcessEnv = process.env): void {
|
|
30
|
+
if (active)
|
|
31
|
+
env[PROFILE_ENV] = JSON.stringify(active);
|
|
32
|
+
else
|
|
33
|
+
delete env[PROFILE_ENV];
|
|
34
|
+
}
|
|
35
|
+
export function assertProfileModel(model: string, active = readActiveProfile()): void {
|
|
36
|
+
if (active?.profile['allowed-models'] && !active.profile['allowed-models'].includes(model))
|
|
37
|
+
throw new Error(`Profile "${active.name}" refuses model "${model}"; allowed-models: ${active.profile['allowed-models'].join(', ')}`);
|
|
38
|
+
}
|
|
39
|
+
export function profileFallback(candidate: string | undefined, active = readActiveProfile()): string | undefined {
|
|
40
|
+
if (active?.profile.fallback === 'none')
|
|
41
|
+
return undefined;
|
|
42
|
+
if (candidate)
|
|
43
|
+
assertProfileModel(candidate, active);
|
|
44
|
+
return candidate;
|
|
45
|
+
}
|
|
46
|
+
export function profileAgent(name: string, active = readActiveProfile()) { return active ? agentSelection(active.profile, name) : undefined; }
|
|
47
|
+
export function profileChild(parent: string, role: string, active = readActiveProfile()) { return active ? childSelection(active.profile, parent, role) : undefined; }
|
|
48
|
+
export function profileService(service: 'watchdog' | 'return-extractor', active = readActiveProfile()) { return active ? serviceSelection(active.profile, service) : undefined; }
|
|
49
|
+
export function profilePanel(name: string, active = readActiveProfile()) {
|
|
50
|
+
if (!active)
|
|
51
|
+
return undefined;
|
|
52
|
+
if (name !== active.name)
|
|
53
|
+
throw new Error(`Profile "${active.name}" owns the poll/debate panel; select --panel ${active.name}.`);
|
|
54
|
+
const voices = active.profile.panel ?? [
|
|
55
|
+
{ name: 'first', model: active.profile.defaults.model, integrator: true },
|
|
56
|
+
{ name: 'second', model: active.profile.defaults.model },
|
|
57
|
+
];
|
|
58
|
+
return voices.map(v => ({ thinking: active.profile.defaults.thinking ?? 'off', ...v }));
|
|
59
|
+
}
|
|
60
|
+
export type ProfilePeerRefusal = {
|
|
61
|
+
isError: true;
|
|
62
|
+
content: [{ type: 'text'; text: string }];
|
|
63
|
+
details: { error: 'model-profile-native' | 'model-profile-allowlist' };
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
function refusal(text: string, error: ProfilePeerRefusal['details']['error']): ProfilePeerRefusal {
|
|
67
|
+
return { isError: true, content: [{ type: 'text', text }], details: { error } };
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const BLANKET_NATIVE = 'Active model profile requires native agents; peer execution is disabled. Use dispatch_agent or leave this profile.';
|
|
71
|
+
|
|
72
|
+
/** True when native routing has no allowlist: standing peers are banned outright. */
|
|
73
|
+
export function profileForcesNativePeers(active = readActiveProfile()): boolean {
|
|
74
|
+
return !!active && active.profile.routing === 'native' && !active.profile['allowed-models']?.length;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Exact allowlist hit, or a unique provider-less suffix match. Ambiguous suffixes fail. */
|
|
78
|
+
export function modelAllowedByProfile(model: string, allowed: readonly string[]): boolean {
|
|
79
|
+
const value = model.trim();
|
|
80
|
+
if (!value || value === 'unknown')
|
|
81
|
+
return false;
|
|
82
|
+
if (allowed.includes(value))
|
|
83
|
+
return true;
|
|
84
|
+
if (value.includes('/'))
|
|
85
|
+
return false;
|
|
86
|
+
return allowed.filter(entry => entry.split('/').pop() === value).length === 1;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function profilePeerGate(opts?: { peerModel?: string; targetResolved?: boolean }, active = readActiveProfile()): ProfilePeerRefusal | null {
|
|
90
|
+
if (!active || active.profile.routing !== 'native')
|
|
91
|
+
return null;
|
|
92
|
+
const allowed = active.profile['allowed-models'];
|
|
93
|
+
if (!allowed?.length)
|
|
94
|
+
return refusal(BLANKET_NATIVE, 'model-profile-native');
|
|
95
|
+
if (opts?.targetResolved === false)
|
|
96
|
+
return null;
|
|
97
|
+
const model = opts?.peerModel?.trim();
|
|
98
|
+
if (!model || model === 'unknown')
|
|
99
|
+
return refusal(`Active model profile "${active.name}" refuses unverified peers; advertised model is missing or unknown. Use a peer on allowed-models: ${allowed.join(', ')}, dispatch_agent native, or leave this profile.`, 'model-profile-allowlist');
|
|
100
|
+
if (modelAllowedByProfile(model, allowed))
|
|
101
|
+
return null;
|
|
102
|
+
return refusal(`Active model profile "${active.name}" refuses peer model "${model}"; allowed-models: ${allowed.join(', ')}. Use a peer on an allowed model, dispatch_agent native, or leave this profile.`, 'model-profile-allowlist');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function profileSpawnPeerRefusal(plan: { runner: string; model?: string; persona?: string; name: string }, active = readActiveProfile()): ProfilePeerRefusal | null {
|
|
106
|
+
const early = profilePeerGate({ targetResolved: false }, active);
|
|
107
|
+
if (early)
|
|
108
|
+
return early;
|
|
109
|
+
if (!active || active.profile.routing !== 'native' || !active.profile['allowed-models']?.length)
|
|
110
|
+
return null;
|
|
111
|
+
if (plan.runner === 'claude-code')
|
|
112
|
+
return refusal(`Active model profile "${active.name}" refuses claude-code peers; allowed-models: ${active.profile['allowed-models'].join(', ')}. Spawn a pi peer on an allowed model or leave this profile.`, 'model-profile-allowlist');
|
|
113
|
+
const planned = plan.model ?? profileAgent(plan.persona ?? plan.name, active)?.model;
|
|
114
|
+
return profilePeerGate({ peerModel: planned, targetResolved: true }, active);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** @deprecated Prefer profilePeerGate with the resolved peer model. */
|
|
118
|
+
export function profilePeerRefusal() {
|
|
119
|
+
return profilePeerGate();
|
|
120
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { resolveSessionRoster } from "../work-mode.ts";
|
|
2
|
+
|
|
3
|
+
export interface RosterDef { name: string }
|
|
4
|
+
export interface RosterState<TDef extends RosterDef> { def: TDef; status: string }
|
|
5
|
+
export interface RosterMutationResult { ok: boolean; message: string }
|
|
6
|
+
export interface SessionAdoption { file: string | null; quarantined: string | null; reason: string | null }
|
|
7
|
+
|
|
8
|
+
export interface RosterPolicyPorts<TDef extends RosterDef, TState extends RosterState<TDef>> {
|
|
9
|
+
getTeams(): Readonly<Record<string, readonly string[]>>;
|
|
10
|
+
getAllDefs(): readonly TDef[];
|
|
11
|
+
getStates(): Map<string, TState>;
|
|
12
|
+
getActiveTeamName(): string;
|
|
13
|
+
setActiveTeamName(name: string): void;
|
|
14
|
+
clearBackendNotices(): void;
|
|
15
|
+
createFreshState(def: TDef, adoption?: SessionAdoption): TState;
|
|
16
|
+
adoptSession(def: TDef): SessionAdoption;
|
|
17
|
+
quarantineSession(def: TDef): { usable: boolean; quarantined: string | null; reason: string | null };
|
|
18
|
+
persist(teamName: string): void;
|
|
19
|
+
recompute(): void;
|
|
20
|
+
refreshUi(): void;
|
|
21
|
+
displayName(name: string): string;
|
|
22
|
+
orchestratorNeedsRosterAfterDrop(size: number): boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface RosterPolicy<TDef extends RosterDef> {
|
|
26
|
+
activateTeam(teamName: string): void;
|
|
27
|
+
activateFirstValidTeam(): boolean;
|
|
28
|
+
persistActiveRoster(): void;
|
|
29
|
+
add(name: string): RosterMutationResult;
|
|
30
|
+
drop(name: string): RosterMutationResult;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function createRosterPolicy<TDef extends RosterDef, TState extends RosterState<TDef>>(ports: RosterPolicyPorts<TDef, TState>): RosterPolicy<TDef> {
|
|
34
|
+
function activateTeam(teamName: string): void {
|
|
35
|
+
ports.setActiveTeamName(teamName);
|
|
36
|
+
const members = ports.getTeams()[teamName] || [];
|
|
37
|
+
const defsByName = new Map(ports.getAllDefs().map(def => [def.name.toLowerCase(), def]));
|
|
38
|
+
const states = ports.getStates();
|
|
39
|
+
states.clear();
|
|
40
|
+
ports.clearBackendNotices();
|
|
41
|
+
for (const member of members) {
|
|
42
|
+
const def = defsByName.get(member.toLowerCase());
|
|
43
|
+
if (def) states.set(def.name.toLowerCase(), ports.createFreshState(def, ports.adoptSession(def)));
|
|
44
|
+
}
|
|
45
|
+
ports.recompute();
|
|
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
|
+
}
|
|
59
|
+
function persistActiveRoster(): void {
|
|
60
|
+
const team = ports.getActiveTeamName();
|
|
61
|
+
if (team && ports.getStates().size > 0) ports.persist(team);
|
|
62
|
+
}
|
|
63
|
+
function add(name: string): RosterMutationResult {
|
|
64
|
+
const key = String(name || "").trim().toLowerCase();
|
|
65
|
+
const def = ports.getAllDefs().find(candidate => candidate.name.toLowerCase() === key);
|
|
66
|
+
if (!def) {
|
|
67
|
+
const available = ports.getAllDefs().map(candidate => candidate.name).sort().join(", ") || "(none)";
|
|
68
|
+
return { ok: false, message: `No persona "${name}". Available: ${available}` };
|
|
69
|
+
}
|
|
70
|
+
const states = ports.getStates();
|
|
71
|
+
if (states.has(def.name.toLowerCase())) return { ok: false, message: `${ports.displayName(def.name)} is already in the active team` };
|
|
72
|
+
const adoption = ports.adoptSession(def);
|
|
73
|
+
states.set(def.name.toLowerCase(), ports.createFreshState(def, adoption));
|
|
74
|
+
if (!ports.getActiveTeamName()) ports.setActiveTeamName("ad-hoc");
|
|
75
|
+
ports.recompute(); ports.refreshUi();
|
|
76
|
+
const note = adoption.quarantined ? ` — its previous session file was unusable (${adoption.reason}) and was quarantined to ${adoption.quarantined}; it starts clean` : "";
|
|
77
|
+
return { ok: true, message: `${ports.displayName(def.name)} added to the active team${note}` };
|
|
78
|
+
}
|
|
79
|
+
function drop(name: string): RosterMutationResult {
|
|
80
|
+
const key = String(name || "").trim().toLowerCase();
|
|
81
|
+
const states = ports.getStates();
|
|
82
|
+
const state = states.get(key);
|
|
83
|
+
if (!state) return { ok: false, message: `"${name}" is not in the active team (${Array.from(states.values()).map(item => item.def.name).join(", ") || "empty"})` };
|
|
84
|
+
if (state.status === "running") return { ok: false, message: `${ports.displayName(state.def.name)} is running — wait for it to finish or /af-agents-kill it first` };
|
|
85
|
+
if (ports.orchestratorNeedsRosterAfterDrop(states.size - 1)) return { ok: false, message: `${ports.displayName(state.def.name)} is the last team member — switch to operator work mode or add a replacement before dropping it` };
|
|
86
|
+
states.delete(key);
|
|
87
|
+
if (states.size === 0) ports.setActiveTeamName("");
|
|
88
|
+
ports.recompute(); ports.refreshUi();
|
|
89
|
+
const health = ports.quarantineSession(state.def);
|
|
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)";
|
|
91
|
+
return { ok: true, message: `${ports.displayName(state.def.name)} dropped from the active team${note}` };
|
|
92
|
+
}
|
|
93
|
+
return { activateTeam, activateFirstValidTeam, persistActiveRoster, add, drop };
|
|
94
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { CAPABILITY_PACKS, persistedCapabilityState, resolveCapabilityPacks, type CapabilityPack, type CapabilityResolution, type ContextState, type PendingOperation } from "../capability-packs.ts";
|
|
2
|
+
import { confirmationGate, type CapabilityConfirmationState, type ConfirmableCapabilityPack } from "../capability-confirmation.ts";
|
|
3
|
+
import { orchestratorNeedsRoster } from "../helpers.ts";
|
|
4
|
+
import { WORK_MODE_ENTRY_TYPE, resolveWorkModeTools, type WorkMode } from "../work-mode.ts";
|
|
5
|
+
import { selectedPickerValue, workModeChangeBlockedByRoster, workModePickerOptions } from "../work-mode-controls.ts";
|
|
6
|
+
|
|
7
|
+
export interface WorkModeUiPort {
|
|
8
|
+
hasUI?: boolean;
|
|
9
|
+
ui: { notify(message: string, level: "error" | "warning" | "info"): void; setStatus(key: string, value: string | undefined): void; select(title: string, options: string[]): Promise<string | undefined> };
|
|
10
|
+
}
|
|
11
|
+
export interface PersistedCapabilityRestore { taskPacks: CapabilityPack[]; provisional: CapabilityPack[]; confirmation: CapabilityConfirmationState }
|
|
12
|
+
export interface WorkModePolicyPorts {
|
|
13
|
+
getBaselineTools(): readonly string[];
|
|
14
|
+
getRosterSize(): number;
|
|
15
|
+
activateFallbackRoster(ctx: WorkModeUiPort): void;
|
|
16
|
+
getActiveTeamName(): string;
|
|
17
|
+
getComsReady(): boolean;
|
|
18
|
+
getHerdrReady(): boolean;
|
|
19
|
+
getAskUserAvailable(): boolean;
|
|
20
|
+
getDeterministicToolsEnabled?(): boolean;
|
|
21
|
+
getDispatchTriageEnabled?(): boolean;
|
|
22
|
+
getIdentityLabel(): string | null;
|
|
23
|
+
getTaskTier(): string | null;
|
|
24
|
+
getPendingOperations(): PendingOperation[];
|
|
25
|
+
getContextState(): ContextState;
|
|
26
|
+
getActiveTools?(): readonly string[];
|
|
27
|
+
setActiveTools(tools: string[]): void;
|
|
28
|
+
recordToolCatalog?(change: { fromMode: WorkMode; toMode: WorkMode; previous: readonly string[]; next: readonly string[]; reason: "refresh" | "mode_switch" }): void;
|
|
29
|
+
persist(type: string, data: unknown): void;
|
|
30
|
+
replayDeferredInputs(): void;
|
|
31
|
+
watchdogArmed(workMode: WorkMode): boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface WorkModePolicy {
|
|
34
|
+
getWorkMode(): WorkMode;
|
|
35
|
+
setRestoredWorkMode(mode: WorkMode): void;
|
|
36
|
+
getCapabilityResolution(): CapabilityResolution;
|
|
37
|
+
getCapabilityConfirmation(): CapabilityConfirmationState;
|
|
38
|
+
setCapabilityConfirmation(pack: ConfirmableCapabilityPack, status: CapabilityConfirmationState[ConfirmableCapabilityPack]): void;
|
|
39
|
+
restoreCapabilities(state: PersistedCapabilityRestore): void;
|
|
40
|
+
resetCapabilities(): void;
|
|
41
|
+
resolveIncomingCapabilities(userText: string, newTask?: boolean): void;
|
|
42
|
+
/** Recompute state/lease changes without losing the current input's transient compaction intent. */
|
|
43
|
+
refreshCapabilities(): void;
|
|
44
|
+
provisionalCapabilityRefusal(pack: ConfirmableCapabilityPack): { content: { type: "text"; text: string }[]; details: { status: string; confirmation: string; pack: ConfirmableCapabilityPack } } | null;
|
|
45
|
+
applyWorkModeTools(): void;
|
|
46
|
+
updateStatus(ctx: WorkModeUiPort): void;
|
|
47
|
+
statusText(): string;
|
|
48
|
+
modelWorkBlockedByRosterRecovery(ctx: WorkModeUiPort): boolean;
|
|
49
|
+
setRosterRecovery(required: boolean, diagnostic?: string): void;
|
|
50
|
+
clearRosterRecovery(): void;
|
|
51
|
+
commit(next: WorkMode, ctx: WorkModeUiPort): Promise<"ok" | "unchanged" | "roster">;
|
|
52
|
+
applySelection(next: WorkMode, ctx: WorkModeUiPort): Promise<void>;
|
|
53
|
+
openPicker(ctx: WorkModeUiPort): Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function createWorkModePolicy(ports: WorkModePolicyPorts, initial: WorkMode = "operator"): WorkModePolicy {
|
|
57
|
+
let workMode = initial;
|
|
58
|
+
let rosterRecoveryRequired = false;
|
|
59
|
+
let rosterRecoveryDiagnostic = "";
|
|
60
|
+
let taskPacks: CapabilityPack[] = [];
|
|
61
|
+
let provisionalPacks: CapabilityPack[] = [];
|
|
62
|
+
let confirmation: CapabilityConfirmationState = {};
|
|
63
|
+
let currentExplicitCompaction = false;
|
|
64
|
+
let resolution = resolveCapabilityPacks({ workMode, userText: "", taskPacks: [], comsReady: false, herdrReady: false, pendingOperations: [], contextState: "normal" });
|
|
65
|
+
|
|
66
|
+
function resolveIncomingCapabilities(userText: string, newTask = false, refresh = false): void {
|
|
67
|
+
resolution = resolveCapabilityPacks({
|
|
68
|
+
workMode, userText,
|
|
69
|
+
taskTier: (["trivial", "small", "feature", "project"] as const).find(tier => tier === ports.getTaskTier()),
|
|
70
|
+
taskPacks, provisionalPacks,
|
|
71
|
+
comsReady: ports.getComsReady(), herdrReady: ports.getHerdrReady(),
|
|
72
|
+
pendingOperations: ports.getPendingOperations(), contextState: ports.getContextState(), newTask,
|
|
73
|
+
});
|
|
74
|
+
if (refresh && currentExplicitCompaction && !newTask) {
|
|
75
|
+
resolution.active = CAPABILITY_PACKS.filter(pack => pack === "compaction" || resolution.active.includes(pack));
|
|
76
|
+
resolution.reasons.compaction = "explicit-compaction";
|
|
77
|
+
}
|
|
78
|
+
currentExplicitCompaction = resolution.active.includes("compaction") && resolution.reasons.compaction === "explicit-compaction";
|
|
79
|
+
for (const pack of ["fleet", "peer", "workspace"] as const) {
|
|
80
|
+
if (confirmation[pack] === "promoted" || confirmation[pack] === "declined") {
|
|
81
|
+
resolution.provisional = resolution.provisional.filter(candidate => candidate !== pack);
|
|
82
|
+
resolution.confirmationRequired = resolution.confirmationRequired.filter(candidate => candidate !== pack);
|
|
83
|
+
if (confirmation[pack] === "promoted" && !resolution.active.includes(pack)) resolution.active.push(pack);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
taskPacks = resolution.nextTaskPacks = CAPABILITY_PACKS.filter(pack => pack !== "core" && pack !== "compaction" && resolution.active.includes(pack));
|
|
87
|
+
provisionalPacks = resolution.provisional.filter(pack => confirmation[pack as ConfirmableCapabilityPack] !== "declined");
|
|
88
|
+
try { ports.persist("agent-hub-capability-packs", persistedCapabilityState(resolution, confirmation)); } catch { /* best effort */ }
|
|
89
|
+
}
|
|
90
|
+
function applyWorkModeTools(fromMode: WorkMode = workMode, reason: "refresh" | "mode_switch" = "refresh"): void {
|
|
91
|
+
const previous = [...(ports.getActiveTools?.() ?? [])];
|
|
92
|
+
const requested = resolveWorkModeTools({ workMode, baselineTools: ports.getBaselineTools(), comsReady: ports.getComsReady(), herdrReady: ports.getHerdrReady(), askUserAvailable: ports.getAskUserAvailable(), deterministicTools: ports.getDeterministicToolsEnabled?.() === true, triageEnabled: ports.getDispatchTriageEnabled?.() === true, capabilityPacks: [...resolution.active, ...resolution.provisional] });
|
|
93
|
+
ports.setActiveTools(requested);
|
|
94
|
+
ports.recordToolCatalog?.({ fromMode, toMode: workMode, previous, next: [...(ports.getActiveTools?.() ?? requested)], reason });
|
|
95
|
+
}
|
|
96
|
+
function statusText(): string {
|
|
97
|
+
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");
|
|
98
|
+
}
|
|
99
|
+
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."; }
|
|
100
|
+
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)." : ""; }
|
|
101
|
+
async function commit(next: WorkMode, ctx: WorkModeUiPort): Promise<"ok" | "unchanged" | "roster"> {
|
|
102
|
+
if (workModeChangeBlockedByRoster(workMode, next, ports.getRosterSize())) ports.activateFallbackRoster(ctx);
|
|
103
|
+
if (orchestratorNeedsRoster(next, ports.getRosterSize())) return "roster";
|
|
104
|
+
if (next === workMode) return "unchanged";
|
|
105
|
+
const previousMode = workMode;
|
|
106
|
+
workMode = next;
|
|
107
|
+
if (workMode === "operator") { rosterRecoveryRequired = false; rosterRecoveryDiagnostic = ""; setTimeout(ports.replayDeferredInputs, 0); }
|
|
108
|
+
resolveIncomingCapabilities(""); applyWorkModeTools(previousMode, "mode_switch"); ctx.ui.setStatus("hub-work-mode", `Work Mode: ${workMode}`); ports.persist(WORK_MODE_ENTRY_TYPE, { workMode });
|
|
109
|
+
return "ok";
|
|
110
|
+
}
|
|
111
|
+
async function applySelection(next: WorkMode, ctx: WorkModeUiPort): Promise<void> {
|
|
112
|
+
const result = await commit(next, ctx);
|
|
113
|
+
if (result === "roster") { ctx.ui.notify(refusalMessage(), "warning"); return; }
|
|
114
|
+
ctx.ui.notify(`${statusText()}\nPrompt and tools update on the next model call.${watchdogNote(next)}`, "info");
|
|
115
|
+
}
|
|
116
|
+
async function openPicker(ctx: WorkModeUiPort): Promise<void> {
|
|
117
|
+
const picker = workModePickerOptions(workMode);
|
|
118
|
+
const choice = await ctx.ui.select(picker.title, [...picker.options]);
|
|
119
|
+
const next = selectedPickerValue(picker.options, choice, picker.workModes);
|
|
120
|
+
if (next) await applySelection(next, ctx);
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
getWorkMode: () => workMode, setRestoredWorkMode: mode => { workMode = mode; },
|
|
124
|
+
getCapabilityResolution: () => resolution, getCapabilityConfirmation: () => confirmation,
|
|
125
|
+
setCapabilityConfirmation: (pack, status) => { if (status) confirmation[pack] = status; else delete confirmation[pack]; },
|
|
126
|
+
restoreCapabilities: state => { taskPacks = [...state.taskPacks]; provisionalPacks = [...state.provisional]; confirmation = { ...state.confirmation }; currentExplicitCompaction = false; },
|
|
127
|
+
resetCapabilities: () => { taskPacks = []; provisionalPacks = []; confirmation = {}; currentExplicitCompaction = false; },
|
|
128
|
+
resolveIncomingCapabilities, refreshCapabilities: () => resolveIncomingCapabilities("", false, true),
|
|
129
|
+
provisionalCapabilityRefusal: pack => { const gate = confirmationGate(confirmation, pack, resolution.provisional.includes(pack)); return gate.allowed ? null : { content: [{ type: "text", text: gate.message }], details: { status: "provisional_confirmation_required", confirmation: gate.status, pack } }; },
|
|
130
|
+
applyWorkModeTools, updateStatus: ctx => ctx.ui.setStatus("hub-work-mode", `Work Mode: ${workMode}`), statusText,
|
|
131
|
+
modelWorkBlockedByRosterRecovery: ctx => { if (workMode !== "orchestrator" || !rosterRecoveryRequired) return false; const message = `${rosterRecoveryDiagnostic || "No valid native roster is active."} Select one with /af-agents-team, restart with --agent-team <name>, or switch explicitly with /af-work-mode operator.`; ctx.ui.notify(message, "error"); if (!ctx.hasUI) console.error(`[agent-hub] ${message}`); return true; },
|
|
132
|
+
setRosterRecovery: (required, diagnostic = "") => { rosterRecoveryRequired = required; rosterRecoveryDiagnostic = required ? diagnostic : ""; }, clearRosterRecovery: () => { rosterRecoveryRequired = false; rosterRecoveryDiagnostic = ""; },
|
|
133
|
+
commit, applySelection, openPicker,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/** Pure `/af-poll` argument, panel, and digest helpers. The hub command is a thin consumer. */
|
|
2
|
+
|
|
3
|
+
export const HUB_POLL_DEFAULT_PERSONA = "researcher";
|
|
4
|
+
|
|
5
|
+
export interface ParsedAfPollArgs {
|
|
6
|
+
panel?: string;
|
|
7
|
+
persona: string;
|
|
8
|
+
question: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface AfPollVoiceDigest {
|
|
13
|
+
name: string;
|
|
14
|
+
model: string;
|
|
15
|
+
ok: boolean;
|
|
16
|
+
position?: string;
|
|
17
|
+
confidence?: string;
|
|
18
|
+
reason?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface AfPollDigestInput {
|
|
22
|
+
panel: string;
|
|
23
|
+
directory: string;
|
|
24
|
+
voices: AfPollVoiceDigest[];
|
|
25
|
+
recommendation?: string;
|
|
26
|
+
integrator?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface AfPollHandleInput {
|
|
30
|
+
args: string;
|
|
31
|
+
cwd: string;
|
|
32
|
+
pollPanelOverride?: string | null;
|
|
33
|
+
listPanels: (cwd: string) => string[] | Promise<string[]>;
|
|
34
|
+
preflight?: (options: { panel: string; persona: string; cwd: string }) => string | null | Promise<string | null>;
|
|
35
|
+
checkBudget: () => string | null | Promise<string | null>;
|
|
36
|
+
chargeBudget: () => void;
|
|
37
|
+
onAccepted?: (info: { panel: string; persona: string; question: string }) => void | Promise<void>;
|
|
38
|
+
execute: (options: { panel: string; persona: string; question: string; cwd: string }) => Promise<AfPollDigestInput>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface AfPollHandleResult {
|
|
42
|
+
ok: boolean;
|
|
43
|
+
message: string;
|
|
44
|
+
digest?: string;
|
|
45
|
+
dispatcherNote?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function tokenize(args: string): string[] {
|
|
49
|
+
const tokens: string[] = [];
|
|
50
|
+
const input = args.trim();
|
|
51
|
+
let current = "";
|
|
52
|
+
let quote: string | null = null;
|
|
53
|
+
for (let i = 0; i < input.length; i++) {
|
|
54
|
+
const ch = input[i];
|
|
55
|
+
if (quote) {
|
|
56
|
+
if (ch === quote) quote = null;
|
|
57
|
+
else current += ch;
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (ch === "\"" || ch === "'") { quote = ch; continue; }
|
|
61
|
+
if (/\s/.test(ch)) {
|
|
62
|
+
if (current) { tokens.push(current); current = ""; }
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
current += ch;
|
|
66
|
+
}
|
|
67
|
+
if (current) tokens.push(current);
|
|
68
|
+
return tokens;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function parseAfPollArgs(args: string): ParsedAfPollArgs {
|
|
72
|
+
const tokens = tokenize(args ?? "");
|
|
73
|
+
let panel: string | undefined;
|
|
74
|
+
let persona: string | undefined;
|
|
75
|
+
const rest: string[] = [];
|
|
76
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
77
|
+
const token = tokens[i];
|
|
78
|
+
if (token === "--panel") {
|
|
79
|
+
const value = tokens[++i];
|
|
80
|
+
if (!value || value.startsWith("--")) return { persona: HUB_POLL_DEFAULT_PERSONA, question: "", error: "/af-poll --panel requires a panel name" };
|
|
81
|
+
panel = value;
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (token === "--persona") {
|
|
85
|
+
const value = tokens[++i];
|
|
86
|
+
if (!value || value.startsWith("--")) return { persona: HUB_POLL_DEFAULT_PERSONA, question: "", error: "/af-poll --persona requires a persona name" };
|
|
87
|
+
persona = value;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
rest.push(token);
|
|
91
|
+
}
|
|
92
|
+
const question = rest.join(" ").trim();
|
|
93
|
+
if (!question) {
|
|
94
|
+
return {
|
|
95
|
+
panel, persona: persona ?? HUB_POLL_DEFAULT_PERSONA, question: "",
|
|
96
|
+
error: "Usage: /af-poll [--panel NAME] [--persona NAME] <question>",
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
return { panel, persona: persona ?? HUB_POLL_DEFAULT_PERSONA, question };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function resolveAfPollPanel(flag: string | undefined, override: string | null | undefined, available: string[]): { panel: string } | { error: string } {
|
|
103
|
+
const named = flag?.trim() || override?.trim() || "";
|
|
104
|
+
const list = available.length ? available.join(", ") : "(none)";
|
|
105
|
+
if (!named) {
|
|
106
|
+
return { error: `--panel is required (or set poll-panel: in ## agent-hub). Available panels: ${list}` };
|
|
107
|
+
}
|
|
108
|
+
if (available.length > 0 && !available.includes(named)) {
|
|
109
|
+
return { error: `Unknown panel "${named}". Available panels: ${list}` };
|
|
110
|
+
}
|
|
111
|
+
return { panel: named };
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function formatAfPollDigest(input: AfPollDigestInput): string {
|
|
115
|
+
const blocks = input.voices.map(voice => {
|
|
116
|
+
const header = `${voice.name} · ${voice.model}`;
|
|
117
|
+
if (!voice.ok) return `${header}\n failed: ${voice.reason ?? "unknown error"}`;
|
|
118
|
+
return `${header}\n position: ${voice.position ?? ""}\n confidence: ${voice.confidence ?? ""}`;
|
|
119
|
+
});
|
|
120
|
+
const merge = input.recommendation
|
|
121
|
+
? `\nmerge${input.integrator ? ` · ${input.integrator}` : ""}\n recommendation: ${input.recommendation}`
|
|
122
|
+
: "";
|
|
123
|
+
return `${blocks.join("\n\n")}${merge}\n\nFull opinions: ${input.directory}`;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function formatAfPollStarted(info: { panel: string; persona: string; question: string; voices?: { name: string; model: string }[] }): string {
|
|
127
|
+
const roster = info.voices?.length
|
|
128
|
+
? info.voices.map(voice => `${voice.name} · ${voice.model}`).join("\n")
|
|
129
|
+
: "(voices loading)";
|
|
130
|
+
return [
|
|
131
|
+
`POLL STARTED (panel ${info.panel}, persona ${info.persona})`,
|
|
132
|
+
"",
|
|
133
|
+
`Question: ${info.question}`,
|
|
134
|
+
"",
|
|
135
|
+
"Voices:",
|
|
136
|
+
roster,
|
|
137
|
+
"",
|
|
138
|
+
"Running read-only. Full opinions stay on disk; a digest follows when every voice and the merge finish.",
|
|
139
|
+
].join("\n");
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function formatAfPollVoiceProgress(voice: AfPollVoiceDigest): string {
|
|
143
|
+
if (!voice.ok) return `POLL VOICE ${voice.name} · ${voice.model}\n failed: ${voice.reason ?? "unknown error"}`;
|
|
144
|
+
return `POLL VOICE ${voice.name} · ${voice.model}\n position: ${voice.position ?? ""}\n confidence: ${voice.confidence ?? ""}`;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function formatAfPollDispatcherNote(input: AfPollDigestInput, digest: string): string {
|
|
148
|
+
return [
|
|
149
|
+
`POLL RESULT (panel ${input.panel})`,
|
|
150
|
+
"",
|
|
151
|
+
digest,
|
|
152
|
+
"",
|
|
153
|
+
"The digest above is the whole payload. Do not paste full voice opinions into this session; cite the path if you need more.",
|
|
154
|
+
].join("\n");
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export async function handleAfPoll(input: AfPollHandleInput): Promise<AfPollHandleResult> {
|
|
158
|
+
const parsed = parseAfPollArgs(input.args);
|
|
159
|
+
if (parsed.error) return { ok: false, message: parsed.error };
|
|
160
|
+
const available = await input.listPanels(input.cwd);
|
|
161
|
+
const panel = resolveAfPollPanel(parsed.panel, input.pollPanelOverride, available);
|
|
162
|
+
if ("error" in panel) return { ok: false, message: panel.error };
|
|
163
|
+
const blocked = await input.preflight?.({ panel: panel.panel, persona: parsed.persona, cwd: input.cwd });
|
|
164
|
+
if (blocked) return { ok: false, message: blocked };
|
|
165
|
+
const budget = await input.checkBudget();
|
|
166
|
+
if (budget) return { ok: false, message: budget };
|
|
167
|
+
input.chargeBudget();
|
|
168
|
+
try { await input.onAccepted?.({ panel: panel.panel, persona: parsed.persona, question: parsed.question }); } catch { /* progress is best-effort */ }
|
|
169
|
+
try {
|
|
170
|
+
const digestInput = await input.execute({ panel: panel.panel, persona: parsed.persona, question: parsed.question, cwd: input.cwd });
|
|
171
|
+
const digest = formatAfPollDigest(digestInput);
|
|
172
|
+
return { ok: true, message: digest, digest, dispatcherNote: formatAfPollDispatcherNote(digestInput, digest) };
|
|
173
|
+
} catch (error) {
|
|
174
|
+
return { ok: false, message: error instanceof Error ? error.message : String(error) };
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
|
|
5
|
+
const VALID_THINKING_LEVELS = new Set(["off", "minimal", "low", "medium", "high", "xhigh"]);
|
|
6
|
+
const THINKING_ABBREV: Record<string, string> = { off: "", minimal: "min", low: "low", medium: "med", high: "hi", xhigh: "xh" };
|
|
7
|
+
|
|
8
|
+
export function displayName(name: string): string {
|
|
9
|
+
return name.split("-").map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function extractAskUserQuestions(output: string): string[] {
|
|
13
|
+
return extractMarkers(output, "ASK_USER");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function extractNeedsResearch(output: string): string[] {
|
|
17
|
+
return extractMarkers(output, "NEEDS_RESEARCH");
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function extractMarkers(output: string, marker: string): string[] {
|
|
21
|
+
const questions: string[] = [];
|
|
22
|
+
const pattern = new RegExp(`^${marker}\\s*:\\s*(.+)$`, "i");
|
|
23
|
+
for (const rawLine of output.split("\n")) {
|
|
24
|
+
const question = rawLine.trim().match(pattern)?.[1]?.trim();
|
|
25
|
+
if (question && !questions.includes(question)) questions.push(question);
|
|
26
|
+
}
|
|
27
|
+
return questions;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function resolveThinkingLevel(raw?: string): string {
|
|
31
|
+
if (!raw) return "off";
|
|
32
|
+
const value = raw.trim().toLowerCase();
|
|
33
|
+
if (VALID_THINKING_LEVELS.has(value)) return value;
|
|
34
|
+
return ["on", "true", "yes", "1"].includes(value) ? "low" : "off";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function abbrevThinking(level: string): string {
|
|
38
|
+
return THINKING_ABBREV[level] ?? "";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function resolveDelegateExtension(cwd: string): string | null {
|
|
42
|
+
try {
|
|
43
|
+
const extension = fileURLToPath(new URL("./delegate.ts", import.meta.url));
|
|
44
|
+
if (existsSync(extension)) return extension;
|
|
45
|
+
} catch {}
|
|
46
|
+
const local = join(cwd, ".pi", "harnesses", "agent-hub", "delegate.ts");
|
|
47
|
+
return existsSync(local) ? local : null;
|
|
48
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import type { ProactiveConfig } from "./proactive-types.ts";
|
|
4
|
+
import { parseLocalBindings, type ReviewedLocalBinding } from "./proactive-local.ts";
|
|
5
|
+
export type LocalProactiveConfig = ProactiveConfig & { readonly localBindings?: readonly ReviewedLocalBinding[] };
|
|
6
|
+
|
|
7
|
+
const DEFAULT_BUDGET = 100;
|
|
8
|
+
export const PROACTIVE_LIMITS = Object.freeze({ maxUnits: 20, maxRetainedBytes: 256 * 1024, maxStateBytes: 32 * 1024, maxQuestions: 16, maxCallsPerTurn: 2, captureMs: 1000, maxFileBytes: 64 * 1024 });
|
|
9
|
+
const keys = new Set(["version", "mode", "remoteContext", "include", "maxEvaluationsPerSession", "localBindings"]);
|
|
10
|
+
const OFF: ProactiveConfig = Object.freeze({ version: 1, mode: "off", remoteContext: "disabled", include: Object.freeze([]), maxEvaluationsPerSession: 0 });
|
|
11
|
+
|
|
12
|
+
function includePath(value: unknown): value is string {
|
|
13
|
+
if (typeof value !== "string" || !value || value.length > 256 || value.startsWith("/") || value.startsWith(".") || value.includes("\\") || value.includes("\0") || /[{}!\[\]?]/.test(value)) return false;
|
|
14
|
+
const segments = value.split("/");
|
|
15
|
+
return segments.every(s => !!s && s !== ".." && s !== "." && !s.startsWith(".")) && !segments.some(s => /^(node_modules|vendor|dist|build|coverage|\.git|\.pi)$/i.test(s)) && (segments.length > 1 || !value.includes("*"));
|
|
16
|
+
}
|
|
17
|
+
export function parseProactiveConfig(value: unknown): LocalProactiveConfig {
|
|
18
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new Error("Invalid proactive review config");
|
|
19
|
+
const v = value as Record<string, unknown>;
|
|
20
|
+
if (Object.keys(v).some(k => !keys.has(k)) || v.version !== 1 || !["off", "shadow", "advisory"].includes(String(v.mode))) throw new Error("Unsupported proactive review config");
|
|
21
|
+
if (v.remoteContext !== undefined && v.remoteContext !== "disabled" && v.remoteContext !== "selected-excerpts") throw new Error("Invalid remoteContext");
|
|
22
|
+
if (v.include !== undefined && (!Array.isArray(v.include) || v.include.length > 32 || !v.include.every(includePath) || new Set(v.include).size !== v.include.length)) throw new Error("Invalid include scope");
|
|
23
|
+
const bindings = v.localBindings === undefined ? undefined : parseLocalBindings(v.localBindings);
|
|
24
|
+
const budget = v.maxEvaluationsPerSession ?? DEFAULT_BUDGET;
|
|
25
|
+
if (!Number.isSafeInteger(budget) || Number(budget) < 0 || Number(budget) > 100) throw new Error("Invalid session budget");
|
|
26
|
+
if (v.mode === "off") {
|
|
27
|
+
if ((v.remoteContext && v.remoteContext !== "disabled") || (Array.isArray(v.include) && v.include.length) || bindings?.length || (v.maxEvaluationsPerSession !== undefined && budget !== 0)) throw new Error("Off config must not authorize capture");
|
|
28
|
+
return OFF;
|
|
29
|
+
}
|
|
30
|
+
if (!Array.isArray(v.include) || !v.include.length) throw new Error("Explicit include scope required");
|
|
31
|
+
return Object.freeze({ version: 1, mode: v.mode as "shadow" | "advisory", remoteContext: (v.remoteContext ?? "disabled") as ProactiveConfig["remoteContext"], include: Object.freeze([...v.include]), maxEvaluationsPerSession: Number(budget), ...(bindings ? { localBindings: bindings } : {}) });
|
|
32
|
+
}
|
|
33
|
+
/** Read consumer config only. Missing means off; malformed config fails closed. Never inspect source here. */
|
|
34
|
+
export function loadProactiveConfig(repo: string): LocalProactiveConfig {
|
|
35
|
+
let raw: string;
|
|
36
|
+
try { raw = readFileSync(join(repo, ".ai/proactive-review.json"), "utf8"); }
|
|
37
|
+
catch (error) { if ((error as NodeJS.ErrnoException).code === "ENOENT") return OFF; throw error; }
|
|
38
|
+
return parseProactiveConfig(JSON.parse(raw));
|
|
39
|
+
}
|
|
40
|
+
export function isCaptureEnabled(config: ProactiveConfig): boolean { return config.mode === "shadow" || config.mode === "advisory"; }
|