@chankov/agent-fleet 2.0.12 → 2.0.14
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/flow.ts +5 -3
- package/.pi/agent-fleet/scripts/lib/flow-command.ts +9 -4
- package/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +3 -1
- package/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
- package/.pi/agents/model-profiles.yaml +80 -29
- package/.pi/agents/peers.yaml +18 -18
- package/.pi/agents/voices.yaml +2 -2
- package/.pi/harnesses/agent-hub/README.md +64 -4
- package/.pi/harnesses/agent-hub/commands/audit.ts +1 -1
- package/.pi/harnesses/agent-hub/commands/context.ts +1 -1
- package/.pi/harnesses/agent-hub/config/model-profiles.ts +1 -0
- package/.pi/harnesses/agent-hub/delegate.ts +5 -3
- package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +27 -2
- package/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +29 -0
- package/.pi/harnesses/agent-hub/dispatch-native-types.ts +6 -0
- package/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +38 -0
- package/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +75 -0
- package/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +53 -0
- package/.pi/harnesses/agent-hub/dispatch-triage-state.ts +15 -0
- package/.pi/harnesses/agent-hub/index.ts +115 -46
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/policy/profile-activation.ts +2 -2
- package/.pi/harnesses/agent-hub/proactive-config.ts +40 -0
- package/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.pi/harnesses/agent-hub/proactive-local.ts +88 -0
- package/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
- package/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
- package/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
- package/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
- package/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
- package/.pi/harnesses/agent-hub/prompts/context.ts +3 -0
- package/.pi/harnesses/agent-hub/prompts/system-prompt.ts +11 -1
- package/.pi/harnesses/agent-hub/research/runtime.ts +3 -1
- package/.pi/harnesses/agent-hub/research/spawn-run.ts +4 -1
- package/.pi/harnesses/agent-hub/return-extract.js +1 -1
- package/.pi/harnesses/agent-hub/session-audit.ts +6 -5
- package/.pi/harnesses/agent-hub/system1-activity.ts +67 -0
- package/.pi/harnesses/agent-hub/system1-communication-store.ts +95 -0
- package/.pi/harnesses/agent-hub/system1-report.ts +142 -1
- package/.pi/harnesses/agent-hub/system1-runtime.ts +7 -1
- package/.pi/harnesses/agent-hub/tools/context.ts +2 -0
- package/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +9 -3
- package/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.pi/harnesses/agent-hub/tools/run-flow.ts +16 -2
- package/.pi/harnesses/agent-hub/ui/detail-panel.ts +26 -5
- package/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +58 -5
- package/.pi/harnesses/agent-hub/ui/fleet-source.ts +7 -2
- package/.pi/harnesses/agent-hub/ui/grid.ts +12 -7
- package/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.pi/harnesses/agent-hub/work-mode.ts +2 -1
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/context-budget-child-prompt.ts +41 -2
- package/.pi/harnesses/lib/context-budget-hub-prompt.ts +4 -2
- package/.pi/harnesses/lib/fleet-dashboard-view.ts +15 -4
- package/.pi/harnesses/lib/fleet-detail-view.ts +68 -7
- package/.pi/harnesses/lib/fleet-read-model.ts +131 -0
- package/.pi/harnesses/lib/fleet-strip-controller.ts +2 -1
- package/.pi/harnesses/lib/fleet-strip-view.ts +45 -10
- package/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.13/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/fleet.ts +216 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/flow.ts +157 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.13/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.13/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.0.13/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.13/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.13/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.13/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.13/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.13/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.13/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.13/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.13/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.13/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.13/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.13/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.13/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.13/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.13/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.13/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.13/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.13/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.13/.pi/extensions/package.json +9 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/README.md +1360 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/acceptance.ts +199 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/context.ts +45 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/recover.ts +52 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/config/agents.ts +178 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/config/overrides.ts +160 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context/budgets.ts +204 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/delegate.ts +467 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/deterministic-fs.ts +127 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-native-complete.ts +169 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +248 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +231 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-native-types.ts +257 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-native.ts +226 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/filesystem-tool.ts +73 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/fixtures/registration-surface.json +61 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/index.ts +2336 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +125 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/no-progress.ts +359 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/policy/work-mode.ts +126 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-config.ts +40 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-local.ts +88 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/process-obligations.ts +57 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/prompts/context.ts +53 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/prompts/fragments.ts +118 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/prompts/system-prompt.ts +115 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/recover-policy.ts +27 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/recovery-contract.ts +80 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/research/runtime.ts +195 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/research/spawn-run.ts +174 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/return-contract.js +327 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/review-findings.js +104 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/run-budget.js +542 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/scope-gate.js +123 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/session-audit.ts +227 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/spawn.ts +526 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/system1-activity.ts +510 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/system1-report.ts +225 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/system1-runtime.ts +276 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/action-executors.ts +185 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/context.ts +142 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +82 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +498 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +124 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/fleet-source.ts +175 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/work-mode.ts +173 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.13/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.13/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.13/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.13/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.13/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
- package/.versions/2.0.13/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.13/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.13/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.13/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.13/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.13/.pi/harnesses/damage-control-continue/index.ts +550 -0
- package/.versions/2.0.13/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.13/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.13/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.13/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.13/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.13/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.13/.pi/harnesses/lib/context-budget-child-prompt.ts +219 -0
- package/.versions/2.0.13/.pi/harnesses/lib/context-budget-hub-prompt.ts +116 -0
- package/.versions/2.0.13/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.13/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.13/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.13/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-dashboard-view.ts +147 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-read-model.ts +536 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-strip-controller.ts +74 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.13/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.13/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.13/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.13/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.13/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.13/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.13/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.13/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.13/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.13/.pi/harnesses/lib/system1/config.js +61 -0
- package/.versions/2.0.13/.pi/harnesses/lib/system1/contracts.ts +152 -0
- package/.versions/2.0.13/.pi/harnesses/lib/system1/demo.ts +106 -0
- package/.versions/2.0.13/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.13/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.13/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.13/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.13/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.13/.pi/prompts/af-build.md +24 -0
- package/.versions/2.0.13/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.13/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.13/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.13/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.13/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.13/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.13/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.13/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.13/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.13/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.13/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.13/.version +1 -0
- package/.versions/2.0.13/agents/architect.md +24 -0
- package/.versions/2.0.13/agents/bowser.md +28 -0
- package/.versions/2.0.13/agents/builder.md +55 -0
- package/.versions/2.0.13/agents/code-reviewer.md +209 -0
- package/.versions/2.0.13/agents/deep-researcher.md +32 -0
- package/.versions/2.0.13/agents/documenter.md +22 -0
- package/.versions/2.0.13/agents/orchestrator.md +22 -0
- package/.versions/2.0.13/agents/plan-reviewer.md +83 -0
- package/.versions/2.0.13/agents/planner.md +105 -0
- package/.versions/2.0.13/agents/releaser.md +24 -0
- package/.versions/2.0.13/agents/researcher.md +30 -0
- package/.versions/2.0.13/agents/security-auditor.md +167 -0
- package/.versions/2.0.13/agents/test-engineer.md +153 -0
- package/.versions/2.0.13/agents/web-debugger.md +44 -0
- package/.versions/2.0.13/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.13/bin/catalog/harness-runtime-closure.json +73 -0
- package/.versions/2.0.13/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.13/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.13/docs/ARCHITECTURE.md +753 -0
- package/.versions/2.0.13/docs/agent-fleet-setup.md +900 -0
- package/.versions/2.0.13/docs/claude-code-coms-bridge.md +134 -0
- package/.versions/2.0.13/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.13/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.13/docs/getting-started.md +126 -0
- package/.versions/2.0.13/docs/npm-install.md +468 -0
- package/.versions/2.0.13/docs/pi-extensions.md +454 -0
- package/.versions/2.0.13/docs/pi-setup.md +92 -0
- package/.versions/2.0.13/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.13/install-manifest.json +3175 -0
- package/.versions/2.0.13/justfile +247 -0
- package/.versions/2.0.13/manifest-meta.json +1057 -0
- package/.versions/2.0.13/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.13/references/communication-contract.md +26 -0
- package/.versions/2.0.13/references/definition-of-done.md +67 -0
- package/.versions/2.0.13/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.13/references/observability-checklist.md +92 -0
- package/.versions/2.0.13/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.13/references/performance-checklist.md +236 -0
- package/.versions/2.0.13/references/prompting-patterns.md +380 -0
- package/.versions/2.0.13/references/security-checklist.md +245 -0
- package/.versions/2.0.13/references/testing-patterns.md +235 -0
- package/.versions/2.0.13/references/workflow-authoring.md +304 -0
- package/.versions/2.0.13/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.13/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.13/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.13/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.13/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.13/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.13/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.13/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.13/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.13/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.13/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.13/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.13/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.13/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.13/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.13/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.13/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.13/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.13/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.13/skills/incremental-implementation/SKILL.md +302 -0
- package/.versions/2.0.13/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.13/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.13/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.13/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.13/skills/planning-and-task-breakdown/SKILL.md +289 -0
- package/.versions/2.0.13/skills/repository-ai-setup/SKILL.md +117 -0
- package/.versions/2.0.13/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.0.13/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.0.13/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.0.13/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.0.13/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.0.13/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.13/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.13/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.14/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/fleet.ts +216 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/flow.ts +157 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.14/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.14/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.0.14/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.14/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.14/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.14/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.14/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.14/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.14/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.14/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.14/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.14/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.14/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.14/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.14/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.14/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.14/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.14/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.14/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.14/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.14/.pi/extensions/package.json +9 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/README.md +1369 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/acceptance.ts +199 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/context.ts +45 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/recover.ts +52 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/config/agents.ts +178 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/config/overrides.ts +160 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context/budgets.ts +204 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/delegate.ts +467 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/deterministic-fs.ts +127 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native-complete.ts +169 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +248 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +231 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native-types.ts +257 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native.ts +226 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +38 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +75 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +53 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-state.ts +15 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/filesystem-tool.ts +73 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/fixtures/registration-surface.json +62 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/index.ts +2370 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +125 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/no-progress.ts +359 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/work-mode.ts +126 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-config.ts +40 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-local.ts +88 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/process-obligations.ts +57 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/prompts/context.ts +54 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/prompts/fragments.ts +118 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/prompts/system-prompt.ts +122 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/recover-policy.ts +27 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/recovery-contract.ts +80 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/research/runtime.ts +195 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/research/spawn-run.ts +174 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/return-contract.js +327 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/review-findings.js +104 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/run-budget.js +542 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/scope-gate.js +123 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/session-audit.ts +227 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/spawn.ts +526 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/system1-activity.ts +510 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/system1-communication-store.ts +95 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/system1-report.ts +225 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/system1-runtime.ts +279 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/action-executors.ts +185 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/context.ts +144 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +498 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +152 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/fleet-source.ts +175 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/work-mode.ts +174 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.14/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.14/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.14/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.14/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.14/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
- package/.versions/2.0.14/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.14/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.14/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.14/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.14/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.14/.pi/harnesses/damage-control-continue/index.ts +550 -0
- package/.versions/2.0.14/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.14/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.14/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.14/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.14/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.14/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.14/.pi/harnesses/lib/context-budget-child-prompt.ts +219 -0
- package/.versions/2.0.14/.pi/harnesses/lib/context-budget-hub-prompt.ts +116 -0
- package/.versions/2.0.14/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.14/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.14/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.14/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-dashboard-view.ts +147 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-read-model.ts +536 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.14/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.14/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.14/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.14/.pi/harnesses/lib/system1/config.js +61 -0
- package/.versions/2.0.14/.pi/harnesses/lib/system1/contracts.ts +152 -0
- package/.versions/2.0.14/.pi/harnesses/lib/system1/demo.ts +106 -0
- package/.versions/2.0.14/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.14/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.14/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.14/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.14/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.14/.pi/prompts/af-build.md +24 -0
- package/.versions/2.0.14/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.14/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.14/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.14/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.14/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.14/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.14/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.14/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.14/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.14/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.14/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.14/.version +1 -0
- package/.versions/2.0.14/agents/architect.md +24 -0
- package/.versions/2.0.14/agents/bowser.md +28 -0
- package/.versions/2.0.14/agents/builder.md +55 -0
- package/.versions/2.0.14/agents/code-reviewer.md +209 -0
- package/.versions/2.0.14/agents/deep-researcher.md +32 -0
- package/.versions/2.0.14/agents/documenter.md +22 -0
- package/.versions/2.0.14/agents/orchestrator.md +22 -0
- package/.versions/2.0.14/agents/plan-reviewer.md +83 -0
- package/.versions/2.0.14/agents/planner.md +105 -0
- package/.versions/2.0.14/agents/releaser.md +24 -0
- package/.versions/2.0.14/agents/researcher.md +30 -0
- package/.versions/2.0.14/agents/security-auditor.md +167 -0
- package/.versions/2.0.14/agents/test-engineer.md +153 -0
- package/.versions/2.0.14/agents/web-debugger.md +44 -0
- package/.versions/2.0.14/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.14/bin/catalog/harness-runtime-closure.json +73 -0
- package/.versions/2.0.14/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.14/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.14/docs/ARCHITECTURE.md +754 -0
- package/.versions/2.0.14/docs/agent-fleet-setup.md +917 -0
- package/.versions/2.0.14/docs/claude-code-coms-bridge.md +134 -0
- package/.versions/2.0.14/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.14/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.14/docs/getting-started.md +126 -0
- package/.versions/2.0.14/docs/npm-install.md +476 -0
- package/.versions/2.0.14/docs/pi-extensions.md +454 -0
- package/.versions/2.0.14/docs/pi-setup.md +92 -0
- package/.versions/2.0.14/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.14/install-manifest.json +3183 -0
- package/.versions/2.0.14/justfile +247 -0
- package/.versions/2.0.14/manifest-meta.json +1065 -0
- package/.versions/2.0.14/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.14/references/communication-contract.md +26 -0
- package/.versions/2.0.14/references/definition-of-done.md +67 -0
- package/.versions/2.0.14/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.14/references/observability-checklist.md +92 -0
- package/.versions/2.0.14/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.14/references/performance-checklist.md +236 -0
- package/.versions/2.0.14/references/prompting-patterns.md +380 -0
- package/.versions/2.0.14/references/security-checklist.md +245 -0
- package/.versions/2.0.14/references/testing-patterns.md +235 -0
- package/.versions/2.0.14/references/workflow-authoring.md +304 -0
- package/.versions/2.0.14/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.14/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.14/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.14/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.14/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.14/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.14/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.14/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.14/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.14/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.14/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.14/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.14/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.14/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.14/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.14/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.14/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.14/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.14/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.14/skills/incremental-implementation/SKILL.md +302 -0
- package/.versions/2.0.14/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.14/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.14/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.14/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.14/skills/planning-and-task-breakdown/SKILL.md +289 -0
- package/.versions/2.0.14/skills/repository-ai-setup/SKILL.md +117 -0
- package/.versions/2.0.14/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.0.14/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.0.14/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.0.14/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.0.14/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.0.14/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.14/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.14/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +16 -0
- package/README.md +3 -3
- package/agents/architect.md +2 -3
- package/agents/bowser.md +2 -2
- package/agents/builder.md +2 -3
- package/agents/code-reviewer.md +7 -8
- package/agents/deep-researcher.md +3 -4
- package/agents/documenter.md +2 -3
- package/agents/orchestrator.md +2 -3
- package/agents/plan-reviewer.md +5 -6
- package/agents/planner.md +5 -6
- package/agents/releaser.md +2 -3
- package/agents/researcher.md +4 -5
- package/agents/security-auditor.md +6 -7
- package/agents/test-engineer.md +3 -4
- package/agents/web-debugger.md +3 -3
- package/agents/web-performance-auditor.md +3 -3
- package/bin/catalog/harness-runtime-closure.json +30 -18
- package/bin/cli.js +47 -1
- package/bin/lib/apply.js +16 -0
- package/bin/lib/overrides.js +37 -1
- package/bin/lib/project-provenance.js +119 -0
- package/bin/lib/scan.js +1 -1
- package/bin/lib/transaction.js +1 -1
- package/bin/lib/validate-overrides.js +37 -3
- package/catalog/agent-prompts/README.md +12 -0
- package/catalog/agent-prompts/architecture-decision-author.md +24 -0
- package/catalog/agent-prompts/requirements-author.md +21 -0
- package/catalog/commands/README.md +13 -0
- package/catalog/commands/assess-change-impact.md +19 -0
- package/catalog/commands/audit-documentation.md +19 -0
- package/catalog/rules/README.md +33 -0
- package/catalog/rules/ai/policy-authoring.md +22 -0
- package/catalog/rules/architecture/behavior-preserving-refactoring.md +25 -0
- package/catalog/rules/architecture/public-contracts.md +22 -0
- package/catalog/rules/architecture/repository-boundaries.md +21 -0
- package/catalog/rules/architecture/structural-change-registration.md +25 -0
- package/catalog/rules/backend/notification-date-time.md +25 -0
- package/catalog/rules/bundles/README.md +16 -0
- package/catalog/rules/data/enum-semantics.md +25 -0
- package/catalog/rules/data/mixed-ownership-data.md +22 -0
- package/catalog/rules/data/reporting-queries.md +34 -0
- package/catalog/rules/docs/docs-maintenance.md +25 -0
- package/catalog/rules/frameworks/vue.md +25 -0
- package/catalog/rules/frontend/async-ui-states.md +26 -0
- package/catalog/rules/frontend/established-ui-primitives.md +25 -0
- package/catalog/rules/frontend/form-validation.md +26 -0
- package/catalog/rules/frontend/navigation-contracts.md +25 -0
- package/catalog/rules/languages/csharp.md +25 -0
- package/catalog/rules/languages/javascript.md +25 -0
- package/catalog/rules/languages/sql.md +24 -0
- package/catalog/rules/security/authorization-before-effects.md +26 -0
- package/catalog/rules/security/diagnostic-data-safety.md +22 -0
- package/catalog/rules/security/response-data-minimization.md +25 -0
- package/catalog/rules/security/trusted-tenant-scope.md +26 -0
- package/catalog/rules/testing/shared-package-consumers.md +25 -0
- package/catalog/rules/testing/verification-conventions.md +24 -0
- package/docs/ARCHITECTURE.md +51 -2
- package/docs/agent-fleet-setup.md +263 -28
- package/docs/codex-session-bridge.md +1 -1
- package/docs/npm-install.md +8 -0
- package/docs/pi-extensions.md +10 -5
- package/docs/workflows.md +4 -3
- package/install-manifest.json +133 -3
- package/manifest-meta.json +85 -15
- package/package.json +7 -4
- package/skills/repository-ai-setup/SKILL.md +117 -0
- package/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/skills/repository-ai-setup/references/verify-setup.md +20 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { isAbsolute, join, resolve, sep } from "node:path";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { lstatSync, readFileSync, realpathSync } from "node:fs";
|
|
4
|
+
import { PROACTIVE_LIMITS } from "./proactive-config.ts";
|
|
5
|
+
import { validProactiveLabelKey } from "../lib/fleet-read-model.ts";
|
|
6
|
+
import type { ReviewRecord } from "./proactive-runtime.ts";
|
|
7
|
+
import type { FindingEntry, FindingReview } from "./proactive-findings.ts";
|
|
8
|
+
import { readProactiveTrace, type ProactiveTraceRecord } from "./system1-activity.ts";
|
|
9
|
+
import { projectWatchdogReadback, readWatchdogTrace, type WatchdogActivity, type WatchdogTraceRecord } from "./system1-activity.ts";
|
|
10
|
+
import type { WatchdogSystem1Session } from "./system1-runtime.ts";
|
|
11
|
+
|
|
12
|
+
export interface WatchdogTraceIntegrity { invalidRecords: number; partialTail: boolean; readError: boolean }
|
|
13
|
+
/** Read the trace, not the provider or worker accounting. Corruption remains visible as metadata. */
|
|
14
|
+
export function readWatchdogEvents(sessionDir: string): { events: WatchdogTraceRecord[]; integrity: WatchdogTraceIntegrity } {
|
|
15
|
+
const path = join(sessionDir, "artifacts", "watchdog", "events.jsonl");
|
|
16
|
+
const events: WatchdogTraceRecord[] = [];
|
|
17
|
+
const integrity: WatchdogTraceIntegrity = { invalidRecords: 0, partialTail: false, readError: false };
|
|
18
|
+
let offset = 0;
|
|
19
|
+
for (;;) {
|
|
20
|
+
const page = readWatchdogTrace(path, { after: offset, limit: 100 });
|
|
21
|
+
events.push(...page.events);
|
|
22
|
+
integrity.invalidRecords += page.invalidRecords;
|
|
23
|
+
integrity.partialTail ||= page.partialTail;
|
|
24
|
+
integrity.readError ||= page.readError;
|
|
25
|
+
if (page.nextOffset === offset) break;
|
|
26
|
+
offset = page.nextOffset;
|
|
27
|
+
}
|
|
28
|
+
return { events, integrity };
|
|
29
|
+
}
|
|
30
|
+
export function watchdogEvents(sessionDir: string): WatchdogTraceRecord[] { return readWatchdogEvents(sessionDir).events; }
|
|
31
|
+
|
|
32
|
+
const ids = (e: WatchdogTraceRecord) => [e.sessionId, e.dispatchId, e.attemptId, e.checkId, e.snapshotId].join("\u0000");
|
|
33
|
+
const span = (e: WatchdogTraceRecord) => `${ids(e)}\u0000${e.llmAttemptId ?? "unknown"}`;
|
|
34
|
+
const finite = (value: unknown): value is number => typeof value === "number" && Number.isFinite(value) && value >= 0;
|
|
35
|
+
const countBy = (values: readonly string[]) => values.reduce<Record<string, number>>((counts, value) => {
|
|
36
|
+
counts[value] = (counts[value] ?? 0) + 1;
|
|
37
|
+
return counts;
|
|
38
|
+
}, {});
|
|
39
|
+
|
|
40
|
+
export function buildWatchdogReport(events: readonly WatchdogTraceRecord[], live?: ReturnType<WatchdogActivity["live"]> | null, integrity?: WatchdogTraceIntegrity) {
|
|
41
|
+
const valid = events.filter(e => e.schema === "watchdog-trace/v1" && e.consumer === "watchdog"
|
|
42
|
+
&& [e.sessionId, e.dispatchId, e.attemptId, e.checkId, e.snapshotId].every(v => typeof v === "string" && /^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$/.test(v)));
|
|
43
|
+
// A duplicate lifecycle event makes the trace ambiguous. Never hide it behind Map's
|
|
44
|
+
// last-write-wins projection when deciding whether pilot evidence is trustworthy.
|
|
45
|
+
const seenEvents = new Set<string>();
|
|
46
|
+
let duplicateEvents = 0;
|
|
47
|
+
for (const event of valid) {
|
|
48
|
+
const key = `${event.type}\u0000${event.type.startsWith("llm_") ? span(event) : ids(event)}`;
|
|
49
|
+
if (seenEvents.has(key)) duplicateEvents++;
|
|
50
|
+
else seenEvents.add(key);
|
|
51
|
+
}
|
|
52
|
+
const starts = new Set(valid.filter(e => e.type === "evaluation_started").map(ids));
|
|
53
|
+
const finishes = new Map(valid.filter(e => e.type === "evaluation_finished").map(e => [ids(e), e]));
|
|
54
|
+
const llmStarts = new Set(valid.filter(e => e.type === "llm_started").map(span));
|
|
55
|
+
const llmFinishes = new Map(valid.filter(e => e.type === "llm_finished").map(e => [span(e), e]));
|
|
56
|
+
const decisions = new Map(valid.filter(e => e.type === "decision").map(e => [ids(e), e]));
|
|
57
|
+
const checks = new Set([...starts, ...llmStarts].map(s => s.split("\u0000").slice(0, 5).join("\u0000")));
|
|
58
|
+
const latencies = [...finishes.values()].map(e => e.elapsedMs).filter(finite).sort((a, b) => a - b);
|
|
59
|
+
const percentile = (p: number) => latencies.length ? latencies[Math.ceil(p * latencies.length) - 1] : null;
|
|
60
|
+
const usage = [...finishes.values()].map(e => e.usage).filter((u): u is { inputTokens: number; outputTokens: number } => !!u && finite(u.inputTokens) && finite(u.outputTokens));
|
|
61
|
+
const outcome = (value: unknown): string => ["continue", "advisory", "drift_stop", "judge_unavailable", "discard"].includes(String(value)) ? String(value) : "unknown";
|
|
62
|
+
const status = (value: unknown): string => ["ok", "skipped", "unavailable", "unsupported", "cancelled"].includes(String(value)) ? String(value) : "unknown";
|
|
63
|
+
const projection = projectWatchdogReadback(valid);
|
|
64
|
+
return {
|
|
65
|
+
schema: "watchdog-report/v1" as const,
|
|
66
|
+
readOnly: true as const,
|
|
67
|
+
checks: checks.size,
|
|
68
|
+
evaluations: { started: starts.size, finished: finishes.size, incomplete: [...starts].filter(k => !finishes.has(k)).length, byStatus: countBy([...finishes.values()].map(e => status(e.status))) },
|
|
69
|
+
llm: { started: llmStarts.size, finished: llmFinishes.size, incomplete: [...llmStarts].filter(k => !llmFinishes.has(k)).length,
|
|
70
|
+
parallel: [...llmStarts].filter(k => starts.has(k.split("\u0000").slice(0, 5).join("\u0000"))).length,
|
|
71
|
+
fallback: [...llmStarts].filter(k => !starts.has(k.split("\u0000").slice(0, 5).join("\u0000"))).length },
|
|
72
|
+
avoidedLlmChecks: [...decisions.entries()].filter(([k, e]) => e.source === "system1" && outcome(e.outcome) === "continue" && ![...llmStarts].some(l => l.startsWith(`${k}\u0000`))).length,
|
|
73
|
+
decisions: countBy([...decisions.values()].map(e => `${e.source === "llm" || e.source === "system1" ? e.source : "none"}:${outcome(e.outcome)}:${e.applied === "yes" || e.applied === "no" ? e.applied : "unknown"}`)),
|
|
74
|
+
latencyMs: { p50: percentile(0.5), p95: percentile(0.95), known: latencies.length },
|
|
75
|
+
usage: { known: usage.length, unknown: finishes.size - usage.length, inputTokens: usage.reduce((n, u) => n + u.inputTokens, 0), outputTokens: usage.reduce((n, u) => n + u.outputTokens, 0) },
|
|
76
|
+
observability: { degraded: (live?.degraded ?? false) || duplicateEvents > 0 || (integrity?.invalidRecords ?? 0) > 0 || (integrity?.partialTail ?? false) || (integrity?.readError ?? false) || valid.length !== events.length,
|
|
77
|
+
duplicateEvents, invalidRecords: (integrity?.invalidRecords ?? 0) + events.length - valid.length, partialTail: integrity?.partialTail ?? false, readError: integrity?.readError ?? false,
|
|
78
|
+
active: live?.active.length ?? 0, incompleteChecks: projection.filter(c => c.evaluation === "interrupted" || c.llm === "interrupted").length },
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function formatWatchdogStatus(session: WatchdogSystem1Session | null, activity: WatchdogActivity | null) {
|
|
83
|
+
const live = activity?.live();
|
|
84
|
+
const latest = live?.completed.at(-1);
|
|
85
|
+
return [
|
|
86
|
+
`System 1 · watchdog · configured ${session?.configuredMode ?? "off"} · effective ${session?.effectiveMode ?? "off"}`,
|
|
87
|
+
`Readiness: ${session?.readiness.status ?? "unavailable"}${session?.readiness.status === "ready" ? " (API access not verified)" : ""} · armed ${session?.hubArmed === true ? "yes" : "no"}`,
|
|
88
|
+
`Active: ${session?.blockLabel ?? "not enabled"} · checks ${live?.active.length ?? 0} · trace ${live?.degraded ? "degraded" : "available"}`,
|
|
89
|
+
`Last: ${latest ? `${latest.checkId} · ${latest.status} · ${latest.reason} · LLM ${latest.llm} · ${latest.outcome}` : "unknown"}`,
|
|
90
|
+
].join("\n");
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Explicit human labels for a reviewed, revision-bound candidate set. No label is inferred. */
|
|
94
|
+
export interface ProactiveHumanLabel {
|
|
95
|
+
snapshotId: string; ruleId: string; ruleHash: string; subject: string;
|
|
96
|
+
expected: "violation" | "clean" | "unknown";
|
|
97
|
+
}
|
|
98
|
+
/** Explicit local JSON file only. Caller supplies a path inside a session artifact directory.
|
|
99
|
+
* Invalid files fail closed; no auto-discovery and no file contents in errors/reports. */
|
|
100
|
+
export function loadProactiveLabels(sessionDir: string, file: string): readonly ProactiveHumanLabel[] {
|
|
101
|
+
if (!isAbsolute(file)) throw new Error("Unavailable labels file");
|
|
102
|
+
const root = resolve(sessionDir, "artifacts"), target = resolve(file);
|
|
103
|
+
try {
|
|
104
|
+
if (!target.startsWith(root + sep) || !target.endsWith(".json") || target.slice(root.length+1).split(sep).some(s => /^(?:\.|\.env|credentials?|secrets?|private)/i.test(s))) throw new Error();
|
|
105
|
+
const rootInfo = lstatSync(root), targetRelative = target.slice(root.length + 1).split(sep);
|
|
106
|
+
if (!rootInfo.isDirectory() || rootInfo.isSymbolicLink()) throw new Error();
|
|
107
|
+
let cursor = root;
|
|
108
|
+
for (const part of targetRelative) {
|
|
109
|
+
cursor = join(cursor, part);
|
|
110
|
+
if (lstatSync(cursor).isSymbolicLink()) throw new Error();
|
|
111
|
+
}
|
|
112
|
+
const canonicalRoot = realpathSync(root), canonicalTarget = realpathSync(target);
|
|
113
|
+
if (!canonicalTarget.startsWith(canonicalRoot + sep) || !lstatSync(target).isFile() || lstatSync(target).size > PROACTIVE_LIMITS.maxFileBytes) throw new Error();
|
|
114
|
+
} catch { throw new Error("Unavailable labels file"); }
|
|
115
|
+
let parsed: unknown;
|
|
116
|
+
try { parsed = JSON.parse(readFileSync(target, "utf8")); } catch { throw new Error("Invalid labels file"); }
|
|
117
|
+
if (!Array.isArray(parsed) || parsed.length > PROACTIVE_LIMITS.maxQuestions * PROACTIVE_LIMITS.maxUnits || parsed.some(label => !validLabel(label))) throw new Error("Invalid labels file");
|
|
118
|
+
return parsed;
|
|
119
|
+
}
|
|
120
|
+
const hashId = (v: unknown) => typeof v === "string" && /^[a-f0-9]{64}$/.test(v);
|
|
121
|
+
const validLabel = (v: unknown): v is ProactiveHumanLabel => !!v && typeof v === "object" && !Array.isArray(v) &&
|
|
122
|
+
Object.keys(v).sort().join(",") === "expected,ruleHash,ruleId,snapshotId,subject" &&
|
|
123
|
+
validProactiveLabelKey(v) &&
|
|
124
|
+
["violation","clean","unknown"].includes((v as ProactiveHumanLabel).expected);
|
|
125
|
+
/** Command-only opt-in: bad syntax or unreadable/unmatched files never become measured zeroes. */
|
|
126
|
+
export function commandProactiveLabels(sessionDir: string, args: string): readonly ProactiveHumanLabel[] | undefined {
|
|
127
|
+
const value = /^--labels[ \t]+(.+)$/.exec(args.trim())?.[1];
|
|
128
|
+
if (!value || !isAbsolute(value)) return undefined;
|
|
129
|
+
try { return loadProactiveLabels(sessionDir, value); } catch { return undefined; }
|
|
130
|
+
}
|
|
131
|
+
export interface ProactiveReportInput {
|
|
132
|
+
records: readonly ReviewRecord[];
|
|
133
|
+
history: readonly FindingReview[];
|
|
134
|
+
current: readonly FindingEntry[];
|
|
135
|
+
activity: readonly ProactiveTraceRecord[];
|
|
136
|
+
labels?: readonly ProactiveHumanLabel[];
|
|
137
|
+
/** Only parent-observed deliveries; child inbox publication is not a delivery receipt. */
|
|
138
|
+
feedback?: { hubDelivered: number; nativeDelivered: number | null };
|
|
139
|
+
}
|
|
140
|
+
export function compareProactiveLabels(labels?: readonly ProactiveHumanLabel[], records: readonly ReviewRecord[] = [], history: readonly FindingReview[] = []) {
|
|
141
|
+
if (!labels) return { availability:"unavailable" as const, labelled:null, truePositives:null, falseAlarms:null, misses:null, trueNegatives:null, unchecked:null, unknown:null, invalid:null, conflicts:null, precision:null, recall:null };
|
|
142
|
+
const seen = new Map<string,ProactiveHumanLabel>(); const rejected = new Set<string>(); let truePositives = 0, falseAlarms = 0, misses = 0, trueNegatives = 0, unchecked = 0, unknown = 0, invalid = 0, conflicts = 0;
|
|
143
|
+
const reviews = new Map(history.map(h => [h.turnId,h]));
|
|
144
|
+
for (const label of labels) {
|
|
145
|
+
if (!validLabel(label)) { invalid++; continue; }
|
|
146
|
+
const key = JSON.stringify([label.snapshotId,label.ruleId,label.ruleHash,label.subject]);
|
|
147
|
+
const prior=seen.get(key);
|
|
148
|
+
if (prior) { if (prior.expected !== label.expected) { conflicts++; rejected.add(key); } else invalid++; continue; } seen.set(key,label);
|
|
149
|
+
}
|
|
150
|
+
for (const [key,label] of seen) {
|
|
151
|
+
if (rejected.has(key)) continue;
|
|
152
|
+
if (label.expected === "unknown") { unknown++; continue; }
|
|
153
|
+
const matching = records.filter(r => r.snapshotId === label.snapshotId);
|
|
154
|
+
const observed = matching.some(r => reviews.get(r.turnId)?.findings.some(f => f.state === "current" && f.snapshotId === label.snapshotId && f.ruleId === label.ruleId && f.ruleHash === label.ruleHash && f.subject === label.subject)) ? "finding" :
|
|
155
|
+
matching.some(r => r.status === "reviewed" && r.assessment?.status === "reviewed" && !r.assessment.gaps.length && r.assessment.checkedUnits?.some(u => u.ruleId === label.ruleId && u.ruleHash === label.ruleHash && u.subject === label.subject && (u.verdict === "no_observed_violation" || u.verdict === "not_applicable"))) ? "clear" : "unchecked";
|
|
156
|
+
if (observed === "unchecked") { unchecked++; continue; }
|
|
157
|
+
if (label.expected === "violation") { if (observed === "finding") truePositives++; else misses++; }
|
|
158
|
+
else if (observed === "finding") falseAlarms++; else trueNegatives++;
|
|
159
|
+
}
|
|
160
|
+
return { availability:"available" as const, source:"explicit-human-labels" as const, labelled:seen.size-rejected.size, truePositives,falseAlarms,misses,trueNegatives,unchecked,unknown,invalid,conflicts,
|
|
161
|
+
precision:truePositives+falseAlarms ? truePositives/(truePositives+falseAlarms) : null,
|
|
162
|
+
recall:truePositives+misses ? truePositives/(truePositives+misses) : null };
|
|
163
|
+
}
|
|
164
|
+
/** Metadata-only projection: never returns supplied task/rule/source/provider text. */
|
|
165
|
+
export function buildProactiveReport(input?: ProactiveReportInput) {
|
|
166
|
+
const records = new Map<string, ReviewRecord>(); let duplicates = 0;
|
|
167
|
+
for (const row of input?.records ?? []) { if (records.has(row.turnId)) { duplicates++; continue; } records.set(row.turnId, row); }
|
|
168
|
+
const history = new Map((input?.history ?? []).map(row => [row.turnId, row]));
|
|
169
|
+
const starts = new Map<string, number>(), ends = new Map<string, number>(), evalStarts = new Set<string>(), evalEnds = new Set<string>(), events = new Set<string>();
|
|
170
|
+
for (const e of input?.activity ?? []) {
|
|
171
|
+
if (e.schema !== "proactive-review-trace/v1" || e.consumer !== "proactive-review" || !/^[a-f0-9]{64}$/.test(e.jobId) || !finite(e.at)) continue;
|
|
172
|
+
const key = JSON.stringify([e.sessionId,e.jobId,e.type,e.evaluationId]);
|
|
173
|
+
if (events.has(key)) { duplicates++; continue; } events.add(key);
|
|
174
|
+
const job = `${e.sessionId}:${e.jobId}`;
|
|
175
|
+
if (e.type === "job_started") starts.set(job,e.at);
|
|
176
|
+
if (e.type === "job_finished") ends.set(job,e.at);
|
|
177
|
+
if (e.evaluationId && e.type === "evaluation_started") evalStarts.add(`${job}:${e.evaluationId}`);
|
|
178
|
+
if (e.evaluationId && e.type === "evaluation_finished") evalEnds.add(`${job}:${e.evaluationId}`);
|
|
179
|
+
}
|
|
180
|
+
const rows = [...records.values()];
|
|
181
|
+
const statuses = new Set(["reviewed","not_checked","superseded","queue_timeout","backlog_full","session_budget","cancelled","unavailable","no_new_evidence","not_instrumented"]);
|
|
182
|
+
const turns = rows.filter(r => r.status !== "not_instrumented");
|
|
183
|
+
const attempts = rows.filter(r => r.status === "not_instrumented").length;
|
|
184
|
+
const reviewed = turns.filter(r => r.status === "reviewed" && r.assessment?.status === "reviewed" && !r.assessment.gaps.length && history.get(r.turnId)?.coverage.status !== "partial").length;
|
|
185
|
+
const partial = turns.filter(r => r.status === "not_checked" || (r.status === "reviewed" && history.get(r.turnId)?.coverage.status === "partial")).length;
|
|
186
|
+
const coverageUnknown = turns.filter(r => r.status === "reviewed" && !((r.assessment?.status === "reviewed" && !r.assessment.gaps.length && history.get(r.turnId)?.coverage.status !== "partial") || history.get(r.turnId)?.coverage.status === "partial")).length;
|
|
187
|
+
const inventoryEligible = turns.filter(r => r.status !== "no_new_evidence");
|
|
188
|
+
const turnsWithoutRuleInventory = inventoryEligible.filter(r => !Array.isArray(r.assessment?.ruleCoverage)).length;
|
|
189
|
+
const active = [...starts.keys()].filter(k => !ends.has(k)).length;
|
|
190
|
+
const latencies = [...ends].flatMap(([id,end]) => { const start=starts.get(id); return start !== undefined && end >= start ? [end-start] : []; }).sort((a,b)=>a-b);
|
|
191
|
+
const percentile=(p:number)=>latencies.length ? latencies[Math.ceil(latencies.length*p)-1] : null;
|
|
192
|
+
const evaluations = rows.flatMap(r => r.assessment?.evaluations ?? []);
|
|
193
|
+
const usage = evaluations.flatMap(e => e.status === "ok" && e.metadata?.usage && finite(e.metadata.usage.inputTokens) && finite(e.metadata.usage.outputTokens) ? [e.metadata.usage] : []);
|
|
194
|
+
const modelLatencies = evaluations.flatMap(e => e.status === "ok" && finite(e.metadata?.latencyMs) ? [e.metadata!.latencyMs] : []).sort((a,b)=>a-b);
|
|
195
|
+
const findings = new Map((input?.current ?? []).map(f => [f.id,f]));
|
|
196
|
+
const gapCount = rows.reduce((n,r)=>n+Math.max(r.assessment?.gaps.length ?? 0, history.get(r.turnId)?.coverage.gaps.length ?? 0),0);
|
|
197
|
+
const uncovered = new Map<string,{ruleId:string;ruleHash:string;status:"not_selected"|"uncertain"|"insufficient";reason:string;count:number}>();
|
|
198
|
+
for (const row of rows) for (const item of row.assessment?.ruleCoverage ?? []) {
|
|
199
|
+
if (!hashId(item.ruleHash) || typeof item.ruleId !== "string" || !["not_selected","uncertain","insufficient"].includes(item.status) || !["budget","provisional_not_applicable","selection","assessment_incomplete","insufficient_evidence","rule_conflict"].includes(item.reason)) continue;
|
|
200
|
+
const key=JSON.stringify([item.ruleId,item.ruleHash,item.status,item.reason]);const prior=uncovered.get(key);
|
|
201
|
+
uncovered.set(key,{ruleId:createHash("sha256").update(item.ruleId).digest("hex"),ruleHash:item.ruleHash,status:item.status,reason:item.reason,count:(prior?.count??0)+1});
|
|
202
|
+
}
|
|
203
|
+
return { schema:"proactive-review-report/v1" as const, consumer:"proactive-review" as const, readOnly:true as const,
|
|
204
|
+
availability: input ? "session-memory" : "unavailable", scope:"retained-session-evidence", completeness:"bounded-history; missing data is not checked",
|
|
205
|
+
turns:{observed:turns.length+active,eligible:turns.filter(r=>r.status!=="no_new_evidence").length+active,reviewed,partial,coverageUnknown:coverageUnknown+active,skipped:turns.filter(r=>r.status!=="reviewed"&&r.status!=="not_checked").length,active,byStatus:countBy(turns.map(r=>statuses.has(r.status)?r.status:"unavailable"))},
|
|
206
|
+
attempts:{notInstrumented:attempts},
|
|
207
|
+
coverage:{gapCount,uncoveredRulesKnown:inventoryEligible.length>0 && turnsWithoutRuleInventory===0 && active===0,turnsWithoutRuleInventory:turnsWithoutRuleInventory+active,unboundInventory:rows.reduce((n,r)=>n+(r.assessment?.gaps.filter(g=>g==="unbound_rule_inventory"||g==="unbound_rules").length??0),0),uncoveredRules:[...uncovered.values()]},
|
|
208
|
+
evaluations:{started:evalStarts.size,finished:evalEnds.size,metadataKnown:evaluations.filter(e=>e.status==="ok"&&e.metadata).length},
|
|
209
|
+
findings:{deterministic:[...findings.values()].filter(f=>f.source==="deterministic").length,system1Suspicions:[...findings.values()].filter(f=>f.source==="system1").length,stale:[...findings.values()].filter(f=>f.state==="stale").length,resolved:[...findings.values()].filter(f=>f.state==="resolved").length,notValidatedBugs:true},
|
|
210
|
+
feedback:{hubDelivered:input?.feedback&&finite(input.feedback.hubDelivered)?input.feedback.hubDelivered:null,nativeDelivered:input?.feedback&&finite(input.feedback.nativeDelivered)?input.feedback.nativeDelivered:null},
|
|
211
|
+
latencyMs:{p50:percentile(.5),p95:percentile(.95),known:latencies.length,modelP50:modelLatencies.length?modelLatencies[Math.ceil(modelLatencies.length*.5)-1]:null,modelP95:modelLatencies.length?modelLatencies[Math.ceil(modelLatencies.length*.95)-1]:null},
|
|
212
|
+
usage:{known:usage.length,unknown:Math.max(evalStarts.size,evaluations.length)-usage.length,inputTokens:usage.reduce((n,u)=>n+u.inputTokens,0),outputTokens:usage.reduce((n,u)=>n+u.outputTokens,0)},
|
|
213
|
+
labels:compareProactiveLabels(input?.labels,rows,input?.history),observability:{duplicateEvents:duplicates,incompleteJobs:active} };
|
|
214
|
+
}
|
|
215
|
+
/** Disk fallback exposes only trace metrics: missing retained review data stays unavailable. */
|
|
216
|
+
export function readProactiveReport(sessionDir:string) {
|
|
217
|
+
const events:ProactiveTraceRecord[]=[]; let offset=0,invalidRecords=0,partialTail=false,readError=false;
|
|
218
|
+
for(let pageCount=0;pageCount<1000;pageCount++) {
|
|
219
|
+
const page=readProactiveTrace(join(sessionDir,"artifacts","proactive-activity","proactive-events.jsonl"),{after:offset,limit:100});
|
|
220
|
+
events.push(...page.events); invalidRecords+=page.invalidRecords;partialTail ||=page.partialTail;readError ||=page.readError;
|
|
221
|
+
if(page.nextOffset===offset)break;offset=page.nextOffset;
|
|
222
|
+
}
|
|
223
|
+
const report=buildProactiveReport({records:[],history:[],current:[],activity:events});
|
|
224
|
+
return {...report,availability:readError?"unavailable":"trace-only",turns:{...report.turns,observed:null,eligible:null,reviewed:null,partial:null,coverageUnknown:null,skipped:null},observability:{...report.observability,invalidRecords,partialTail,readError}};
|
|
225
|
+
}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { SYSTEM1_CONFIG_RELATIVE_PATH } from "../lib/system1/config.js";
|
|
4
|
+
import type { JsonText, System1Availability, System1Result, System1Service } from "../lib/system1/contracts.ts";
|
|
5
|
+
import { createSystem1Runtime, DEFAULT_SYSTEM1_TIMEOUT_MS } from "../lib/system1/service.ts";
|
|
6
|
+
import type { JevTransport } from "../lib/system1/jev.ts";
|
|
7
|
+
import { normalizeWatchdogSetting } from "./drift-watchdog.js";
|
|
8
|
+
import { WATCHDOG_POLICY_VERSION, type AcceptedWatchdogProfile } from "./drift-system1-policy.ts";
|
|
9
|
+
import {
|
|
10
|
+
WATCHDOG_QUESTIONS,
|
|
11
|
+
WATCHDOG_QUESTIONS_VERSION,
|
|
12
|
+
WATCHDOG_REQUIRED_CAPABILITIES,
|
|
13
|
+
WATCHDOG_STATE_MAX_BYTES,
|
|
14
|
+
WATCHDOG_STATE_VERSION,
|
|
15
|
+
buildWatchdogState,
|
|
16
|
+
parseWatchdogStateV1,
|
|
17
|
+
type WatchdogStateBuild,
|
|
18
|
+
type WatchdogStateV1,
|
|
19
|
+
} from "./drift-system1.ts";
|
|
20
|
+
|
|
21
|
+
export const WATCHDOG_SYSTEM1_MODES = ["off", "shadow", "active"] as const;
|
|
22
|
+
export type WatchdogSystem1Mode = (typeof WATCHDOG_SYSTEM1_MODES)[number];
|
|
23
|
+
export const DEFAULT_WATCHDOG_SYSTEM1_MODE: WatchdogSystem1Mode = "off";
|
|
24
|
+
/** Production approved profiles stay empty until a separate reviewed G2 change. */
|
|
25
|
+
export const APPROVED_WATCHDOG_PROFILES: readonly AcceptedWatchdogProfile[] = Object.freeze([]);
|
|
26
|
+
/** Explicit opt-in experiment, NOT G2-approved: advisory scope only, never terminal rules. */
|
|
27
|
+
export const EXPERIMENTAL_SCOPE_PROFILE: AcceptedWatchdogProfile = Object.freeze({
|
|
28
|
+
policyVersion: WATCHDOG_POLICY_VERSION,
|
|
29
|
+
stateVersion: WATCHDOG_STATE_VERSION,
|
|
30
|
+
questionsVersion: WATCHDOG_QUESTIONS_VERSION,
|
|
31
|
+
provider: "typesafe",
|
|
32
|
+
model: "jev-1.13.0",
|
|
33
|
+
rules: Object.freeze(["scope"]),
|
|
34
|
+
minConfidence: 0.95,
|
|
35
|
+
maxContradiction: 0.05,
|
|
36
|
+
});
|
|
37
|
+
export const ACTIVE_BLOCKED_LABEL = "active blocked: calibration_required";
|
|
38
|
+
|
|
39
|
+
export type WatchdogConsumerSkipReason =
|
|
40
|
+
| "consumer_off"
|
|
41
|
+
| "feature_unselected"
|
|
42
|
+
| "watchdog_disarmed"
|
|
43
|
+
| "state_too_large"
|
|
44
|
+
| "invalid_state"
|
|
45
|
+
| "disposed";
|
|
46
|
+
|
|
47
|
+
export type WatchdogConsumerResult =
|
|
48
|
+
| System1Result
|
|
49
|
+
| { status: "skipped"; reason: WatchdogConsumerSkipReason };
|
|
50
|
+
|
|
51
|
+
export interface WatchdogSystem1Session {
|
|
52
|
+
readonly configuredMode: WatchdogSystem1Mode;
|
|
53
|
+
readonly effectiveMode: "off" | "shadow" | "active";
|
|
54
|
+
readonly requestedModel: string;
|
|
55
|
+
readonly blockLabel: string | null;
|
|
56
|
+
readonly readiness: System1Availability;
|
|
57
|
+
/** Shared session service; no second provider or consumer policy. Undefined when unavailable/disposed. */
|
|
58
|
+
readonly sharedService: System1Service | undefined;
|
|
59
|
+
readonly approvedProfiles: readonly AcceptedWatchdogProfile[];
|
|
60
|
+
readonly hubArmed: boolean;
|
|
61
|
+
readonly warnings: readonly string[];
|
|
62
|
+
disposed: boolean;
|
|
63
|
+
evaluate(input: { armed: boolean; state: WatchdogStateV1 | WatchdogStateBuild; signal?: AbortSignal }): Promise<WatchdogConsumerResult>;
|
|
64
|
+
dispose(): void;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function normalizeWatchdogSystem1Mode(value: unknown): { mode: WatchdogSystem1Mode; warning?: string } {
|
|
68
|
+
if (value == null || String(value).trim() === "") return { mode: DEFAULT_WATCHDOG_SYSTEM1_MODE };
|
|
69
|
+
const mode = String(value).trim().toLowerCase();
|
|
70
|
+
if ((WATCHDOG_SYSTEM1_MODES as readonly string[]).includes(mode)) return { mode: mode as WatchdogSystem1Mode };
|
|
71
|
+
return {
|
|
72
|
+
mode: "off",
|
|
73
|
+
warning: `watchdog-system1 "${value}" is not one of ${WATCHDOG_SYSTEM1_MODES.join("|")} — using off`,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const WATCHDOG_PROFILE_RULES = new Set(["scope", "loop", "failures", "toolcap"]);
|
|
78
|
+
|
|
79
|
+
function eligibleProfiles(profiles: readonly AcceptedWatchdogProfile[], config: unknown): readonly AcceptedWatchdogProfile[] {
|
|
80
|
+
const requested = config && typeof config === "object" ? config as { provider?: unknown; model?: unknown } : null;
|
|
81
|
+
return profiles.filter(profile => profile.policyVersion === WATCHDOG_POLICY_VERSION
|
|
82
|
+
&& profile.stateVersion === WATCHDOG_STATE_VERSION && profile.questionsVersion === WATCHDOG_QUESTIONS_VERSION
|
|
83
|
+
&& profile.provider === requested?.provider && profile.model === requested?.model
|
|
84
|
+
&& profile.rules.length > 0 && profile.rules.every(rule => WATCHDOG_PROFILE_RULES.has(rule))
|
|
85
|
+
&& Number.isFinite(profile.minConfidence) && profile.minConfidence >= 0 && profile.minConfidence <= 1
|
|
86
|
+
&& Number.isFinite(profile.maxContradiction) && profile.maxContradiction >= 0 && profile.maxContradiction <= 1);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function effectiveMode(configured: WatchdogSystem1Mode, profiles: readonly AcceptedWatchdogProfile[]): "off" | "shadow" | "active" {
|
|
90
|
+
return configured === "off" ? "off" : configured === "active" && profiles.length > 0 ? "active" : "shadow";
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface ReadWatchdogSystem1SnapshotInput {
|
|
94
|
+
cwd: string;
|
|
95
|
+
configuredMode: WatchdogSystem1Mode;
|
|
96
|
+
watchdogSetting: string;
|
|
97
|
+
env?: Record<string, string | undefined>;
|
|
98
|
+
transport?: JevTransport;
|
|
99
|
+
warnings?: readonly string[];
|
|
100
|
+
wrapService?: (service: System1Service) => System1Service;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** Caller-owned reads. Matches doctor selection: only an explicit features.system1 true counts. Does not load dotenv. */
|
|
104
|
+
export function readWatchdogSystem1Snapshot(input: ReadWatchdogSystem1SnapshotInput): CreateWatchdogSystem1SessionOptions {
|
|
105
|
+
return {
|
|
106
|
+
configuredMode: input.configuredMode,
|
|
107
|
+
watchdogArmed: normalizeWatchdogSetting(input.watchdogSetting) !== "off",
|
|
108
|
+
selected: readFeatureSelected(input.cwd),
|
|
109
|
+
config: readSystem1Config(input.cwd),
|
|
110
|
+
env: input.env ?? {},
|
|
111
|
+
transport: input.transport,
|
|
112
|
+
warnings: input.warnings,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
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
|
+
export interface CreateWatchdogSystem1SessionOptions {
|
|
138
|
+
configuredMode: WatchdogSystem1Mode;
|
|
139
|
+
watchdogArmed: boolean;
|
|
140
|
+
selected: boolean;
|
|
141
|
+
config: unknown;
|
|
142
|
+
env?: Record<string, string | undefined>;
|
|
143
|
+
transport?: JevTransport;
|
|
144
|
+
/** Test-only service/profile injection. Production wiring must omit both. */
|
|
145
|
+
service?: System1Service;
|
|
146
|
+
approvedProfilesForTest?: readonly AcceptedWatchdogProfile[];
|
|
147
|
+
readiness?: System1Availability;
|
|
148
|
+
warnings?: readonly string[];
|
|
149
|
+
wrapService?: (service: System1Service) => System1Service;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function createWatchdogSystem1Session(options: CreateWatchdogSystem1SessionOptions): WatchdogSystem1Session {
|
|
153
|
+
const runtime = options.service
|
|
154
|
+
? { readiness: options.readiness ?? { status: "ready" as const }, service: options.service }
|
|
155
|
+
: createSystem1Runtime({
|
|
156
|
+
selected: options.selected,
|
|
157
|
+
config: options.config,
|
|
158
|
+
env: options.env ?? {},
|
|
159
|
+
transport: options.transport,
|
|
160
|
+
});
|
|
161
|
+
const service = options.wrapService ? options.wrapService(runtime.service) : runtime.service;
|
|
162
|
+
const configuredMode = options.configuredMode;
|
|
163
|
+
// Only a profile matching this session's immutable provider/model and policy can open active.
|
|
164
|
+
// An unrelated shipped profile must not turn configured active into effective active.
|
|
165
|
+
// The experimental profile is only eligible after explicit consumer opt-in;
|
|
166
|
+
// provider/model/version/rule checks still apply. It is not a G2-approved profile.
|
|
167
|
+
const candidates = options.approvedProfilesForTest ?? (configuredMode === "active"
|
|
168
|
+
? [EXPERIMENTAL_SCOPE_PROFILE] : APPROVED_WATCHDOG_PROFILES);
|
|
169
|
+
const profiles = candidates.length ? eligibleProfiles(candidates, options.config) : candidates;
|
|
170
|
+
const controller = new AbortController();
|
|
171
|
+
let disposed = false;
|
|
172
|
+
const session: WatchdogSystem1Session = {
|
|
173
|
+
configuredMode,
|
|
174
|
+
effectiveMode: effectiveMode(configuredMode, profiles),
|
|
175
|
+
requestedModel: typeof (options.config as { model?: unknown } | null)?.model === "string" ? (options.config as { model: string }).model : "unknown",
|
|
176
|
+
blockLabel: configuredMode === "active"
|
|
177
|
+
? profiles.length === 0 ? ACTIVE_BLOCKED_LABEL : options.approvedProfilesForTest === undefined ? "experimental: scope only; G2 not validated" : null
|
|
178
|
+
: null,
|
|
179
|
+
readiness: runtime.readiness,
|
|
180
|
+
get sharedService() { return !disposed && options.selected && runtime.readiness.status === "ready" ? service : undefined; },
|
|
181
|
+
approvedProfiles: profiles,
|
|
182
|
+
hubArmed: options.watchdogArmed,
|
|
183
|
+
warnings: Object.freeze([...(options.warnings ?? [])]),
|
|
184
|
+
disposed: false,
|
|
185
|
+
async evaluate(input) {
|
|
186
|
+
if (disposed || controller.signal.aborted) return { status: "skipped", reason: "disposed" };
|
|
187
|
+
if (configuredMode === "off") return { status: "skipped", reason: "consumer_off" };
|
|
188
|
+
if (!options.selected) return { status: "skipped", reason: "feature_unselected" };
|
|
189
|
+
if (runtime.readiness.status !== "ready") return runtime.readiness;
|
|
190
|
+
if (!input.armed) return { status: "skipped", reason: "watchdog_disarmed" };
|
|
191
|
+
const outbound = consumerOutboundState(input.state);
|
|
192
|
+
if (!outbound.ok) return { status: "skipped", reason: outbound.reason };
|
|
193
|
+
if (input.signal?.aborted) return { status: "cancelled" };
|
|
194
|
+
const call = new AbortController();
|
|
195
|
+
const abortCall = () => call.abort();
|
|
196
|
+
controller.signal.addEventListener("abort", abortCall, { once: true });
|
|
197
|
+
input.signal?.addEventListener("abort", abortCall, { once: true });
|
|
198
|
+
try {
|
|
199
|
+
return await service.evaluate({
|
|
200
|
+
state: outbound.state,
|
|
201
|
+
questions: WATCHDOG_QUESTIONS,
|
|
202
|
+
questionSetVersion: WATCHDOG_QUESTIONS_VERSION,
|
|
203
|
+
timeoutMs: DEFAULT_SYSTEM1_TIMEOUT_MS,
|
|
204
|
+
signal: call.signal,
|
|
205
|
+
requiredCapabilities: WATCHDOG_REQUIRED_CAPABILITIES,
|
|
206
|
+
});
|
|
207
|
+
} finally {
|
|
208
|
+
controller.signal.removeEventListener("abort", abortCall);
|
|
209
|
+
input.signal?.removeEventListener("abort", abortCall);
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
dispose() {
|
|
213
|
+
if (disposed) return;
|
|
214
|
+
disposed = true;
|
|
215
|
+
session.disposed = true;
|
|
216
|
+
controller.abort();
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
return session;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function consumerOutboundState(state: unknown): { ok: true; state: JsonText } | { ok: false; reason: "state_too_large" | "invalid_state" } {
|
|
223
|
+
if (isOversizedBuild(state)) return { ok: false, reason: "state_too_large" };
|
|
224
|
+
const candidate = isSuccessfulBuild(state) ? state.state : state;
|
|
225
|
+
if (isRecord(state) && "ok" in state && !isSuccessfulBuild(state) && !isOversizedBuild(state)) {
|
|
226
|
+
return { ok: false, reason: "invalid_state" };
|
|
227
|
+
}
|
|
228
|
+
const parsed = parseWatchdogStateV1(candidate);
|
|
229
|
+
if (!parsed || parsed.schema !== WATCHDOG_STATE_VERSION) return { ok: false, reason: "invalid_state" };
|
|
230
|
+
return byteGate(parsed);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
234
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
function exactKeys(value: Record<string, unknown>, keys: readonly string[]): boolean {
|
|
238
|
+
const actual = Object.keys(value);
|
|
239
|
+
return actual.length === keys.length && keys.every((key) => Object.hasOwn(value, key));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
function isOversizedBuild(state: unknown): state is Extract<WatchdogStateBuild, { ok: false }> {
|
|
243
|
+
return isRecord(state)
|
|
244
|
+
&& exactKeys(state, ["ok", "reason", "bytes"])
|
|
245
|
+
&& state.ok === false
|
|
246
|
+
&& state.reason === "state_too_large"
|
|
247
|
+
&& typeof state.bytes === "number"
|
|
248
|
+
&& Number.isFinite(state.bytes);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function isSuccessfulBuild(state: unknown): state is Extract<WatchdogStateBuild, { ok: true }> {
|
|
252
|
+
return isRecord(state)
|
|
253
|
+
&& exactKeys(state, ["ok", "state", "bytes"])
|
|
254
|
+
&& state.ok === true
|
|
255
|
+
&& typeof state.bytes === "number"
|
|
256
|
+
&& Number.isFinite(state.bytes);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
function byteGate(state: WatchdogStateV1): { ok: true; state: JsonText } | { ok: false; reason: "state_too_large" | "invalid_state" } {
|
|
260
|
+
let serialized: string;
|
|
261
|
+
try {
|
|
262
|
+
serialized = JSON.stringify(state);
|
|
263
|
+
} catch {
|
|
264
|
+
return { ok: false, reason: "invalid_state" };
|
|
265
|
+
}
|
|
266
|
+
if (Buffer.byteLength(serialized, "utf8") > WATCHDOG_STATE_MAX_BYTES) return { ok: false, reason: "state_too_large" };
|
|
267
|
+
const parsed: unknown = JSON.parse(serialized);
|
|
268
|
+
if (!parseWatchdogStateV1(parsed) || typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
269
|
+
return { ok: false, reason: "invalid_state" };
|
|
270
|
+
}
|
|
271
|
+
return { ok: true, state: parsed as JsonText };
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export function disposeWatchdogSystem1Session(session: WatchdogSystem1Session | null): null {
|
|
275
|
+
session?.dispose();
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export { buildWatchdogState };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { posix } from "node:path";
|
|
2
|
+
|
|
3
|
+
export interface TaskResumeInput {
|
|
4
|
+
taskId: string;
|
|
5
|
+
instructions: string;
|
|
6
|
+
scope?: readonly string[];
|
|
7
|
+
deliverables?: readonly string[];
|
|
8
|
+
artifacts?: readonly string[];
|
|
9
|
+
model?: string | null;
|
|
10
|
+
permissions?: readonly string[] | string;
|
|
11
|
+
previous?: TaskResumeContract | null;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface TaskResumeContract {
|
|
15
|
+
taskId: string;
|
|
16
|
+
instructions: string;
|
|
17
|
+
scope: string[];
|
|
18
|
+
deliverables: string[];
|
|
19
|
+
artifacts: string[];
|
|
20
|
+
model: string | null;
|
|
21
|
+
permissions: string[];
|
|
22
|
+
resumeAllowed: boolean;
|
|
23
|
+
inheritedUnfinishedInstructions: boolean;
|
|
24
|
+
identity: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function normalizeText(value: unknown): string {
|
|
28
|
+
return String(value ?? "").trim().replace(/\s+/g, " ");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function normalizeList(values: readonly string[] | undefined): string[] {
|
|
32
|
+
return [...new Set((values ?? []).map(value => posix.normalize(String(value).trim().replace(/\\/g, "/")).replace(/^\.\//, "").replace(/\/$/, "")).filter(Boolean))].sort();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function normalizePermissions(value: readonly string[] | string | undefined): string[] {
|
|
36
|
+
return normalizeList(typeof value === "string" ? value.split(",") : value);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function identityOf(contract: Omit<TaskResumeContract, "resumeAllowed" | "inheritedUnfinishedInstructions" | "identity">): string {
|
|
40
|
+
return JSON.stringify([
|
|
41
|
+
contract.taskId,
|
|
42
|
+
contract.instructions,
|
|
43
|
+
contract.scope,
|
|
44
|
+
contract.deliverables,
|
|
45
|
+
contract.artifacts,
|
|
46
|
+
contract.model,
|
|
47
|
+
contract.permissions,
|
|
48
|
+
]);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Bind Pi session reuse to the exact current task and capability contract. */
|
|
52
|
+
export function bindResume(input: TaskResumeInput): TaskResumeContract {
|
|
53
|
+
const current = {
|
|
54
|
+
taskId: normalizeText(input.taskId),
|
|
55
|
+
instructions: normalizeText(input.instructions),
|
|
56
|
+
scope: normalizeList(input.scope),
|
|
57
|
+
deliverables: normalizeList(input.deliverables),
|
|
58
|
+
artifacts: normalizeList(input.artifacts),
|
|
59
|
+
model: normalizeText(input.model) || null,
|
|
60
|
+
permissions: normalizePermissions(input.permissions),
|
|
61
|
+
};
|
|
62
|
+
const identity = identityOf(current);
|
|
63
|
+
const resumeAllowed = !!input.previous && input.previous.identity === identity;
|
|
64
|
+
return {
|
|
65
|
+
...current,
|
|
66
|
+
resumeAllowed,
|
|
67
|
+
inheritedUnfinishedInstructions: resumeAllowed,
|
|
68
|
+
identity,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { redactTimelineEvent, type FleetTranscriptStore } from "../lib/fleet-transcript-store.ts";
|
|
2
|
+
import type { TimelineEntry } from "./ui/zoom.ts";
|
|
3
|
+
|
|
4
|
+
const MAX_LIVE_TIMELINE_ENTRIES = 500;
|
|
5
|
+
export const MAX_LIVE_ENTRY_CHARS = 64 * 1024;
|
|
6
|
+
export const SYSTEM1_CARD_TITLE = "System 1";
|
|
7
|
+
|
|
8
|
+
export function isSystem1TimelineCard(entry: { kind?: string; title?: string } | undefined): boolean {
|
|
9
|
+
return entry?.kind === "text" && entry.title === SYSTEM1_CARD_TITLE;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type TimelineTarget = {
|
|
13
|
+
timeline: TimelineEntry[];
|
|
14
|
+
transcriptStore?: FleetTranscriptStore;
|
|
15
|
+
transcriptPending?: TimelineEntry;
|
|
16
|
+
transcriptFlushTimer?: ReturnType<typeof setTimeout>;
|
|
17
|
+
zoomRender?: (force?: boolean) => void;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export function flushTimelineStore(target: TimelineTarget): void {
|
|
21
|
+
if (target.transcriptFlushTimer) clearTimeout(target.transcriptFlushTimer);
|
|
22
|
+
target.transcriptFlushTimer = undefined;
|
|
23
|
+
if (!target.transcriptPending) return;
|
|
24
|
+
const pending = target.transcriptPending;
|
|
25
|
+
target.transcriptStore?.append({ ...pending, kind: pending.kind === "tool" ? "tool-result" : pending.kind });
|
|
26
|
+
target.transcriptPending = undefined;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function appendTimelineEvent(target: TimelineTarget, event: TimelineEntry): TimelineEntry {
|
|
30
|
+
flushTimelineStore(target);
|
|
31
|
+
// The live UI retains the legacy "tool" kind, but the durable transcript
|
|
32
|
+
// accepts only start/result events; persist a generic tool row as a result.
|
|
33
|
+
const safe = redactTimelineEvent({ ...event, kind: event.kind === "tool" ? "tool-result" : event.kind });
|
|
34
|
+
target.transcriptStore?.append(safe);
|
|
35
|
+
target.timeline.push({ ...safe, kind: event.kind, content: safe.content.slice(-MAX_LIVE_ENTRY_CHARS) });
|
|
36
|
+
if (target.timeline.length > MAX_LIVE_TIMELINE_ENTRIES) target.timeline.splice(0, target.timeline.length - MAX_LIVE_TIMELINE_ENTRIES);
|
|
37
|
+
return safe;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Safe System 1 metadata. Kind stays text; the title is the merge boundary. */
|
|
41
|
+
export function appendSystem1TimelineCard(target: TimelineTarget, content: string): TimelineEntry {
|
|
42
|
+
return appendTimelineEvent(target, {
|
|
43
|
+
kind: "text",
|
|
44
|
+
title: SYSTEM1_CARD_TITLE,
|
|
45
|
+
content,
|
|
46
|
+
timestamp: Date.now(),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function appendTimelineText(target: TimelineTarget, kind: "text" | "thinking", delta: string): void {
|
|
51
|
+
if (!delta) return;
|
|
52
|
+
const safe = redactTimelineEvent({ kind, title: kind === "text" ? "Assistant" : "Thinking", content: delta, timestamp: Date.now() }) as TimelineEntry;
|
|
53
|
+
if (target.transcriptPending?.kind === kind) target.transcriptPending.content += safe.content;
|
|
54
|
+
else { flushTimelineStore(target); target.transcriptPending = { ...safe }; }
|
|
55
|
+
if (!target.transcriptFlushTimer) {
|
|
56
|
+
target.transcriptFlushTimer = setTimeout(() => { flushTimelineStore(target); target.zoomRender?.(); }, 100);
|
|
57
|
+
try { (target.transcriptFlushTimer as any).unref?.(); } catch {}
|
|
58
|
+
}
|
|
59
|
+
let remaining = safe.content;
|
|
60
|
+
while (remaining) {
|
|
61
|
+
const last = target.timeline[target.timeline.length - 1];
|
|
62
|
+
if (last && last.kind === kind && !isSystem1TimelineCard(last) && last.content.length < MAX_LIVE_ENTRY_CHARS) {
|
|
63
|
+
const room = MAX_LIVE_ENTRY_CHARS - last.content.length;
|
|
64
|
+
last.content += remaining.slice(0, room);
|
|
65
|
+
remaining = remaining.slice(room);
|
|
66
|
+
} else {
|
|
67
|
+
target.timeline.push({ ...safe, content: remaining.slice(0, MAX_LIVE_ENTRY_CHARS) });
|
|
68
|
+
remaining = remaining.slice(MAX_LIVE_ENTRY_CHARS);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (target.timeline.length > MAX_LIVE_TIMELINE_ENTRIES) target.timeline.splice(0, target.timeline.length - MAX_LIVE_TIMELINE_ENTRIES);
|
|
72
|
+
}
|