@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
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
import { loadSystem1Snapshot } from "../lib/system1/config-loader.js";
|
|
2
|
+
import { normalizeSystem1Config } from "../lib/system1/config-v2.js";
|
|
1
3
|
import { registerDispatchTriage } from "./tools/dispatch-triage.ts";
|
|
2
4
|
import { createTriageRuntime } from "./dispatch-triage-runtime.ts";
|
|
3
|
-
import {
|
|
5
|
+
import { type TriageConfig, type TriageInput } from "./dispatch-triage-contract.ts";
|
|
6
|
+
import { loadTaskTriageConfig } from "./task-triage-config.ts";
|
|
7
|
+
import { TASK_TRIAGE_MODEL } from "./task-triage-contract.ts";
|
|
8
|
+
import type { JevTransport } from "../lib/system1/jev.ts";
|
|
9
|
+
import { createTaskTriageRuntime, evaluatedTaskTriageInputChanged, TASK_TRIAGE_RUNTIME_ENTRY } from "./task-triage-runtime.ts";
|
|
10
|
+
import { adoptTaskTriageState, applyTaskTriageAdditions, recoverTaskTriageProcessState } from "./task-triage-obligations.ts";
|
|
11
|
+
import { confirmTaskTriageAction, confirmTaskTriageWaiver, consumeActionGrant, taskTriageActionAuditRecord, type TaskTriageActionObservation } from "./task-triage-authorization.ts";
|
|
12
|
+
import { registerTaskTriageRecover } from "./commands/task-triage-recover.ts";
|
|
13
|
+
import { registerTaskTriageWaiver } from "./commands/task-triage-waive.ts";
|
|
4
14
|
import { createCommunicationStore } from "./system1-communication-store.ts";
|
|
5
15
|
import { openSystem1Communication } from "./ui/system1-communication.ts";
|
|
6
16
|
import { registerRetry } from "./commands/retry.ts";
|
|
@@ -59,7 +69,7 @@ import {
|
|
|
59
69
|
} from "../lib/spawned-peers.js";
|
|
60
70
|
import { contextPct, estimatePromptTokens, resolveContextWindow } from "./context-window.js";
|
|
61
71
|
import { DEFAULT_WATCHDOG_SETTING, WATCHDOG_SETTINGS, normalizeWatchdogSetting, resolveWatchdogActive } from "./drift-watchdog.js";
|
|
62
|
-
import { createWatchdogActivity, type WatchdogActivity } from "./system1-activity.ts";
|
|
72
|
+
import { createWatchdogActivity, createTaskTriageActivity, type WatchdogActivity, type TaskTriageActivity } from "./system1-activity.ts";
|
|
63
73
|
import { createWatchdogSystem1Session, disposeWatchdogSystem1Session, readWatchdogSystem1Snapshot, type WatchdogSystem1Session } from "./system1-runtime.ts";
|
|
64
74
|
import { shouldExtractReturn } from "./return-extract.js";
|
|
65
75
|
import { crossCheck, deliveryDisposition, extractAssertionIds, parseDeliveredReturn } from "./return-contract.js";
|
|
@@ -81,7 +91,7 @@ import { registerContextCommand } from "./commands/context-command.ts";
|
|
|
81
91
|
import { registerAudit } from "./commands/audit.ts";
|
|
82
92
|
import { showSessionAudit } from "./session-audit.ts";
|
|
83
93
|
import { buildWatchdogReport, buildProactiveReport, commandProactiveLabels, readProactiveReport, formatWatchdogStatus, readWatchdogEvents } from "./system1-report.ts";
|
|
84
|
-
import { createProcessState, processAllowsPersona, evaluateProcessObligations, latestProcessState, processAuditRecord, processPreEffectGate, type ProcessObligationState, type ProcessVerdict } from "./process-obligations.ts";
|
|
94
|
+
import { createProcessState, processAllowsPersona, processOpenObligations, evaluateProcessObligations, latestProcessState, processAuditRecord, processTaskIdentityConflicts, processPreEffectGate, missingProcessRoleRecoveryHints, activeAdditionRecoveryHints, taskTransitionRecoveryHint, transitionToolDecision, latestPendingTaskTransition, TASK_TRANSITION_ENTRY_TYPE, type ProcessObligationState, type ProcessVerdict } from "./process-obligations.ts";
|
|
85
95
|
import { registerHubReport } from "./commands/hub-report.ts";
|
|
86
96
|
import { registerZoom } from "./commands/zoom.ts";
|
|
87
97
|
import { registerDispatchPolicy } from "./commands/dispatch-policy.ts";
|
|
@@ -180,12 +190,46 @@ import { join, resolve } from "path";
|
|
|
180
190
|
import * as fs from "node:fs";
|
|
181
191
|
import * as path from "node:path";
|
|
182
192
|
import * as crypto from "node:crypto";
|
|
193
|
+
import { fileURLToPath } from "node:url";
|
|
183
194
|
|
|
184
195
|
// ── Extension ────────────────────────────────────
|
|
185
196
|
|
|
186
197
|
const CONTEXT_WARN_THRESHOLD = 70;
|
|
187
198
|
const RESEARCHER_PERSONAS = new Set(["researcher", "deep-researcher"]);
|
|
188
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Test-only transport seam for real-Pi acceptance. With the offline guard,
|
|
202
|
+
* the normal shared System 1 service uses deterministic wire responses rather
|
|
203
|
+
* than HTTPS; config, readiness, adapter, deadlines and consumers remain real.
|
|
204
|
+
* A profile alone cannot activate this seam outside the guarded test process.
|
|
205
|
+
*/
|
|
206
|
+
let taskTriageFakeInstances = 0;
|
|
207
|
+
function resolveTaskTriageTestTransport(): JevTransport | undefined {
|
|
208
|
+
const profile = process.env.AGENT_HUB_TASK_TRIAGE_FAKE;
|
|
209
|
+
const guard = `--import=${fileURLToPath(new URL("../../../bin/test/helpers/system1-no-network.js", import.meta.url))}`;
|
|
210
|
+
if (!profile || process.env.PI_OFFLINE !== "1" || !process.env.NODE_OPTIONS?.split(/\s+/).includes(guard)) return undefined;
|
|
211
|
+
const hot = profile === "security" ? "security_change" : profile === "wide" ? "wide_change" : profile === "irreversible" ? "irreversible_execution" : null;
|
|
212
|
+
if (!hot && profile !== "plain" && profile !== "timeout") return undefined;
|
|
213
|
+
const instanceId = ++taskTriageFakeInstances;
|
|
214
|
+
return async request => {
|
|
215
|
+
const wire = JSON.parse(request.body.toString("utf8"));
|
|
216
|
+
const recordPath = process.env.AGENT_HUB_TASK_TRIAGE_FAKE_RECORD;
|
|
217
|
+
if (recordPath) {
|
|
218
|
+
try { fs.appendFileSync(recordPath, JSON.stringify({ at: Date.now(), profile, instanceId, pid: process.pid, questions: Object.keys(wire.questions), stateFingerprint: createHash("sha256").update(JSON.stringify(wire.state)).digest("hex"), questionFingerprint: createHash("sha256").update(JSON.stringify(wire.questions)).digest("hex"), stack: (new Error("fake-transport").stack ?? "").split("\n").slice(1, 6) }) + "\n"); } catch { /* evidence best-effort */ }
|
|
219
|
+
}
|
|
220
|
+
if (profile === "timeout") {
|
|
221
|
+
return new Promise((_, reject) => {
|
|
222
|
+
if (request.signal.aborted) return reject(new Error("guarded fake transport deadline"));
|
|
223
|
+
request.signal.addEventListener("abort", () => reject(new Error("guarded fake transport deadline")), { once: true });
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
return { status: 200, headers: {}, body: JSON.stringify({ model: TASK_TRIAGE_MODEL,
|
|
227
|
+
answers: Object.fromEntries(Object.keys(wire.questions).map(id => [id, { type: "noul", noul: id === hot ? 0.95 : 0.05 }])),
|
|
228
|
+
usage: { input_tokens: 1, output_tokens: 1 },
|
|
229
|
+
}) };
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
189
233
|
export default function (pi: ExtensionAPI) {
|
|
190
234
|
// ── Embedded coms: identity CLI flags ──
|
|
191
235
|
// Registered here (factory load time) so pi's CLI parser accepts them. Because
|
|
@@ -409,8 +453,21 @@ export default function (pi: ExtensionAPI) {
|
|
|
409
453
|
// Correctness obligations are independent of the spend tier. They persist for
|
|
410
454
|
// the current task and reset only through the explicit new-task tool path.
|
|
411
455
|
let processState = createProcessState();
|
|
456
|
+
let taskTriage: ReturnType<typeof createTaskTriageRuntime> | null = null;
|
|
457
|
+
let taskTriageTestTransportActive = false;
|
|
458
|
+
let taskTriageActivity: TaskTriageActivity | null = null;
|
|
459
|
+
let taskTriageConfigStatus: "active" | "off" | "invalid" = "off";
|
|
460
|
+
let taskTriageConfigured = false;
|
|
461
|
+
let processPersistenceBlocked = false;
|
|
462
|
+
let pendingTaskTransition = false;
|
|
463
|
+
let transitionDiversions = 0;
|
|
464
|
+
let transitionHintDelivered = false;
|
|
465
|
+
let transitionBatchRefused = false;
|
|
466
|
+
let orchestratorSelfReadUsed = 0;
|
|
467
|
+
const processBlock = () => processPersistenceBlocked ? { reason: "process_state_corrupt", message: "Process persistence is blocked; dependent effects remain refused. Ask the human to run /af-task-triage-recover for a checked in-session append/readback; if it refuses, inspect or resume a valid session. Never edit session JSONL or reset obligations." } : pendingTaskTransition ? { reason: "task_transition_pending", message: taskTransitionRecoveryHint } : null;
|
|
412
468
|
const persistProcessVerdict = (state: ProcessObligationState, verdict: ProcessVerdict) => {
|
|
413
|
-
try { pi.appendEntry("agent-hub-process-state", processAuditRecord(state, verdict)); }
|
|
469
|
+
try { pi.appendEntry("agent-hub-process-state", processAuditRecord(state, verdict)); }
|
|
470
|
+
catch { processPersistenceBlocked = true; }
|
|
414
471
|
};
|
|
415
472
|
// Duplicate-dispatch guard: fingerprints of (agent, task) already dispatched
|
|
416
473
|
// THIS turn. Auto-research resumes and /af-agents-restart call dispatchAgent
|
|
@@ -437,6 +494,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
437
494
|
const communicationStore = createCommunicationStore();
|
|
438
495
|
let triageRuntime: ReturnType<typeof createTriageRuntime> | null = null;
|
|
439
496
|
let proactiveRuntime: ReturnType<typeof createProactiveRuntime> | null = null;
|
|
497
|
+
let system1Snapshot: ReturnType<typeof loadSystem1Snapshot> = normalizeSystem1Config(null);
|
|
440
498
|
let proactiveConfig: ProactiveConfig | null = null;
|
|
441
499
|
let proactiveHubDeliveries = 0;
|
|
442
500
|
const proactiveReportInput = () => proactiveRuntime ? { records: proactiveRuntime.records, history: proactiveRuntime.findings.history, current: proactiveRuntime.findings.current, activity: proactiveRuntime.activity.live(), feedback: { hubDelivered: proactiveHubDeliveries, nativeDelivered: null } } : undefined;
|
|
@@ -453,6 +511,12 @@ export default function (pi: ExtensionAPI) {
|
|
|
453
511
|
let delegatedTokens = 0;
|
|
454
512
|
|
|
455
513
|
const noProgress = createNoProgressGuard((type, data) => pi.appendEntry(type, data));
|
|
514
|
+
const taskTriageMetadata = () => {
|
|
515
|
+
const current = taskTriage?.current;
|
|
516
|
+
return { taskId: noProgress.taskId(), inputRevision: taskTriage?.inputRevision, configuredStatus: taskTriageConfigStatus,
|
|
517
|
+
runtimeBlocks: [...(processPersistenceBlocked ? ["process_persistence_blocked" as const] : []), ...(pendingTaskTransition ? ["task_transition_pending" as const] : [])],
|
|
518
|
+
assessment: current ? { taskId: current.taskId, evaluationId: current.evaluationId, inputRevision: current.revision, assessment: current.assessment } : undefined };
|
|
519
|
+
};
|
|
456
520
|
let taskIdentityReset: ReturnType<typeof createReservedTaskIdentityReset>;
|
|
457
521
|
let unknownToolCounter = createUnknownToolCounter({ limit: 3 });
|
|
458
522
|
const toolCatalogRuntime = createToolCatalogRuntime(catalogSnapshot("operator", []));
|
|
@@ -464,13 +528,15 @@ export default function (pi: ExtensionAPI) {
|
|
|
464
528
|
seenUnknownToolCalls.clear();
|
|
465
529
|
latestUnknownToolNotice = "";
|
|
466
530
|
};
|
|
531
|
+
let readWorkMode: () => string = () => "operator";
|
|
467
532
|
const budgetCtx = createBudgetContext({
|
|
468
533
|
getBudgetOverrides: () => budgetOverrides,
|
|
534
|
+
getWorkMode: () => readWorkMode(),
|
|
469
535
|
getTurnDispatchCount: () => turnDispatchCount, setTurnDispatchCount: value => { turnDispatchCount = value; },
|
|
470
536
|
getTurnResearchCount: () => turnResearchCount, setTurnResearchCount: value => { turnResearchCount = value; },
|
|
471
537
|
getTurnBudgetAskUserWaitMs: () => turnBudgetAskUserWaitMs, setTurnBudgetAskUserWaitMs: value => { turnBudgetAskUserWaitMs = value; },
|
|
472
538
|
resetBudgetRecovery: () => budgetRecovery.reset(),
|
|
473
|
-
resetNoProgress: () => noProgress.reset(), resetUnknownToolCounter: resetUnknownToolCounterForCurrentTask,
|
|
539
|
+
resetNoProgress: (persistTaskIdentity) => noProgress.reset(persistTaskIdentity), resetUnknownToolCounter: resetUnknownToolCounterForCurrentTask,
|
|
474
540
|
getTaskContinuationCount: () => taskContinuationCount, setTaskContinuationCount: value => { taskContinuationCount = value; },
|
|
475
541
|
getTurnContinuationCount: () => turnContinuationCount, setTurnContinuationCount: value => { turnContinuationCount = value; },
|
|
476
542
|
getTaskDispatchCount: () => taskDispatchCount, setTaskDispatchCount: value => { taskDispatchCount = value; },
|
|
@@ -656,6 +722,11 @@ export default function (pi: ExtensionAPI) {
|
|
|
656
722
|
modelForResearch: state => shortModel(state.model) + thinkingSuffix(resolvedThinking(state.def)),
|
|
657
723
|
modelForPeer: abbreviateModel,
|
|
658
724
|
getSystem1: () => watchdogActivity?.live() ?? null,
|
|
725
|
+
getTaskTriage: () => {
|
|
726
|
+
if (!taskTriageConfigured && !processState.additions?.length) return null;
|
|
727
|
+
try { return { ...taskTriageMetadata(), process: { schema: processState.schema, ...evaluateProcessObligations(processState, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER }) } }; }
|
|
728
|
+
catch { return { ...taskTriageMetadata(), process: { schema: "invalid" } }; }
|
|
729
|
+
},
|
|
659
730
|
getProactive: () => proactiveRuntime ? { records: proactiveRuntime.records, history: proactiveRuntime.findings.history, current: proactiveRuntime.findings.current, activity: proactiveRuntime.activity.live() } : null,
|
|
660
731
|
});
|
|
661
732
|
let fleetActions: ReturnType<typeof createFleetActions<AgentState, ResearchState>> | null = null;
|
|
@@ -720,6 +791,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
720
791
|
|
|
721
792
|
const nativeDispatch = createDispatchNative({
|
|
722
793
|
getAgentState: key => agentStates.get(key),
|
|
794
|
+
getProcessState: () => processState,
|
|
723
795
|
listAgentStates: () => Array.from(agentStates.values()),
|
|
724
796
|
getSessionDir: () => sessionDir,
|
|
725
797
|
getDispatchPolicy: () => dispatchPolicy,
|
|
@@ -845,6 +917,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
845
917
|
|
|
846
918
|
function pendingCapabilityOperations(): PendingOperation[] {
|
|
847
919
|
const pending: PendingOperation[] = [];
|
|
920
|
+
if (pendingTaskTransition) pending.push({ pack: "fleet", kind: "task-transition" });
|
|
921
|
+
if (processOpenObligations(processState).some(stage => stage === "plan" || stage === "review")) pending.push({ pack: "fleet", kind: "process-stage" });
|
|
848
922
|
if (Array.from(agentStates.values()).some(state => state.status === "running") || Array.from(researchStates.values()).some(state => state.status === "running")) pending.push({ pack: "fleet", kind: "child" });
|
|
849
923
|
if (pendingReplies.size > 0 || pendingHandoff) pending.push({ pack: "peer", kind: "message" });
|
|
850
924
|
if (hubSpawnedPeers.size > 0) pending.push({ pack: "workspace", kind: "pane" });
|
|
@@ -871,6 +945,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
871
945
|
const workModePolicy = createWorkModePolicy({
|
|
872
946
|
getBaselineTools: () => baselineTools, getRosterSize: () => agentStates.size,
|
|
873
947
|
getDeterministicToolsEnabled: () => resolveAssist(readActiveProfile()?.profile.assist)['deterministic-tools'],
|
|
948
|
+
getDispatchTriageEnabled: () => triageRuntime?.available === true,
|
|
874
949
|
activateFallbackRoster: ctx => {
|
|
875
950
|
if (!rosterPolicy.activateFirstValidTeam()) return;
|
|
876
951
|
workModePolicy.clearRosterRecovery();
|
|
@@ -893,6 +968,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
893
968
|
applyWorkModeTools, modelWorkBlockedByRosterRecovery,
|
|
894
969
|
statusText: workModeStatusText, applySelection: applyWorkModeSelection, openPicker: openWorkModePicker,
|
|
895
970
|
} = workModePolicy;
|
|
971
|
+
readWorkMode = () => getWorkMode();
|
|
896
972
|
|
|
897
973
|
|
|
898
974
|
const toolCtx: ToolContext = createToolExecutionOrchestration({
|
|
@@ -904,7 +980,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
904
980
|
getTaskResearchCount: () => taskResearchCount, setTaskResearchCount: value => { taskResearchCount = value; },
|
|
905
981
|
getTaskReviewRounds: () => taskReviewRounds, setTaskReviewRounds: value => { taskReviewRounds = value; },
|
|
906
982
|
getTaskTier: () => taskTier, getTurnReport: () => turnReport, getSessionTotals: () => sessionTotals,
|
|
907
|
-
getProcessState: () => processState, setProcessState: value => { processState = value; }, persistProcessVerdict,
|
|
983
|
+
getProcessState: () => processState, setProcessState: value => { processState = value; }, persistProcessVerdict, processBlock,
|
|
908
984
|
getTurnDispatchFingerprints: () => turnDispatchFingerprints,
|
|
909
985
|
getExternalBlockers: () => externalBlockers,
|
|
910
986
|
getExternalBlockerAcknowledged: () => externalBlockerAcknowledged, setExternalBlockerAcknowledged: value => { externalBlockerAcknowledged = value; },
|
|
@@ -926,6 +1002,20 @@ export default function (pi: ExtensionAPI) {
|
|
|
926
1002
|
getTaskTier: () => taskTier, setTaskTier: value => { taskTier = value; },
|
|
927
1003
|
getTaskTierAssumed: () => taskTierAssumed, setTaskTierAssumed: value => { taskTierAssumed = value; },
|
|
928
1004
|
getProcessState: () => processState, setProcessState: value => { processState = value; },
|
|
1005
|
+
processBlock, adoptTaskTriage: async (id, newTask, expandedScope) => {
|
|
1006
|
+
if (processPersistenceBlocked) throw new Error("corrupt process state");
|
|
1007
|
+
const next = await adoptTaskTriageState({ runtime: taskTriage, taskId: id, newTask,
|
|
1008
|
+
expandedScope, pendingTransition: pendingTaskTransition, state: processState,
|
|
1009
|
+
persist: state => pi.appendEntry("agent-hub-process-state", processAuditRecord(state, evaluateProcessObligations(state, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER }))),
|
|
1010
|
+
onPostCommitFailure: () => { processPersistenceBlocked = true; },
|
|
1011
|
+
});
|
|
1012
|
+
pendingTaskTransition = false;
|
|
1013
|
+
transitionDiversions = 0;
|
|
1014
|
+
transitionHintDelivered = false;
|
|
1015
|
+
transitionBatchRefused = false;
|
|
1016
|
+
try { pi.appendEntry(TASK_TRANSITION_ENTRY_TYPE, { pending: false }); } catch { processPersistenceBlocked = true; }
|
|
1017
|
+
return next;
|
|
1018
|
+
},
|
|
929
1019
|
persistProcessState: value => persistProcessVerdict(value, evaluateProcessObligations(value, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER })),
|
|
930
1020
|
getTaskDispatchCount: () => taskDispatchCount, getTaskResearchCount: () => taskResearchCount,
|
|
931
1021
|
getTurnReport: () => turnReport, getAssertions: () => assertions, setAssertions: value => { assertions = value; },
|
|
@@ -937,6 +1027,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
937
1027
|
appendMachineHandoffSections, markPeerAddressed,
|
|
938
1028
|
},
|
|
939
1029
|
herdr: {
|
|
1030
|
+
getProcessState: () => processState, processBlock,
|
|
940
1031
|
provisionalCapabilityRefusal, isFleetReady: () => herdrFleetReady, isComsReady: () => comsReady,
|
|
941
1032
|
getIdentity: () => identity, getCurrentContext: () => currentCtx, peersInScope,
|
|
942
1033
|
getComsPeerNames: () => peersInScope().map(peer => peer.name), herdr: herdrApi,
|
|
@@ -952,7 +1043,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
952
1043
|
const candidates = [...agentStates.values()].map(s => {
|
|
953
1044
|
const name = s.def.name.toLowerCase();
|
|
954
1045
|
const research = ["researcher", "deep-researcher", ...researchPersonas.map(p => p.name.toLowerCase())].includes(name);
|
|
955
|
-
const gate = processPreEffectGate(processState, "child", name) ?? (processAllowsPersona(processState,name) ? null : checkTierPersonaGate(taskTier,name)) ?? checkReviewRoundCap(taskTier,name,taskReviewRounds) ?? checkDocsLane(name, scope, undefined) ?? taskGate ?? turnGate;
|
|
1046
|
+
const gate = processBlock() ?? processPreEffectGate(processState, "child", name) ?? (processAllowsPersona(processState,name) ? null : checkTierPersonaGate(taskTier,name)) ?? checkReviewRoundCap(taskTier,name,taskReviewRounds) ?? checkDocsLane(name, scope, undefined) ?? taskGate ?? turnGate;
|
|
956
1047
|
return { name, description: s.def.description, ...(research ? { excluded: "research_persona" } : s.status === "running" ? { excluded: "busy" } : gate ? { excluded: gate.reason } : {}) };
|
|
957
1048
|
});
|
|
958
1049
|
return { taskId: noProgress.taskId(), task, scope, language, domain, candidates, constraints: JSON.stringify({ tier: taskTier, process: { risk: processState.risk, scope: processState.scope }, externalBlocked: externalBlockers.length > 0 && !externalBlockerAcknowledged }), complete: !(externalBlockers.length > 0 && !externalBlockerAcknowledged) };
|
|
@@ -992,7 +1083,10 @@ export default function (pi: ExtensionAPI) {
|
|
|
992
1083
|
registerFleetTools(pi, toolCtx);
|
|
993
1084
|
registerFilesystemTool(pi, {
|
|
994
1085
|
enabled: () => resolveAssist(readActiveProfile()?.profile.assist)['deterministic-tools'],
|
|
1086
|
+
readOnly: () => getWorkMode() === "orchestrator",
|
|
995
1087
|
sessionDir: () => sessionDir,
|
|
1088
|
+
remainingSelfReadBytes: () => Math.max(0, 64 * 1024 - orchestratorSelfReadUsed),
|
|
1089
|
+
noteSelfReadBytes: bytes => { orchestratorSelfReadUsed += bytes; },
|
|
996
1090
|
});
|
|
997
1091
|
|
|
998
1092
|
const researchControls = createResearchControls({
|
|
@@ -1040,9 +1134,38 @@ export default function (pi: ExtensionAPI) {
|
|
|
1040
1134
|
getWorkModeStatusText: workModeStatusText,
|
|
1041
1135
|
openWorkModePicker,
|
|
1042
1136
|
handleBudgetContinue: async ctx => { await budgetRecovery.resume(ctx); },
|
|
1137
|
+
handleTaskTriageRecover: () => {
|
|
1138
|
+
if (!processPersistenceBlocked) return false;
|
|
1139
|
+
try {
|
|
1140
|
+
const recovered = recoverTaskTriageProcessState({ state: processState, current: taskTriage?.current ? { taskId: taskTriage.current.taskId, evaluationId: taskTriage.current.evaluationId, inputRevision: taskTriage.current.revision, assessment: taskTriage.current.assessment } : null,
|
|
1141
|
+
taskId: noProgress.taskId(), budgetTier: taskTier ?? DEFAULT_TASK_TIER,
|
|
1142
|
+
append: record => pi.appendEntry("agent-hub-process-state", record),
|
|
1143
|
+
entries: () => currentCtx?.sessionManager.getEntries() ?? [],
|
|
1144
|
+
});
|
|
1145
|
+
processState = recovered;
|
|
1146
|
+
processPersistenceBlocked = false;
|
|
1147
|
+
resolveIncomingCapabilities(""); applyWorkModeTools();
|
|
1148
|
+
return true;
|
|
1149
|
+
} catch { return false; }
|
|
1150
|
+
},
|
|
1151
|
+
handleTaskTriageWaive: async (args, ctx) => {
|
|
1152
|
+
const [id, ...words] = args.trim().split(/\s+/);
|
|
1153
|
+
const addition = processState.additions?.find(a => a.id === id && a.status === "active" && a.taskId === noProgress.taskId());
|
|
1154
|
+
if (!addition || !words.length || processBlock()) return false;
|
|
1155
|
+
const next = await confirmTaskTriageWaiver(processState, { taskId: addition.taskId, evaluationId: addition.evaluationId, inputRevision: addition.inputRevision, additionId: id, reason: words.join(" ") }, {
|
|
1156
|
+
taskId: () => noProgress.taskId(), inputRevision: () => taskTriage?.current?.revision ?? "",
|
|
1157
|
+
ask: (nonce, question, askCtx, signal) => requestRuntimeAsk(pi.events, nonce, question, askCtx, signal),
|
|
1158
|
+
startWait: nonce => executionHistory.startAskUser(nonce), endWait: (nonce, sameTask) => { const wait = executionHistory.endAskUser(nonce, Date.now()); if (sameTask && wait > 0) { taskClock = addTaskClockWait(taskClock, wait); turnBudgetAskUserWaitMs += wait; } },
|
|
1159
|
+
persist: value => pi.appendEntry("agent-hub-process-state", processAuditRecord(value, evaluateProcessObligations(value, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER }))),
|
|
1160
|
+
}, ctx);
|
|
1161
|
+
if (next) processState = next;
|
|
1162
|
+
return !!next;
|
|
1163
|
+
},
|
|
1043
1164
|
handleAudit: async (ctx, args = "") => {
|
|
1044
1165
|
const input = proactiveReportInput();
|
|
1045
|
-
await showSessionAudit(ctx, sessionDir, input && { ...input, labels: commandProactiveLabels(sessionDir, args) }
|
|
1166
|
+
await showSessionAudit(ctx, sessionDir, input && { ...input, labels: commandProactiveLabels(sessionDir, args) }, {
|
|
1167
|
+
...taskTriageMetadata(), activity: taskTriageActivity?.live(),
|
|
1168
|
+
});
|
|
1046
1169
|
},
|
|
1047
1170
|
handleRetry: async (args, ctx) => {
|
|
1048
1171
|
const dispatchId = args?.trim();
|
|
@@ -1795,6 +1918,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
1795
1918
|
registerRetry(pi, commandCtx);
|
|
1796
1919
|
registerRecover(pi, commandCtx);
|
|
1797
1920
|
registerDebate(pi, commandCtx);
|
|
1921
|
+
registerTaskTriageRecover(pi, commandCtx);
|
|
1922
|
+
registerTaskTriageWaiver(pi, commandCtx);
|
|
1798
1923
|
|
|
1799
1924
|
const detailPanel = createDetailPanel<AgentDef, AgentState, ResearchState>({
|
|
1800
1925
|
getAgent: key => agentStates.get(key),
|
|
@@ -1837,6 +1962,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1837
1962
|
onThinkingChanged: updateWidget,
|
|
1838
1963
|
openSystem1: ctx => openSystem1Communication(ctx, communicationStore),
|
|
1839
1964
|
getFleetRows: (now, unfiltered) => fleetSource.rows(now, unfiltered ? { showFinished: true } : { showFinished: fleetShowFinished, query: fleetFilter }),
|
|
1965
|
+
getTaskTriage: () => fleetSource.snapshot(Date.now()).taskTriage,
|
|
1840
1966
|
getProactive: () => fleetSource.snapshot(Date.now()).proactive,
|
|
1841
1967
|
readProactiveEvidence: (finding) => proactiveRuntime?.findings.readback(finding.snapshotHandle, finding.snapshotHash, finding.snapshotId, finding.unitId, finding.excerptHash) ?? null,
|
|
1842
1968
|
actions: fleetActions,
|
|
@@ -1939,10 +2065,44 @@ export default function (pi: ExtensionAPI) {
|
|
|
1939
2065
|
// ask_user call with its tool_execution start/end so /af-agents-history can subtract
|
|
1940
2066
|
// that "away from keyboard" time from the dispatcher's real work.
|
|
1941
2067
|
// T11 production pre-effect gate: operator direct side effects use the same task-scoped process state as child dispatch.
|
|
1942
|
-
pi.on("tool_call", async (event: any) => {
|
|
1943
|
-
|
|
2068
|
+
pi.on("tool_call", async (event: any, ctx) => {
|
|
2069
|
+
const toolName = String(event.toolName || "").toLowerCase();
|
|
2070
|
+
const block = processBlock();
|
|
2071
|
+
// set_task_tier binds the fence. ask_user is the human supersession path. Every other tool is a diversion.
|
|
2072
|
+
// The first assistant step may emit several tools together. Refuse that whole step without aborting,
|
|
2073
|
+
// so the model can still call set_task_tier. Abort only a later step that ignores the hint; terminate
|
|
2074
|
+
// alone cannot stop siblings whose calls already returned.
|
|
2075
|
+
if (block && toolName !== "set_task_tier" && toolName !== "ask_user") {
|
|
2076
|
+
const decision = transitionToolDecision(transitionHintDelivered, transitionDiversions, block.message);
|
|
2077
|
+
transitionDiversions = decision.nextCount;
|
|
2078
|
+
transitionBatchRefused = true;
|
|
2079
|
+
if (decision.terminate) ctx?.abort?.();
|
|
2080
|
+
return { block: true, terminate: decision.terminate, reason: decision.reason };
|
|
2081
|
+
}
|
|
2082
|
+
if (!["bash", "edit", "write"].includes(toolName)) return;
|
|
1944
2083
|
const gate = processPreEffectGate(processState, "write");
|
|
1945
|
-
if (gate) return
|
|
2084
|
+
if (!gate) return;
|
|
2085
|
+
if (gate.reason !== "action_confirmation_unsupported") return { block: true, reason: gate.message };
|
|
2086
|
+
const bound = taskTriage?.current;
|
|
2087
|
+
// Pi's tool_call contract provides the exact call id and input; absent fields cannot be bound.
|
|
2088
|
+
if (!bound || bound.taskId !== noProgress.taskId() || !event.toolCallId || !event.input || !ctx) return { block: true, reason: gate.message };
|
|
2089
|
+
const action = { taskId: bound.taskId, inputRevision: bound.revision, actionId: String(event.toolCallId), operation: String(event.toolName), target: crypto.createHash("sha256").update(JSON.stringify(event.input)).digest("hex"), cwd: ctx.cwd };
|
|
2090
|
+
const observeAction = (status: TaskTriageActionObservation) => {
|
|
2091
|
+
try { const record = taskTriageActionAuditRecord(action, status); if (record) pi.appendEntry("agent-hub-task-triage-action-observation", record); }
|
|
2092
|
+
catch { /* Diagnostic trace cannot alter effect authorization. */ }
|
|
2093
|
+
};
|
|
2094
|
+
observeAction("requested");
|
|
2095
|
+
const grant = await confirmTaskTriageAction(action, {
|
|
2096
|
+
taskId: () => noProgress.taskId(), inputRevision: () => taskTriage?.current?.revision ?? "",
|
|
2097
|
+
ask: (id, question, askCtx, signal) => requestRuntimeAsk(pi.events, id, question, askCtx, signal),
|
|
2098
|
+
startWait: id => executionHistory.startAskUser(id), endWait: (id, sameTask) => { const wait = executionHistory.endAskUser(id, Date.now()); if (sameTask && wait > 0) { taskClock = addTaskClockWait(taskClock, wait); turnBudgetAskUserWaitMs += wait; } },
|
|
2099
|
+
}, ctx, contract => { pi.appendEntry("agent-hub-task-triage-action-grant", contract); return true; }, undefined, { input: event.input, cwd: ctx.cwd });
|
|
2100
|
+
if (processBlock() || ctx.cwd !== action.cwd || String(event.toolName) !== action.operation || String(event.toolCallId) !== action.actionId
|
|
2101
|
+
|| noProgress.taskId() !== action.taskId || taskTriage?.current?.revision !== action.inputRevision
|
|
2102
|
+
|| crypto.createHash("sha256").update(JSON.stringify(event.input)).digest("hex") !== action.target) return { block: true, reason: "Action changed while confirmation was pending; effect refused." };
|
|
2103
|
+
if (!grant || !consumeActionGrant(grant, action)) { observeAction("not_granted"); return { block: true, reason: gate.message }; }
|
|
2104
|
+
try { pi.appendEntry("agent-hub-task-triage-action-consumed", action); }
|
|
2105
|
+
catch { observeAction("consumption_failed"); return { block: true, reason: "One-use authorization consumption could not be persisted; effect refused." }; }
|
|
1946
2106
|
});
|
|
1947
2107
|
pi.on("tool_execution_start", async event => turnHandlers.toolStart(event));
|
|
1948
2108
|
observeAskUserResults(({ params, result, phase }) => {
|
|
@@ -2019,7 +2179,10 @@ export default function (pi: ExtensionAPI) {
|
|
|
2019
2179
|
function buildHubSystemPrompt(): { systemPrompt: string } {
|
|
2020
2180
|
const built = assembleHubPrompt(hubPromptCtx);
|
|
2021
2181
|
lastHubLedger = built.ledger;
|
|
2022
|
-
|
|
2182
|
+
const names = new Set(Array.from(agentStates.values(), s => s.def.name.toLowerCase()));
|
|
2183
|
+
const missingRoles = missingProcessRoleRecoveryHints(processState, names);
|
|
2184
|
+
const additions = activeAdditionRecoveryHints(processState, noProgress.taskId(), taskTriage?.current?.revision);
|
|
2185
|
+
return { systemPrompt: `${built.systemPrompt}\n\nTask-triage (experimental, uncertain): ${JSON.stringify(taskTriage?.status ?? { status: "skipped", detail: "consumer_off" })}. This does not change budget or authorize effects.${processBlock() ? ` BLOCKED: ${processBlock()!.message}` : ""}${missingRoles ? ` ${missingRoles} Never auto-raise tier or substitute an unrelated role.` : ""}${additions ? ` ${additions}` : ""}` };
|
|
2023
2186
|
}
|
|
2024
2187
|
|
|
2025
2188
|
const turnHandlers = createTurnLifecycleHandlers({
|
|
@@ -2041,6 +2204,29 @@ export default function (pi: ExtensionAPI) {
|
|
|
2041
2204
|
respondToPeer: ctx => coms.respond(ctx),
|
|
2042
2205
|
});
|
|
2043
2206
|
pi.on("before_agent_start", async () => {
|
|
2207
|
+
if (taskTriageTestTransportActive && process.env.AGENT_HUB_TASK_TRIAGE_FAKE_STATE_RECORD) {
|
|
2208
|
+
try { fs.appendFileSync(process.env.AGENT_HUB_TASK_TRIAGE_FAKE_STATE_RECORD, JSON.stringify({ pid: process.pid, phase: "before_agent_start", consumerPresent: !!taskTriage, consumerStatus: taskTriage?.status.status ?? null, consumerDetail: taskTriage?.status.detail ?? null, calls: taskTriage?.calls ?? null, processPersistenceBlocked, rosterBlocked: !!currentCtx && modelWorkBlockedByRosterRecovery(currentCtx), pendingTaskTransition }) + "\n"); } catch { /* diagnostic only */ }
|
|
2209
|
+
}
|
|
2210
|
+
// Pressure/roster recovery gates run first; assessment runs before this model input.
|
|
2211
|
+
if (taskTriage && !processPersistenceBlocked && (!currentCtx || !modelWorkBlockedByRosterRecovery(currentCtx))) {
|
|
2212
|
+
// Persist the first task identity before binding a pre-model assessment:
|
|
2213
|
+
// compaction/resume must not mint a new ID for the same cached input.
|
|
2214
|
+
try { noProgress.persistTaskIdentity(); } catch { processPersistenceBlocked = true; }
|
|
2215
|
+
const assessment = processPersistenceBlocked ? null : await taskTriage.evaluate(noProgress.taskId());
|
|
2216
|
+
// Guarded offline fixture diagnostics: metadata only, never task text or provider payload.
|
|
2217
|
+
if (taskTriageTestTransportActive && process.env.AGENT_HUB_TASK_TRIAGE_FAKE_STATE_RECORD) {
|
|
2218
|
+
try { fs.appendFileSync(process.env.AGENT_HUB_TASK_TRIAGE_FAKE_STATE_RECORD, JSON.stringify({ pid: process.pid, phase: "assessment", inputRevision: assessment?.revision ?? null, fingerprint: assessment?.fingerprint ?? null, taskId: assessment?.taskId ?? null, status: assessment?.assessment.status ?? null, calls: taskTriage.calls, pendingTaskTransition, processPersistenceBlocked }) + "\n"); } catch { /* diagnostic only */ }
|
|
2219
|
+
}
|
|
2220
|
+
if (assessment && !pendingTaskTransition && !processPersistenceBlocked) {
|
|
2221
|
+
try {
|
|
2222
|
+
const next = applyTaskTriageAdditions(processState, assessment.assessment, { taskId: assessment.taskId, evaluationId: assessment.evaluationId, inputRevision: assessment.revision });
|
|
2223
|
+
pi.appendEntry("agent-hub-process-state", processAuditRecord(next, evaluateProcessObligations(next, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER })));
|
|
2224
|
+
processState = next;
|
|
2225
|
+
} catch { processPersistenceBlocked = true; }
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
// Assessment can open a plan/review lease after input resolved its original packs.
|
|
2229
|
+
if (taskTriage) workModePolicy.refreshCapabilities();
|
|
2044
2230
|
const result = turnHandlers.beforeAgentStart();
|
|
2045
2231
|
toolCatalogRuntime.beginTurn();
|
|
2046
2232
|
return result;
|
|
@@ -2054,6 +2240,12 @@ export default function (pi: ExtensionAPI) {
|
|
|
2054
2240
|
sendUserMessage: (content, options) => pi.sendUserMessage(content as any, options),
|
|
2055
2241
|
resolveCapabilities: resolveIncomingCapabilities, applyWorkMode: applyWorkModeTools,
|
|
2056
2242
|
modelWorkBlocked: modelWorkBlockedByRosterRecovery,
|
|
2243
|
+
onAcceptedInput: (text, source, replayed) => {
|
|
2244
|
+
if ((source === "extension" && !replayed) || !text.trim()) return;
|
|
2245
|
+
if (evaluatedTaskTriageInputChanged(taskTriage?.current ?? null, text)) { pendingTaskTransition = true; transitionDiversions = 0; transitionHintDelivered = false; transitionBatchRefused = false; try { pi.appendEntry(TASK_TRANSITION_ENTRY_TYPE, { pending: true }); } catch { processPersistenceBlocked = true; } }
|
|
2246
|
+
hubTaskText = text;
|
|
2247
|
+
taskTriage?.input(text, "interactive");
|
|
2248
|
+
},
|
|
2057
2249
|
});
|
|
2058
2250
|
function replayDeferredRecoveryInputs(): void { pressureLifecycle.replayDeferred(); }
|
|
2059
2251
|
pi.on("message_end", async (event, ctx) => {
|
|
@@ -2064,8 +2256,10 @@ export default function (pi: ExtensionAPI) {
|
|
|
2064
2256
|
}
|
|
2065
2257
|
pressureLifecycle.messageEnd(event, ctx);
|
|
2066
2258
|
});
|
|
2067
|
-
pi.on("turn_start", event => hubCapture.start(event.turnIndex));
|
|
2259
|
+
pi.on("turn_start", event => { orchestratorSelfReadUsed = 0; hubCapture.start(event.turnIndex); });
|
|
2068
2260
|
pi.on("turn_end", async (event, ctx) => {
|
|
2261
|
+
if (transitionBatchRefused && pendingTaskTransition) transitionHintDelivered = true;
|
|
2262
|
+
transitionBatchRefused = false;
|
|
2069
2263
|
pressureLifecycle.turnEnd(ctx);
|
|
2070
2264
|
const text = event.message.role === "assistant" ? event.message.content.filter(c => c.type === "text").map(c => c.text).join("") : "";
|
|
2071
2265
|
hubCapture.end(event.turnIndex, text);
|
|
@@ -2079,7 +2273,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
2079
2273
|
pi.on("agent_settled", async (_event, ctx) => pressureLifecycle.agentSettled(ctx));
|
|
2080
2274
|
pi.on("session_compact", async (_event, ctx) => {
|
|
2081
2275
|
noProgress.compact(ctx.sessionManager.getEntries());
|
|
2082
|
-
persistProcessVerdict(processState, evaluateProcessObligations(processState, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER }));
|
|
2276
|
+
if (!processPersistenceBlocked) persistProcessVerdict(processState, evaluateProcessObligations(processState, { writable: true, budgetTier: taskTier ?? DEFAULT_TASK_TIER }));
|
|
2083
2277
|
const result = toolCatalogRuntime.compact({
|
|
2084
2278
|
mode: getWorkMode(), getEffectiveTools: () => pi.getActiveTools(),
|
|
2085
2279
|
persist: (type, data) => pi.appendEntry(type, data), counterSnapshot: () => unknownToolCounter.snapshot(),
|
|
@@ -2091,9 +2285,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
2091
2285
|
if (result) latestToolCatalogDelta = result.delta;
|
|
2092
2286
|
});
|
|
2093
2287
|
pi.on("input", async (event, ctx) => {
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
return pressureLifecycle.input(event, ctx);
|
|
2288
|
+
const outcome = pressureLifecycle.input(event, ctx);
|
|
2289
|
+
return { action: outcome.action };
|
|
2097
2290
|
});
|
|
2098
2291
|
|
|
2099
2292
|
// ── Session Start ────────────────────────────
|
|
@@ -2115,7 +2308,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
2115
2308
|
resetAccessApproval: accessApprovalRouter.reset,
|
|
2116
2309
|
terminateResearch: () => { for (const st of researchStates.values()) if (st.proc && st.status === "running") { st.killedByOperator = true; st.proc.kill("SIGTERM"); } },
|
|
2117
2310
|
resetResearch: researchRuntime.reset, resetHistory: executionHistory.reset,
|
|
2118
|
-
resetBudgets: () => { hubCapture.reset(); hubTaskText = undefined; proactiveRuntime = null; proactiveConfig = null; proactiveHubDeliveries = 0; taskClock = createTaskClock(); turnBudgetAskUserWaitMs = 0; turnContinuationCount = 0; taskContinuationCount = 0; budgetRecovery.reset(); noProgress.prepareSessionRestore(); resetUnknownToolCounterForCurrentTask(); toolCatalogRuntime.restore(catalogSnapshot(getWorkMode(), [])); latestToolCatalogDelta = null; },
|
|
2311
|
+
resetBudgets: () => { hubCapture.reset(); hubTaskText = undefined; proactiveRuntime = null; proactiveConfig = null; system1Snapshot = normalizeSystem1Config(null); proactiveHubDeliveries = 0; taskClock = createTaskClock(); turnBudgetAskUserWaitMs = 0; turnContinuationCount = 0; taskContinuationCount = 0; budgetRecovery.reset(); noProgress.prepareSessionRestore(); resetUnknownToolCounterForCurrentTask(); toolCatalogRuntime.restore(catalogSnapshot(getWorkMode(), [])); latestToolCatalogDelta = null; },
|
|
2119
2312
|
clearWidgets: _ctx => { fleetUiGeneration++; fleetActions?.reset(); gridUI.dispose(); },
|
|
2120
2313
|
closeDelegationWatchers: () => { for (const st of agentStates.values()) { st.delegationsWatcher?.close(); st.delegationsWatcher = undefined; } },
|
|
2121
2314
|
resetSessionState: ctx => { delegatedTokens = 0; hubSpawnedPeers.clear(); widgetCtx = ctx; contextWindow = ctx.model?.contextWindow || 0; gridUI.reset(); },
|
|
@@ -2145,7 +2338,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
2145
2338
|
},
|
|
2146
2339
|
initializeExemptions: (_ctx) => {
|
|
2147
2340
|
try {
|
|
2148
|
-
|
|
2341
|
+
system1Snapshot = loadSystem1Snapshot(_ctx.cwd || process.cwd());
|
|
2342
|
+
const config = loadProactiveConfig(_ctx.cwd || process.cwd(), system1Snapshot);
|
|
2149
2343
|
if (isCaptureEnabled(config)) proactiveConfig = config;
|
|
2150
2344
|
} catch { /* invalid config fails closed */ }
|
|
2151
2345
|
// ── Damage-control shared exemptions file ──
|
|
@@ -2183,18 +2377,37 @@ export default function (pi: ExtensionAPI) {
|
|
|
2183
2377
|
watchdogSystem1 = disposeWatchdogSystem1Session(watchdogSystem1);
|
|
2184
2378
|
communicationStore.dispose();
|
|
2185
2379
|
triageRuntime?.dispose(); triageRuntime = null;
|
|
2380
|
+
taskTriage?.dispose(); taskTriage = null;
|
|
2381
|
+
taskTriageActivity?.dispose(); taskTriageActivity = null;
|
|
2186
2382
|
try { watchdogActivity?.dispose(); } catch { /* trace disposal must not block the session */ }
|
|
2187
2383
|
// Stable for a real session across snapshot replacement; G2 must not split one session into artificial samples.
|
|
2188
2384
|
watchdogActivity = sessionDir ? createWatchdogActivity({ directory: `${sessionDir}/artifacts/watchdog`, sessionId: path.basename(sessionDir) }) : null;
|
|
2385
|
+
const taskTriageTestTransport = resolveTaskTriageTestTransport();
|
|
2386
|
+
taskTriageTestTransportActive = !!taskTriageTestTransport;
|
|
2189
2387
|
watchdogSystem1 = createWatchdogSystem1Session({ ...readWatchdogSystem1Snapshot({
|
|
2190
2388
|
cwd: _ctx.cwd,
|
|
2389
|
+
snapshot: system1Snapshot,
|
|
2191
2390
|
configuredMode: sessionOverrides.watchdogSystem1Mode,
|
|
2192
2391
|
watchdogSetting: sessionOverrides.watchdogSetting,
|
|
2193
2392
|
env: process.env,
|
|
2393
|
+
transport: taskTriageTestTransport,
|
|
2194
2394
|
warnings: sessionOverrides.warnings,
|
|
2195
2395
|
}), wrapService: service => communicationStore.wrap(service, { provider: "typesafe", model: "jev-1.13.0" }) });
|
|
2196
|
-
|
|
2197
|
-
|
|
2396
|
+
const triageConfig = (system1Snapshot?.consumers.dispatchTriage.config ?? null) as TriageConfig | null;
|
|
2397
|
+
const taskTriageConfig = loadTaskTriageConfig(_ctx.cwd || process.cwd(), system1Snapshot);
|
|
2398
|
+
const sharedService = watchdogSystem1?.sharedService;
|
|
2399
|
+
const serviceUnavailableReason = watchdogSystem1?.readiness.status === "ready" ? "unavailable" : watchdogSystem1?.readiness.reason ?? "unavailable";
|
|
2400
|
+
taskTriageConfigured = taskTriageConfig.status !== "missing";
|
|
2401
|
+
taskTriageConfigStatus = taskTriageConfig.status === "active" ? "active" : taskTriageConfig.status === "invalid" ? "invalid" : "off";
|
|
2402
|
+
taskTriageActivity = taskTriageConfig.status === "active" ? createTaskTriageActivity({ directory: sessionDir ? path.join(sessionDir, "artifacts/task-triage-activity") : undefined }) : null;
|
|
2403
|
+
taskTriage = taskTriageConfig.status === "active" ? createTaskTriageRuntime({ root: _ctx.cwd || process.cwd(), service: sharedService, serviceUnavailableReason, persist: state => pi.appendEntry(TASK_TRIAGE_RUNTIME_ENTRY, state), observer: taskTriageActivity! }) : null;
|
|
2404
|
+
if (taskTriageTestTransportActive && process.env.AGENT_HUB_TASK_TRIAGE_FAKE_STATE_RECORD) {
|
|
2405
|
+
try { fs.appendFileSync(process.env.AGENT_HUB_TASK_TRIAGE_FAKE_STATE_RECORD, JSON.stringify({ pid: process.pid, phase: "service_init", configStatus: taskTriageConfig.status, consumerPresent: !!taskTriage, fakeTransportActive: taskTriageTestTransportActive, sharedServiceReady: !!sharedService, serviceUnavailableReason }) + "\n"); } catch { /* diagnostic only */ }
|
|
2406
|
+
}
|
|
2407
|
+
if (taskTriage && !sharedService) {
|
|
2408
|
+
try { _ctx.ui.notify(`Task triage is enabled but unavailable (${serviceUnavailableReason}); no inference or new requirements will be added. Existing process obligations remain enforced.`, "warning"); }
|
|
2409
|
+
catch { /* Optional UI must not change process enforcement. The prompt retains the status. */ }
|
|
2410
|
+
}
|
|
2198
2411
|
triageRuntime = createTriageRuntime({ config: triageConfig, service: watchdogSystem1?.sharedService,
|
|
2199
2412
|
current: input => triageInput(input.task,input.scope,input.language,input.domain),
|
|
2200
2413
|
trace: event => pi.appendEntry("agent-hub-triage", event),
|
|
@@ -2203,7 +2416,10 @@ export default function (pi: ExtensionAPI) {
|
|
|
2203
2416
|
setLanguage: value => { userLanguage = value; },
|
|
2204
2417
|
setReconTimeout: value => { reconSearchTimeoutMs = value; }, setBudgetOverrides: value => { budgetOverrides = value; },
|
|
2205
2418
|
setWatchdog: (setting, judge) => { watchdogSetting = setting; watchdogJudgeModel = judge; },
|
|
2206
|
-
resetTurnCounts: () => { turnDispatchCount = 0; turnResearchCount = 0; },
|
|
2419
|
+
resetTurnCounts: () => { turnDispatchCount = 0; turnResearchCount = 0; },
|
|
2420
|
+
// Session setup clears in-memory budgets before restore, not the saved task.
|
|
2421
|
+
// A persisted reset here would append a new task event after the old one.
|
|
2422
|
+
resetTaskWindow: () => resetTaskWindow(null, Date.now(), false), updateModeStatus,
|
|
2207
2423
|
setProjectRules: value => { projectRulesDirs = value; }, setProjectDocs: value => { projectDocsPaths = value; },
|
|
2208
2424
|
resetModelPolicy: () => {modelPolicy.reset();profileActivation.reset();applyWorkModeTools();}, getModelProfileErrors: () => modelProfileErrors, getAgentDefs: () => allAgentDefs, getModelProfiles: () => modelProfiles,
|
|
2209
2425
|
deleteModelProfile: name => { delete modelProfiles[name]; }, allowedModels,
|
|
@@ -2225,8 +2441,20 @@ export default function (pi: ExtensionAPI) {
|
|
|
2225
2441
|
comsMissNotified.clear();
|
|
2226
2442
|
recomputeGrid();
|
|
2227
2443
|
const sessionEntries = _ctx.sessionManager.getEntries();
|
|
2228
|
-
|
|
2229
|
-
|
|
2444
|
+
// Resume restores the persisted fence. A missing entry is the legacy clear state.
|
|
2445
|
+
pendingTaskTransition = latestPendingTaskTransition(sessionEntries);
|
|
2446
|
+
transitionDiversions = 0;
|
|
2447
|
+
transitionHintDelivered = false;
|
|
2448
|
+
transitionBatchRefused = false;
|
|
2449
|
+
try { processState = latestProcessState(sessionEntries); processPersistenceBlocked = false; }
|
|
2450
|
+
catch { processState = createProcessState(); processPersistenceBlocked = true; }
|
|
2451
|
+
taskTriage?.restore(sessionEntries);
|
|
2452
|
+
const savedTaskIds = new Set(processState.additions?.map(addition => addition.taskId));
|
|
2453
|
+
noProgress.restore(sessionEntries, savedTaskIds.size === 1 ? [...savedTaskIds][0] : undefined);
|
|
2454
|
+
if (processTaskIdentityConflicts(processState, noProgress.taskId())) processPersistenceBlocked = true;
|
|
2455
|
+
if (taskTriageTestTransportActive && process.env.AGENT_HUB_TASK_TRIAGE_FAKE_STATE_RECORD) {
|
|
2456
|
+
try { fs.appendFileSync(process.env.AGENT_HUB_TASK_TRIAGE_FAKE_STATE_RECORD, JSON.stringify({ pid: process.pid, phase: "restore", processPersistenceBlocked, savedTaskIdCount: savedTaskIds.size, taskIdMatchesAddition: savedTaskIds.size === 1 && savedTaskIds.has(noProgress.taskId()), consumerPresent: !!taskTriage, calls: taskTriage?.calls ?? null, consumerStatus: taskTriage?.status.status ?? null }) + "\n"); } catch { /* diagnostic only */ }
|
|
2457
|
+
}
|
|
2230
2458
|
const persistedCatalog = latestPersistedToolCatalog(sessionEntries);
|
|
2231
2459
|
if (persistedCatalog) toolCatalogRuntime.restore(persistedCatalog);
|
|
2232
2460
|
const persistedUnknownTools = latestPersistedUnknownToolCounter(sessionEntries);
|
|
@@ -2348,6 +2576,9 @@ export default function (pi: ExtensionAPI) {
|
|
|
2348
2576
|
watchdogSystem1 = disposeWatchdogSystem1Session(watchdogSystem1);
|
|
2349
2577
|
communicationStore.dispose();
|
|
2350
2578
|
triageRuntime?.dispose(); triageRuntime = null;
|
|
2579
|
+
taskTriage?.dispose(); taskTriage = null;
|
|
2580
|
+
taskTriageActivity?.dispose(); taskTriageActivity = null;
|
|
2581
|
+
taskTriageConfigStatus = "off"; taskTriageConfigured = false;
|
|
2351
2582
|
try { watchdogActivity?.dispose(); } catch { /* trace disposal must not block shutdown */ }
|
|
2352
2583
|
watchdogActivity = null;
|
|
2353
2584
|
for (const st of [...agentStates.values(), ...researchStates.values()]) {
|
|
@@ -11,9 +11,10 @@ export interface ContextPressureRootState {
|
|
|
11
11
|
automaticPending: boolean;
|
|
12
12
|
automaticRunning: boolean;
|
|
13
13
|
deferredReplayAllowance: number;
|
|
14
|
+
deferredReplayTexts: string[];
|
|
14
15
|
deferredInputs: DeferredRecoveryInput[];
|
|
15
16
|
}
|
|
16
|
-
export const createContextPressureRootState = (): ContextPressureRootState => ({ pressure: createContextPressureState(), automaticPending: false, automaticRunning: false, deferredReplayAllowance: 0, deferredInputs: [] });
|
|
17
|
+
export const createContextPressureRootState = (): ContextPressureRootState => ({ pressure: createContextPressureState(), automaticPending: false, automaticRunning: false, deferredReplayAllowance: 0, deferredReplayTexts: [], deferredInputs: [] });
|
|
17
18
|
|
|
18
19
|
export interface ContextPressurePorts {
|
|
19
20
|
getState(): ContextPressureRootState;
|
|
@@ -24,6 +25,8 @@ export interface ContextPressurePorts {
|
|
|
24
25
|
resolveCapabilities(input: string): void;
|
|
25
26
|
applyWorkMode(): void;
|
|
26
27
|
modelWorkBlocked(ctx: ExtensionContext): boolean;
|
|
28
|
+
/** Accepted user input (including an authenticated pressure replay), before pack resolution. */
|
|
29
|
+
onAcceptedInput?(text: string, source: string, replayed: boolean): void;
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
export interface ContextPressureLifecycle {
|
|
@@ -36,7 +39,7 @@ export interface ContextPressureLifecycle {
|
|
|
36
39
|
context(ctx: ExtensionContext): void;
|
|
37
40
|
agentSettled(ctx: ExtensionContext): void;
|
|
38
41
|
sessionCompact(): void;
|
|
39
|
-
input(event: any, ctx: ExtensionContext): { action: "handled" | "continue" };
|
|
42
|
+
input(event: any, ctx: ExtensionContext): { action: "handled" | "continue"; replayedUserInput?: boolean };
|
|
40
43
|
replayDeferred(): void;
|
|
41
44
|
}
|
|
42
45
|
|
|
@@ -85,6 +88,7 @@ export function createContextPressureLifecycle(ports: ContextPressurePorts): Con
|
|
|
85
88
|
const replayDeferred = () => {
|
|
86
89
|
if (state().automaticPending || state().automaticRunning || state().deferredInputs.length === 0) return;
|
|
87
90
|
const queued = state().deferredInputs.splice(0); state().deferredReplayAllowance += queued.length;
|
|
91
|
+
state().deferredReplayTexts.push(...queued.map(input => input.text));
|
|
88
92
|
queued.forEach((input, index) => ports.sendUserMessage(input.images?.length ? [{ type: "text", text: input.text }, ...input.images] : input.text, { deliverAs: index === 0 ? input.streamingBehavior : "followUp" }));
|
|
89
93
|
};
|
|
90
94
|
const runCompaction: ContextPressureLifecycle["runCompaction"] = (ctx, source) => {
|
|
@@ -106,9 +110,11 @@ export function createContextPressureLifecycle(ports: ContextPressurePorts): Con
|
|
|
106
110
|
agentSettled(ctx) { runCompaction(ctx, "agent_settled"); },
|
|
107
111
|
sessionCompact() { markSucceeded(); if (!state().automaticRunning) setTimeout(replayDeferred, 0); },
|
|
108
112
|
input(event, ctx) {
|
|
109
|
-
const replaying = event.source === "extension" && state().
|
|
110
|
-
if (replaying) state().deferredReplayAllowance--;
|
|
113
|
+
const replaying = event.source === "extension" && state().deferredReplayTexts[0] === incomingText(event);
|
|
114
|
+
if (replaying) { state().deferredReplayTexts.shift(); state().deferredReplayAllowance--; }
|
|
111
115
|
else {
|
|
116
|
+
// Extension feedback/status cannot join the user-owned recovery queue.
|
|
117
|
+
if (event.source === "extension") return { action: state().automaticPending || state().automaticRunning ? "handled" : "continue" };
|
|
112
118
|
if (state().pressure.phase === "normal") observe(ctx, "input");
|
|
113
119
|
if (state().automaticPending || state().automaticRunning || state().pressure.phase === "failed") {
|
|
114
120
|
state().deferredInputs.push({ text: event.text, images: event.images ? [...event.images] : undefined, streamingBehavior: event.streamingBehavior });
|
|
@@ -119,7 +125,9 @@ export function createContextPressureLifecycle(ports: ContextPressurePorts): Con
|
|
|
119
125
|
}
|
|
120
126
|
if (replaying && ports.modelWorkBlocked(ctx)) { state().deferredInputs.push({ text: event.text, images: event.images ? [...event.images] : undefined, streamingBehavior: event.streamingBehavior }); return { action: "handled" }; }
|
|
121
127
|
if (ports.modelWorkBlocked(ctx)) return { action: "handled" };
|
|
122
|
-
|
|
128
|
+
const text = incomingText(event);
|
|
129
|
+
ports.onAcceptedInput?.(text, event.source, replaying);
|
|
130
|
+
ports.resolveCapabilities(text); ports.applyWorkMode(); return { action: "continue", ...(replaying ? { replayedUserInput: true } : {}) };
|
|
123
131
|
},
|
|
124
132
|
};
|
|
125
133
|
}
|