@chankov/agent-fleet 2.0.11 → 2.0.12
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/lib/flow-maintenance.ts +1 -1
- package/.pi/agent-fleet/scripts/lib/herdr-layout.ts +3 -3
- package/.pi/harnesses/agent-hub/README.md +63 -6
- 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/context.ts +1 -0
- 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/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 +3 -1
- 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-spawn.ts +56 -51
- package/.pi/harnesses/agent-hub/dispatch-native-types.ts +8 -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 +81 -43
- 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/work-mode.ts +2 -2
- package/.pi/harnesses/agent-hub/prompts/context.ts +1 -1
- package/.pi/harnesses/agent-hub/prompts/session-start.ts +2 -2
- 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 +1 -1
- package/.pi/harnesses/agent-hub/research/spawn-run.ts +1 -1
- package/.pi/harnesses/agent-hub/return-extract.js +3 -1
- 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 +68 -3
- package/.pi/harnesses/agent-hub/spawn.ts +76 -8
- package/.pi/harnesses/agent-hub/system1-activity.ts +443 -0
- package/.pi/harnesses/agent-hub/system1-report.ts +84 -0
- package/.pi/harnesses/agent-hub/system1-runtime.ts +273 -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/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 +11 -18
- package/.pi/harnesses/agent-hub/ui/fleet-actions.ts +3 -1
- package/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +2 -2
- package/.pi/harnesses/agent-hub/ui/fleet-source.ts +14 -1
- package/.pi/harnesses/agent-hub/ui/grid.ts +6 -6
- 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.ts +1 -1
- package/.pi/harnesses/lib/fleet-dashboard-view.ts +3 -1
- package/.pi/harnesses/lib/fleet-detail-view.ts +35 -4
- package/.pi/harnesses/lib/fleet-read-model.ts +206 -14
- package/.pi/harnesses/lib/fleet-strip-view.ts +17 -5
- 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/.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/CHANGELOG.md +10 -0
- package/bin/cli.js +3 -3
- package/bin/lib/doctor.js +63 -1
- package/docs/ARCHITECTURE.md +113 -3
- package/docs/agent-fleet-setup.md +96 -0
- package/docs/npm-install.md +87 -2
- package/install-manifest.json +34 -1
- package/manifest-meta.json +25 -0
- package/package.json +6 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CustomEditor } from "@mariozechner/pi-coding-agent";
|
|
2
2
|
import { isKeyRelease, Key, matchesKey, truncateToWidth, visibleWidth } from "@mariozechner/pi-tui";
|
|
3
3
|
import { fleetStripTransition, initialFleetStripState, reconcileStripState, type FleetStripIntent, type FleetStripState } from "../../lib/fleet-strip-controller.ts";
|
|
4
|
-
import { selectWidgetRows, summariseWidget, type FleetRow } from "../../lib/fleet-read-model.ts";
|
|
4
|
+
import { selectWidgetRows, summariseWidget, system1Visible, type FleetRow } from "../../lib/fleet-read-model.ts";
|
|
5
5
|
import { renderFleetStrip, visibleWindow } from "../../lib/fleet-strip-view.ts";
|
|
6
6
|
import { installFleetEditor, type FleetEditorFactory, type FleetEditorWrapper } from "./fleet-editor.ts";
|
|
7
7
|
export interface GridWidgetContext {
|
|
@@ -34,7 +34,7 @@ export function createGridUI(deps: GridUIContext) {
|
|
|
34
34
|
function editorGate() {
|
|
35
35
|
const editor = currentEditor();
|
|
36
36
|
const compatible = !!editor && typeof editor.isShowingAutocomplete === "function" && typeof editor.focused === "boolean";
|
|
37
|
-
return { compatible, open: compatible && suspended === 0 && editor
|
|
37
|
+
return { compatible, open: compatible && suspended === 0 && editor?.focused === true && editor.getText() === "" && editor.isShowingAutocomplete?.() === false };
|
|
38
38
|
}
|
|
39
39
|
function snapshot(now: number) {
|
|
40
40
|
snapshotNow = now;
|
|
@@ -49,7 +49,7 @@ export function createGridUI(deps: GridUIContext) {
|
|
|
49
49
|
return lastRows;
|
|
50
50
|
}
|
|
51
51
|
function needsTimer(rows: readonly FleetRow[], now: number): boolean {
|
|
52
|
-
return state.active || !!state.confirmation || rows.some(row => row.status === "running" || ((row.status === "done" || row.status === "error") && row.endedAt != null && now < row.endedAt + 10_000));
|
|
52
|
+
return state.active || !!state.confirmation || rows.some(row => row.status === "running" || ((row.status === "done" || row.status === "error") && row.endedAt != null && now < row.endedAt + 10_000) || system1Visible(row, now));
|
|
53
53
|
}
|
|
54
54
|
function arm() {
|
|
55
55
|
if (timer || disposed) return;
|
|
@@ -58,7 +58,7 @@ export function createGridUI(deps: GridUIContext) {
|
|
|
58
58
|
timer = schedule(() => { timer = undefined; const before = lastDisplayKey; refresh(false); if (before !== lastDisplayKey) tui?.requestRender?.(); arm(); }, 500);
|
|
59
59
|
}
|
|
60
60
|
function displayKey(rows: readonly FleetRow[], now: number): string {
|
|
61
|
-
return JSON.stringify([Math.floor(now / 1000), rows.map(row => [row.key, row.runToken, row.status, Math.floor(row.elapsed / 1000), row.lastWork]), state, maxRows(), tui?.terminal?.columns ?? null, suspended, editorGate().open]);
|
|
61
|
+
return JSON.stringify([Math.floor(now / 1000), rows.map(row => [row.key, row.runToken, row.status, Math.floor(row.elapsed / 1000), row.lastWork, row.system1 && row.system1.runToken === row.runToken ? [row.system1.checkId, row.system1.phase, row.system1.label, row.system1.elapsedMs, row.system1.retainUntil, row.system1.llmRelation] : null]), state, maxRows(), tui?.terminal?.columns ?? null, suspended, editorGate().open]);
|
|
62
62
|
}
|
|
63
63
|
function refresh(request = true) {
|
|
64
64
|
if (disposed) return;
|
|
@@ -81,7 +81,7 @@ export function createGridUI(deps: GridUIContext) {
|
|
|
81
81
|
interactiveAvailable: gate.compatible && suspended === 0,
|
|
82
82
|
focused: gate.compatible && editor?.focused === true,
|
|
83
83
|
editorEmpty: editor?.getText?.() === "",
|
|
84
|
-
autocomplete:
|
|
84
|
+
autocomplete: editor?.isShowingAutocomplete?.() ?? true,
|
|
85
85
|
modal: suspended > 0,
|
|
86
86
|
bodyRows: bodyRows(),
|
|
87
87
|
}, now);
|
|
@@ -129,7 +129,7 @@ export function createGridUI(deps: GridUIContext) {
|
|
|
129
129
|
interactiveAvailable: gate.compatible && suspended === 0,
|
|
130
130
|
focused: gate.compatible && editor?.focused === true,
|
|
131
131
|
editorEmpty: editor?.getText?.() === "",
|
|
132
|
-
autocomplete:
|
|
132
|
+
autocomplete: editor?.isShowingAutocomplete?.() ?? true,
|
|
133
133
|
modal: suspended > 0,
|
|
134
134
|
bodyRows: bodyRows(),
|
|
135
135
|
}, now);
|
|
@@ -5,7 +5,7 @@ import { buildFleetRows, type PeerInput } from "../../lib/fleet-read-model.ts";
|
|
|
5
5
|
|
|
6
6
|
export interface PoolPresentationDeps {
|
|
7
7
|
getIdentity(): { session_id: string; name: string; color: string; project: string } | null;
|
|
8
|
-
getDisplayProject(): string | undefined;
|
|
8
|
+
getDisplayProject(): string | null | undefined;
|
|
9
9
|
includeExplicitPeers(): boolean;
|
|
10
10
|
getPeerCards(): ReadonlyMap<string, { name: string; model: string; purpose: string; color: string; staleCount?: number }>;
|
|
11
11
|
readProjectEntries(project: string): ComsRegistryEntry[];
|
|
@@ -18,6 +18,7 @@ export interface Zoomable {
|
|
|
18
18
|
def: { name: string };
|
|
19
19
|
status: string;
|
|
20
20
|
timeline: TimelineEntry[];
|
|
21
|
+
transcriptStore?: { path: string };
|
|
21
22
|
zoomRender?: (force?: boolean) => void;
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -37,7 +38,7 @@ export class ZoomUI {
|
|
|
37
38
|
constructor(
|
|
38
39
|
private state: Zoomable,
|
|
39
40
|
private onDone: () => void,
|
|
40
|
-
private notify: (message: string, type?: "info" | "
|
|
41
|
+
private notify: (message: string, type?: "info" | "warning" | "error") => void,
|
|
41
42
|
) {}
|
|
42
43
|
|
|
43
44
|
handleInput(data: string, tui: any): void {
|
|
@@ -65,7 +66,7 @@ export class ZoomUI {
|
|
|
65
66
|
if (!item) return;
|
|
66
67
|
try {
|
|
67
68
|
await copyToClipboard(item.content);
|
|
68
|
-
this.notify("Copied selected zoom row", "
|
|
69
|
+
this.notify("Copied selected zoom row", "info");
|
|
69
70
|
} catch (err) {
|
|
70
71
|
const message = err instanceof Error ? err.message : String(err);
|
|
71
72
|
this.notify(`Failed to copy selected zoom row: ${message}`, "error");
|
|
@@ -82,7 +83,8 @@ export class ZoomUI {
|
|
|
82
83
|
const cardBox = new Box(1, 0, (s: string) => isSelected ? theme.bg("selectedBg", s) : s);
|
|
83
84
|
|
|
84
85
|
let icon = "○", color = "dim";
|
|
85
|
-
if (item.
|
|
86
|
+
if (item.title === "System 1") { icon = "S1"; color = "warning"; }
|
|
87
|
+
else if (item.kind === "text") { icon = "🤖"; color = "accent"; }
|
|
86
88
|
else if (item.kind === "tool") { icon = "🛠️"; color = "warning"; }
|
|
87
89
|
else if (item.kind === "thinking") { icon = "💭"; color = "dim"; }
|
|
88
90
|
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { buildWatchdogReport, readWatchdogEvents, type WatchdogTraceIntegrity } from "./system1-report.ts";
|
|
4
|
+
import type { WatchdogTraceRecord } from "./system1-activity.ts";
|
|
5
|
+
import { WATCHDOG_POLICY_VERSION, type AcceptedWatchdogProfile } from "./drift-system1-policy.ts";
|
|
6
|
+
|
|
7
|
+
export interface HumanWatchdogLabel {
|
|
8
|
+
sessionId: string; dispatchId: string; attemptId: string; checkId: string; snapshotId: string; llmAttemptId: string;
|
|
9
|
+
partition: "tuning" | "held_out";
|
|
10
|
+
label: "on_track" | "drifting" | "stuck" | "unknown";
|
|
11
|
+
/** Human adjudication at this signal, not dispatch success or LLM agreement. */
|
|
12
|
+
humanConfirmed: true;
|
|
13
|
+
}
|
|
14
|
+
const checkId = (x: HumanWatchdogLabel | WatchdogTraceRecord) => [x.sessionId, x.dispatchId, x.attemptId, x.checkId, x.snapshotId].join("\u0000");
|
|
15
|
+
const id = (x: HumanWatchdogLabel | WatchdogTraceRecord) => `${checkId(x)}\u0000${x.llmAttemptId ?? ""}`;
|
|
16
|
+
/** Offline, read-only. A prospective candidate needs explicit profile and replayable safe metadata.
|
|
17
|
+
* No profile is shipped. This report neither approves nor activates a profile. */
|
|
18
|
+
export function evaluateWatchdog(events: readonly WatchdogTraceRecord[], labels: readonly HumanWatchdogLabel[], profile: AcceptedWatchdogProfile | null = null, integrity?: WatchdogTraceIntegrity) {
|
|
19
|
+
const report = buildWatchdogReport(events, null, integrity);
|
|
20
|
+
const sessionPartitions = new Map<string, Set<string>>();
|
|
21
|
+
for (const label of labels) {
|
|
22
|
+
const partitions = sessionPartitions.get(label.sessionId) ?? new Set<string>(); partitions.add(label.partition); sessionPartitions.set(label.sessionId, partitions);
|
|
23
|
+
}
|
|
24
|
+
const leakage = [...sessionPartitions].filter(([, partitions]) => partitions.size > 1).map(([sessionId]) => sessionId);
|
|
25
|
+
const potential = events.filter(e => e.schema === "watchdog-trace/v1" && e.type === "evaluation_finished" && e.status === "ok" && e.statusChoice === "on_track" && e.unused !== true);
|
|
26
|
+
const labeledIds = new Set(labels.filter(l => l.humanConfirmed === true && ["held_out", "tuning"].includes(l.partition)).map(id));
|
|
27
|
+
const unlabeledCandidates = new Set(potential.map(id).filter(key => !labeledIds.has(key))).size;
|
|
28
|
+
const duplicateLabels = [...labels.reduce((counts, label) => counts.set(id(label), (counts.get(id(label)) ?? 0) + 1), new Map<string, number>())]
|
|
29
|
+
.filter(([, count]) => count > 1).map(([key]) => key);
|
|
30
|
+
const duplicateTrace = [...events.filter(e => e.schema === "watchdog-trace/v1" && ["evaluation_started", "evaluation_finished", "llm_started", "llm_finished", "decision"].includes(e.type))
|
|
31
|
+
.reduce((counts, e) => { const key = `${e.type}\u0000${id(e)}`; counts.set(key, (counts.get(key) ?? 0) + 1); return counts; }, new Map<string, number>())]
|
|
32
|
+
.filter(([, count]) => count > 1).map(([key]) => key);
|
|
33
|
+
// Runtime retries open a new snapshot. Two LLM IDs on the same snapshot are
|
|
34
|
+
// ambiguous evidence even if a human label names one of them.
|
|
35
|
+
const llmIdsByCheck = new Map<string, Set<string>>();
|
|
36
|
+
for (const event of events.filter(e => e.schema === "watchdog-trace/v1" && ["evaluation_started", "evaluation_finished", "llm_started", "llm_finished"].includes(e.type))) {
|
|
37
|
+
const key = checkId(event);
|
|
38
|
+
const attempts = llmIdsByCheck.get(key) ?? new Set<string>();
|
|
39
|
+
attempts.add(event.llmAttemptId ?? ""); llmIdsByCheck.set(key, attempts);
|
|
40
|
+
}
|
|
41
|
+
const ambiguousLlmChecks = [...llmIdsByCheck.values()].filter(attempts => attempts.size !== 1 || attempts.has("")).length;
|
|
42
|
+
const eligible = (e: WatchdogTraceRecord) => !!profile && profile.policyVersion === WATCHDOG_POLICY_VERSION
|
|
43
|
+
&& e.stateVersion === profile.stateVersion // stateVersion is recorded on the start event, see starts below
|
|
44
|
+
&& e.questionsVersion === profile.questionsVersion && e.stateComplete === true && e.predicatesProvider === true
|
|
45
|
+
&& e.provider === profile.provider && e.statusProvenance === "provider"
|
|
46
|
+
&& e.requestedModel === profile.model && e.returnedModel === profile.model && !!e.rule && profile.rules.includes(e.rule)
|
|
47
|
+
&& Number.isFinite(profile.minConfidence) && profile.minConfidence >= 0 && profile.minConfidence <= 1
|
|
48
|
+
&& Number.isFinite(profile.maxContradiction) && profile.maxContradiction >= 0 && profile.maxContradiction <= 1
|
|
49
|
+
&& typeof e.numerical?.status_confidence === "number" && e.numerical.status_confidence >= profile.minConfidence
|
|
50
|
+
&& typeof e.numerical.status_on_track === "number" && e.numerical.status_on_track >= profile.minConfidence
|
|
51
|
+
&& ["status_drifting", "status_stuck", "status_insufficient_evidence", "repeating", "outside_task", "trail_carries_instructions"].every(k => typeof e.numerical?.[k] === "number" && e.numerical[k] >= 0 && e.numerical[k] <= 1)
|
|
52
|
+
&& ["repeating", "outside_task", "trail_carries_instructions"].every(k => e.numerical![k] <= profile.maxContradiction)
|
|
53
|
+
&& Math.abs(["status_on_track", "status_drifting", "status_stuck", "status_insufficient_evidence"].reduce((sum, k) => sum + e.numerical![k], 0) - 1) <= 0.02;
|
|
54
|
+
const starts = new Map(events.filter(e => e.schema === "watchdog-trace/v1" && e.type === "evaluation_started").map(e => [id(e), e]));
|
|
55
|
+
const evaluations = new Map(potential.filter(e => eligible({ ...e, stateVersion: starts.get(id(e))?.stateVersion, questionsVersion: starts.get(id(e))?.questionsVersion, rule: starts.get(id(e))?.rule })).map(e => [id(e), e]));
|
|
56
|
+
const decisions = new Map(events.filter(e => e.schema === "watchdog-trace/v1" && e.type === "decision").map(e => [id(e), e]));
|
|
57
|
+
// A retry must not pair to a different snapshot or an orphan LLM finish.
|
|
58
|
+
const llmStarts = new Map(events.filter(e => e.schema === "watchdog-trace/v1" && e.type === "llm_started" && !!e.llmAttemptId).map(e => [id(e), e]));
|
|
59
|
+
const pairs = new Set(events.filter(e => e.schema === "watchdog-trace/v1" && e.type === "llm_finished" && e.status === "verdict" && !!e.llmAttemptId
|
|
60
|
+
&& (llmStarts.get(id(e))?.sequence ?? Infinity) < e.sequence).map(id));
|
|
61
|
+
const seen = new Set<string>(), byRule: Record<string, { candidates: number; missed: number }> = {};
|
|
62
|
+
const failedSessions = new Set<string>(), successfulSessions = new Set<string>(), incompleteSessions = new Set<string>();
|
|
63
|
+
let unknown = 0, heldOutCandidates = 0, tuningCandidates = 0, matchedPairs = 0, unpaired = 0;
|
|
64
|
+
for (const label of labels) {
|
|
65
|
+
const key = id(label);
|
|
66
|
+
if (seen.has(key) || label.humanConfirmed !== true || !["held_out", "tuning"].includes(label.partition)) continue;
|
|
67
|
+
seen.add(key);
|
|
68
|
+
const evaluation = evaluations.get(key), decision = decisions.get(key);
|
|
69
|
+
if (!evaluation) continue;
|
|
70
|
+
if (pairs.has(key)) matchedPairs++; else unpaired++;
|
|
71
|
+
if (label.partition === "tuning") { tuningCandidates++; continue; }
|
|
72
|
+
heldOutCandidates++;
|
|
73
|
+
if (label.label === "unknown" || leakage.includes(label.sessionId)) { unknown++; incompleteSessions.add(label.sessionId); continue; }
|
|
74
|
+
const actualRule = starts.get(key)?.rule;
|
|
75
|
+
const rule = typeof actualRule === "string" && /^(loop|scope|failures|toolcap)$/.test(actualRule) ? actualRule : "unknown";
|
|
76
|
+
const counts = byRule[rule] ?? { candidates: 0, missed: 0 }; byRule[rule] = counts;
|
|
77
|
+
counts.candidates++;
|
|
78
|
+
// Candidate is the prospective shortcut, even when shadow LLM disagrees; LLM is not ground truth.
|
|
79
|
+
if (label.label === "drifting" || label.label === "stuck") { counts.missed++; failedSessions.add(label.sessionId); }
|
|
80
|
+
else successfulSessions.add(label.sessionId);
|
|
81
|
+
// Actual avoidance is counted in the trace report, never inferred from a label.
|
|
82
|
+
void decision;
|
|
83
|
+
}
|
|
84
|
+
const sessions = new Set([...successfulSessions].filter(s => !incompleteSessions.has(s) && !leakage.includes(s)).concat([...failedSessions]));
|
|
85
|
+
const n = sessions.size, failures = failedSessions.size;
|
|
86
|
+
const checksByRule: Record<string, number> = {};
|
|
87
|
+
for (const event of starts.values()) {
|
|
88
|
+
const rule = typeof event.rule === "string" && /^(loop|scope|failures|toolcap)$/.test(event.rule) ? event.rule : "unknown";
|
|
89
|
+
checksByRule[rule] = (checksByRule[rule] ?? 0) + 1;
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
schema: "watchdog-evaluation/v1" as const, readOnly: true as const,
|
|
93
|
+
eligibility: !profile || report.observability.degraded || leakage.length || unknown || unlabeledCandidates || duplicateLabels.length || duplicateTrace.length || ambiguousLlmChecks || unpaired || !heldOutCandidates || !n || failures ? "not_enough_evidence" as const : "candidate_for_maintainer_review" as const,
|
|
94
|
+
activation: "closed_requires_G2" as const,
|
|
95
|
+
potentialOnTrack: potential.length, heldOutCandidates, tuningCandidates, unknownLabels: unknown, unlabeledCandidates, duplicateLabels: duplicateLabels.length, duplicateTrace: duplicateTrace.length, ambiguousLlmChecks, leakageSessions: leakage,
|
|
96
|
+
matchedPairs, unpaired, perRule: byRule, checksByRule,
|
|
97
|
+
sessionFailure: { sessions: n, failed: failures, upper95: n ? failures === 0 ? 1 - Math.pow(0.05, 1 / n) : null : null, unit: "independent_session" as const },
|
|
98
|
+
diagnostics: report,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
export function readHumanWatchdogLabels(sessionDir: string): HumanWatchdogLabel[] {
|
|
102
|
+
try {
|
|
103
|
+
const text = readFileSync(join(sessionDir, "artifacts", "watchdog", "labels.jsonl"), "utf8");
|
|
104
|
+
return text.split("\n").flatMap(line => { try { const value = JSON.parse(line); return value?.humanConfirmed === true && ["tuning", "held_out"].includes(value.partition) && ["on_track", "drifting", "stuck", "unknown"].includes(value.label) && ["sessionId", "dispatchId", "attemptId", "checkId", "snapshotId", "llmAttemptId"].every(k => typeof value[k] === "string" && /^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$/.test(value[k])) ? [value as HumanWatchdogLabel] : []; } catch { return []; } });
|
|
105
|
+
} catch { return []; }
|
|
106
|
+
}
|
|
107
|
+
export function evaluateWatchdogSession(sessionDir: string, profile: AcceptedWatchdogProfile | null = null) {
|
|
108
|
+
const trace = readWatchdogEvents(sessionDir);
|
|
109
|
+
return evaluateWatchdog(trace.events, readHumanWatchdogLabels(sessionDir), profile, trace.integrity);
|
|
110
|
+
}
|
|
@@ -494,7 +494,7 @@ export function createComsPeer(deps: CreateComsPeerDeps) {
|
|
|
494
494
|
const result = await Promise.race([entry.promise, timeout]);
|
|
495
495
|
if (result.error === "timeout") return { status: "pending" };
|
|
496
496
|
if (result.error) return { status: "error", error: result.error };
|
|
497
|
-
return { status: "complete", response: result.response };
|
|
497
|
+
return { status: "complete", response: "response" in result ? result.response : undefined };
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
async function respond(ctx: ExtensionContext): Promise<void> {
|
|
@@ -98,7 +98,7 @@ export function reconcilePlane(components: readonly ContextBudgetComponent[], pl
|
|
|
98
98
|
const residualTokens = hasMeasured ? Math.max(0, measured - attributedTokens) : undefined;
|
|
99
99
|
const validWindow = Number(window);
|
|
100
100
|
const occupancyPercent = hasMeasured && Number.isFinite(validWindow) && validWindow > 0 ? (measured / validWindow) * 100 : undefined;
|
|
101
|
-
const residual = residualTokens === undefined ? undefined : {
|
|
101
|
+
const residual: ContextBudgetComponent | undefined = residualTokens === undefined ? undefined : {
|
|
102
102
|
id: `${plane}/provider-unattributed`, plane, category: "unattributed", label: "Provider / serialization / unattributed",
|
|
103
103
|
persistence: "turn", visibility: "model-visible", chars: 0, estimatedTokens: 0, adjustedTokens: residualTokens,
|
|
104
104
|
confidence: "provider-total" as const,
|
|
@@ -40,7 +40,9 @@ export function renderFleetDashboard(vm: FleetViewModel, width: number, bodyHeig
|
|
|
40
40
|
if (!row) { lines.push(""); continue; }
|
|
41
41
|
const selected = offset + i === vm.selection.index;
|
|
42
42
|
const indent = treePrefix(row.lastAtDepth, row.depth);
|
|
43
|
-
const
|
|
43
|
+
const badge = row.system1 && row.system1.runToken === row.runToken ? ` ${safeTerminalText(row.system1.compact)}` : "";
|
|
44
|
+
const name = `${selected ? "❯" : " "} ${indent}${glyph(row)} ${safeTerminalText(row.name)}${badge}`;
|
|
45
|
+
|
|
44
46
|
const parts = [name, row.kind, `${row.backend === "coms" ? "⇄ " : ""}${safeTerminalText(row.model)}`, context(row.contextPct), tokens(row.contextTokens), duration(row.elapsed), row.toolCount == null ? "—" : String(row.toolCount), safeTerminalText(row.lastWork)];
|
|
45
47
|
const count = w < 80 ? 4 : w < 105 ? 6 : 8;
|
|
46
48
|
const line = fit(parts.slice(0, count).join(" "), w, metrics);
|
|
@@ -163,13 +163,14 @@ function durationLabel(ms: number | undefined): string {
|
|
|
163
163
|
|
|
164
164
|
function detailEntryLines(entry: TimelineEntry, index: number, width: number, expandedIndex: number | null, verbose: boolean, selectedIndex?: number): string[] {
|
|
165
165
|
const w = Math.max(1, width);
|
|
166
|
-
const
|
|
166
|
+
const system1 = entry.title === "System 1";
|
|
167
|
+
const icon = system1 ? "S1" : isToolEntry(entry) ? (entry.kind === "tool-result" ? "◂" : "▸") : entry.kind === "thinking" ? "·" : "•";
|
|
167
168
|
const selected = index === selectedIndex ? "›" : " ";
|
|
168
169
|
const meta = entry.kind === "tool-result"
|
|
169
170
|
? ` [${[entry.status, durationLabel(entry.durationMs)].filter(Boolean).join(" · ")}]`
|
|
170
171
|
: "";
|
|
171
172
|
if (!verbose) {
|
|
172
|
-
if (index === expandedIndex && isToolEntry(entry)) return [trim(`${selected}${icon} ${entry.title}${meta}`, w), ...entry.content.split(/\r?\n/).map(line => ` ${trim(line, Math.max(0, w - 3))}`)];
|
|
173
|
+
if (system1 || (index === expandedIndex && isToolEntry(entry))) return [trim(`${selected}${icon} ${entry.title}${meta}`, w), ...entry.content.split(/\r?\n/).map(line => ` ${trim(line, Math.max(0, w - 3))}`)];
|
|
173
174
|
return [trim(`${selected}${icon} ${entry.title}${meta} ${entry.content.replace(/\s+/g, " ")}`, w)];
|
|
174
175
|
}
|
|
175
176
|
const heading = trim(`${selected}${icon} ${entry.title}`, w);
|
|
@@ -196,15 +197,45 @@ export function detailContent(timeline: readonly TimelineEntry[], width: number,
|
|
|
196
197
|
return timeline.flatMap((entry, index) => detailEntryLines(entry, index, width, expandedIndex, verbose, selectedIndex));
|
|
197
198
|
}
|
|
198
199
|
|
|
200
|
+
/** Owner-fenced System 1 preface. Empty unless the live row still owns this run. */
|
|
201
|
+
export function system1DetailPreface(row: FleetRow, width: number): string[] {
|
|
202
|
+
const w = Math.max(1, width);
|
|
203
|
+
if (!row.system1 || row.system1.runToken !== row.runToken) return [];
|
|
204
|
+
return row.system1.detail.split(/\r?\n/).map(line => trim(` S1 ${line}`, w));
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/** Transcript body including the preface. Scroll math must use this, not detailContent alone. */
|
|
208
|
+
export function detailBodyLines(row: FleetRow, timeline: readonly TimelineEntry[], width: number, expandedIndex: number | null, verbose = false, selectedIndex?: number): string[] {
|
|
209
|
+
return [...system1DetailPreface(row, width), ...detailContent(timeline, width, expandedIndex, verbose, selectedIndex)];
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** Entry offsets shifted by the preface so selection stays inside the visible body. */
|
|
213
|
+
export function detailBodyOffsets(row: FleetRow, timeline: readonly TimelineEntry[], width: number, expandedIndex: number | null, verbose = false): DetailEntryOffset[] {
|
|
214
|
+
const shift = system1DetailPreface(row, width).length;
|
|
215
|
+
return detailEntryOffsets(timeline, width, expandedIndex, verbose).map(item => ({ index: item.index, start: item.start + shift, end: item.end + shift }));
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** Replace the open panel's System 1 view from the current fleet row. Model edits on the open row stay. */
|
|
219
|
+
export function applyLiveFleetDetailRow<T extends { key: string; name: string; model: string; system1?: FleetRow["system1"]; runToken?: string; toolCount: number | null }>(
|
|
220
|
+
openRow: T,
|
|
221
|
+
fresh: T | undefined,
|
|
222
|
+
enabled: boolean,
|
|
223
|
+
): T {
|
|
224
|
+
if (!enabled) return openRow;
|
|
225
|
+
if (!fresh || fresh.key !== openRow.key) return { ...openRow, system1: undefined };
|
|
226
|
+
return { ...openRow, system1: fresh.system1, runToken: fresh.runToken, toolCount: fresh.toolCount, name: fresh.name };
|
|
227
|
+
}
|
|
228
|
+
|
|
199
229
|
/** Render a constant-height transcript detail screen, including the no-local-peer notice. */
|
|
200
230
|
export function renderFleetDetail(row: FleetRow, timeline: readonly TimelineEntry[], scrollOffset: number, width: number, bodyHeight: number, theme: ThemeLike, expandedIndex: number | null = null, verbose = false, selectedIndex?: number): string[] {
|
|
201
231
|
const w = Math.max(1, width), body = Math.max(0, bodyHeight);
|
|
202
232
|
const mode = verbose ? "Verbose" : "Compact";
|
|
203
|
-
const
|
|
233
|
+
const badge = row.system1 && row.system1.runToken === row.runToken ? ` · ${row.system1.compact}` : "";
|
|
234
|
+
const header = trim(` ${row.name}${badge} · ${mode} · ${row.status} · ${row.kind} · ${row.model} · ${row.backend} · ${row.contextPct == null ? "context automatic" : `${Math.round(row.contextPct)}%`} · ${Math.round(row.elapsed / 1000)}s · ${row.toolCount ?? "—"} tools`, w);
|
|
204
235
|
const lines = [theme.bold(header), theme.fg("dim", "╭" + "─".repeat(Math.max(0, w - 2)) + "╮")];
|
|
205
236
|
if (!row.hasTimeline) lines.push(...Array.from({ length: body }, (_, i) => i === 0 ? theme.fg("dim", " no local transcript for this coms peer") : ""));
|
|
206
237
|
else {
|
|
207
|
-
const content =
|
|
238
|
+
const content = detailBodyLines(row, timeline, w, expandedIndex, verbose, selectedIndex);
|
|
208
239
|
const offset = Math.max(0, Math.min(scrollOffset, Math.max(0, content.length - body)));
|
|
209
240
|
lines.push(...content.slice(offset, offset + body), ...Array(Math.max(0, body - content.slice(offset, offset + body).length)).fill(""));
|
|
210
241
|
}
|
|
@@ -27,6 +27,73 @@ export interface FleetRow {
|
|
|
27
27
|
lastAtDepth?: readonly boolean[];
|
|
28
28
|
/** Included only to preserve the path to an eligible descendant. */
|
|
29
29
|
structuralOnly?: boolean;
|
|
30
|
+
/** Owner-fenced System 1 view. Absent unless the current runToken matches. */
|
|
31
|
+
system1?: System1OwnerView;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const SYSTEM1_RETENTION_MS = 10_000;
|
|
35
|
+
export const SYSTEM1_GLYPH = "S1";
|
|
36
|
+
|
|
37
|
+
export interface System1CheckInput {
|
|
38
|
+
dispatchId: string;
|
|
39
|
+
attemptId: string;
|
|
40
|
+
checkId: string;
|
|
41
|
+
snapshotId: string;
|
|
42
|
+
evaluation: "evaluating" | "finished" | "interrupted" | "unknown";
|
|
43
|
+
llm: string;
|
|
44
|
+
status: string;
|
|
45
|
+
reason: string;
|
|
46
|
+
elapsedMs: number | null;
|
|
47
|
+
finishedAt?: number;
|
|
48
|
+
rule?: string;
|
|
49
|
+
configuredMode?: "off" | "shadow" | "active";
|
|
50
|
+
effectiveMode?: "off" | "shadow" | "active";
|
|
51
|
+
stateVersion?: string;
|
|
52
|
+
questionsVersion?: string;
|
|
53
|
+
numerical?: Record<string, number>;
|
|
54
|
+
statusChoice?: string;
|
|
55
|
+
returnedModel?: string;
|
|
56
|
+
usage?: { inputTokens: number; outputTokens: number } | "unknown";
|
|
57
|
+
source?: "llm" | "none" | "system1" | "unknown";
|
|
58
|
+
applied?: "yes" | "no" | "unknown";
|
|
59
|
+
outcome?: string;
|
|
60
|
+
llmVerdict?: string;
|
|
61
|
+
unused?: boolean;
|
|
62
|
+
degraded?: boolean;
|
|
63
|
+
/** Test/fixture override. Production shadow does not invent an active fallback. */
|
|
64
|
+
llmRelation?: "parallel" | "fallback" | "none";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface System1OwnerView {
|
|
68
|
+
dispatchId: string;
|
|
69
|
+
attemptId: string;
|
|
70
|
+
checkId: string;
|
|
71
|
+
snapshotId: string;
|
|
72
|
+
runToken: string;
|
|
73
|
+
phase: "evaluating" | "result" | "unavailable" | "cancelled" | "interrupted";
|
|
74
|
+
compact: string;
|
|
75
|
+
label: string;
|
|
76
|
+
detail: string;
|
|
77
|
+
effectiveMode: "off" | "shadow" | "active" | "unknown";
|
|
78
|
+
llmRelation: "parallel" | "fallback" | "none";
|
|
79
|
+
rule: string;
|
|
80
|
+
elapsedMs: number | null;
|
|
81
|
+
retainUntil: number;
|
|
82
|
+
status: string;
|
|
83
|
+
reason: string;
|
|
84
|
+
statusChoice: string;
|
|
85
|
+
confidence: number | null;
|
|
86
|
+
returnedModel: string;
|
|
87
|
+
stateVersion: string;
|
|
88
|
+
questionsVersion: string;
|
|
89
|
+
policyVersion: "none" | "watchdog-policy/v1";
|
|
90
|
+
usage: "unknown" | { inputTokens: number; outputTokens: number };
|
|
91
|
+
source: "llm" | "none" | "system1" | "unknown";
|
|
92
|
+
applied: "yes" | "no" | "unknown";
|
|
93
|
+
outcome: string;
|
|
94
|
+
llm: string;
|
|
95
|
+
llmVerdict: string;
|
|
96
|
+
degraded: boolean;
|
|
30
97
|
}
|
|
31
98
|
|
|
32
99
|
export interface DelegateInput extends Omit<FleetRow, "kind" | "parentKey" | "depth" | "backend" | "hasTimeline" | "lastAtDepth" | "structuralOnly"> {
|
|
@@ -125,17 +192,123 @@ export function buildFleetRows(src: FleetSource, filter: FleetFilter): FleetRow[
|
|
|
125
192
|
return withTreeMetadata(out);
|
|
126
193
|
}
|
|
127
194
|
|
|
195
|
+
const SYSTEM1_CHOICES = new Set(["on_track", "drifting", "stuck", "insufficient_evidence"]);
|
|
196
|
+
const safeToken = (value: string | undefined, fallback: string) => {
|
|
197
|
+
const cleaned = (value ?? "").replace(/[^a-z0-9_.:/-]/gi, "").slice(0, 48);
|
|
198
|
+
return cleaned || fallback;
|
|
199
|
+
};
|
|
200
|
+
const finite = (value: number | null | undefined): number | null => typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
201
|
+
|
|
202
|
+
function system1Elapsed(ms: number | null, evaluating: boolean): string {
|
|
203
|
+
if (ms == null) return "elapsed unknown";
|
|
204
|
+
const safe = Math.max(0, Math.round(ms));
|
|
205
|
+
if (evaluating) return safe < 10_000 ? `${(safe / 1000).toFixed(1)}s` : `${Math.floor(safe / 1000)}s`;
|
|
206
|
+
return safe < 1000 ? `${safe}ms` : `${(safe / 1000).toFixed(1)}s`;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function system1Relation(input: System1CheckInput): System1OwnerView["llmRelation"] {
|
|
210
|
+
if (input.llmRelation) return input.llmRelation;
|
|
211
|
+
if (input.effectiveMode === "shadow") return "parallel";
|
|
212
|
+
if (input.effectiveMode === "active" && input.llm !== "none") return "fallback";
|
|
213
|
+
return "none";
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** Pure owner view. Callers must pass the current run token; a mismatch is not a view. */
|
|
217
|
+
export function projectSystem1Owner(input: System1CheckInput, runToken: string, now: number): System1OwnerView | undefined {
|
|
218
|
+
if (!input.dispatchId || !input.checkId || !runToken) return undefined;
|
|
219
|
+
// Off, and any record that never started an evaluation, is not a System 1 badge.
|
|
220
|
+
if (input.configuredMode === "off" || input.effectiveMode === "off") return undefined;
|
|
221
|
+
if (input.evaluation !== "evaluating" && input.evaluation !== "finished" && input.evaluation !== "interrupted") return undefined;
|
|
222
|
+
const relation = system1Relation(input);
|
|
223
|
+
const evaluating = input.evaluation === "evaluating" && input.unused !== true;
|
|
224
|
+
const choice = input.statusChoice && SYSTEM1_CHOICES.has(input.statusChoice) ? input.statusChoice : "";
|
|
225
|
+
const cancelled = input.status === "cancelled" || input.reason === "disposed" || input.reason === "cancelled" || input.unused === true;
|
|
226
|
+
const interrupted = !evaluating && (input.evaluation === "interrupted" || input.status === "interrupted");
|
|
227
|
+
const unavailable = !evaluating && !cancelled && !interrupted && (input.status === "unavailable" || input.status === "skipped" || input.status === "unsupported" || input.status === "unknown");
|
|
228
|
+
const phase: System1OwnerView["phase"] = evaluating ? "evaluating" : cancelled ? "cancelled" : interrupted ? "interrupted" : unavailable ? "unavailable" : "result";
|
|
229
|
+
const mode = input.effectiveMode === "shadow" || input.effectiveMode === "active" ? input.effectiveMode : "unknown";
|
|
230
|
+
const rule = safeToken(input.rule, "unknown");
|
|
231
|
+
const elapsed = system1Elapsed(finite(input.elapsedMs), evaluating);
|
|
232
|
+
const relationText = relation === "parallel" ? "LLM parallel" : relation === "fallback" ? (input.status === "ok" ? "S1 uncertain \u2192 LLM judging" : "S1 unavailable \u2192 LLM judging") : "";
|
|
233
|
+
const compact = phase === "evaluating" ? "S1 evaluating"
|
|
234
|
+
: phase === "cancelled" ? "S1 cancelled"
|
|
235
|
+
: phase === "interrupted" ? "S1 interrupted"
|
|
236
|
+
: relation === "fallback" ? relationText
|
|
237
|
+
: phase === "unavailable" ? "S1 unavailable"
|
|
238
|
+
: choice ? `S1 ${choice}` : `S1 ${safeToken(input.status, "unknown")}`;
|
|
239
|
+
const labelParts = [compact];
|
|
240
|
+
if (phase === "evaluating") labelParts.push(rule, elapsed);
|
|
241
|
+
else if (phase === "result") labelParts.push(elapsed, ...(mode === "unknown" ? [] : [mode]));
|
|
242
|
+
if (relation === "parallel") labelParts.push("LLM parallel");
|
|
243
|
+
if (relation === "fallback" && compact !== relationText) labelParts.push(relationText);
|
|
244
|
+
const confidence = finite(input.numerical?.status_confidence);
|
|
245
|
+
const usage = input.usage && typeof input.usage === "object" ? input.usage : "unknown";
|
|
246
|
+
const source = input.source === "llm" || input.source === "none" || input.source === "system1" ? input.source : "unknown";
|
|
247
|
+
const applied = input.applied === "yes" || input.applied === "no" ? input.applied : "unknown";
|
|
248
|
+
const detail = [
|
|
249
|
+
`System 1 \u00b7 watchdog \u00b7 ${rule} \u00b7 ${mode}`,
|
|
250
|
+
`check ${safeToken(input.checkId, "unknown").slice(0, 8)} / attempt ${safeToken(input.attemptId, "unknown").slice(0, 8)} \u00b7 ${phase} \u00b7 ${elapsed}`,
|
|
251
|
+
`Jev: ${choice || "unknown"} \u00b7 confidence ${confidence == null ? "unknown" : confidence} (provider)`,
|
|
252
|
+
`LLM: ${safeToken(input.llmVerdict, "unknown")} \u00b7 decision: ${safeToken(input.outcome, "unknown")} \u00b7 applied: ${applied} \u00b7 source: ${source}`,
|
|
253
|
+
`model ${safeToken(input.returnedModel, "unknown")} \u00b7 state ${safeToken(input.stateVersion, "unknown")} \u00b7 questions ${safeToken(input.questionsVersion, "unknown")} \u00b7 policy ${mode === "active" ? "watchdog-policy/v1" : "none"}`,
|
|
254
|
+
usage === "unknown" ? "usage unknown" : `usage ${usage.inputTokens}/${usage.outputTokens}`,
|
|
255
|
+
relationText,
|
|
256
|
+
input.degraded ? "observability degraded" : "",
|
|
257
|
+
].filter(Boolean).join("\n");
|
|
258
|
+
return {
|
|
259
|
+
dispatchId: input.dispatchId,
|
|
260
|
+
attemptId: input.attemptId,
|
|
261
|
+
checkId: input.checkId,
|
|
262
|
+
snapshotId: input.snapshotId,
|
|
263
|
+
runToken,
|
|
264
|
+
phase,
|
|
265
|
+
compact,
|
|
266
|
+
label: labelParts.filter(Boolean).join(" \u00b7 "),
|
|
267
|
+
detail,
|
|
268
|
+
effectiveMode: mode,
|
|
269
|
+
llmRelation: relation,
|
|
270
|
+
rule,
|
|
271
|
+
elapsedMs: finite(input.elapsedMs),
|
|
272
|
+
retainUntil: evaluating ? Number.POSITIVE_INFINITY : finite(input.finishedAt) == null ? 0 : finite(input.finishedAt)! + SYSTEM1_RETENTION_MS,
|
|
273
|
+
status: safeToken(input.status, "unknown"),
|
|
274
|
+
reason: safeToken(input.reason, "unknown"),
|
|
275
|
+
statusChoice: choice || "unknown",
|
|
276
|
+
confidence,
|
|
277
|
+
returnedModel: safeToken(input.returnedModel, "unknown"),
|
|
278
|
+
stateVersion: safeToken(input.stateVersion, "unknown"),
|
|
279
|
+
questionsVersion: safeToken(input.questionsVersion, "unknown"),
|
|
280
|
+
policyVersion: mode === "active" ? "watchdog-policy/v1" : "none",
|
|
281
|
+
usage,
|
|
282
|
+
source,
|
|
283
|
+
applied,
|
|
284
|
+
outcome: safeToken(input.outcome, "unknown"),
|
|
285
|
+
llm: safeToken(input.llm, "unknown"),
|
|
286
|
+
llmVerdict: safeToken(input.llmVerdict, "unknown"),
|
|
287
|
+
degraded: input.degraded === true,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/** Owner row stays visible through System 1 retention, including idle/cancelled workers. */
|
|
292
|
+
export function system1Visible(row: FleetRow, now: number): boolean {
|
|
293
|
+
const view = row.system1;
|
|
294
|
+
if (!view || row.kind !== "specialist" || view.runToken !== row.runToken) return false;
|
|
295
|
+
if (view.phase === "evaluating") return true;
|
|
296
|
+
return Number.isFinite(view.retainUntil) && now < view.retainUntil;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function widgetEligible(row: FleetRow, now: number, pin?: WidgetSelectionPin): boolean {
|
|
300
|
+
const activeTask = row.kind !== "peer" && (row.status === "running" || row.status === "pending");
|
|
301
|
+
const activePeer = row.kind === "peer" && row.status === "running";
|
|
302
|
+
const retained = row.kind !== "peer" && (row.status === "done" || row.status === "error") && row.endedAt != null && now < row.endedAt + 10_000;
|
|
303
|
+
const pinned = !!pin && row.key === pin.key && (row.status === "done" || row.status === "error") && row.runToken === pin.runToken;
|
|
304
|
+
return activeTask || activePeer || retained || pinned || system1Visible(row, now);
|
|
305
|
+
}
|
|
306
|
+
|
|
128
307
|
/** Select widget rows using a single snapshot clock and exact terminal retention. */
|
|
129
308
|
export function selectWidgetRows(rows: readonly FleetRow[], now: number, pin?: WidgetSelectionPin): FleetRow[] {
|
|
130
309
|
const byKey = new Map(rows.map(row => [row.key, row]));
|
|
131
310
|
const include = new Set<string>();
|
|
132
|
-
for (const row of rows)
|
|
133
|
-
const activeTask = row.kind !== "peer" && (row.status === "running" || row.status === "pending");
|
|
134
|
-
const activePeer = row.kind === "peer" && row.status === "running";
|
|
135
|
-
const retained = row.kind !== "peer" && (row.status === "done" || row.status === "error") && row.endedAt != null && now < row.endedAt + 10_000;
|
|
136
|
-
const pinned = !!pin && row.key === pin.key && (row.status === "done" || row.status === "error") && row.runToken === pin.runToken;
|
|
137
|
-
if (activeTask || activePeer || retained || pinned) include.add(row.key);
|
|
138
|
-
}
|
|
311
|
+
for (const row of rows) if (widgetEligible(row, now, pin)) include.add(row.key);
|
|
139
312
|
for (const key of [...include]) {
|
|
140
313
|
let row = byKey.get(key);
|
|
141
314
|
const seen = new Set<string>();
|
|
@@ -143,12 +316,7 @@ export function selectWidgetRows(rows: readonly FleetRow[], now: number, pin?: W
|
|
|
143
316
|
seen.add(row.parentKey); include.add(row.parentKey); row = byKey.get(row.parentKey);
|
|
144
317
|
}
|
|
145
318
|
}
|
|
146
|
-
return withTreeMetadata(rows.filter(row => include.has(row.key)).map(row => ({ ...row, structuralOnly: !(
|
|
147
|
-
(row.kind !== "peer" && (row.status === "running" || row.status === "pending")) ||
|
|
148
|
-
(row.kind === "peer" && row.status === "running") ||
|
|
149
|
-
(row.kind !== "peer" && (row.status === "done" || row.status === "error") && row.endedAt != null && now < row.endedAt + 10_000) ||
|
|
150
|
-
(!!pin && row.key === pin.key && row.runToken === pin.runToken)
|
|
151
|
-
) })));
|
|
319
|
+
return withTreeMetadata(rows.filter(row => include.has(row.key)).map(row => ({ ...row, structuralOnly: !widgetEligible(row, now, pin) })));
|
|
152
320
|
}
|
|
153
321
|
|
|
154
322
|
/** Total covered length of possibly overlapping intervals. */
|
|
@@ -175,6 +343,11 @@ export interface StripSummary {
|
|
|
175
343
|
wallMs: number;
|
|
176
344
|
wallKnown: number;
|
|
177
345
|
wallTotal: number;
|
|
346
|
+
/** Present only when an owner-fenced System 1 view is in the widget set. */
|
|
347
|
+
system1Evaluating?: number;
|
|
348
|
+
system1Mode?: "off" | "shadow" | "active" | "unknown" | null;
|
|
349
|
+
system1Last?: string | null;
|
|
350
|
+
system1Mixed?: boolean;
|
|
178
351
|
}
|
|
179
352
|
|
|
180
353
|
/** Aggregate the whole eligible widget set, excluding peer waits and structural context. */
|
|
@@ -195,7 +368,26 @@ export function summariseWidget(rows: readonly FleetRow[]): StripSummary {
|
|
|
195
368
|
if (row.timingKind === "run" && row.startedAt != null) { wallKnown++; intervals.push([row.startedAt, row.endedAt ?? row.startedAt + Math.max(0, row.elapsed)]); }
|
|
196
369
|
}
|
|
197
370
|
}
|
|
198
|
-
|
|
371
|
+
const summary: StripSummary = { running, peerActive, done, failed, contextMax, contextKnown, contextTotal, wallMs: unionMs(intervals), wallKnown, wallTotal };
|
|
372
|
+
const identities: string[] = [];
|
|
373
|
+
const modes = new Set<StripSummary["system1Mode"]>();
|
|
374
|
+
let system1Evaluating = 0;
|
|
375
|
+
let latest: System1OwnerView | undefined;
|
|
376
|
+
for (const row of rows) {
|
|
377
|
+
const view = row.system1;
|
|
378
|
+
if (row.structuralOnly || !view || view.runToken !== row.runToken || row.kind !== "specialist") continue;
|
|
379
|
+
if (view.phase === "evaluating") system1Evaluating++;
|
|
380
|
+
modes.add(view.effectiveMode);
|
|
381
|
+
identities.push([view.phase, view.compact, view.effectiveMode, view.llmRelation, view.statusChoice].join("|"));
|
|
382
|
+
if (!latest || view.retainUntil >= latest.retainUntil) latest = view;
|
|
383
|
+
}
|
|
384
|
+
if (identities.length > 0 && latest) {
|
|
385
|
+
summary.system1Evaluating = system1Evaluating;
|
|
386
|
+
summary.system1Mode = modes.size === 1 ? [...modes][0] : null;
|
|
387
|
+
summary.system1Mixed = new Set(identities).size > 1;
|
|
388
|
+
summary.system1Last = summary.system1Mixed ? null : latest.label;
|
|
389
|
+
}
|
|
390
|
+
return summary;
|
|
199
391
|
}
|
|
200
392
|
|
|
201
393
|
/** Backward-compatible dashboard aggregate. */
|
|
@@ -78,7 +78,14 @@ function padLeft(value: string, width: number, metrics: TextMetrics): string { r
|
|
|
78
78
|
function fit(value: string, width: number, metrics: TextMetrics): string { return metrics.truncateToWidth(value, Math.max(0, width)); }
|
|
79
79
|
|
|
80
80
|
export function summaryFields(summary: StripSummary): string[] {
|
|
81
|
-
const fields = [`${summary.running} running
|
|
81
|
+
const fields = [`${summary.running} running`];
|
|
82
|
+
if (summary.system1Evaluating) fields.push(`S1 ${summary.system1Evaluating} evaluating`);
|
|
83
|
+
if (summary.system1Mixed) fields.push("S1 mixed");
|
|
84
|
+
const mode = summary.system1Mode && summary.system1Mode !== "unknown" ? summary.system1Mode : null;
|
|
85
|
+
const lastHasMode = !!mode && !!summary.system1Last?.split(" · ").includes(mode);
|
|
86
|
+
if (mode && !summary.system1Mixed && !lastHasMode) fields.push(mode);
|
|
87
|
+
if (!summary.system1Mixed && summary.system1Last && !summary.system1Evaluating) fields.push(summary.system1Last);
|
|
88
|
+
fields.push(`${summary.peerActive} peer active`);
|
|
82
89
|
const wallPartial = summary.wallKnown < summary.wallTotal ? ` (${summary.wallKnown}/${summary.wallTotal} known)` : "";
|
|
83
90
|
fields.push(`wall ${summary.wallKnown ? Math.floor(summary.wallMs / 1000) + "s" : "—"}${wallPartial}`);
|
|
84
91
|
const contextPartial = summary.contextKnown < summary.contextTotal ? ` (${summary.contextKnown}/${summary.contextTotal} known)` : "";
|
|
@@ -100,7 +107,8 @@ function collapsedSummary(summary: StripSummary, width: number, hint: string, me
|
|
|
100
107
|
export function renderFleetStrip(vm: StripViewModel, width: number, theme: ThemeLike, metrics: TextMetrics): string[] {
|
|
101
108
|
const budget = Math.max(0, Math.floor(vm.maxRows));
|
|
102
109
|
const w = Math.max(0, Math.floor(width));
|
|
103
|
-
|
|
110
|
+
const system1Shown = (vm.summary.system1Evaluating ?? 0) > 0 || !!vm.summary.system1Last || vm.summary.system1Mixed === true;
|
|
111
|
+
if (!budget || !w || (!vm.window.rows.length && vm.summary.running + vm.summary.peerActive === 0 && !system1Shown)) return [];
|
|
104
112
|
const hint = vm.interactiveAvailable ? " · Alt+I inspect" : "";
|
|
105
113
|
const collapsed = fit(theme.fg("dim", collapsedSummary(vm.summary, w, hint, metrics)), w, metrics);
|
|
106
114
|
if (!vm.active || budget < 4) return [collapsed].slice(0, budget);
|
|
@@ -114,12 +122,16 @@ export function renderFleetStrip(vm: StripViewModel, width: number, theme: Theme
|
|
|
114
122
|
for (const row of windowRows) {
|
|
115
123
|
const marker = row.key === vm.selectedKey ? "❯" : " ";
|
|
116
124
|
const backend = row.backend === "coms" ? "⇄ " : "";
|
|
117
|
-
const
|
|
125
|
+
const badgeText = row.system1 && row.system1.runToken === row.runToken ? safeTerminalText(row.system1.compact) : "";
|
|
126
|
+
const badge = badgeText ? ` ${theme.fg("warning", badgeText)}` : "";
|
|
127
|
+
const identity = `${treePrefix(row.lastAtDepth, row.depth)}${glyph(row)} ${safeTerminalText(row.name)}${badge}`;
|
|
128
|
+
|
|
118
129
|
const elapsed = padLeft(duration(row), 6, metrics);
|
|
130
|
+
const system1 = badge ? ` ${safeTerminalText(row.system1?.label ?? "")}` : "";
|
|
119
131
|
let line: string;
|
|
120
132
|
if (w < 80) line = `${marker} ${identity} ${elapsed}`;
|
|
121
|
-
else if (w < 105) line = `${marker} ${identity} ${backend}${safeTerminalText(row.model)} ${ctx(row)} ${elapsed}`;
|
|
122
|
-
else line = `${marker} ${identity} ${backend}${safeTerminalText(row.model)} ${elapsed} ${row.toolCount == null ? "—" : row.toolCount} tools ${ctx(row)} ${safeTerminalText(row.lastWork)}`;
|
|
133
|
+
else if (w < 105) line = `${marker} ${identity} ${backend}${safeTerminalText(row.model)} ${ctx(row)} ${elapsed}${system1}`;
|
|
134
|
+
else line = `${marker} ${identity} ${backend}${safeTerminalText(row.model)} ${elapsed} ${row.toolCount == null ? "—" : row.toolCount} tools ${ctx(row)}${system1} ${safeTerminalText(row.lastWork)}`;
|
|
123
135
|
line = fit(line, w, metrics);
|
|
124
136
|
if (row.key === vm.selectedKey && theme.bg) {
|
|
125
137
|
const cells = metrics.visibleWidth(line);
|