@chankov/agent-fleet 2.0.11 → 2.0.13
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/lib/flow-maintenance.ts +1 -1
- package/.pi/agent-fleet/scripts/lib/herdr-layout.ts +3 -3
- 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 +118 -10
- package/.pi/harnesses/agent-hub/budget-recovery.ts +24 -1
- package/.pi/harnesses/agent-hub/capability-packs.ts +2 -1
- package/.pi/harnesses/agent-hub/commands/audit.ts +1 -1
- package/.pi/harnesses/agent-hub/commands/context.ts +2 -1
- package/.pi/harnesses/agent-hub/commands/recover.ts +52 -0
- package/.pi/harnesses/agent-hub/commands/retry.ts +1 -1
- package/.pi/harnesses/agent-hub/config/model-profiles.ts +1 -0
- package/.pi/harnesses/agent-hub/config/overrides.ts +8 -1
- package/.pi/harnesses/agent-hub/context-budget-snapshot.ts +1 -1
- package/.pi/harnesses/agent-hub/context-window.js +2 -0
- package/.pi/harnesses/agent-hub/delegate.ts +8 -4
- package/.pi/harnesses/agent-hub/dispatch-coms.ts +20 -5
- package/.pi/harnesses/agent-hub/dispatch-native-complete.ts +9 -3
- package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +27 -2
- package/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +85 -51
- package/.pi/harnesses/agent-hub/dispatch-native-types.ts +14 -2
- package/.pi/harnesses/agent-hub/dispatch-native.ts +1 -1
- package/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.pi/harnesses/agent-hub/drift-watchdog.js +140 -9
- package/.pi/harnesses/agent-hub/index.ts +154 -81
- package/.pi/harnesses/agent-hub/input/completions.ts +8 -2
- package/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +4 -2
- package/.pi/harnesses/agent-hub/monitor-lifecycle.ts +1 -1
- package/.pi/harnesses/agent-hub/no-progress.ts +169 -16
- 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/policy/work-mode.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 -1
- package/.pi/harnesses/agent-hub/prompts/session-start.ts +2 -2
- package/.pi/harnesses/agent-hub/prompts/system-prompt.ts +3 -0
- package/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.pi/harnesses/agent-hub/recover-policy.ts +27 -0
- package/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.pi/harnesses/agent-hub/recovery-contract.ts +3 -1
- package/.pi/harnesses/agent-hub/research/controls.ts +1 -1
- package/.pi/harnesses/agent-hub/research/runtime.ts +4 -2
- package/.pi/harnesses/agent-hub/research/spawn-run.ts +5 -2
- package/.pi/harnesses/agent-hub/return-extract.js +4 -2
- package/.pi/harnesses/agent-hub/review-findings.js +2 -0
- package/.pi/harnesses/agent-hub/run-budget.js +6 -1
- package/.pi/harnesses/agent-hub/run-namespace.js +6 -0
- package/.pi/harnesses/agent-hub/session-audit.ts +73 -7
- package/.pi/harnesses/agent-hub/spawn.ts +76 -8
- package/.pi/harnesses/agent-hub/system1-activity.ts +510 -0
- package/.pi/harnesses/agent-hub/system1-report.ts +225 -0
- package/.pi/harnesses/agent-hub/system1-runtime.ts +276 -0
- package/.pi/harnesses/agent-hub/timeline.ts +23 -5
- package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +14 -1
- package/.pi/harnesses/agent-hub/tools/herdr-executors.ts +2 -2
- package/.pi/harnesses/agent-hub/tools/run-flow.ts +16 -2
- package/.pi/harnesses/agent-hub/types.ts +1 -0
- package/.pi/harnesses/agent-hub/ui/activity-dots.ts +12 -3
- package/.pi/harnesses/agent-hub/ui/context-budget.ts +4 -3
- package/.pi/harnesses/agent-hub/ui/detail-panel.ts +36 -22
- package/.pi/harnesses/agent-hub/ui/fleet-actions.ts +3 -1
- package/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +32 -7
- package/.pi/harnesses/agent-hub/ui/fleet-source.ts +20 -2
- package/.pi/harnesses/agent-hub/ui/grid.ts +15 -10
- package/.pi/harnesses/agent-hub/ui/pool.ts +1 -1
- package/.pi/harnesses/agent-hub/ui/zoom.ts +5 -3
- package/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/coms-core.ts +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/context-budget.ts +1 -1
- package/.pi/harnesses/lib/fleet-dashboard-view.ts +16 -3
- package/.pi/harnesses/lib/fleet-detail-view.ts +98 -6
- package/.pi/harnesses/lib/fleet-read-model.ts +337 -14
- package/.pi/harnesses/lib/fleet-strip-view.ts +59 -12
- package/.pi/harnesses/lib/hermes-monitor-registry.ts +1 -1
- package/.pi/harnesses/lib/spawned-peers.js +1 -0
- package/.pi/harnesses/lib/system1/config.js +61 -0
- package/.pi/harnesses/lib/system1/contracts.ts +152 -0
- package/.pi/harnesses/lib/system1/demo.ts +106 -0
- package/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.12/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.12/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/fleet.ts +216 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/flow.ts +155 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/flow-command.ts +93 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +177 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.12/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.12/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.12/.pi/agents/model-profiles.yaml +83 -0
- package/.versions/2.0.12/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.12/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.12/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.12/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.12/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.12/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.12/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.12/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.12/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.12/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.12/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.12/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.12/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.12/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.12/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.12/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.12/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.12/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.12/.pi/extensions/package.json +9 -0
- package/.versions/2.0.12/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.12/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.12/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.12/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.12/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.12/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.12/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/README.md +1309 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/acceptance.ts +199 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/context.ts +45 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/recover.ts +52 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/config/agents.ts +178 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/config/model-profiles.ts +235 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/config/overrides.ts +160 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/context/budgets.ts +204 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/delegate.ts +465 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/deterministic-fs.ts +127 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/dispatch-native-complete.ts +169 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +223 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +202 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/dispatch-native-types.ts +251 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/dispatch-native.ts +226 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/filesystem-tool.ts +73 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/fixtures/registration-surface.json +61 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/index.ts +2301 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +125 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/no-progress.ts +359 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/policy/work-mode.ts +126 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/process-obligations.ts +57 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/prompts/context.ts +51 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/prompts/fragments.ts +118 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/prompts/system-prompt.ts +112 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/recover-policy.ts +27 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/recovery-contract.ts +80 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/research/runtime.ts +193 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/research/spawn-run.ts +171 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/return-contract.js +327 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/review-findings.js +104 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/run-budget.js +542 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/scope-gate.js +123 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/session-audit.ts +226 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/spawn.ts +526 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/system1-activity.ts +443 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/system1-report.ts +84 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/system1-runtime.ts +273 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/action-executors.ts +185 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/context.ts +142 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +82 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +498 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/run-flow.ts +122 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/detail-panel.ts +171 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +99 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/fleet-source.ts +170 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/grid.ts +154 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/work-mode.ts +173 -0
- package/.versions/2.0.12/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.12/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.12/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.12/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.12/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.12/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
- package/.versions/2.0.12/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.12/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.12/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.12/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.12/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.12/.pi/harnesses/damage-control-continue/index.ts +550 -0
- package/.versions/2.0.12/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.12/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.12/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.12/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.12/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.12/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.12/.pi/harnesses/lib/context-budget-child-prompt.ts +180 -0
- package/.versions/2.0.12/.pi/harnesses/lib/context-budget-hub-prompt.ts +114 -0
- package/.versions/2.0.12/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.12/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.12/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.12/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fleet-dashboard-view.ts +136 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fleet-detail-view.ts +278 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fleet-read-model.ts +405 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fleet-strip-controller.ts +74 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fleet-strip-view.ts +144 -0
- package/.versions/2.0.12/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.12/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.12/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.12/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.12/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.12/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.12/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.12/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.12/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.12/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.12/.pi/harnesses/lib/system1/config.js +61 -0
- package/.versions/2.0.12/.pi/harnesses/lib/system1/contracts.ts +152 -0
- package/.versions/2.0.12/.pi/harnesses/lib/system1/demo.ts +106 -0
- package/.versions/2.0.12/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.12/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.12/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.12/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.12/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.12/.pi/prompts/af-build.md +24 -0
- package/.versions/2.0.12/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.12/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.12/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.12/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.12/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.12/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.12/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.12/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.12/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.12/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.12/.version +1 -0
- package/.versions/2.0.12/agents/architect.md +25 -0
- package/.versions/2.0.12/agents/bowser.md +28 -0
- package/.versions/2.0.12/agents/builder.md +56 -0
- package/.versions/2.0.12/agents/code-reviewer.md +210 -0
- package/.versions/2.0.12/agents/deep-researcher.md +33 -0
- package/.versions/2.0.12/agents/documenter.md +23 -0
- package/.versions/2.0.12/agents/orchestrator.md +23 -0
- package/.versions/2.0.12/agents/plan-reviewer.md +84 -0
- package/.versions/2.0.12/agents/planner.md +106 -0
- package/.versions/2.0.12/agents/releaser.md +25 -0
- package/.versions/2.0.12/agents/researcher.md +31 -0
- package/.versions/2.0.12/agents/security-auditor.md +168 -0
- package/.versions/2.0.12/agents/test-engineer.md +154 -0
- package/.versions/2.0.12/agents/web-debugger.md +44 -0
- package/.versions/2.0.12/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.12/bin/catalog/harness-runtime-closure.json +61 -0
- package/.versions/2.0.12/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.12/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.12/docs/ARCHITECTURE.md +705 -0
- package/.versions/2.0.12/docs/agent-fleet-setup.md +682 -0
- package/.versions/2.0.12/docs/claude-code-coms-bridge.md +134 -0
- package/.versions/2.0.12/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.12/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.12/docs/getting-started.md +126 -0
- package/.versions/2.0.12/docs/npm-install.md +468 -0
- package/.versions/2.0.12/docs/pi-extensions.md +449 -0
- package/.versions/2.0.12/docs/pi-setup.md +92 -0
- package/.versions/2.0.12/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.12/install-manifest.json +3053 -0
- package/.versions/2.0.12/justfile +247 -0
- package/.versions/2.0.12/manifest-meta.json +995 -0
- package/.versions/2.0.12/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.12/references/communication-contract.md +26 -0
- package/.versions/2.0.12/references/definition-of-done.md +67 -0
- package/.versions/2.0.12/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.12/references/observability-checklist.md +92 -0
- package/.versions/2.0.12/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.12/references/performance-checklist.md +236 -0
- package/.versions/2.0.12/references/prompting-patterns.md +380 -0
- package/.versions/2.0.12/references/security-checklist.md +245 -0
- package/.versions/2.0.12/references/testing-patterns.md +235 -0
- package/.versions/2.0.12/references/workflow-authoring.md +304 -0
- package/.versions/2.0.12/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.12/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.12/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.12/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.12/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.12/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.12/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.12/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.12/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.12/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.12/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.12/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.12/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.12/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.12/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.12/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.12/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.12/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.12/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.12/skills/incremental-implementation/SKILL.md +302 -0
- package/.versions/2.0.12/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.12/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.12/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.12/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.12/skills/planning-and-task-breakdown/SKILL.md +289 -0
- package/.versions/2.0.12/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.12/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.12/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.12/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -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/CHANGELOG.md +20 -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 +50 -4
- package/bin/lib/apply.js +16 -0
- package/bin/lib/doctor.js +63 -1
- 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 +163 -5
- package/docs/agent-fleet-setup.md +342 -28
- package/docs/codex-session-bridge.md +1 -1
- package/docs/npm-install.md +87 -2
- package/docs/pi-extensions.md +10 -5
- package/docs/workflows.md +4 -3
- package/install-manifest.json +158 -3
- package/manifest-meta.json +102 -15
- package/package.json +9 -3
- 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,443 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { closeSync, constants, fchmodSync, lstatSync, mkdirSync, openSync, readFileSync, writeSync } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import type { ShadowTrace, ShadowTraceEvent } from "./drift-judge.ts";
|
|
5
|
+
|
|
6
|
+
export const WATCHDOG_TRACE_SCHEMA = "watchdog-trace/v1";
|
|
7
|
+
export const WATCHDOG_TRACE_FILE = "events.jsonl";
|
|
8
|
+
const COMPLETED_LIMIT = 100;
|
|
9
|
+
const STATUSES = new Set(["ok", "skipped", "unavailable", "unsupported", "cancelled", "interrupted", "unknown", "verdict"]);
|
|
10
|
+
const REASONS = new Set(["consumer_off", "feature_unselected", "watchdog_disarmed", "state_too_large", "invalid_state", "disposed", "disabled", "missing_config", "missing_key", "timeout", "network", "auth", "rate_limit", "overloaded", "invalid_response", "invalid_config", "invalid_request", "cancelled", "interrupted", "observer_error", "unsupported", "unknown"]);
|
|
11
|
+
const VERDICTS = new Set(["on_track", "drifting", "stuck", "insufficient_evidence"]);
|
|
12
|
+
const OUTCOMES = new Set(["continue", "discard", "drift_stop", "advisory", "judge_unavailable", "unknown"]);
|
|
13
|
+
|
|
14
|
+
export interface WatchdogTraceRecord {
|
|
15
|
+
schema: typeof WATCHDOG_TRACE_SCHEMA;
|
|
16
|
+
type: "evaluation_started" | "evaluation_finished" | "llm_started" | "llm_finished" | "decision";
|
|
17
|
+
sessionId: string;
|
|
18
|
+
dispatchId: string;
|
|
19
|
+
attemptId: string;
|
|
20
|
+
checkId: string;
|
|
21
|
+
snapshotId: string;
|
|
22
|
+
sequence: number;
|
|
23
|
+
at: number;
|
|
24
|
+
consumer: "watchdog";
|
|
25
|
+
llmAttemptId?: string;
|
|
26
|
+
rule?: string;
|
|
27
|
+
configuredMode?: "off" | "shadow" | "active";
|
|
28
|
+
effectiveMode?: "off" | "shadow" | "active";
|
|
29
|
+
stateVersion?: string;
|
|
30
|
+
questionsVersion?: string;
|
|
31
|
+
policyVersion: "none" | "watchdog-policy/v1";
|
|
32
|
+
status?: string;
|
|
33
|
+
reason?: string;
|
|
34
|
+
elapsedMs?: number | null;
|
|
35
|
+
unused?: boolean;
|
|
36
|
+
verdict?: string;
|
|
37
|
+
returnedModel?: string | null;
|
|
38
|
+
attempts?: number | null;
|
|
39
|
+
usage?: { inputTokens: number; outputTokens: number } | null;
|
|
40
|
+
numerical?: Record<string, number>;
|
|
41
|
+
source?: "llm" | "none" | "system1";
|
|
42
|
+
applied?: "yes" | "no" | "unknown";
|
|
43
|
+
outcome?: string;
|
|
44
|
+
statusChoice?: "on_track" | "drifting" | "stuck" | "insufficient_evidence";
|
|
45
|
+
requestedModel?: string;
|
|
46
|
+
provider?: "typesafe";
|
|
47
|
+
statusProvenance?: "provider" | "self_reported" | "derived";
|
|
48
|
+
stateComplete?: boolean;
|
|
49
|
+
predicatesProvider?: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface WatchdogCheckProjection {
|
|
53
|
+
dispatchId: string;
|
|
54
|
+
attemptId: string;
|
|
55
|
+
checkId: string;
|
|
56
|
+
snapshotId: string;
|
|
57
|
+
evaluation: "evaluating" | "finished" | "interrupted" | "unknown";
|
|
58
|
+
llm: "running" | "finished" | "interrupted" | "unknown" | "none";
|
|
59
|
+
llmStatus?: string;
|
|
60
|
+
status: string;
|
|
61
|
+
reason: string;
|
|
62
|
+
elapsedMs: number | null;
|
|
63
|
+
usage: { inputTokens: number; outputTokens: number } | "unknown";
|
|
64
|
+
returnedModel: string | "unknown";
|
|
65
|
+
attempts: number | "unknown";
|
|
66
|
+
applied: "yes" | "no" | "unknown";
|
|
67
|
+
source: "llm" | "none" | "system1" | "unknown";
|
|
68
|
+
outcome: string;
|
|
69
|
+
unused: boolean;
|
|
70
|
+
rule?: string;
|
|
71
|
+
configuredMode?: "off" | "shadow" | "active";
|
|
72
|
+
effectiveMode?: "off" | "shadow" | "active";
|
|
73
|
+
stateVersion?: string;
|
|
74
|
+
questionsVersion?: string;
|
|
75
|
+
numerical?: Record<string, number>;
|
|
76
|
+
statusChoice?: "on_track" | "drifting" | "stuck" | "insufficient_evidence";
|
|
77
|
+
requestedModel?: string;
|
|
78
|
+
provider?: "typesafe";
|
|
79
|
+
statusProvenance?: "provider" | "self_reported" | "derived";
|
|
80
|
+
stateComplete?: boolean;
|
|
81
|
+
predicatesProvider?: boolean;
|
|
82
|
+
llmVerdict?: string;
|
|
83
|
+
finishedAt?: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface WatchdogActivity extends ShadowTrace {
|
|
87
|
+
readonly degraded: boolean;
|
|
88
|
+
readonly path: string | null;
|
|
89
|
+
live(): { active: WatchdogCheckProjection[]; completed: WatchdogCheckProjection[]; degraded: boolean };
|
|
90
|
+
dispose(): void;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
94
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function enumValue<T extends string>(value: unknown, allowed: Set<string>, fallback: T): T {
|
|
98
|
+
return typeof value === "string" && allowed.has(value) ? value as T : fallback;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function model(value: unknown): string | null {
|
|
102
|
+
if (typeof value !== "string" || value.length === 0 || value.length > 128) return null;
|
|
103
|
+
if (value.startsWith("/") || value.includes("\\") || value.split("/").includes("..")) return null;
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function usage(value: unknown): { inputTokens: number; outputTokens: number } | null {
|
|
108
|
+
if (!isRecord(value)) return null;
|
|
109
|
+
if (typeof value.inputTokens !== "number" || typeof value.outputTokens !== "number") return null;
|
|
110
|
+
if (!Number.isFinite(value.inputTokens) || !Number.isFinite(value.outputTokens) || value.inputTokens < 0 || value.outputTokens < 0) return null;
|
|
111
|
+
return { inputTokens: value.inputTokens, outputTokens: value.outputTokens };
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function numerical(value: unknown): Record<string, number> | undefined {
|
|
115
|
+
if (!isRecord(value)) return undefined;
|
|
116
|
+
const out: Record<string, number> = {};
|
|
117
|
+
for (const [key, item] of Object.entries(value)) {
|
|
118
|
+
if (!/^[a-z0-9_]{1,64}$/.test(key)) continue;
|
|
119
|
+
if (typeof item !== "number" || !Number.isFinite(item)) continue;
|
|
120
|
+
out[key] = item;
|
|
121
|
+
}
|
|
122
|
+
return Object.keys(out).length > 0 ? out : undefined;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function keyOf(event: { dispatchId?: string; attemptId?: string; checkId?: string; snapshotId?: string }): string {
|
|
126
|
+
return JSON.stringify([event.dispatchId ?? "", event.attemptId ?? "", event.checkId ?? "", event.snapshotId ?? ""]);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function secureAppend(path: string, text: string): void {
|
|
130
|
+
mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
|
|
131
|
+
try { if (lstatSync(path).isSymbolicLink()) throw new Error("refused watchdog trace symlink"); } catch (error: unknown) {
|
|
132
|
+
if ((error as NodeJS.ErrnoException).code !== "ENOENT") throw error;
|
|
133
|
+
}
|
|
134
|
+
const noFollow = (constants as { O_NOFOLLOW?: number }).O_NOFOLLOW ?? 0;
|
|
135
|
+
const fd = openSync(path, constants.O_APPEND | constants.O_CREAT | constants.O_WRONLY | noFollow, 0o600);
|
|
136
|
+
try {
|
|
137
|
+
try { fchmodSync(fd, 0o600); } catch (error) { if (process.platform !== "win32") throw error; }
|
|
138
|
+
writeSync(fd, text, undefined, "utf8");
|
|
139
|
+
} finally {
|
|
140
|
+
closeSync(fd);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
interface CheckState {
|
|
145
|
+
record: WatchdogCheckProjection;
|
|
146
|
+
llmAttemptId?: string;
|
|
147
|
+
evaluationOpen: boolean;
|
|
148
|
+
llmOpen: boolean;
|
|
149
|
+
evaluationDone: boolean;
|
|
150
|
+
llmDone: boolean;
|
|
151
|
+
decisionDone: boolean;
|
|
152
|
+
archived: boolean;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function blank(event: ShadowTraceEvent): WatchdogCheckProjection {
|
|
156
|
+
return {
|
|
157
|
+
dispatchId: event.dispatchId,
|
|
158
|
+
attemptId: event.attemptId,
|
|
159
|
+
checkId: event.checkId,
|
|
160
|
+
snapshotId: event.snapshotId,
|
|
161
|
+
evaluation: "unknown",
|
|
162
|
+
llm: "none",
|
|
163
|
+
status: "unknown",
|
|
164
|
+
reason: "unknown",
|
|
165
|
+
elapsedMs: null,
|
|
166
|
+
usage: "unknown",
|
|
167
|
+
returnedModel: "unknown",
|
|
168
|
+
attempts: "unknown",
|
|
169
|
+
applied: "unknown",
|
|
170
|
+
source: "unknown",
|
|
171
|
+
outcome: "unknown",
|
|
172
|
+
unused: false,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export function createWatchdogActivity(options: { directory?: string; sessionId?: string; now?: () => number; write?: (line: string) => void } = {}): WatchdogActivity {
|
|
177
|
+
const now = options.now ?? Date.now;
|
|
178
|
+
const sessionId = options.sessionId ?? randomUUID();
|
|
179
|
+
const path = options.directory ? join(options.directory, WATCHDOG_TRACE_FILE) : null;
|
|
180
|
+
const active = new Map<string, CheckState>();
|
|
181
|
+
const known = new Map<string, CheckState>();
|
|
182
|
+
const completed: WatchdogCheckProjection[] = [];
|
|
183
|
+
let sequence = 0;
|
|
184
|
+
let degraded = false;
|
|
185
|
+
const append = (event: ShadowTraceEvent, type: WatchdogTraceRecord["type"], extra: Partial<WatchdogTraceRecord> = {}) => {
|
|
186
|
+
const record: WatchdogTraceRecord = {
|
|
187
|
+
schema: WATCHDOG_TRACE_SCHEMA,
|
|
188
|
+
type,
|
|
189
|
+
sessionId,
|
|
190
|
+
dispatchId: event.dispatchId,
|
|
191
|
+
attemptId: event.attemptId,
|
|
192
|
+
checkId: event.checkId,
|
|
193
|
+
snapshotId: event.snapshotId,
|
|
194
|
+
sequence: ++sequence,
|
|
195
|
+
at: now(),
|
|
196
|
+
consumer: "watchdog",
|
|
197
|
+
policyVersion: event.effectiveMode === "active" ? "watchdog-policy/v1" : "none",
|
|
198
|
+
...(event.llmAttemptId ? { llmAttemptId: event.llmAttemptId } : {}),
|
|
199
|
+
...(event.rule ? { rule: event.rule.slice(0, 64) } : {}),
|
|
200
|
+
...extra,
|
|
201
|
+
};
|
|
202
|
+
const line = `${JSON.stringify(record)}\n`;
|
|
203
|
+
try {
|
|
204
|
+
if (options.write) options.write(line);
|
|
205
|
+
else if (path) secureAppend(path, line);
|
|
206
|
+
} catch {
|
|
207
|
+
degraded = true;
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
const ensure = (event: ShadowTraceEvent): CheckState | null => {
|
|
211
|
+
if (!event.dispatchId || !event.attemptId || !event.checkId || !event.snapshotId) return null;
|
|
212
|
+
const key = keyOf(event);
|
|
213
|
+
let state = known.get(key);
|
|
214
|
+
if (!state) {
|
|
215
|
+
state = { record: blank(event), llmAttemptId: event.llmAttemptId, evaluationOpen: false, llmOpen: false, evaluationDone: false, llmDone: false, decisionDone: false, archived: false };
|
|
216
|
+
known.set(key, state);
|
|
217
|
+
active.set(key, state);
|
|
218
|
+
}
|
|
219
|
+
if (event.llmAttemptId && !state.llmAttemptId) state.llmAttemptId = event.llmAttemptId;
|
|
220
|
+
return state;
|
|
221
|
+
};
|
|
222
|
+
const finishSlot = (state: CheckState) => {
|
|
223
|
+
if (state.archived || state.evaluationOpen || state.llmOpen) return;
|
|
224
|
+
if (!state.evaluationDone && !state.llmDone) return;
|
|
225
|
+
state.archived = true;
|
|
226
|
+
active.delete(keyOf(state.record));
|
|
227
|
+
completed.push(state.record);
|
|
228
|
+
while (completed.length > COMPLETED_LIMIT) {
|
|
229
|
+
const dropped = completed.shift();
|
|
230
|
+
if (dropped) known.delete(keyOf(dropped));
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
let activity: WatchdogActivity;
|
|
234
|
+
const finishOpen = (state: CheckState) => {
|
|
235
|
+
const identity = { dispatchId: state.record.dispatchId, attemptId: state.record.attemptId, checkId: state.record.checkId, snapshotId: state.record.snapshotId, llmAttemptId: state.llmAttemptId };
|
|
236
|
+
if (state.evaluationOpen && !state.evaluationDone) {
|
|
237
|
+
activity.evaluationFinished({ ...identity, status: "cancelled", reason: "disposed", elapsedMs: state.record.elapsedMs, unused: true });
|
|
238
|
+
}
|
|
239
|
+
if (state.llmOpen && !state.llmDone) {
|
|
240
|
+
activity.llmFinished({ ...identity, status: "cancelled" });
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
activity = {
|
|
244
|
+
get degraded() { return degraded; },
|
|
245
|
+
get path() { return path; },
|
|
246
|
+
evaluationStarted(event) {
|
|
247
|
+
const state = ensure(event);
|
|
248
|
+
if (!state || state.evaluationOpen || state.evaluationDone) return;
|
|
249
|
+
state.evaluationOpen = true;
|
|
250
|
+
state.record.evaluation = "evaluating";
|
|
251
|
+
if (event.rule) state.record.rule = event.rule;
|
|
252
|
+
if (event.configuredMode) state.record.configuredMode = event.configuredMode;
|
|
253
|
+
if (event.effectiveMode) state.record.effectiveMode = event.effectiveMode;
|
|
254
|
+
if (event.stateVersion) state.record.stateVersion = event.stateVersion;
|
|
255
|
+
if (event.questionsVersion) state.record.questionsVersion = event.questionsVersion;
|
|
256
|
+
append(event, "evaluation_started", {
|
|
257
|
+
configuredMode: event.configuredMode,
|
|
258
|
+
effectiveMode: event.effectiveMode,
|
|
259
|
+
stateVersion: event.stateVersion,
|
|
260
|
+
questionsVersion: event.questionsVersion,
|
|
261
|
+
});
|
|
262
|
+
},
|
|
263
|
+
evaluationFinished(event) {
|
|
264
|
+
const state = known.get(keyOf(event));
|
|
265
|
+
if (!state || state.evaluationDone) return;
|
|
266
|
+
state.evaluationDone = true;
|
|
267
|
+
state.evaluationOpen = false;
|
|
268
|
+
state.record.evaluation = "finished";
|
|
269
|
+
state.record.status = enumValue(event.status, STATUSES, "unknown");
|
|
270
|
+
state.record.reason = enumValue(event.reason, REASONS, "unknown");
|
|
271
|
+
state.record.elapsedMs = typeof event.elapsedMs === "number" && Number.isFinite(event.elapsedMs) ? event.elapsedMs : null;
|
|
272
|
+
state.record.usage = usage(event.usage) ?? "unknown";
|
|
273
|
+
state.record.returnedModel = model(event.returnedModel) ?? "unknown";
|
|
274
|
+
state.record.attempts = typeof event.attempts === "number" && Number.isFinite(event.attempts) ? event.attempts : "unknown";
|
|
275
|
+
state.record.unused = event.unused === true;
|
|
276
|
+
state.record.finishedAt = now();
|
|
277
|
+
const choice = event.statusChoice;
|
|
278
|
+
if (choice === "on_track" || choice === "drifting" || choice === "stuck" || choice === "insufficient_evidence") state.record.statusChoice = choice;
|
|
279
|
+
const numbers = numerical(event.numerical);
|
|
280
|
+
if (numbers) state.record.numerical = numbers;
|
|
281
|
+
state.record.requestedModel = model(event.requestedModel) ?? undefined;
|
|
282
|
+
state.record.provider = event.provider === "typesafe" ? "typesafe" : undefined;
|
|
283
|
+
state.record.statusProvenance = event.statusProvenance === "provider" || event.statusProvenance === "self_reported" || event.statusProvenance === "derived" ? event.statusProvenance : undefined;
|
|
284
|
+
state.record.stateComplete = event.stateComplete === true;
|
|
285
|
+
state.record.predicatesProvider = event.predicatesProvider === true;
|
|
286
|
+
append(event, "evaluation_finished", {
|
|
287
|
+
policyVersion: state.record.effectiveMode === "active" ? "watchdog-policy/v1" : "none",
|
|
288
|
+
status: state.record.status,
|
|
289
|
+
reason: state.record.reason,
|
|
290
|
+
elapsedMs: state.record.elapsedMs,
|
|
291
|
+
unused: state.record.unused,
|
|
292
|
+
returnedModel: state.record.returnedModel === "unknown" ? null : state.record.returnedModel,
|
|
293
|
+
attempts: state.record.attempts === "unknown" ? null : state.record.attempts,
|
|
294
|
+
usage: state.record.usage === "unknown" ? null : state.record.usage,
|
|
295
|
+
numerical: numbers,
|
|
296
|
+
...(state.record.statusChoice ? { statusChoice: state.record.statusChoice } : {}),
|
|
297
|
+
requestedModel: state.record.requestedModel,
|
|
298
|
+
provider: state.record.provider,
|
|
299
|
+
statusProvenance: state.record.statusProvenance,
|
|
300
|
+
stateComplete: state.record.stateComplete,
|
|
301
|
+
predicatesProvider: state.record.predicatesProvider,
|
|
302
|
+
});
|
|
303
|
+
finishSlot(state);
|
|
304
|
+
},
|
|
305
|
+
llmStarted(event) {
|
|
306
|
+
const state = ensure(event);
|
|
307
|
+
if (!state || state.llmOpen || state.llmDone) return;
|
|
308
|
+
if (state.archived) {
|
|
309
|
+
state.archived = false;
|
|
310
|
+
const index = completed.indexOf(state.record);
|
|
311
|
+
if (index >= 0) completed.splice(index, 1);
|
|
312
|
+
active.set(keyOf(event), state);
|
|
313
|
+
}
|
|
314
|
+
state.llmOpen = true;
|
|
315
|
+
state.record.llm = "running";
|
|
316
|
+
append(event, "llm_started");
|
|
317
|
+
},
|
|
318
|
+
llmFinished(event) {
|
|
319
|
+
const state = known.get(keyOf(event));
|
|
320
|
+
if (!state || state.llmDone) return;
|
|
321
|
+
state.llmDone = true;
|
|
322
|
+
state.llmOpen = false;
|
|
323
|
+
state.record.llm = "finished";
|
|
324
|
+
state.record.llmStatus = enumValue(event.status, STATUSES, "unknown");
|
|
325
|
+
const verdict = typeof event.verdict === "string" && VERDICTS.has(event.verdict) ? event.verdict : undefined;
|
|
326
|
+
if (verdict) state.record.llmVerdict = verdict;
|
|
327
|
+
append(event, "llm_finished", { status: enumValue(event.status, STATUSES, "unknown"), ...(verdict ? { verdict } : {}) });
|
|
328
|
+
finishSlot(state);
|
|
329
|
+
},
|
|
330
|
+
decision(event) {
|
|
331
|
+
const state = known.get(keyOf(event));
|
|
332
|
+
if (!state || state.decisionDone) return;
|
|
333
|
+
state.decisionDone = true;
|
|
334
|
+
state.record.source = event.source === "llm" || event.source === "none" || event.source === "system1" ? event.source : "unknown";
|
|
335
|
+
state.record.applied = event.applied === "yes" || event.applied === "no" ? event.applied : "unknown";
|
|
336
|
+
state.record.outcome = enumValue(event.outcome, OUTCOMES, "unknown");
|
|
337
|
+
append(event, "decision", { policyVersion: state.record.effectiveMode === "active" ? "watchdog-policy/v1" : "none", source: state.record.source === "unknown" ? "none" : state.record.source, applied: state.record.applied, outcome: state.record.outcome });
|
|
338
|
+
},
|
|
339
|
+
live() {
|
|
340
|
+
return { active: [...active.values()].map((item) => item.record), completed: completed.slice(), degraded };
|
|
341
|
+
},
|
|
342
|
+
endDispatch(dispatchId) {
|
|
343
|
+
if (!dispatchId) return;
|
|
344
|
+
for (const state of [...active.values()]) {
|
|
345
|
+
if (state.record.dispatchId !== dispatchId) continue;
|
|
346
|
+
finishOpen(state);
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
dispose() {
|
|
350
|
+
for (const state of [...active.values()]) finishOpen(state);
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
return activity;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export function readWatchdogTrace(path: string, options: { after?: number; limit?: number } = {}): { events: WatchdogTraceRecord[]; nextOffset: number; invalidRecords: number; partialTail: boolean; readError: boolean } {
|
|
357
|
+
const after = Math.max(0, options.after ?? 0);
|
|
358
|
+
const limit = Math.max(1, options.limit ?? 100);
|
|
359
|
+
let text = "";
|
|
360
|
+
try { text = readFileSync(path, "utf8"); } catch (error: unknown) {
|
|
361
|
+
return { events: [], nextOffset: after, invalidRecords: 0, partialTail: false, readError: (error as NodeJS.ErrnoException)?.code !== "ENOENT" };
|
|
362
|
+
}
|
|
363
|
+
// Never treat a complete-looking JSON object without a newline as a durable record.
|
|
364
|
+
const incomplete = text.length > 0 && !text.endsWith("\n");
|
|
365
|
+
const lines = text.split("\n").slice(0, -1).filter(line => line.length > 0);
|
|
366
|
+
const page = lines.slice(after, after + limit);
|
|
367
|
+
const events: WatchdogTraceRecord[] = [];
|
|
368
|
+
let invalidRecords = 0;
|
|
369
|
+
for (const line of page) {
|
|
370
|
+
try {
|
|
371
|
+
const parsed: unknown = JSON.parse(line);
|
|
372
|
+
const record = parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed as Partial<WatchdogTraceRecord> : null;
|
|
373
|
+
if (record?.schema === WATCHDOG_TRACE_SCHEMA && record.consumer === "watchdog"
|
|
374
|
+
&& record.type != null && ["evaluation_started", "evaluation_finished", "llm_started", "llm_finished", "decision"].includes(record.type)
|
|
375
|
+
&& [record.sessionId, record.dispatchId, record.attemptId, record.checkId, record.snapshotId]
|
|
376
|
+
.every(v => typeof v === "string" && /^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$/.test(v))
|
|
377
|
+
&& typeof record.sequence === "number" && Number.isFinite(record.sequence)
|
|
378
|
+
&& typeof record.at === "number" && Number.isFinite(record.at)) events.push(record as WatchdogTraceRecord);
|
|
379
|
+
else invalidRecords++;
|
|
380
|
+
} catch { invalidRecords++; }
|
|
381
|
+
}
|
|
382
|
+
return { events, nextOffset: after + page.length, invalidRecords, partialTail: incomplete && after + page.length >= lines.length, readError: false };
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/** Crash readback. An unfinished span is interrupted/unknown, never still evaluating and never success. */
|
|
386
|
+
export function projectWatchdogReadback(events: readonly WatchdogTraceRecord[]): WatchdogCheckProjection[] {
|
|
387
|
+
const checks = new Map<string, WatchdogCheckProjection>();
|
|
388
|
+
for (const event of events) {
|
|
389
|
+
const key = keyOf(event);
|
|
390
|
+
const current = checks.get(key) ?? {
|
|
391
|
+
...blank(event),
|
|
392
|
+
evaluation: "unknown" as const,
|
|
393
|
+
};
|
|
394
|
+
if (event.type === "evaluation_started") {
|
|
395
|
+
current.evaluation = "evaluating";
|
|
396
|
+
if (event.rule) current.rule = event.rule;
|
|
397
|
+
if (event.configuredMode) current.configuredMode = event.configuredMode;
|
|
398
|
+
if (event.effectiveMode) current.effectiveMode = event.effectiveMode;
|
|
399
|
+
if (event.stateVersion) current.stateVersion = event.stateVersion;
|
|
400
|
+
if (event.questionsVersion) current.questionsVersion = event.questionsVersion;
|
|
401
|
+
}
|
|
402
|
+
if (event.type === "evaluation_finished") {
|
|
403
|
+
current.evaluation = "finished";
|
|
404
|
+
current.status = event.status ?? "unknown";
|
|
405
|
+
current.reason = event.reason ?? "unknown";
|
|
406
|
+
current.elapsedMs = event.elapsedMs ?? null;
|
|
407
|
+
current.usage = event.usage ?? "unknown";
|
|
408
|
+
current.returnedModel = event.returnedModel ?? "unknown";
|
|
409
|
+
current.attempts = event.attempts ?? "unknown";
|
|
410
|
+
current.unused = event.unused === true;
|
|
411
|
+
current.finishedAt = event.at;
|
|
412
|
+
if (event.statusChoice) current.statusChoice = event.statusChoice;
|
|
413
|
+
if (event.numerical) current.numerical = event.numerical;
|
|
414
|
+
if (event.requestedModel) current.requestedModel = model(event.requestedModel) ?? undefined;
|
|
415
|
+
if (event.provider === "typesafe") current.provider = "typesafe";
|
|
416
|
+
if (event.statusProvenance === "provider" || event.statusProvenance === "self_reported" || event.statusProvenance === "derived") current.statusProvenance = event.statusProvenance;
|
|
417
|
+
current.stateComplete = event.stateComplete === true;
|
|
418
|
+
current.predicatesProvider = event.predicatesProvider === true;
|
|
419
|
+
}
|
|
420
|
+
if (event.type === "llm_started") current.llm = "running";
|
|
421
|
+
if (event.type === "llm_finished") {
|
|
422
|
+
current.llm = "finished";
|
|
423
|
+
current.llmStatus = enumValue(event.status, STATUSES, "unknown");
|
|
424
|
+
if (event.verdict === "on_track" || event.verdict === "drifting" || event.verdict === "stuck" || event.verdict === "insufficient_evidence") current.llmVerdict = event.verdict;
|
|
425
|
+
}
|
|
426
|
+
if (event.type === "decision") {
|
|
427
|
+
current.source = event.source ?? "unknown";
|
|
428
|
+
current.applied = event.applied ?? "unknown";
|
|
429
|
+
current.outcome = event.outcome ?? "unknown";
|
|
430
|
+
}
|
|
431
|
+
checks.set(key, current);
|
|
432
|
+
}
|
|
433
|
+
for (const check of checks.values()) {
|
|
434
|
+
if (check.evaluation === "evaluating") {
|
|
435
|
+
check.evaluation = "interrupted";
|
|
436
|
+
check.status = "unknown";
|
|
437
|
+
check.reason = "interrupted";
|
|
438
|
+
}
|
|
439
|
+
if (check.llm === "running") check.llm = "interrupted";
|
|
440
|
+
if (check.usage == null) check.usage = "unknown";
|
|
441
|
+
}
|
|
442
|
+
return [...checks.values()];
|
|
443
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { projectWatchdogReadback, readWatchdogTrace, type WatchdogActivity, type WatchdogTraceRecord } from "./system1-activity.ts";
|
|
3
|
+
import type { WatchdogSystem1Session } from "./system1-runtime.ts";
|
|
4
|
+
|
|
5
|
+
export interface WatchdogTraceIntegrity { invalidRecords: number; partialTail: boolean; readError: boolean }
|
|
6
|
+
/** Read the trace, not the provider or worker accounting. Corruption remains visible as metadata. */
|
|
7
|
+
export function readWatchdogEvents(sessionDir: string): { events: WatchdogTraceRecord[]; integrity: WatchdogTraceIntegrity } {
|
|
8
|
+
const path = join(sessionDir, "artifacts", "watchdog", "events.jsonl");
|
|
9
|
+
const events: WatchdogTraceRecord[] = [];
|
|
10
|
+
const integrity: WatchdogTraceIntegrity = { invalidRecords: 0, partialTail: false, readError: false };
|
|
11
|
+
let offset = 0;
|
|
12
|
+
for (;;) {
|
|
13
|
+
const page = readWatchdogTrace(path, { after: offset, limit: 100 });
|
|
14
|
+
events.push(...page.events);
|
|
15
|
+
integrity.invalidRecords += page.invalidRecords;
|
|
16
|
+
integrity.partialTail ||= page.partialTail;
|
|
17
|
+
integrity.readError ||= page.readError;
|
|
18
|
+
if (page.nextOffset === offset) break;
|
|
19
|
+
offset = page.nextOffset;
|
|
20
|
+
}
|
|
21
|
+
return { events, integrity };
|
|
22
|
+
}
|
|
23
|
+
export function watchdogEvents(sessionDir: string): WatchdogTraceRecord[] { return readWatchdogEvents(sessionDir).events; }
|
|
24
|
+
|
|
25
|
+
const ids = (e: WatchdogTraceRecord) => [e.sessionId, e.dispatchId, e.attemptId, e.checkId, e.snapshotId].join("\u0000");
|
|
26
|
+
const span = (e: WatchdogTraceRecord) => `${ids(e)}\u0000${e.llmAttemptId ?? "unknown"}`;
|
|
27
|
+
const finite = (value: unknown): value is number => typeof value === "number" && Number.isFinite(value) && value >= 0;
|
|
28
|
+
const countBy = (values: readonly string[]) => values.reduce<Record<string, number>>((counts, value) => {
|
|
29
|
+
counts[value] = (counts[value] ?? 0) + 1;
|
|
30
|
+
return counts;
|
|
31
|
+
}, {});
|
|
32
|
+
|
|
33
|
+
export function buildWatchdogReport(events: readonly WatchdogTraceRecord[], live?: ReturnType<WatchdogActivity["live"]> | null, integrity?: WatchdogTraceIntegrity) {
|
|
34
|
+
const valid = events.filter(e => e.schema === "watchdog-trace/v1" && e.consumer === "watchdog"
|
|
35
|
+
&& [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)));
|
|
36
|
+
// A duplicate lifecycle event makes the trace ambiguous. Never hide it behind Map's
|
|
37
|
+
// last-write-wins projection when deciding whether pilot evidence is trustworthy.
|
|
38
|
+
const seenEvents = new Set<string>();
|
|
39
|
+
let duplicateEvents = 0;
|
|
40
|
+
for (const event of valid) {
|
|
41
|
+
const key = `${event.type}\u0000${event.type.startsWith("llm_") ? span(event) : ids(event)}`;
|
|
42
|
+
if (seenEvents.has(key)) duplicateEvents++;
|
|
43
|
+
else seenEvents.add(key);
|
|
44
|
+
}
|
|
45
|
+
const starts = new Set(valid.filter(e => e.type === "evaluation_started").map(ids));
|
|
46
|
+
const finishes = new Map(valid.filter(e => e.type === "evaluation_finished").map(e => [ids(e), e]));
|
|
47
|
+
const llmStarts = new Set(valid.filter(e => e.type === "llm_started").map(span));
|
|
48
|
+
const llmFinishes = new Map(valid.filter(e => e.type === "llm_finished").map(e => [span(e), e]));
|
|
49
|
+
const decisions = new Map(valid.filter(e => e.type === "decision").map(e => [ids(e), e]));
|
|
50
|
+
const checks = new Set([...starts, ...llmStarts].map(s => s.split("\u0000").slice(0, 5).join("\u0000")));
|
|
51
|
+
const latencies = [...finishes.values()].map(e => e.elapsedMs).filter(finite).sort((a, b) => a - b);
|
|
52
|
+
const percentile = (p: number) => latencies.length ? latencies[Math.ceil(p * latencies.length) - 1] : null;
|
|
53
|
+
const usage = [...finishes.values()].map(e => e.usage).filter((u): u is { inputTokens: number; outputTokens: number } => !!u && finite(u.inputTokens) && finite(u.outputTokens));
|
|
54
|
+
const outcome = (value: unknown): string => ["continue", "advisory", "drift_stop", "judge_unavailable", "discard"].includes(String(value)) ? String(value) : "unknown";
|
|
55
|
+
const status = (value: unknown): string => ["ok", "skipped", "unavailable", "unsupported", "cancelled"].includes(String(value)) ? String(value) : "unknown";
|
|
56
|
+
const projection = projectWatchdogReadback(valid);
|
|
57
|
+
return {
|
|
58
|
+
schema: "watchdog-report/v1" as const,
|
|
59
|
+
readOnly: true as const,
|
|
60
|
+
checks: checks.size,
|
|
61
|
+
evaluations: { started: starts.size, finished: finishes.size, incomplete: [...starts].filter(k => !finishes.has(k)).length, byStatus: countBy([...finishes.values()].map(e => status(e.status))) },
|
|
62
|
+
llm: { started: llmStarts.size, finished: llmFinishes.size, incomplete: [...llmStarts].filter(k => !llmFinishes.has(k)).length,
|
|
63
|
+
parallel: [...llmStarts].filter(k => starts.has(k.split("\u0000").slice(0, 5).join("\u0000"))).length,
|
|
64
|
+
fallback: [...llmStarts].filter(k => !starts.has(k.split("\u0000").slice(0, 5).join("\u0000"))).length },
|
|
65
|
+
avoidedLlmChecks: [...decisions.entries()].filter(([k, e]) => e.source === "system1" && outcome(e.outcome) === "continue" && ![...llmStarts].some(l => l.startsWith(`${k}\u0000`))).length,
|
|
66
|
+
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"}`)),
|
|
67
|
+
latencyMs: { p50: percentile(0.5), p95: percentile(0.95), known: latencies.length },
|
|
68
|
+
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) },
|
|
69
|
+
observability: { degraded: (live?.degraded ?? false) || duplicateEvents > 0 || (integrity?.invalidRecords ?? 0) > 0 || (integrity?.partialTail ?? false) || (integrity?.readError ?? false) || valid.length !== events.length,
|
|
70
|
+
duplicateEvents, invalidRecords: (integrity?.invalidRecords ?? 0) + events.length - valid.length, partialTail: integrity?.partialTail ?? false, readError: integrity?.readError ?? false,
|
|
71
|
+
active: live?.active.length ?? 0, incompleteChecks: projection.filter(c => c.evaluation === "interrupted" || c.llm === "interrupted").length },
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function formatWatchdogStatus(session: WatchdogSystem1Session | null, activity: WatchdogActivity | null) {
|
|
76
|
+
const live = activity?.live();
|
|
77
|
+
const latest = live?.completed.at(-1);
|
|
78
|
+
return [
|
|
79
|
+
`System 1 · watchdog · configured ${session?.configuredMode ?? "off"} · effective ${session?.effectiveMode ?? "off"}`,
|
|
80
|
+
`Readiness: ${session?.readiness.status ?? "unavailable"}${session?.readiness.status === "ready" ? " (API access not verified)" : ""} · armed ${session?.hubArmed === true ? "yes" : "no"}`,
|
|
81
|
+
`Active: ${session?.blockLabel ?? "not enabled"} · checks ${live?.active.length ?? 0} · trace ${live?.degraded ? "degraded" : "available"}`,
|
|
82
|
+
`Last: ${latest ? `${latest.checkId} · ${latest.status} · ${latest.reason} · LLM ${latest.llm} · ${latest.outcome}` : "unknown"}`,
|
|
83
|
+
].join("\n");
|
|
84
|
+
}
|