@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
|
@@ -3,9 +3,13 @@ import { basename, join } from "node:path";
|
|
|
3
3
|
import type { ExtensionContext } from "@mariozechner/pi-coding-agent";
|
|
4
4
|
import { redactSecrets } from "../lib/fleet-transcript-store.ts";
|
|
5
5
|
import { RECOVERY_CATEGORIES, type RecoveryCategory } from "./recovery-contract.ts";
|
|
6
|
-
import { readWatchdogEvents, buildProactiveReport, readProactiveReport, type ProactiveReportInput } from "./system1-report.ts";
|
|
7
|
-
import {
|
|
6
|
+
import { readWatchdogEvents, buildProactiveReport, readProactiveReport, readTaskTriageReport, buildTaskTriageReport, type ProactiveReportInput } from "./system1-report.ts";
|
|
7
|
+
import { projectTaskTriage, type TaskTriageProjectionInput, type TaskTriageSessionView } from "../lib/fleet-read-model.ts";
|
|
8
|
+
import { projectWatchdogReadback, type TaskTriageActivity } from "./system1-activity.ts";
|
|
9
|
+
export type TaskTriageAuditInput = Omit<TaskTriageProjectionInput, "process"> & { activity?: ReturnType<TaskTriageActivity["live"]> };
|
|
8
10
|
import { createNoProgressGuard, projectRecoveryRows } from './no-progress.ts';
|
|
11
|
+
import { createHash } from "node:crypto";
|
|
12
|
+
import { taskTriageActionAuditRecord, type TaskTriageActionAuditRecord } from "./task-triage-authorization.ts";
|
|
9
13
|
|
|
10
14
|
const RESULT_SCHEMA = "agent-fleet.runtime-result/v1";
|
|
11
15
|
const PROTOCOL_SCHEMA = "agent-fleet.tool-protocol-diagnostic/v1";
|
|
@@ -33,7 +37,8 @@ export interface SessionAuditEvent {
|
|
|
33
37
|
risk?: "unknown" | "low" | "high";
|
|
34
38
|
scope?: "unknown" | "read-only" | "small" | "wide";
|
|
35
39
|
budgetTier?: string | null;
|
|
36
|
-
obligations?: Record<string, "satisfied" | "open" | "unsupported">;
|
|
40
|
+
obligations?: Record<string, "satisfied" | "open" | "unsupported" | "waived">;
|
|
41
|
+
processAdditions?: TaskTriageSessionView["process"]["additions"];
|
|
37
42
|
appliedRuleIds?: string[];
|
|
38
43
|
currentStage?: string;
|
|
39
44
|
admissibleNextAction?: string;
|
|
@@ -52,6 +57,7 @@ export interface SessionAuditSummary {
|
|
|
52
57
|
};
|
|
53
58
|
events: SessionAuditEvent[];
|
|
54
59
|
proactive: ReturnType<typeof buildProactiveReport> | ReturnType<typeof readProactiveReport>;
|
|
60
|
+
taskTriage: TaskTriageSessionView & { metrics: ReturnType<typeof readTaskTriageReport>; actions: ReturnType<typeof projectTaskTriageActions> };
|
|
55
61
|
unavailable: string[];
|
|
56
62
|
}
|
|
57
63
|
|
|
@@ -76,8 +82,66 @@ function runtimeResult(details: Record<string, any> | null): Record<string, any>
|
|
|
76
82
|
return value?.schema === RESULT_SCHEMA ? value : null;
|
|
77
83
|
}
|
|
78
84
|
|
|
85
|
+
/** Diagnostic joins only: durable consumption is not proof of execution or semantic acceptance. */
|
|
86
|
+
export function projectTaskTriageActions(entries: readonly unknown[], binding?: Pick<TaskTriageProjectionInput, "taskId" | "inputRevision">) {
|
|
87
|
+
type ActionRow = { metadata: TaskTriageActionAuditRecord; requested: boolean; denied: boolean; grant: boolean; consumed: boolean;
|
|
88
|
+
consumptionFailed: boolean; execution: "not_recorded" | "tool_result_ok" | "tool_result_error"; ambiguous: boolean; seen: Set<string> };
|
|
89
|
+
const rows = new Map<string, ActionRow>();
|
|
90
|
+
let invalidRecords = 0, overflow = false;
|
|
91
|
+
const hash = (v: unknown): v is string => typeof v === "string" && /^[a-f0-9]{64}$/.test(v);
|
|
92
|
+
const uuid = (v: unknown): v is string => typeof v === "string" && /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(v);
|
|
93
|
+
for (const entry of entries) {
|
|
94
|
+
const record = entryData(entry);
|
|
95
|
+
const observation = record.type === "agent-hub-task-triage-action-observation";
|
|
96
|
+
const grant = record.type === "agent-hub-task-triage-action-grant", consumed = record.type === "agent-hub-task-triage-action-consumed";
|
|
97
|
+
if (observation || grant || consumed) {
|
|
98
|
+
const data = record.data;
|
|
99
|
+
let metadata: TaskTriageActionAuditRecord | null = null;
|
|
100
|
+
if (observation && data?.schema === "task-triage-action-audit/v1" && uuid(data.taskId) && hash(data.inputRevision)
|
|
101
|
+
&& hash(data.actionFingerprint) && hash(data.callFingerprint) && ["bash", "edit", "write"].includes(data.operation)
|
|
102
|
+
&& ["requested", "not_granted", "consumption_failed"].includes(data.status)
|
|
103
|
+
&& Object.keys(data).length === 7) metadata = { schema: data.schema, taskId: data.taskId, inputRevision: data.inputRevision,
|
|
104
|
+
actionFingerprint: data.actionFingerprint, callFingerprint: data.callFingerprint, operation: data.operation, status: data.status };
|
|
105
|
+
else if (!observation && data) metadata = taskTriageActionAuditRecord(data as any, "requested");
|
|
106
|
+
if (!metadata) { invalidRecords++; continue; }
|
|
107
|
+
const key = JSON.stringify([metadata.taskId, metadata.inputRevision, metadata.callFingerprint]);
|
|
108
|
+
let row = rows.get(key);
|
|
109
|
+
if (!row) {
|
|
110
|
+
if (rows.size >= 300) { overflow = true; continue; }
|
|
111
|
+
row = { metadata, requested: false, denied: false, grant: false, consumed: false, consumptionFailed: false, execution: "not_recorded", ambiguous: false, seen: new Set() };
|
|
112
|
+
rows.set(key, row);
|
|
113
|
+
}
|
|
114
|
+
const type = grant ? "grant" : consumed ? "consumed" : metadata.status;
|
|
115
|
+
if (row.seen.has(type) || row.metadata.actionFingerprint !== metadata.actionFingerprint || row.metadata.operation !== metadata.operation) row.ambiguous = true;
|
|
116
|
+
row.seen.add(type);
|
|
117
|
+
if (grant) { if (row.denied || row.consumed) row.ambiguous = true; row.grant = true; }
|
|
118
|
+
else if (consumed) { if (!row.grant || row.denied || row.consumptionFailed) row.ambiguous = true; row.consumed = true; }
|
|
119
|
+
else if (metadata.status === "requested") row.requested = true;
|
|
120
|
+
else if (metadata.status === "not_granted") { if (row.grant || row.consumed) row.ambiguous = true; row.denied = true; }
|
|
121
|
+
else { if (row.consumed || !row.grant) row.ambiguous = true; row.consumptionFailed = true; }
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
const message = object(object(entry)?.message);
|
|
125
|
+
if (message?.role !== "toolResult" || typeof message.toolCallId !== "string" || !message.toolCallId || message.toolCallId.length > 512) continue;
|
|
126
|
+
const call = createHash("sha256").update(message.toolCallId).digest("hex");
|
|
127
|
+
const matching = [...rows.values()].filter(row => row.metadata.callFingerprint === call && row.metadata.operation === message.toolName && row.consumed);
|
|
128
|
+
if (matching.length > 1) { matching.forEach(row => { row.ambiguous = true; }); continue; }
|
|
129
|
+
const row = matching[0]; if (!row) continue;
|
|
130
|
+
if (row.execution !== "not_recorded") row.ambiguous = true;
|
|
131
|
+
if (typeof message.isError === "boolean") row.execution = message.isError ? "tool_result_error" : "tool_result_ok";
|
|
132
|
+
}
|
|
133
|
+
const records = [...rows.values()].map(row => ({ taskId: row.metadata.taskId, inputRevision: row.metadata.inputRevision,
|
|
134
|
+
actionFingerprint: row.metadata.actionFingerprint, operation: row.metadata.operation,
|
|
135
|
+
binding: !binding?.taskId || !binding?.inputRevision ? "unbound" : row.metadata.taskId === binding.taskId && row.metadata.inputRevision === binding.inputRevision ? "current" : "stale",
|
|
136
|
+
authorization: row.ambiguous ? "ambiguous" : row.grant ? "recorded_grant" : row.denied ? "not_granted" : "not_recorded",
|
|
137
|
+
consumption: row.ambiguous ? "ambiguous" : row.consumptionFailed ? "persistence_failed" : row.consumed ? "recorded_once" : "not_recorded",
|
|
138
|
+
execution: row.ambiguous ? "not_recorded" : row.denied || row.consumptionFailed ? "blocked" : row.execution }));
|
|
139
|
+
return { availability: records.length ? "recorded" : "unavailable", records, invalidRecords, overflow,
|
|
140
|
+
ambiguous: records.filter(row => row.authorization === "ambiguous").length, completeness: "retained session entries only; no replay authority" };
|
|
141
|
+
}
|
|
142
|
+
|
|
79
143
|
/** Build an allowlisted audit from runtime-owned records. Prompt, output, payload, paths and environment values are never copied. */
|
|
80
|
-
export function buildSessionAudit(input: { entries: readonly unknown[]; sessionDir: string; proactive?: ProactiveReportInput }): SessionAuditSummary {
|
|
144
|
+
export function buildSessionAudit(input: { entries: readonly unknown[]; sessionDir: string; proactive?: ProactiveReportInput; taskTriage?: TaskTriageAuditInput }): SessionAuditSummary {
|
|
81
145
|
const unavailable = new Set<string>(), meta = readJson(join(input.sessionDir, "session.json"));
|
|
82
146
|
const rootSessionId = runtimeId(meta?.sessionId) ?? runtimeId(basename(input.sessionDir));
|
|
83
147
|
if (!meta) unavailable.add("root_session_metadata");
|
|
@@ -131,10 +195,22 @@ export function buildSessionAudit(input: { entries: readonly unknown[]; sessionD
|
|
|
131
195
|
evidence: type === 'technical' || type === 'settled' ? 'available' : 'available',
|
|
132
196
|
explanation: type === 'grant' ? 'Human-authorized one-use indeterminate retry; partial side effects and duplicate effects were warned; no automatic execution.' : type === 'technical' ? 'Technical assessment only; failed execution and parent acceptance remain independent.' : undefined });
|
|
133
197
|
}
|
|
198
|
+
let latestProcess: unknown;
|
|
134
199
|
for (const entry of input.entries) {
|
|
135
200
|
const record = entryData(entry), snapshotId = record.type === "compaction" || record.type === "session_compact" ? record.id : null;
|
|
136
201
|
if (snapshotId) { snapshots.add(snapshotId); continue; }
|
|
137
202
|
if (record.type === "agent-hub-process-state") {
|
|
203
|
+
latestProcess = record.data;
|
|
204
|
+
if (record.data && Object.hasOwn(record.data, "additions")) {
|
|
205
|
+
const projected = projectTaskTriage({ ...input.taskTriage, process: record.data }).process;
|
|
206
|
+
add({ kind: "process_obligation", rootSessionId, childDispatchId: null, childSessionId: null, snapshotId: null,
|
|
207
|
+
status: projected.completion === "process_complete" ? "accepted" : "not_accepted",
|
|
208
|
+
risk: projected.declaration.risk as SessionAuditEvent["risk"], scope: projected.declaration.scope as SessionAuditEvent["scope"],
|
|
209
|
+
budgetTier: projected.declaration.budgetTier, obligations: projected.obligations ?? undefined, processAdditions: projected.additions,
|
|
210
|
+
currentStage: projected.currentStage, evidence: projected.availability === "available" ? "available" : "unavailable",
|
|
211
|
+
explanation: "Process status only; waivers remain waived and per-effect confirmation is independent of task acceptance." });
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
138
214
|
const data = record.data, risk = ["unknown", "low", "high"].includes(data?.risk) ? data!.risk as "unknown" | "low" | "high" : "unknown";
|
|
139
215
|
const budgetTier = ["trivial", "small", "feature", "project"].includes(data?.budgetTier) ? data!.budgetTier : null;
|
|
140
216
|
const scope = ["unknown", "read-only", "small", "wide"].includes(data?.scope) ? data!.scope : "unknown";
|
|
@@ -206,9 +282,19 @@ export function buildSessionAudit(input: { entries: readonly unknown[]; sessionD
|
|
|
206
282
|
},
|
|
207
283
|
evidence: check.evaluation === "interrupted" || check.llm === "interrupted" ? "unavailable" : "available" });
|
|
208
284
|
}
|
|
285
|
+
const diskMetrics = readTaskTriageReport(input.sessionDir);
|
|
286
|
+
// Disk includes prior session instances. Use bounded live fallback only if this
|
|
287
|
+
// observer lost writes; report the source rather than duplicating its events.
|
|
288
|
+
const liveActivity = input.taskTriage?.activity;
|
|
289
|
+
const metrics = liveActivity?.degraded ? { ...buildTaskTriageReport(liveActivity.events, liveActivity, diskMetrics.observability),
|
|
290
|
+
availability: "session-memory", scope: "bounded-live-observer; durable trace degraded" } : diskMetrics;
|
|
291
|
+
const taskTriage = { ...projectTaskTriage({ ...input.taskTriage, process: latestProcess }), metrics, actions: projectTaskTriageActions(input.entries, input.taskTriage) };
|
|
292
|
+
if (taskTriage.actions.invalidRecords || taskTriage.actions.ambiguous || taskTriage.actions.overflow) unavailable.add("task_triage_action_integrity");
|
|
293
|
+
if (latestProcess !== undefined && taskTriage.process.availability === "unavailable") unavailable.add("task_triage_process_integrity");
|
|
294
|
+
if (taskTriage.metrics.observability.degraded) unavailable.add("task_triage_trace_integrity");
|
|
209
295
|
const deduped = new Map<string, SessionAuditEvent>();
|
|
210
296
|
for (const event of rawEvents) {
|
|
211
|
-
const key = JSON.stringify([event.kind, event.rootSessionId, event.childDispatchId, event.childSessionId, event.snapshotId, event.category ?? null, event.status, event.taskId ?? null, event.requestId ?? null, event.operation ?? null, event.risk ?? null, event.scope ?? null, event.budgetTier ?? null, event.obligations ?? null, event.appliedRuleIds ?? null, event.currentStage ?? null, event.admissibleNextAction ?? null, event.auditScope ?? null, event.watchdog ?? null, event.operationId ?? null, event.attemptId ?? null, event.technicalBlock ?? null, event.openRequirements ?? null]);
|
|
297
|
+
const key = JSON.stringify([event.kind, event.rootSessionId, event.childDispatchId, event.childSessionId, event.snapshotId, event.category ?? null, event.status, event.taskId ?? null, event.requestId ?? null, event.operation ?? null, event.risk ?? null, event.scope ?? null, event.budgetTier ?? null, event.obligations ?? null, event.processAdditions ?? null, event.appliedRuleIds ?? null, event.currentStage ?? null, event.admissibleNextAction ?? null, event.auditScope ?? null, event.watchdog ?? null, event.operationId ?? null, event.attemptId ?? null, event.technicalBlock ?? null, event.openRequirements ?? null]);
|
|
212
298
|
const prior = deduped.get(key);
|
|
213
299
|
if (prior) prior.repeatCount++;
|
|
214
300
|
else deduped.set(key, { ...event, repeatCount: 1 });
|
|
@@ -216,12 +302,12 @@ export function buildSessionAudit(input: { entries: readonly unknown[]; sessionD
|
|
|
216
302
|
return {
|
|
217
303
|
schema: "agent-fleet.session-audit/v1", readOnly: true,
|
|
218
304
|
identity: { rootSessionId, children: [...children].map(([dispatchId, sessionId]) => ({ dispatchId, sessionId })), snapshots: [...snapshots].map(snapshotId => ({ snapshotId })) },
|
|
219
|
-
events: [...deduped.values()], proactive: input.proactive ? buildProactiveReport(input.proactive) : readProactiveReport(input.sessionDir), unavailable: [...unavailable].sort(),
|
|
305
|
+
events: [...deduped.values()], proactive: input.proactive ? buildProactiveReport(input.proactive) : readProactiveReport(input.sessionDir), taskTriage, unavailable: [...unavailable].sort(),
|
|
220
306
|
};
|
|
221
307
|
}
|
|
222
308
|
|
|
223
309
|
export function formatSessionAudit(summary: SessionAuditSummary): string { return JSON.stringify(summary, null, 2); }
|
|
224
310
|
|
|
225
|
-
export async function showSessionAudit(ctx: ExtensionContext, sessionDir: string, proactive?: ProactiveReportInput): Promise<void> {
|
|
226
|
-
ctx.ui.notify(formatSessionAudit(buildSessionAudit({ entries: ctx.sessionManager.getEntries(), sessionDir, proactive })), "info");
|
|
311
|
+
export async function showSessionAudit(ctx: ExtensionContext, sessionDir: string, proactive?: ProactiveReportInput, taskTriage?: TaskTriageAuditInput): Promise<void> {
|
|
312
|
+
ctx.ui.notify(formatSessionAudit(buildSessionAudit({ entries: ctx.sessionManager.getEntries(), sessionDir, proactive, taskTriage })), "info");
|
|
227
313
|
}
|
|
@@ -131,6 +131,9 @@ export interface SpawnPiAgentResult {
|
|
|
131
131
|
modelFallback?: ModelFallbackNotice;
|
|
132
132
|
/** Present only when parent-side bounded termination was requested. */
|
|
133
133
|
termination?: Termination;
|
|
134
|
+
/** T3 runtime lifecycle facts: launched/close/termination are separate dimensions.
|
|
135
|
+
* Safety refusal and spawn failure never launched; timeout without close stays uncertain. */
|
|
136
|
+
lifecycle: { launched: boolean; closeSeen: boolean };
|
|
134
137
|
boundedOutput?: { truncated: boolean; totalBytes: number; handle: string; contentPath: string; sha256: string };
|
|
135
138
|
writeIsolation?: Pick<WriteIsolationResult, "applied" | "failClosed" | "mechanism" | "permissionExpansion" | "rollsBackUserEdits" | "protectsConcurrentUserWrites">;
|
|
136
139
|
}
|
|
@@ -201,7 +204,7 @@ export function spawnPiAgent(opts: SpawnPiAgentOptions, cbs: SpawnPiAgentCallbac
|
|
|
201
204
|
if(active) opts={...opts,env:{...opts.env,[PROFILE_ENV]:JSON.stringify(active)}};
|
|
202
205
|
return await spawnPiAgentUnchecked(opts,cbs);
|
|
203
206
|
} catch(error) {
|
|
204
|
-
return {output:'',stderr:String(error),exitCode:1,spawnError:String(error),modelUsed:opts.model,toolCallsStarted:0};
|
|
207
|
+
return {output:'',stderr:String(error),exitCode:1,spawnError:String(error),modelUsed:opts.model,toolCallsStarted:0,lifecycle:{launched:false,closeSeen:false}};
|
|
205
208
|
}
|
|
206
209
|
});
|
|
207
210
|
}
|
|
@@ -236,6 +239,7 @@ function spawnPiAgentUnchecked(
|
|
|
236
239
|
return Promise.resolve({
|
|
237
240
|
output: "", stderr: "", exitCode: null, modelUsed: opts.model, toolCallsStarted: 0,
|
|
238
241
|
termination: { reason: "cancelled", confirmed: false, escalated: false },
|
|
242
|
+
lifecycle: { launched: false, closeSeen: false },
|
|
239
243
|
});
|
|
240
244
|
}
|
|
241
245
|
const childEnv = nativeChildEnv(process.env, opts.env);
|
|
@@ -247,6 +251,7 @@ function spawnPiAgentUnchecked(
|
|
|
247
251
|
output: "", stderr: isolation.reason ?? "write isolation unavailable", exitCode: 1,
|
|
248
252
|
spawnError: isolation.reason ?? "write isolation unavailable; unsandboxed execution refused",
|
|
249
253
|
modelUsed: opts.model, toolCallsStarted: 0, writeIsolation: publishedIsolation,
|
|
254
|
+
lifecycle: { launched: false, closeSeen: false },
|
|
250
255
|
});
|
|
251
256
|
}
|
|
252
257
|
const launchCommand = isolation?.command ?? "pi";
|
|
@@ -324,6 +329,9 @@ function spawnPiAgentUnchecked(
|
|
|
324
329
|
stderr: stderrChunks.join(""),
|
|
325
330
|
toolCallsStarted, runtimeTests, toolEvents,
|
|
326
331
|
modelUsed: opts.model,
|
|
332
|
+
// T3: explicit lifecycle facts travel with every settlement.
|
|
333
|
+
// Missing close or an unconfirmed process tree stays uncertain downstream.
|
|
334
|
+
lifecycle: { launched: true, closeSeen },
|
|
327
335
|
...(spawnError ? { spawnError } : {}),
|
|
328
336
|
...(assistantError ? { assistantError } : {}),
|
|
329
337
|
...(termination ? { termination } : {}),
|
|
@@ -497,7 +505,7 @@ export async function spawnPiAgentWithModelFallback(
|
|
|
497
505
|
fallbackOptions: ModelFallbackOptions = {},
|
|
498
506
|
): Promise<SpawnPiAgentResult> {
|
|
499
507
|
try { fallbackModel=profileFallback(fallbackModel,readActiveProfile()??readActiveProfile(opts.env)); }
|
|
500
|
-
catch(error) { return {output:'',stderr:String(error),exitCode:1,spawnError:String(error),modelUsed:opts.model,toolCallsStarted:0}; }
|
|
508
|
+
catch(error) { return {output:'',stderr:String(error),exitCode:1,spawnError:String(error),modelUsed:opts.model,toolCallsStarted:0,lifecycle:{launched:false,closeSeen:false}}; }
|
|
501
509
|
if (!fallbackModel || fallbackModel === opts.model) return spawnPiAgent(opts, cbs);
|
|
502
510
|
|
|
503
511
|
const sessionExisted = existsSync(opts.sessionFile);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { closeSync, constants, fchmodSync, lstatSync, mkdirSync, openSync, readFileSync, writeSync } from "node:fs";
|
|
2
|
+
import { closeSync, constants, fchmodSync, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, writeSync } from "node:fs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import type { ShadowTrace, ShadowTraceEvent } from "./drift-judge.ts";
|
|
5
|
+
import type { System1Result } from "../lib/system1/contracts.ts";
|
|
6
|
+
import { TASK_TRIAGE_STATE_VERSION, TASK_TRIAGE_QUESTION_VERSION, TASK_TRIAGE_POLICY_VERSION, TASK_TRIAGE_PROVIDER, TASK_TRIAGE_MODEL, type TaskTriageAssessment } from "./task-triage-contract.ts";
|
|
5
7
|
|
|
6
8
|
export const WATCHDOG_TRACE_SCHEMA = "watchdog-trace/v1";
|
|
7
9
|
export const WATCHDOG_TRACE_FILE = "events.jsonl";
|
|
@@ -442,6 +444,119 @@ export function projectWatchdogReadback(events: readonly WatchdogTraceRecord[]):
|
|
|
442
444
|
return [...checks.values()];
|
|
443
445
|
}
|
|
444
446
|
|
|
447
|
+
export const TASK_TRIAGE_TRACE_SCHEMA = "task-triage-trace/v1";
|
|
448
|
+
const TRIAGE_STATUSES = new Set(["applied", "no_additions", "invalid_result", "stale", "incomplete_input", "sensitive_input", "oversized_input", "skipped", "unavailable", "unsupported", "cancelled", "unknown"]);
|
|
449
|
+
const TRIAGE_REASONS = new Set([...REASONS, "policy_version", "version_or_provider", "answers", "counter_restore_ambiguous", "reserved_result_unavailable", "session_call_cap", "counter_persistence_failed", "result_persistence_failed", "deadline_or_cancelled", "provider_failure", "no_user_input", "shared_service_disabled", "shared_service_missing_config", "shared_service_missing_key", "shared_service_invalid_config", "shared_service_unavailable"]);
|
|
450
|
+
const TRIAGE_SIGNALS = ["security_change", "wide_change", "irreversible_execution"] as const;
|
|
451
|
+
const UUID = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i;
|
|
452
|
+
export interface TaskTriageTraceIdentity { taskId: string; evaluationId: string; inputRevision: string }
|
|
453
|
+
export interface TaskTriageTraceRecord extends TaskTriageTraceIdentity {
|
|
454
|
+
schema: typeof TASK_TRIAGE_TRACE_SCHEMA; consumer: "task-triage"; type: "evaluation_started" | "evaluation_finished";
|
|
455
|
+
sessionId: string; sequence: number; at: number; stateVersion: typeof TASK_TRIAGE_STATE_VERSION;
|
|
456
|
+
questionsVersion: typeof TASK_TRIAGE_QUESTION_VERSION; policyVersion: typeof TASK_TRIAGE_POLICY_VERSION;
|
|
457
|
+
provider: typeof TASK_TRIAGE_PROVIDER; requestedModel: typeof TASK_TRIAGE_MODEL;
|
|
458
|
+
logicalCall: boolean | null; status: string; reason: string; reasons: string[];
|
|
459
|
+
probabilities: Record<string, number> | null; providerStatus: string; returnedModel: string | null;
|
|
460
|
+
attempts: number | null; latencyMs: number | null; usage: { inputTokens: number; outputTokens: number } | null;
|
|
461
|
+
}
|
|
462
|
+
const triageIdentity = (v: TaskTriageTraceIdentity) => v && typeof v.taskId === "string" && UUID.test(v.taskId)
|
|
463
|
+
&& typeof v.evaluationId === "string" && UUID.test(v.evaluationId) && typeof v.inputRevision === "string" && /^[a-f0-9]{64}$/.test(v.inputRevision);
|
|
464
|
+
const triageKey = (v: TaskTriageTraceIdentity) => JSON.stringify([v.taskId, v.evaluationId, v.inputRevision]);
|
|
465
|
+
const nonnegative = (v: unknown): v is number => typeof v === "number" && Number.isFinite(v) && v >= 0;
|
|
466
|
+
function triageProbabilities(value: unknown): Record<string, number> | null {
|
|
467
|
+
if (!isRecord(value)) return null;
|
|
468
|
+
const out: Record<string, number> = {};
|
|
469
|
+
for (const key of TRIAGE_SIGNALS) if (nonnegative(value[key]) && value[key] <= 1) out[key] = value[key];
|
|
470
|
+
return Object.keys(out).length ? out : null;
|
|
471
|
+
}
|
|
472
|
+
function safeTraceParent(path: string) {
|
|
473
|
+
for (let parent = dirname(path); ; parent = dirname(parent)) {
|
|
474
|
+
try { if (lstatSync(parent).isSymbolicLink()) throw new Error("linked trace directory"); }
|
|
475
|
+
catch (error) { if ((error as NodeJS.ErrnoException).code !== "ENOENT") throw error; }
|
|
476
|
+
if (parent === dirname(parent)) break;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
/** Separate metadata-only observer. It cannot authorize effects or change runtime counters. */
|
|
480
|
+
export function createTaskTriageActivity(options: { directory?: string; sessionId?: string; now?: () => number; write?: (line: string) => void } = {}) {
|
|
481
|
+
const sessionId = randomUUID(), path = options.directory ? join(options.directory, "task-triage-events.jsonl") : null;
|
|
482
|
+
const spans = new Map<string, TaskTriageTraceRecord>();
|
|
483
|
+
const finished = new Set<string>(), events: TaskTriageTraceRecord[] = [];
|
|
484
|
+
let sequence = 0, degraded = false, disposed = false;
|
|
485
|
+
const append = (record: TaskTriageTraceRecord) => {
|
|
486
|
+
events.push(record);
|
|
487
|
+
try {
|
|
488
|
+
if (options.write) options.write(`${JSON.stringify(record)}\n`);
|
|
489
|
+
else if (path) { safeTraceParent(path); secureAppend(path, `${JSON.stringify(record)}\n`); }
|
|
490
|
+
} catch { degraded = true; }
|
|
491
|
+
};
|
|
492
|
+
const terminal = (identity: TaskTriageTraceIdentity, input: { assessment: TaskTriageAssessment; result?: System1Result }) => {
|
|
493
|
+
const key = triageKey(identity), start = spans.get(key);
|
|
494
|
+
if (!start || finished.has(key)) return;
|
|
495
|
+
finished.add(key);
|
|
496
|
+
const metadata = input.result?.status === "ok" ? input.result.evaluation.metadata : undefined;
|
|
497
|
+
append({ ...start, type: "evaluation_finished", sequence: ++sequence, at: (options.now ?? Date.now)(),
|
|
498
|
+
status: enumValue(input.assessment.status, TRIAGE_STATUSES, "unknown"), reason: enumValue(input.assessment.detail, TRIAGE_REASONS, "unknown"),
|
|
499
|
+
reasons: [...new Set((input.assessment.reasons ?? []).filter(r => TRIAGE_SIGNALS.includes(r)))],
|
|
500
|
+
probabilities: triageProbabilities(input.assessment.probabilities),
|
|
501
|
+
providerStatus: enumValue(input.result?.status, STATUSES, "unknown"), returnedModel: metadata?.returnedModel === TASK_TRIAGE_MODEL ? TASK_TRIAGE_MODEL : null,
|
|
502
|
+
attempts: Number.isSafeInteger(metadata?.attempts) && nonnegative(metadata?.attempts) ? metadata.attempts : null,
|
|
503
|
+
latencyMs: nonnegative(metadata?.latencyMs) ? metadata.latencyMs : null, usage: usage(metadata?.usage) });
|
|
504
|
+
};
|
|
505
|
+
return {
|
|
506
|
+
get path() { return path; }, get degraded() { return degraded; },
|
|
507
|
+
live(): { events: TaskTriageTraceRecord[]; degraded: boolean } { return { events: structuredClone(events), degraded }; },
|
|
508
|
+
evaluationStarted(identity: TaskTriageTraceIdentity, logicalCall: boolean | null) {
|
|
509
|
+
if (disposed || !triageIdentity(identity) || spans.has(triageKey(identity))) return;
|
|
510
|
+
if (spans.size >= COMPLETED_LIMIT) { degraded = true; return; }
|
|
511
|
+
const record: TaskTriageTraceRecord = { taskId: identity.taskId, evaluationId: identity.evaluationId, inputRevision: identity.inputRevision,
|
|
512
|
+
schema: TASK_TRIAGE_TRACE_SCHEMA, consumer: "task-triage", type: "evaluation_started", sessionId, sequence: ++sequence, at: (options.now ?? Date.now)(),
|
|
513
|
+
stateVersion: TASK_TRIAGE_STATE_VERSION, questionsVersion: TASK_TRIAGE_QUESTION_VERSION, policyVersion: TASK_TRIAGE_POLICY_VERSION,
|
|
514
|
+
provider: TASK_TRIAGE_PROVIDER, requestedModel: TASK_TRIAGE_MODEL, logicalCall: typeof logicalCall === "boolean" ? logicalCall : null,
|
|
515
|
+
status: "unknown", reason: "unknown", reasons: [], probabilities: null, providerStatus: "unknown", returnedModel: null, attempts: null, latencyMs: null, usage: null };
|
|
516
|
+
spans.set(triageKey(identity), record); append(record);
|
|
517
|
+
},
|
|
518
|
+
evaluationFinished(identity: TaskTriageTraceIdentity, input: { assessment: TaskTriageAssessment; result?: System1Result }) { if (!disposed) terminal(identity, input); },
|
|
519
|
+
dispose() {
|
|
520
|
+
if (disposed) return;
|
|
521
|
+
for (const start of spans.values()) terminal(start, { assessment: { status: "cancelled", reasons: [], detail: "disposed" } });
|
|
522
|
+
disposed = true;
|
|
523
|
+
},
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
export type TaskTriageActivity = ReturnType<typeof createTaskTriageActivity>;
|
|
527
|
+
const TRIAGE_TRACE_KEYS = new Set(["taskId", "evaluationId", "inputRevision", "schema", "consumer", "type", "sessionId", "sequence", "at", "stateVersion", "questionsVersion", "policyVersion", "provider", "requestedModel", "logicalCall", "status", "reason", "reasons", "probabilities", "providerStatus", "returnedModel", "attempts", "latencyMs", "usage"]);
|
|
528
|
+
/** Validate durable readback as strictly as emission; reject payload extras instead of copying them. */
|
|
529
|
+
export function isTaskTriageTraceRecord(value: unknown): value is TaskTriageTraceRecord {
|
|
530
|
+
if (!isRecord(value) || Object.keys(value).length !== TRIAGE_TRACE_KEYS.size || Object.keys(value).some(k => !TRIAGE_TRACE_KEYS.has(k))) return false;
|
|
531
|
+
const v = value as unknown as TaskTriageTraceRecord;
|
|
532
|
+
return triageIdentity(v) && typeof v.sessionId === "string" && UUID.test(v.sessionId) && v.schema === TASK_TRIAGE_TRACE_SCHEMA && v.consumer === "task-triage"
|
|
533
|
+
&& ["evaluation_started", "evaluation_finished"].includes(v.type) && Number.isSafeInteger(v.sequence) && v.sequence > 0 && nonnegative(v.at)
|
|
534
|
+
&& v.stateVersion === TASK_TRIAGE_STATE_VERSION && v.questionsVersion === TASK_TRIAGE_QUESTION_VERSION && v.policyVersion === TASK_TRIAGE_POLICY_VERSION
|
|
535
|
+
&& v.provider === TASK_TRIAGE_PROVIDER && v.requestedModel === TASK_TRIAGE_MODEL && (typeof v.logicalCall === "boolean" || v.logicalCall === null)
|
|
536
|
+
&& TRIAGE_STATUSES.has(v.status) && TRIAGE_REASONS.has(v.reason) && Array.isArray(v.reasons) && v.reasons.length <= 3 && v.reasons.every(r => TRIAGE_SIGNALS.includes(r as typeof TRIAGE_SIGNALS[number]))
|
|
537
|
+
&& (v.probabilities === null || (isRecord(v.probabilities) && Object.keys(v.probabilities).every(k => TRIAGE_SIGNALS.includes(k as typeof TRIAGE_SIGNALS[number]) && nonnegative(v.probabilities![k]) && v.probabilities![k] <= 1)))
|
|
538
|
+
&& STATUSES.has(v.providerStatus) && (v.returnedModel === null || v.returnedModel === TASK_TRIAGE_MODEL)
|
|
539
|
+
&& (v.attempts === null || (Number.isSafeInteger(v.attempts) && v.attempts >= 0)) && (v.latencyMs === null || nonnegative(v.latencyMs))
|
|
540
|
+
&& (v.usage === null || (isRecord(v.usage) && Object.keys(v.usage).sort().join(",") === "inputTokens,outputTokens" && usage(v.usage) !== null));
|
|
541
|
+
}
|
|
542
|
+
export function readTaskTriageTrace(path: string, options: { after?: number; limit?: number } = {}) {
|
|
543
|
+
const after = Number.isSafeInteger(options.after) && options.after! >= 0 ? options.after! : 0;
|
|
544
|
+
const limit = Number.isSafeInteger(options.limit) ? Math.min(100, Math.max(1, options.limit!)) : 100;
|
|
545
|
+
let text = "", fd: number | undefined;
|
|
546
|
+
try {
|
|
547
|
+
safeTraceParent(path);
|
|
548
|
+
if (!lstatSync(path).isFile()) throw new Error("trace unavailable");
|
|
549
|
+
fd = openSync(path, constants.O_RDONLY | ((constants as { O_NOFOLLOW?: number }).O_NOFOLLOW ?? 0));
|
|
550
|
+
const stat = fstatSync(fd); if (!stat.isFile() || stat.size > 4 * 1024 * 1024) throw new Error("trace unavailable");
|
|
551
|
+
text = readFileSync(fd, "utf8");
|
|
552
|
+
} catch (error) { return { events: [] as TaskTriageTraceRecord[], nextOffset: after, invalidRecords: 0, partialTail: false, readError: (error as NodeJS.ErrnoException).code !== "ENOENT", missing: (error as NodeJS.ErrnoException).code === "ENOENT" }; }
|
|
553
|
+
finally { if (fd !== undefined) closeSync(fd); }
|
|
554
|
+
const lines = text.split("\n").slice(0, -1), page = lines.slice(after, after + limit);
|
|
555
|
+
const events: TaskTriageTraceRecord[] = []; let invalidRecords = 0;
|
|
556
|
+
for (const line of page) { try { const value: unknown = JSON.parse(line); if (isTaskTriageTraceRecord(value)) events.push(value); else invalidRecords++; } catch { invalidRecords++; } }
|
|
557
|
+
return { events, nextOffset: after + page.length, invalidRecords, partialTail: !!text && !text.endsWith("\n"), readError: false, missing: false };
|
|
558
|
+
}
|
|
559
|
+
|
|
445
560
|
/** Separate proactive consumer in the existing session activity store; never stores evidence payloads. */
|
|
446
561
|
export const PROACTIVE_TRACE_SCHEMA = "proactive-review-trace/v1";
|
|
447
562
|
export interface ProactiveTraceRecord {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import type { EvaluateRequest, System1Result, System1Service } from "../lib/system1/contracts.ts";
|
|
3
|
+
import { TASK_TRIAGE_QUESTIONS, TASK_TRIAGE_QUESTION_VERSION, TASK_TRIAGE_STATE_VERSION } from "./task-triage-contract.ts";
|
|
3
4
|
|
|
4
5
|
export const COMMUNICATION_LIMITS = Object.freeze({ pairs: 200, bytes: 4 * 1024 * 1024, payloadBytes: 32 * 1024 });
|
|
5
6
|
export interface CommunicationPair {
|
|
@@ -8,16 +9,21 @@ export interface CommunicationPair {
|
|
|
8
9
|
status: string; requestOmitted?: string; responseOmitted?: string;
|
|
9
10
|
}
|
|
10
11
|
const secretKey = /authorization|api.?key|password|passwd|secret|credential|cookie|access.?token|refresh.?token|private.?key/i;
|
|
12
|
+
function redactSecretText(text: string): string {
|
|
13
|
+
return text
|
|
14
|
+
.replace(/-----BEGIN [^-]*PRIVATE KEY-----[\s\S]*?(?:-----END [^-]*PRIVATE KEY-----|$)/g, "[REDACTED]")
|
|
15
|
+
.replace(/\b(?:Bearer|Basic)\s+\S+/gi, "[REDACTED]")
|
|
16
|
+
.replace(/\b(?:sk-|gh[pousr]_|github_pat_|AKIA)[A-Za-z0-9_\-]+/g, "[REDACTED]")
|
|
17
|
+
.replace(/((?:authorization|api[_ -]?key|password|passwd|secret|token|credential|private[_ -]?key)\s*[=:]\s*)[^\s,;]+/gi, "$1[REDACTED]");
|
|
18
|
+
}
|
|
19
|
+
/** True only for credential-like text; path masking is handled separately. */
|
|
20
|
+
export function containsCommunicationSecret(text: string): boolean { return redactSecretText(text) !== text; }
|
|
11
21
|
/** Conservative diagnostic copy, never an HTTP capture. Unknown consumer schemas are withheld. */
|
|
12
22
|
export function redactCommunication(value: unknown): unknown {
|
|
13
23
|
const seen = new WeakSet<object>();
|
|
14
24
|
const walk = (v: unknown, depth: number): unknown => {
|
|
15
25
|
if (depth > 30) return "[withheld: depth]";
|
|
16
|
-
if (typeof v === "string") return v
|
|
17
|
-
.replace(/-----BEGIN [^-]*PRIVATE KEY-----[\s\S]*?(?:-----END [^-]*PRIVATE KEY-----|$)/g, "[REDACTED]")
|
|
18
|
-
.replace(/\b(?:Bearer|Basic)\s+\S+/gi, "[REDACTED]")
|
|
19
|
-
.replace(/\b(?:sk-|gh[pousr]_|github_pat_|AKIA)[A-Za-z0-9_\-]+/g, "[REDACTED]")
|
|
20
|
-
.replace(/((?:api[_ -]?key|password|passwd|secret|token|credential)\s*[=:]\s*)[^\s,;]+/gi, "$1[REDACTED]")
|
|
26
|
+
if (typeof v === "string") return redactSecretText(v)
|
|
21
27
|
.replace(/(?:\/[A-Za-z0-9._-]+){2,}|[A-Za-z]:\\[^\s]+/g, "[PATH]")
|
|
22
28
|
.replace(/[\x00-\x08\x0b-\x1f\x7f-\x9f]/g, "");
|
|
23
29
|
if (v === null || typeof v === "boolean" || typeof v === "number") return v;
|
|
@@ -30,11 +36,27 @@ export function redactCommunication(value: unknown): unknown {
|
|
|
30
36
|
}
|
|
31
37
|
function consumerFor(request: EvaluateRequest): string {
|
|
32
38
|
const version = request.questionSetVersion;
|
|
39
|
+
if (version === TASK_TRIAGE_QUESTION_VERSION) return "task-triage";
|
|
33
40
|
if (version === "dispatch-triage/v1") return "dispatch-triage";
|
|
34
41
|
if (version === "watchdog-questions/v1") return "watchdog";
|
|
35
42
|
if (["proactive-assessment/v1", "proactive-selection/v1"].includes(version)) return "proactive";
|
|
36
43
|
return "not instrumented";
|
|
37
44
|
}
|
|
45
|
+
/** Reviewed v1 diagnostic projection; file bodies and arbitrary nested extras are never captured. */
|
|
46
|
+
function projectTaskTriageState(state: Record<string, unknown>) {
|
|
47
|
+
const strings = (value: unknown, max: number): value is string[] => Array.isArray(value) && value.length <= max && value.every(v => typeof v === "string");
|
|
48
|
+
if (state.schema !== TASK_TRIAGE_STATE_VERSION || typeof state.task !== "string"
|
|
49
|
+
|| !strings(state.clarifications, 32) || !strings(state.constraints, 16) || !strings(state.gaps, 32)
|
|
50
|
+
|| !Array.isArray(state.paths) || state.paths.length > 32) return null;
|
|
51
|
+
const paths: { path: string; kind: string }[] = [];
|
|
52
|
+
for (const entry of state.paths) {
|
|
53
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry) || typeof entry.path !== "string"
|
|
54
|
+
|| !["file", "directory", "missing"].includes(entry.kind)) return null;
|
|
55
|
+
paths.push({ path: entry.path, kind: entry.kind });
|
|
56
|
+
}
|
|
57
|
+
return { schema: state.schema, task: state.task, clarifications: state.clarifications,
|
|
58
|
+
paths, constraints: state.constraints, gaps: state.gaps };
|
|
59
|
+
}
|
|
38
60
|
export function createCommunicationStore(limits = COMMUNICATION_LIMITS, now = Date.now) {
|
|
39
61
|
let enabled = false, generation = 0, sessionEpoch = 0, evicted = 0;
|
|
40
62
|
const pairs = new Map<string, CommunicationPair>();
|
|
@@ -42,10 +64,19 @@ export function createCommunicationStore(limits = COMMUNICATION_LIMITS, now = Da
|
|
|
42
64
|
const emit = () => { for (const listener of listeners) { try { listener(); } catch { /* observer cannot affect inference */ } } };
|
|
43
65
|
const bytes = () => Buffer.byteLength(JSON.stringify([...pairs.values()]));
|
|
44
66
|
const trim = () => { while (pairs.size > limits.pairs || (pairs.size && bytes() > limits.bytes)) { pairs.delete(pairs.keys().next().value!); evicted++; } };
|
|
45
|
-
const payload = (value: unknown): string | null => {
|
|
67
|
+
const payload = (value: unknown, taskTriage = false): string | null => {
|
|
46
68
|
const raw = JSON.stringify(value);
|
|
47
69
|
if (Buffer.byteLength(raw) > limits.payloadBytes) return null;
|
|
48
|
-
const
|
|
70
|
+
const clean = redactCommunication(value);
|
|
71
|
+
if (taskTriage) {
|
|
72
|
+
// Restore only these exact public constants, not arbitrary path-like text.
|
|
73
|
+
const source = value as { state?: { schema?: unknown }; questionSetVersion?: unknown; evaluation?: { metadata?: { questionSetVersion?: unknown } } };
|
|
74
|
+
const projected = clean as typeof source;
|
|
75
|
+
if (source.state?.schema === TASK_TRIAGE_STATE_VERSION && projected.state) projected.state.schema = TASK_TRIAGE_STATE_VERSION;
|
|
76
|
+
if (source.questionSetVersion === TASK_TRIAGE_QUESTION_VERSION) projected.questionSetVersion = TASK_TRIAGE_QUESTION_VERSION;
|
|
77
|
+
if (source.evaluation?.metadata?.questionSetVersion === TASK_TRIAGE_QUESTION_VERSION && projected.evaluation?.metadata) projected.evaluation.metadata.questionSetVersion = TASK_TRIAGE_QUESTION_VERSION;
|
|
78
|
+
}
|
|
79
|
+
const text = JSON.stringify(clean, null, 2);
|
|
49
80
|
return Buffer.byteLength(text) <= limits.payloadBytes ? text : null;
|
|
50
81
|
};
|
|
51
82
|
return {
|
|
@@ -62,11 +93,12 @@ export function createCommunicationStore(limits = COMMUNICATION_LIMITS, now = Da
|
|
|
62
93
|
if (enabled && ownerEpoch === sessionEpoch) {
|
|
63
94
|
id = randomUUID(); const consumer = consumerFor(request);
|
|
64
95
|
const state = request.state as Record<string, unknown>;
|
|
65
|
-
const owner = typeof state?.owner === "string" ? String(redactCommunication(state.owner)) : consumer === "dispatch-triage" ? "hub" : "owner unavailable";
|
|
96
|
+
const owner = consumer === "task-triage" ? "hub" : typeof state?.owner === "string" ? String(redactCommunication(state.owner)) : consumer === "dispatch-triage" ? "hub" : "owner unavailable";
|
|
66
97
|
const keys = consumer === "watchdog" ? ["schema","task","scope","hub_owned_paths","tool_events","signal","counters","coverage"] : consumer === "proactive" ? ["schema","candidates","task","paths","plan","planStatus","snapshotId","status","gaps","units","pairs"] : ["schema","task","scope","language","domain","constraints","candidates"];
|
|
67
|
-
const projected = state && typeof state === "object" && !Array.isArray(state)
|
|
68
|
-
|
|
69
|
-
const
|
|
98
|
+
const projected = state && typeof state === "object" && !Array.isArray(state)
|
|
99
|
+
? consumer === "task-triage" ? (JSON.stringify(request.questions) === JSON.stringify(TASK_TRIAGE_QUESTIONS) ? projectTaskTriageState(state) : null) : Object.fromEntries(keys.filter(k => Object.hasOwn(state,k)).map(k => [k,state[k]])) : null;
|
|
100
|
+
const questions = (consumer === "task-triage" ? TASK_TRIAGE_QUESTIONS : request.questions).map(q => ({ id:q.id,type:q.type,instructions:q.instructions,...(q.type === "choice" ? {options:q.options} : q.type === "ordinal" ? {levels:q.levels} : {criteria:q.criteria}) }));
|
|
101
|
+
const text = consumer === "not instrumented" || projected === null ? null : payload({ state: projected, questions, questionSetVersion: request.questionSetVersion, timeoutMs: request.timeoutMs, requiredCapabilities: request.requiredCapabilities }, consumer === "task-triage");
|
|
70
102
|
pairs.set(id, { id, consumer, owner, provider: String(redactCommunication(identity.provider)), model: String(redactCommunication(identity.model)), started: now(), status: "pending", request: text, response: null, ...(text === null ? { requestOmitted: "payload withheld or too large" } : {}) }); trim(); emit();
|
|
71
103
|
}
|
|
72
104
|
} catch { id = undefined; }
|
|
@@ -80,8 +112,10 @@ export function createCommunicationStore(limits = COMMUNICATION_LIMITS, now = Da
|
|
|
80
112
|
if (id && enabled && epoch === generation && pairs.has(id)) {
|
|
81
113
|
const pair = pairs.get(id)!;
|
|
82
114
|
// Reconstruct the result allowlist; never preserve unvalidated provider extras.
|
|
83
|
-
const safe = result.status === "ok" ? { status: result.status, evaluation: { answers: result.evaluation.answers
|
|
84
|
-
|
|
115
|
+
const safe = result.status === "ok" ? { status: result.status, evaluation: { answers: result.evaluation.answers
|
|
116
|
+
.filter(a => pair.consumer !== "task-triage" || (a.type === "predicate" && TASK_TRIAGE_QUESTIONS.some(q => q.id === a.questionId)))
|
|
117
|
+
.map(a => ({ questionId: a.questionId, type: a.type, ...(a.type === "predicate" ? { probabilityTrue: a.probabilityTrue } : { value: a.value, ...(a.type === "ordinal" ? { levels: a.levels } : {}) }), uncertainty: { provenance: a.uncertainty.provenance, ...(pair.consumer === "task-triage" ? {} : { confidence: a.uncertainty.confidence, distribution: a.uncertainty.distribution }) } })), metadata: { provider: result.evaluation.metadata.provider, requestedModel: result.evaluation.metadata.requestedModel, returnedModel: result.evaluation.metadata.returnedModel, questionSetVersion: result.evaluation.metadata.questionSetVersion, latencyMs: result.evaluation.metadata.latencyMs, attempts: result.evaluation.metadata.attempts, usage: result.evaluation.metadata.usage ? { inputTokens: result.evaluation.metadata.usage.inputTokens, outputTokens: result.evaluation.metadata.usage.outputTokens } : pair.consumer === "task-triage" ? null : undefined } } } : { status: result.status, ...("reason" in result ? { reason: result.reason } : {}), ...("missingCapabilities" in result ? { missingCapabilities: result.missingCapabilities } : {}) };
|
|
118
|
+
pair.response = pair.consumer === "not instrumented" ? null : payload(safe, pair.consumer === "task-triage");
|
|
85
119
|
pair.status = result.status; pair.ended = now();
|
|
86
120
|
if (pair.response === null) pair.responseOmitted = "payload withheld or too large";
|
|
87
121
|
trim(); emit();
|
|
@@ -8,6 +8,56 @@ import type { FindingEntry, FindingReview } from "./proactive-findings.ts";
|
|
|
8
8
|
import { readProactiveTrace, type ProactiveTraceRecord } from "./system1-activity.ts";
|
|
9
9
|
import { projectWatchdogReadback, readWatchdogTrace, type WatchdogActivity, type WatchdogTraceRecord } from "./system1-activity.ts";
|
|
10
10
|
import type { WatchdogSystem1Session } from "./system1-runtime.ts";
|
|
11
|
+
import { isTaskTriageTraceRecord, readTaskTriageTrace, type TaskTriageTraceRecord } from "./system1-activity.ts";
|
|
12
|
+
|
|
13
|
+
/** Metadata metrics only. Provider success/assessment signals never imply process acceptance. */
|
|
14
|
+
export function buildTaskTriageReport(events: readonly unknown[], live?: { degraded: boolean } | null, integrity?: WatchdogTraceIntegrity) {
|
|
15
|
+
const starts = new Map<string, TaskTriageTraceRecord>(), finishes = new Map<string, TaskTriageTraceRecord>();
|
|
16
|
+
let invalidRecords = integrity?.invalidRecords ?? 0, duplicateEvents = 0;
|
|
17
|
+
for (const event of events) {
|
|
18
|
+
if (!isTaskTriageTraceRecord(event)) { invalidRecords++; continue; }
|
|
19
|
+
const key = JSON.stringify([event.sessionId, event.taskId, event.evaluationId, event.inputRevision]);
|
|
20
|
+
const table = event.type === "evaluation_started" ? starts : finishes;
|
|
21
|
+
if (table.has(key)) { duplicateEvents++; continue; }
|
|
22
|
+
table.set(key, event);
|
|
23
|
+
}
|
|
24
|
+
const keys = new Set([...starts.keys(), ...finishes.keys()]);
|
|
25
|
+
const rows = [...keys].map(key => ({ start: starts.get(key), finish: finishes.get(key) }));
|
|
26
|
+
const calls = rows.filter(r => r.start?.logicalCall !== false);
|
|
27
|
+
const logicalKnown = rows.filter(r => typeof r.start?.logicalCall === "boolean");
|
|
28
|
+
const attempts = calls.flatMap(r => r.finish?.attempts !== null && r.finish?.attempts !== undefined ? [r.finish.attempts] : []);
|
|
29
|
+
const usages = calls.flatMap(r => r.finish?.usage ? [r.finish.usage] : []);
|
|
30
|
+
const latencies = rows.flatMap(r => r.finish?.latencyMs !== null && r.finish?.latencyMs !== undefined ? [r.finish.latencyMs] : []).sort((a, b) => a - b);
|
|
31
|
+
const observedInputTokens = usages.reduce((n, u) => n + u.inputTokens, 0), observedOutputTokens = usages.reduce((n, u) => n + u.outputTokens, 0);
|
|
32
|
+
const incomplete = rows.filter(r => r.start && !r.finish).length, orphanFinishes = rows.filter(r => !r.start && r.finish).length;
|
|
33
|
+
const bindingMismatches = rows.filter(r => r.start && r.finish && r.start.logicalCall !== r.finish.logicalCall).length;
|
|
34
|
+
const degraded = !!live?.degraded || invalidRecords > 0 || duplicateEvents > 0 || orphanFinishes > 0 || bindingMismatches > 0 || !!integrity?.partialTail || !!integrity?.readError;
|
|
35
|
+
const totalsKnown = calls.length > 0 && usages.length === calls.length && !degraded;
|
|
36
|
+
const byStatus: Record<string, number> = {};
|
|
37
|
+
for (const row of rows) { const status = row.finish?.status ?? "interrupted"; byStatus[status] = (byStatus[status] ?? 0) + 1; }
|
|
38
|
+
return { schema: "task-triage-report/v1" as const, consumer: "task-triage" as const, readOnly: true as const,
|
|
39
|
+
availability: events.length ? "retained-trace" : "unavailable", scope: "retained-evaluation-metadata", completeness: "unknown outside retained trace",
|
|
40
|
+
assessments: { started: starts.size, finished: finishes.size, incomplete, byStatus },
|
|
41
|
+
logicalCalls: { known: logicalKnown.length, reserved: logicalKnown.length ? logicalKnown.filter(r => r.start!.logicalCall === true).length : null, unknown: rows.length - logicalKnown.length },
|
|
42
|
+
physicalAttempts: { known: attempts.length, observed: attempts.length ? attempts.reduce((n, a) => n + a, 0) : null, unknown: calls.length - attempts.length },
|
|
43
|
+
usage: { known: usages.length, unknown: calls.length - usages.length,
|
|
44
|
+
observedInputTokens: usages.length ? observedInputTokens : null, observedOutputTokens: usages.length ? observedOutputTokens : null,
|
|
45
|
+
inputTokens: totalsKnown ? observedInputTokens : null, outputTokens: totalsKnown ? observedOutputTokens : null },
|
|
46
|
+
latencyMs: { p50: latencies.length ? latencies[Math.ceil(latencies.length * .5) - 1] : null, p95: latencies.length ? latencies[Math.ceil(latencies.length * .95) - 1] : null, known: latencies.length },
|
|
47
|
+
obligations: "not_instrumented" as const, taskAcceptance: "not_instrumented" as const, cost: null, calibrationAccepted: false as const,
|
|
48
|
+
observability: { degraded, invalidRecords, duplicateEvents, orphanFinishes, bindingMismatches, partialTail: integrity?.partialTail ?? false, readError: integrity?.readError ?? false } };
|
|
49
|
+
}
|
|
50
|
+
export function readTaskTriageReport(sessionDir: string) {
|
|
51
|
+
const events: TaskTriageTraceRecord[] = [], integrity: WatchdogTraceIntegrity = { invalidRecords: 0, partialTail: false, readError: false };
|
|
52
|
+
let offset = 0;
|
|
53
|
+
for (;;) {
|
|
54
|
+
const page = readTaskTriageTrace(join(sessionDir, "artifacts/task-triage-activity/task-triage-events.jsonl"), { after: offset, limit: 100 });
|
|
55
|
+
events.push(...page.events); integrity.invalidRecords += page.invalidRecords; integrity.partialTail ||= page.partialTail; integrity.readError ||= page.readError;
|
|
56
|
+
if (page.nextOffset === offset) break;
|
|
57
|
+
offset = page.nextOffset;
|
|
58
|
+
}
|
|
59
|
+
return buildTaskTriageReport(events, null, integrity);
|
|
60
|
+
}
|
|
11
61
|
|
|
12
62
|
export interface WatchdogTraceIntegrity { invalidRecords: number; partialTail: boolean; readError: boolean }
|
|
13
63
|
/** Read the trace, not the provider or worker accounting. Corruption remains visible as metadata. */
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { SYSTEM1_CONFIG_RELATIVE_PATH } from "../lib/system1/config.js";
|
|
1
|
+
import { loadSystem1Snapshot, providerDocument, readSystem1Selected } from "../lib/system1/config-loader.js";
|
|
4
2
|
import type { JsonText, System1Availability, System1Result, System1Service } from "../lib/system1/contracts.ts";
|
|
5
3
|
import { createSystem1Runtime, DEFAULT_SYSTEM1_TIMEOUT_MS } from "../lib/system1/service.ts";
|
|
6
4
|
import type { JevTransport } from "../lib/system1/jev.ts";
|
|
@@ -92,6 +90,7 @@ function effectiveMode(configured: WatchdogSystem1Mode, profiles: readonly Accep
|
|
|
92
90
|
|
|
93
91
|
export interface ReadWatchdogSystem1SnapshotInput {
|
|
94
92
|
cwd: string;
|
|
93
|
+
snapshot?: ReturnType<typeof loadSystem1Snapshot>;
|
|
95
94
|
configuredMode: WatchdogSystem1Mode;
|
|
96
95
|
watchdogSetting: string;
|
|
97
96
|
env?: Record<string, string | undefined>;
|
|
@@ -100,40 +99,20 @@ export interface ReadWatchdogSystem1SnapshotInput {
|
|
|
100
99
|
wrapService?: (service: System1Service) => System1Service;
|
|
101
100
|
}
|
|
102
101
|
|
|
103
|
-
/** Caller-owned reads. Matches doctor selection
|
|
102
|
+
/** Caller-owned reads. Matches doctor selection, including declared feature dependencies. Does not load dotenv. */
|
|
104
103
|
export function readWatchdogSystem1Snapshot(input: ReadWatchdogSystem1SnapshotInput): CreateWatchdogSystem1SessionOptions {
|
|
104
|
+
const snapshot = input.snapshot ?? loadSystem1Snapshot(input.cwd);
|
|
105
105
|
return {
|
|
106
|
-
configuredMode:
|
|
106
|
+
configuredMode: snapshot.consumers.watchdog.config?.mode ?? "off",
|
|
107
107
|
watchdogArmed: normalizeWatchdogSetting(input.watchdogSetting) !== "off",
|
|
108
|
-
selected:
|
|
109
|
-
config:
|
|
108
|
+
selected: readSystem1Selected(input.cwd),
|
|
109
|
+
config: providerDocument(snapshot),
|
|
110
110
|
env: input.env ?? {},
|
|
111
111
|
transport: input.transport,
|
|
112
|
-
warnings: input.warnings,
|
|
112
|
+
warnings: [...(input.warnings ?? []), ...snapshot.errors.map((error: { path: string; code: string }) => `${error.path}: ${error.code}`)],
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
function readFeatureSelected(cwd: string): boolean {
|
|
117
|
-
const path = join(cwd, ".ai", "agent-fleet.json");
|
|
118
|
-
if (!existsSync(path)) return false;
|
|
119
|
-
try {
|
|
120
|
-
const desired = JSON.parse(readFileSync(path, "utf8"));
|
|
121
|
-
return desired?.features?.system1 === true;
|
|
122
|
-
} catch {
|
|
123
|
-
return false;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function readSystem1Config(cwd: string): unknown {
|
|
128
|
-
const path = join(cwd, SYSTEM1_CONFIG_RELATIVE_PATH);
|
|
129
|
-
if (!existsSync(path)) return undefined;
|
|
130
|
-
try {
|
|
131
|
-
return JSON.parse(readFileSync(path, "utf8"));
|
|
132
|
-
} catch {
|
|
133
|
-
return null;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
116
|
export interface CreateWatchdogSystem1SessionOptions {
|
|
138
117
|
configuredMode: WatchdogSystem1Mode;
|
|
139
118
|
watchdogArmed: boolean;
|