@chankov/agent-fleet 2.0.12 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/agent-fleet/scripts/flow.ts +5 -3
- package/.pi/agent-fleet/scripts/lib/flow-command.ts +9 -4
- package/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +3 -1
- package/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
- package/.pi/agents/model-profiles.yaml +80 -29
- package/.pi/agents/peers.yaml +18 -18
- package/.pi/agents/voices.yaml +2 -2
- package/.pi/harnesses/agent-hub/README.md +64 -4
- package/.pi/harnesses/agent-hub/commands/audit.ts +1 -1
- package/.pi/harnesses/agent-hub/commands/context.ts +1 -1
- package/.pi/harnesses/agent-hub/config/model-profiles.ts +1 -0
- package/.pi/harnesses/agent-hub/delegate.ts +5 -3
- package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +27 -2
- package/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +29 -0
- package/.pi/harnesses/agent-hub/dispatch-native-types.ts +6 -0
- package/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +38 -0
- package/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +75 -0
- package/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +53 -0
- package/.pi/harnesses/agent-hub/dispatch-triage-state.ts +15 -0
- package/.pi/harnesses/agent-hub/index.ts +115 -46
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/policy/profile-activation.ts +2 -2
- package/.pi/harnesses/agent-hub/proactive-config.ts +40 -0
- package/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.pi/harnesses/agent-hub/proactive-local.ts +88 -0
- package/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
- package/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
- package/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
- package/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
- package/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
- package/.pi/harnesses/agent-hub/prompts/context.ts +3 -0
- package/.pi/harnesses/agent-hub/prompts/system-prompt.ts +11 -1
- package/.pi/harnesses/agent-hub/research/runtime.ts +3 -1
- package/.pi/harnesses/agent-hub/research/spawn-run.ts +4 -1
- package/.pi/harnesses/agent-hub/return-extract.js +1 -1
- package/.pi/harnesses/agent-hub/session-audit.ts +6 -5
- package/.pi/harnesses/agent-hub/system1-activity.ts +67 -0
- package/.pi/harnesses/agent-hub/system1-communication-store.ts +95 -0
- package/.pi/harnesses/agent-hub/system1-report.ts +142 -1
- package/.pi/harnesses/agent-hub/system1-runtime.ts +7 -1
- package/.pi/harnesses/agent-hub/tools/context.ts +2 -0
- package/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +9 -3
- package/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.pi/harnesses/agent-hub/tools/run-flow.ts +16 -2
- package/.pi/harnesses/agent-hub/ui/detail-panel.ts +26 -5
- package/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +58 -5
- package/.pi/harnesses/agent-hub/ui/fleet-source.ts +7 -2
- package/.pi/harnesses/agent-hub/ui/grid.ts +12 -7
- package/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.pi/harnesses/agent-hub/work-mode.ts +2 -1
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/context-budget-child-prompt.ts +41 -2
- package/.pi/harnesses/lib/context-budget-hub-prompt.ts +4 -2
- package/.pi/harnesses/lib/fleet-dashboard-view.ts +15 -4
- package/.pi/harnesses/lib/fleet-detail-view.ts +68 -7
- package/.pi/harnesses/lib/fleet-read-model.ts +131 -0
- package/.pi/harnesses/lib/fleet-strip-controller.ts +2 -1
- package/.pi/harnesses/lib/fleet-strip-view.ts +45 -10
- package/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.13/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.13/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/fleet.ts +216 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/flow.ts +157 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.13/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.13/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.13/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.0.13/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.13/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.13/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.13/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.13/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.13/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.13/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.13/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.13/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.13/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.13/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.13/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.13/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.13/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.13/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.13/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.13/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.13/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.13/.pi/extensions/package.json +9 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.13/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/README.md +1360 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/acceptance.ts +199 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/context.ts +45 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/recover.ts +52 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/config/agents.ts +178 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/config/overrides.ts +160 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context/budgets.ts +204 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/delegate.ts +467 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/deterministic-fs.ts +127 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-native-complete.ts +169 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +248 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +231 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-native-types.ts +257 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-native.ts +226 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/filesystem-tool.ts +73 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/fixtures/registration-surface.json +61 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/index.ts +2336 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +125 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/no-progress.ts +359 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/policy/work-mode.ts +126 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-config.ts +40 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-local.ts +88 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/process-obligations.ts +57 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/prompts/context.ts +53 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/prompts/fragments.ts +118 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/prompts/system-prompt.ts +115 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/recover-policy.ts +27 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/recovery-contract.ts +80 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/research/runtime.ts +195 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/research/spawn-run.ts +174 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/return-contract.js +327 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/review-findings.js +104 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/run-budget.js +542 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/scope-gate.js +123 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/session-audit.ts +227 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/spawn.ts +526 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/system1-activity.ts +510 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/system1-report.ts +225 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/system1-runtime.ts +276 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/action-executors.ts +185 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/context.ts +142 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +82 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +498 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +124 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/fleet-source.ts +175 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/work-mode.ts +173 -0
- package/.versions/2.0.13/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.13/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.13/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.13/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.13/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.13/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
- package/.versions/2.0.13/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.13/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.13/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.13/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.13/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.13/.pi/harnesses/damage-control-continue/index.ts +550 -0
- package/.versions/2.0.13/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.13/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.13/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.13/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.13/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.13/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.13/.pi/harnesses/lib/context-budget-child-prompt.ts +219 -0
- package/.versions/2.0.13/.pi/harnesses/lib/context-budget-hub-prompt.ts +116 -0
- package/.versions/2.0.13/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.13/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.13/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.13/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-dashboard-view.ts +147 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-read-model.ts +536 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-strip-controller.ts +74 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.0.13/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.13/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.13/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.13/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.13/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.13/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.13/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.13/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.13/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.13/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.13/.pi/harnesses/lib/system1/config.js +61 -0
- package/.versions/2.0.13/.pi/harnesses/lib/system1/contracts.ts +152 -0
- package/.versions/2.0.13/.pi/harnesses/lib/system1/demo.ts +106 -0
- package/.versions/2.0.13/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.13/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.13/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.13/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.13/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.13/.pi/prompts/af-build.md +24 -0
- package/.versions/2.0.13/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.13/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.13/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.13/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.13/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.13/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.13/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.13/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.13/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.13/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.13/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.13/.version +1 -0
- package/.versions/2.0.13/agents/architect.md +24 -0
- package/.versions/2.0.13/agents/bowser.md +28 -0
- package/.versions/2.0.13/agents/builder.md +55 -0
- package/.versions/2.0.13/agents/code-reviewer.md +209 -0
- package/.versions/2.0.13/agents/deep-researcher.md +32 -0
- package/.versions/2.0.13/agents/documenter.md +22 -0
- package/.versions/2.0.13/agents/orchestrator.md +22 -0
- package/.versions/2.0.13/agents/plan-reviewer.md +83 -0
- package/.versions/2.0.13/agents/planner.md +105 -0
- package/.versions/2.0.13/agents/releaser.md +24 -0
- package/.versions/2.0.13/agents/researcher.md +30 -0
- package/.versions/2.0.13/agents/security-auditor.md +167 -0
- package/.versions/2.0.13/agents/test-engineer.md +153 -0
- package/.versions/2.0.13/agents/web-debugger.md +44 -0
- package/.versions/2.0.13/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.13/bin/catalog/harness-runtime-closure.json +73 -0
- package/.versions/2.0.13/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.13/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.13/docs/ARCHITECTURE.md +753 -0
- package/.versions/2.0.13/docs/agent-fleet-setup.md +900 -0
- package/.versions/2.0.13/docs/claude-code-coms-bridge.md +134 -0
- package/.versions/2.0.13/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.13/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.13/docs/getting-started.md +126 -0
- package/.versions/2.0.13/docs/npm-install.md +468 -0
- package/.versions/2.0.13/docs/pi-extensions.md +454 -0
- package/.versions/2.0.13/docs/pi-setup.md +92 -0
- package/.versions/2.0.13/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.13/install-manifest.json +3175 -0
- package/.versions/2.0.13/justfile +247 -0
- package/.versions/2.0.13/manifest-meta.json +1057 -0
- package/.versions/2.0.13/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.13/references/communication-contract.md +26 -0
- package/.versions/2.0.13/references/definition-of-done.md +67 -0
- package/.versions/2.0.13/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.13/references/observability-checklist.md +92 -0
- package/.versions/2.0.13/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.13/references/performance-checklist.md +236 -0
- package/.versions/2.0.13/references/prompting-patterns.md +380 -0
- package/.versions/2.0.13/references/security-checklist.md +245 -0
- package/.versions/2.0.13/references/testing-patterns.md +235 -0
- package/.versions/2.0.13/references/workflow-authoring.md +304 -0
- package/.versions/2.0.13/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.13/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.13/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.13/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.13/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.13/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.13/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.13/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.13/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.13/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.13/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.13/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.13/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.13/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.13/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.13/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.13/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.13/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.13/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.13/skills/incremental-implementation/SKILL.md +302 -0
- package/.versions/2.0.13/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.13/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.13/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.13/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.13/skills/planning-and-task-breakdown/SKILL.md +289 -0
- package/.versions/2.0.13/skills/repository-ai-setup/SKILL.md +117 -0
- package/.versions/2.0.13/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.0.13/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.0.13/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.0.13/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.0.13/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.0.13/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.13/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.13/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.13/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.14/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.14/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/fleet.ts +216 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/flow.ts +157 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +34 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.14/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.14/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.14/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.0.14/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.14/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.14/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.14/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.14/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.14/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.14/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.14/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.14/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.14/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.14/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.14/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.14/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.14/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.14/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.14/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.14/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.14/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.14/.pi/extensions/package.json +9 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.14/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/README.md +1369 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/acceptance.ts +199 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/context.ts +45 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/recover.ts +52 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/config/agents.ts +178 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/config/overrides.ts +160 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context/budgets.ts +204 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/delegate.ts +467 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/deterministic-fs.ts +127 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native-complete.ts +169 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +248 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +231 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native-types.ts +257 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-native.ts +226 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +38 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +75 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +53 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/dispatch-triage-state.ts +15 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/filesystem-tool.ts +73 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/fixtures/registration-surface.json +62 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/index.ts +2370 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +125 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/no-progress.ts +359 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/policy/work-mode.ts +126 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-config.ts +40 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-local.ts +88 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-observer.ts +105 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-rules.ts +143 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-runtime.ts +316 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-snapshot.ts +243 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/proactive-types.ts +63 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/process-obligations.ts +57 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/prompts/context.ts +54 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/prompts/fragments.ts +118 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/prompts/system-prompt.ts +122 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/recover-policy.ts +27 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/recovery-contract.ts +80 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/research/runtime.ts +195 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/research/spawn-run.ts +174 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/return-contract.js +327 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/review-findings.js +104 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/run-budget.js +542 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/scope-gate.js +123 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/session-audit.ts +227 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/spawn.ts +526 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/system1-activity.ts +510 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/system1-communication-store.ts +95 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/system1-report.ts +225 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/system1-runtime.ts +279 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/action-executors.ts +185 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/context.ts +144 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +498 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +152 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/fleet-source.ts +175 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/work-mode.ts +174 -0
- package/.versions/2.0.14/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.14/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.14/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.14/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.14/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.14/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
- package/.versions/2.0.14/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.14/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.14/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.14/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.14/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.14/.pi/harnesses/damage-control-continue/index.ts +550 -0
- package/.versions/2.0.14/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.14/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.14/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.14/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.14/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.14/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.14/.pi/harnesses/lib/context-budget-child-prompt.ts +219 -0
- package/.versions/2.0.14/.pi/harnesses/lib/context-budget-hub-prompt.ts +116 -0
- package/.versions/2.0.14/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.14/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.14/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.14/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-dashboard-view.ts +147 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-read-model.ts +536 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.0.14/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.14/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.14/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.14/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.14/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.14/.pi/harnesses/lib/system1/config.js +61 -0
- package/.versions/2.0.14/.pi/harnesses/lib/system1/contracts.ts +152 -0
- package/.versions/2.0.14/.pi/harnesses/lib/system1/demo.ts +106 -0
- package/.versions/2.0.14/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.14/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.14/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.14/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.14/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.14/.pi/prompts/af-build.md +24 -0
- package/.versions/2.0.14/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.14/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.14/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.14/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.14/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.14/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.14/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.14/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.14/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.14/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.14/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.14/.version +1 -0
- package/.versions/2.0.14/agents/architect.md +24 -0
- package/.versions/2.0.14/agents/bowser.md +28 -0
- package/.versions/2.0.14/agents/builder.md +55 -0
- package/.versions/2.0.14/agents/code-reviewer.md +209 -0
- package/.versions/2.0.14/agents/deep-researcher.md +32 -0
- package/.versions/2.0.14/agents/documenter.md +22 -0
- package/.versions/2.0.14/agents/orchestrator.md +22 -0
- package/.versions/2.0.14/agents/plan-reviewer.md +83 -0
- package/.versions/2.0.14/agents/planner.md +105 -0
- package/.versions/2.0.14/agents/releaser.md +24 -0
- package/.versions/2.0.14/agents/researcher.md +30 -0
- package/.versions/2.0.14/agents/security-auditor.md +167 -0
- package/.versions/2.0.14/agents/test-engineer.md +153 -0
- package/.versions/2.0.14/agents/web-debugger.md +44 -0
- package/.versions/2.0.14/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.14/bin/catalog/harness-runtime-closure.json +73 -0
- package/.versions/2.0.14/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.14/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.14/docs/ARCHITECTURE.md +754 -0
- package/.versions/2.0.14/docs/agent-fleet-setup.md +917 -0
- package/.versions/2.0.14/docs/claude-code-coms-bridge.md +134 -0
- package/.versions/2.0.14/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.14/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.14/docs/getting-started.md +126 -0
- package/.versions/2.0.14/docs/npm-install.md +476 -0
- package/.versions/2.0.14/docs/pi-extensions.md +454 -0
- package/.versions/2.0.14/docs/pi-setup.md +92 -0
- package/.versions/2.0.14/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.14/install-manifest.json +3183 -0
- package/.versions/2.0.14/justfile +247 -0
- package/.versions/2.0.14/manifest-meta.json +1065 -0
- package/.versions/2.0.14/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.14/references/communication-contract.md +26 -0
- package/.versions/2.0.14/references/definition-of-done.md +67 -0
- package/.versions/2.0.14/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.14/references/observability-checklist.md +92 -0
- package/.versions/2.0.14/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.14/references/performance-checklist.md +236 -0
- package/.versions/2.0.14/references/prompting-patterns.md +380 -0
- package/.versions/2.0.14/references/security-checklist.md +245 -0
- package/.versions/2.0.14/references/testing-patterns.md +235 -0
- package/.versions/2.0.14/references/workflow-authoring.md +304 -0
- package/.versions/2.0.14/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.14/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.14/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.14/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.14/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.14/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.14/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.14/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.14/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.14/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.14/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.14/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.14/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.14/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.14/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.14/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.14/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.14/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.14/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.14/skills/incremental-implementation/SKILL.md +302 -0
- package/.versions/2.0.14/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.14/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.14/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.14/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.14/skills/planning-and-task-breakdown/SKILL.md +289 -0
- package/.versions/2.0.14/skills/repository-ai-setup/SKILL.md +117 -0
- package/.versions/2.0.14/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.0.14/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.0.14/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.0.14/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.0.14/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.0.14/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.14/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.14/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.14/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +16 -0
- package/README.md +3 -3
- package/agents/architect.md +2 -3
- package/agents/bowser.md +2 -2
- package/agents/builder.md +2 -3
- package/agents/code-reviewer.md +7 -8
- package/agents/deep-researcher.md +3 -4
- package/agents/documenter.md +2 -3
- package/agents/orchestrator.md +2 -3
- package/agents/plan-reviewer.md +5 -6
- package/agents/planner.md +5 -6
- package/agents/releaser.md +2 -3
- package/agents/researcher.md +4 -5
- package/agents/security-auditor.md +6 -7
- package/agents/test-engineer.md +3 -4
- package/agents/web-debugger.md +3 -3
- package/agents/web-performance-auditor.md +3 -3
- package/bin/catalog/harness-runtime-closure.json +30 -18
- package/bin/cli.js +47 -1
- package/bin/lib/apply.js +16 -0
- package/bin/lib/overrides.js +37 -1
- package/bin/lib/project-provenance.js +119 -0
- package/bin/lib/scan.js +1 -1
- package/bin/lib/transaction.js +1 -1
- package/bin/lib/validate-overrides.js +37 -3
- package/catalog/agent-prompts/README.md +12 -0
- package/catalog/agent-prompts/architecture-decision-author.md +24 -0
- package/catalog/agent-prompts/requirements-author.md +21 -0
- package/catalog/commands/README.md +13 -0
- package/catalog/commands/assess-change-impact.md +19 -0
- package/catalog/commands/audit-documentation.md +19 -0
- package/catalog/rules/README.md +33 -0
- package/catalog/rules/ai/policy-authoring.md +22 -0
- package/catalog/rules/architecture/behavior-preserving-refactoring.md +25 -0
- package/catalog/rules/architecture/public-contracts.md +22 -0
- package/catalog/rules/architecture/repository-boundaries.md +21 -0
- package/catalog/rules/architecture/structural-change-registration.md +25 -0
- package/catalog/rules/backend/notification-date-time.md +25 -0
- package/catalog/rules/bundles/README.md +16 -0
- package/catalog/rules/data/enum-semantics.md +25 -0
- package/catalog/rules/data/mixed-ownership-data.md +22 -0
- package/catalog/rules/data/reporting-queries.md +34 -0
- package/catalog/rules/docs/docs-maintenance.md +25 -0
- package/catalog/rules/frameworks/vue.md +25 -0
- package/catalog/rules/frontend/async-ui-states.md +26 -0
- package/catalog/rules/frontend/established-ui-primitives.md +25 -0
- package/catalog/rules/frontend/form-validation.md +26 -0
- package/catalog/rules/frontend/navigation-contracts.md +25 -0
- package/catalog/rules/languages/csharp.md +25 -0
- package/catalog/rules/languages/javascript.md +25 -0
- package/catalog/rules/languages/sql.md +24 -0
- package/catalog/rules/security/authorization-before-effects.md +26 -0
- package/catalog/rules/security/diagnostic-data-safety.md +22 -0
- package/catalog/rules/security/response-data-minimization.md +25 -0
- package/catalog/rules/security/trusted-tenant-scope.md +26 -0
- package/catalog/rules/testing/shared-package-consumers.md +25 -0
- package/catalog/rules/testing/verification-conventions.md +24 -0
- package/docs/ARCHITECTURE.md +51 -2
- package/docs/agent-fleet-setup.md +263 -28
- package/docs/codex-session-bridge.md +1 -1
- package/docs/npm-install.md +8 -0
- package/docs/pi-extensions.md +10 -5
- package/docs/workflows.md +4 -3
- package/install-manifest.json +133 -3
- package/manifest-meta.json +85 -15
- package/package.json +7 -4
- package/skills/repository-ai-setup/SKILL.md +117 -0
- package/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/skills/repository-ai-setup/references/verify-setup.md +20 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/** JSON-serializable CLI contract. Help and argument validation derive from this source. */
|
|
2
|
+
interface Parameter {type:'string'|'integer';description:string;minimum?:number;maximum?:number;default?:number;pattern?:string;maxLength?:number;}
|
|
3
|
+
export type Requirement='none'|'identity'|'binding'|'report'|'sources'|'instruction'|'questions';
|
|
4
|
+
export interface Operation {
|
|
5
|
+
name:string;description:string;usage:string;
|
|
6
|
+
inputSchema:{type:'object';properties:Record<string,Parameter>;required:string[];additionalProperties:false};
|
|
7
|
+
effects:{remote:'none'|'read'|'instruction'|'answer';local:'none'|'binding'|'journal'};
|
|
8
|
+
requirements:Requirement[];limitations:string[];
|
|
9
|
+
}
|
|
10
|
+
export interface Availability {status:'available'|'unsupported'|'unavailable';reason:string;}
|
|
11
|
+
const string=(description:string):Parameter=>({type:'string',description});
|
|
12
|
+
const id:Parameter={...string('Stable request/question identifier; never reuse for a different payload or target.'),pattern:'^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$'};
|
|
13
|
+
const project:Parameter={...string('Explicit coms project; never inferred only from cwd.')};
|
|
14
|
+
const stateDir=string('Optional private 0700 directory; defaults to CODEX_HOME/fleet-client.');
|
|
15
|
+
function operation(name:string,description:string,properties:Record<string,Parameter>,required:string[],requirements:Requirement[],remote:Operation['effects']['remote']='none',local:Operation['effects']['local']='none',limitations:string[]=[]):Operation {
|
|
16
|
+
const args=Object.entries(properties).map(([key,p])=>{
|
|
17
|
+
const value=p.type==='integer'?`${p.minimum}..${p.maximum}`:key;
|
|
18
|
+
const flag=`--${key} <${value}>`;return required.includes(key)?flag:`[${flag}]`;
|
|
19
|
+
});
|
|
20
|
+
return {name,description,usage:[name,...args].join(' '),inputSchema:{type:'object',properties:{...properties,'state-dir':stateDir},required,additionalProperties:false},effects:{remote,local},requirements,limitations};
|
|
21
|
+
}
|
|
22
|
+
const sources=['Bounded source coverage; unavailable and partial sources remain explicit.','Question reads cover at most four pages; follow nextCursor with questions --after.'];
|
|
23
|
+
const answers=['Requires an explicit human response to the exact pending owner/question/tool call.','Pi validates flags and arbitrates the first valid answer. Availability does not prove a particular question is pending.','Receipt persisted before delivery; unknown outcomes must not be retried automatically.'];
|
|
24
|
+
const operations:Operation[]=[
|
|
25
|
+
operation('sessions','Discover existing Pi sessions in an explicit project.',{project},['project'],['none']),
|
|
26
|
+
operation('select','Bind this conversation to a fresh, unambiguous project/peer identity.',{project,peer:string('Exact Pi peer name.')},['project','peer'],['identity'],'none','binding',['Requested project/peer is validated at selection time.']),
|
|
27
|
+
operation('status','Read selection/registry presence and separate question state.',{},[],['identity'],'read','journal',['Registry presence is not execution or transport readiness.']),
|
|
28
|
+
operation('activity','Read a fresh bounded activity, monitor and question snapshot.',{},[],['sources'],'read','journal',sources),
|
|
29
|
+
operation('summary','Read fresh bounded source evidence for a conversational summary.',{},[],['sources'],'read','journal',sources),
|
|
30
|
+
operation('resync','Advance source cursors and recover exactly correlated receipts.',{},[],['sources'],'read','journal',sources),
|
|
31
|
+
operation('replay','Read the last stored report, explicitly marked historical.',{},[],['report'],'none','none',['Requires a saved report for this exact binding; does not prove current question state.']),
|
|
32
|
+
operation('receipts','Read recorded instruction and answer outcomes, including offline.',{},[],['binding']),
|
|
33
|
+
operation('send','Submit a human-authorized Pi follow-up instruction.',{id,'text-file':string('Owned regular non-symlink 0600 UTF-8 file, 1–16000 bytes.'),'wait-ms':{type:'integer',description:'Bounded reply wait in milliseconds.',minimum:100,maximum:60000,default:1000}},['id','text-file'],['instruction'],'instruction','journal',['Requires a unique visible herdr Pi pane and correlated coms ping.','Busy Hub instructions queue; immediate child steering is not guaranteed.','Submitted/queued is not completion. Duplicate IDs never cause another send; unknown requires inspection.']),
|
|
34
|
+
operation('watch','Emit bounded NDJSON source snapshots while the client is active.',{seconds:{type:'integer',description:'Active observation window in seconds.',minimum:1,maximum:60}},['seconds'],['sources'],'read','journal',[...sources,'No idle wake or model polling; ending watch does not stop Pi. Slow source calls may extend a sample until timeout.']),
|
|
35
|
+
operation('doctor','Read local dependency versions and selection diagnostics.',{},[],['none']),
|
|
36
|
+
operation('detach','Remove only this conversation selection; leave Pi running.',{},[],['identity'],'none','binding'),
|
|
37
|
+
operation('questions','Read one page of addressed pending questions and terminal IDs.',{after:{...id,description:'Question cursor from nextCursor.'}},[],['questions'],'read','journal',['Requires a compatible Pi wrapper; unsupported is not an empty list.','Pages are bounded to 32 KiB; terminal history is bounded.']),
|
|
38
|
+
operation('answer','Submit an explicit structured human answer to one question.',{id,question:id,'answer-file':string('Owned regular non-symlink 0600 JSON file, at most 16000 bytes; selection or freeform matching question flags.')},['id','question','answer-file'],['questions'],'answer','journal',answers),
|
|
39
|
+
operation('cancel-question','Submit the human\'s explicit refusal for one question.',{id,question:id},['id','question'],['questions'],'answer','journal',answers),
|
|
40
|
+
operation('describe','Describe the contract and check current prerequisites without executing mutations.',{},[],['none'],'read','none',['Point-in-time capability check; operations revalidate their own prerequisites.','Does not send instructions, answer questions or update observations/cursors/receipts.']),
|
|
41
|
+
];
|
|
42
|
+
export function clientCatalog() {
|
|
43
|
+
return structuredClone({schemaVersion:1,client:'fleet-session-client',operations,usage:operations.map(o=>o.usage),
|
|
44
|
+
options:'--state-dir <private-directory>',identity:'CODEX_THREAD_ID from execution environment',
|
|
45
|
+
scope:'Existing Pi; active bounded reads, no idle wake or automatic human choice.',
|
|
46
|
+
availabilitySemantics:'Available means observed prerequisites, not authorization or guaranteed future delivery. Unavailable means missing/unverifiable prerequisites; unsupported means a verified protocol/runtime limitation.'});
|
|
47
|
+
}
|
|
48
|
+
export function parseClientArguments(argv:string[]) {
|
|
49
|
+
const [command,...args]=argv;const op=operations.find(o=>o.name===command);
|
|
50
|
+
if(!op)throw Error('Unknown command; use --help');
|
|
51
|
+
const flags:Record<string,string>={};
|
|
52
|
+
for(let i=0;i<args.length;i+=2){
|
|
53
|
+
const key=args[i].startsWith('--')?args[i].slice(2):'';const value=args[i+1];
|
|
54
|
+
if(!Object.hasOwn(op.inputSchema.properties,key)||flags[key]!==undefined||!value||value.startsWith('--'))throw Error('Invalid or duplicate command option');
|
|
55
|
+
const p=op.inputSchema.properties[key];
|
|
56
|
+
if(p.type==='integer'&&(!Number.isInteger(Number(value))||Number(value)<p.minimum!||Number(value)>p.maximum!))throw Error(`--${key} must be ${p.minimum}–${p.maximum}`);
|
|
57
|
+
if(p.pattern&&!new RegExp(p.pattern).test(value))throw Error(`Invalid --${key}`);
|
|
58
|
+
flags[key]=value;
|
|
59
|
+
}
|
|
60
|
+
for(const key of op.inputSchema.required)if(!flags[key])throw Error(`--${key} is required`);
|
|
61
|
+
for(const [key,p] of Object.entries(op.inputSchema.properties))if(flags[key]===undefined&&p.default!==undefined)flags[key]=String(p.default);
|
|
62
|
+
return {command,flags};
|
|
63
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { FleetSessionClient, type Binding } from './fleet-codex-session.ts';
|
|
3
|
+
import { readSources, sendInstruction, requestQuestion, probeInstruction, type QuestionRequest, type QuestionResponse } from './fleet-codex-transport.ts';
|
|
4
|
+
import { clientCatalog, type Availability, type Requirement } from './fleet-codex-catalog.ts';
|
|
5
|
+
import { ulid, type RegistryEntry } from './coms-envelope.ts';
|
|
6
|
+
|
|
7
|
+
export type JsonRecord = Record<string, unknown>;
|
|
8
|
+
export interface SourceReport {
|
|
9
|
+
observedAt?:string; partial?:boolean; cursor:JsonRecord; questionState?:QuestionState;
|
|
10
|
+
pane?:{paneId:string|null;state:string;reason?:string};
|
|
11
|
+
activity?:{available?:boolean; current?:{detail?:string;kind?:string;at?:string}|null;steps?:unknown[];gap?:boolean};
|
|
12
|
+
monitor?:{available?:boolean;tasks?:unknown[];gap?:boolean};
|
|
13
|
+
binding?:Binding; receipts?:Receipt[]; replayed?:boolean; replies?:{wireId:string;state:'result'|'failed';result:string;truncated:boolean}[];
|
|
14
|
+
}
|
|
15
|
+
export interface Receipt {commandId:string; wireId?:string; target:string; digest:string; state:'unknown'|'submitted'|'queued'|'result'|'failed'; at:string; result?:unknown; reason?:string;}
|
|
16
|
+
interface QuestionReceipt {requestId:string;wireId:string;target:string;questionId:string;digest:string;status:string;at:string;}
|
|
17
|
+
interface QuestionState extends QuestionResponse { observedAt:string; questions:unknown[]; resolved:NonNullable<QuestionResponse['resolved']>; newQuestionIds:string[]; }
|
|
18
|
+
interface Journal {version:1; receipts:Receipt[]; questionReceipts?:QuestionReceipt[]; questionSeen?:{target:string;ids:string[]}; target?:string; cursor:JsonRecord; report?:SourceReport;}
|
|
19
|
+
interface Adapters {
|
|
20
|
+
probe:(entry:RegistryEntry,project:string)=>Promise<Availability>;
|
|
21
|
+
question:(entry:RegistryEntry,project:string,request:QuestionRequest)=>Promise<QuestionResponse>;
|
|
22
|
+
read:(entry:RegistryEntry, project:string, cursor:JsonRecord, waitMs:number, pending?:string[] )=>Promise<SourceReport>;
|
|
23
|
+
send:(entry:RegistryEntry,project:string,pane:string,id:string,text:string,waitMs:number,ack:(state:'submitted'|'queued')=>void)=>Promise<Pick<Receipt,'state'|'result'|'reason'>>;
|
|
24
|
+
}
|
|
25
|
+
const targetKey=(b:Binding)=>[b.project,b.peer,b.sessionId,b.startedAt].join('/');
|
|
26
|
+
function journal(raw:string|null):Journal {
|
|
27
|
+
if (raw===null) return {version:1,receipts:[],cursor:{}};
|
|
28
|
+
try {
|
|
29
|
+
const j=JSON.parse(raw);
|
|
30
|
+
if (j.version!==1 || !Array.isArray(j.receipts) || !j.cursor || typeof j.cursor!=='object' || j.receipts.some((r:Receipt)=>!r.commandId || !r.target || !r.digest || !['unknown','submitted','queued','result','failed'].includes(r.state))) throw Error();
|
|
31
|
+
if(j.questionReceipts!==undefined && (!Array.isArray(j.questionReceipts)||j.questionReceipts.some((r:QuestionReceipt)=>!r.requestId||!r.wireId||!r.questionId||!r.digest||!r.target||typeof r.status!=='string')))throw Error();
|
|
32
|
+
if(j.questionSeen!==undefined&&(!j.questionSeen||typeof j.questionSeen.target!=='string'||!Array.isArray(j.questionSeen.ids)||j.questionSeen.ids.length>256||j.questionSeen.ids.some((id:unknown)=>typeof id!=='string')))throw Error();
|
|
33
|
+
return j;
|
|
34
|
+
} catch {throw Error('invalid runtime journal; refusing to lose duplicate protection');}
|
|
35
|
+
}
|
|
36
|
+
export class FleetClientOperations {
|
|
37
|
+
private client:FleetSessionClient; private adapters:Adapters;
|
|
38
|
+
constructor(client:FleetSessionClient, adapters:Partial<Adapters>={}) {this.client=client;this.adapters={read:readSources,send:sendInstruction,question:requestQuestion,probe:probeInstruction,...adapters};}
|
|
39
|
+
async describe() {
|
|
40
|
+
const available=(reason:string):Availability=>({status:'available',reason});
|
|
41
|
+
const unavailable=(reason:string):Availability=>({status:'unavailable',reason});
|
|
42
|
+
let selection:ReturnType<FleetSessionClient['status']>|undefined;let selectionReason='selection unavailable';
|
|
43
|
+
try {selection=this.client.status();selectionReason=`selection ${selection.status}`;}catch(error){selectionReason=error instanceof Error?error.message:selectionReason;}
|
|
44
|
+
const binding=selection?.binding;
|
|
45
|
+
const capabilities:Record<Requirement,Availability>={none:available('local operation; no selected target required'),
|
|
46
|
+
identity:selection?available('conversation identity and selection storage readable'):unavailable(selectionReason),
|
|
47
|
+
binding:binding?available('exact local binding readable'):unavailable(selectionReason),
|
|
48
|
+
report:unavailable('no saved report for this binding'),sources:unavailable(selectionReason),instruction:unavailable(selectionReason),questions:unavailable(selectionReason)};
|
|
49
|
+
const render=()=>{const catalog=clientCatalog();return {...catalog,observedAt:new Date().toISOString(),
|
|
50
|
+
selection:selection??{status:'unavailable',reason:selectionReason},
|
|
51
|
+
operations:catalog.operations.map(op=>({...op,availability:capabilities[op.requirements[0]]}))};};
|
|
52
|
+
if(binding) {
|
|
53
|
+
try {const j=journal(this.client.readRuntime().raw);if(j.target===targetKey(binding)&&j.report)capabilities.report=available('historical report for exact binding; no live freshness claim');}
|
|
54
|
+
catch(error){const failure=unavailable(error instanceof Error?error.message:'journal unavailable');for(const key of ['binding','report','sources','instruction','questions'] as const)capabilities[key]=failure;if(selection?.status==='available')capabilities.identity=failure;}
|
|
55
|
+
}
|
|
56
|
+
if(selection?.status==='available'&&binding&&capabilities.binding.status==='available') {
|
|
57
|
+
// The registry entry must be obtained under the same identity check, without a write lock or journal update.
|
|
58
|
+
let entry:RegistryEntry;
|
|
59
|
+
try {entry=this.client.selectedEntry();}
|
|
60
|
+
catch {for(const key of ['sources','instruction','questions'] as const)capabilities[key]=unavailable('target changed during registry read');return render();}
|
|
61
|
+
const [source,question,instruction]=await Promise.allSettled([
|
|
62
|
+
this.adapters.read(entry,binding.project,{},0),
|
|
63
|
+
this.adapters.question(entry,binding.project,{operation:'list',msg_id:ulid()}),
|
|
64
|
+
this.adapters.probe(entry,binding.project),
|
|
65
|
+
]);
|
|
66
|
+
const q=question.status==='fulfilled'?question.value:undefined;
|
|
67
|
+
capabilities.questions=q?.status==='available'?available('addressed question list protocol verified; exact pending question and answer flags are checked on use'):
|
|
68
|
+
{status:q?.status==='unsupported'?'unsupported':'unavailable',reason:q?.reason??(q?`question channel ${q.status}`:'question channel probe failed')};
|
|
69
|
+
const r=source.status==='fulfilled'?source.value:undefined;
|
|
70
|
+
const names=[r?.activity?.available?'activity':null,r?.monitor?.available?'monitor':null,q?.status==='available'?'questions':null].filter(Boolean);
|
|
71
|
+
capabilities.sources=names.length?available(`readable sources: ${names.join(', ')}; coverage can be partial`):unavailable('activity, monitor and question sources unavailable');
|
|
72
|
+
capabilities.instruction=instruction.status==='fulfilled'?instruction.value:unavailable('instruction preflight failed');
|
|
73
|
+
try {this.assertCurrent(targetKey(binding));}
|
|
74
|
+
catch {for(const key of ['sources','instruction','questions'] as const)capabilities[key]=unavailable('target changed during capability probe');}
|
|
75
|
+
}
|
|
76
|
+
return render();
|
|
77
|
+
}
|
|
78
|
+
private resolveQuestionReceipts(j:Journal,target:string,report:QuestionResponse) {
|
|
79
|
+
for(const r of j.questionReceipts??[])if(r.target===target&&r.status==='unknown'&&
|
|
80
|
+
report.resolved?.some(q=>q.id===r.questionId&&q.requestId===r.wireId&&['answered','cancelled'].includes(q.state)))r.status='accepted';
|
|
81
|
+
}
|
|
82
|
+
private async questionSnapshot(b:Binding,e:RegistryEntry,j:Journal):Promise<QuestionState> {
|
|
83
|
+
const snapshot:QuestionState={status:'available',observedAt:new Date().toISOString(),questions:[],resolved:[],newQuestionIds:[],nextCursor:null,partial:false};
|
|
84
|
+
const questions=new Map<string,unknown>();const resolved=new Map<string,NonNullable<QuestionResponse['resolved']>[number]>();
|
|
85
|
+
let after:string|undefined;
|
|
86
|
+
for(let page=0;page<4;page++) {
|
|
87
|
+
let result:QuestionResponse;
|
|
88
|
+
try {result=await this.adapters.question(e,b.project,{operation:'list',msg_id:ulid(),...(after?{after}:{})});}
|
|
89
|
+
catch {result={status:'unavailable',reason:'question channel unavailable'};}
|
|
90
|
+
if(result.status!=='available') {snapshot.status=result.status;snapshot.reason=result.reason;snapshot.partial=true;break;}
|
|
91
|
+
for(const q of result.questions??[])questions.set((q as {id:string}).id,q);
|
|
92
|
+
for(const q of result.resolved??[])resolved.set(q.id,q);
|
|
93
|
+
snapshot.partial ||= !!result.partial;
|
|
94
|
+
snapshot.nextCursor=result.nextCursor??null;
|
|
95
|
+
if(!result.nextCursor)break;
|
|
96
|
+
if(result.nextCursor===after){snapshot.partial=true;break;}
|
|
97
|
+
after=result.nextCursor;
|
|
98
|
+
}
|
|
99
|
+
// A question resolved between pages must not be presented as still pending.
|
|
100
|
+
for(const id of resolved.keys())questions.delete(id);
|
|
101
|
+
snapshot.questions=[...questions.values()];snapshot.resolved=[...resolved.values()];
|
|
102
|
+
const target=targetKey(b);const seen=j.questionSeen?.target===target?j.questionSeen.ids:[];
|
|
103
|
+
snapshot.newQuestionIds=[...questions.keys()].filter(id=>!seen.includes(id));
|
|
104
|
+
// A failed read is not evidence that previously observed questions disappeared.
|
|
105
|
+
j.questionSeen={target,ids:[...new Set([...seen,...questions.keys()])].slice(-256)};
|
|
106
|
+
this.resolveQuestionReceipts(j,target,snapshot);
|
|
107
|
+
return snapshot;
|
|
108
|
+
}
|
|
109
|
+
private assertCurrent(target:string) {
|
|
110
|
+
const current=this.client.status();
|
|
111
|
+
if(current.status!=='available'||!current.binding||targetKey(current.binding)!==target)throw Error('target changed during read');
|
|
112
|
+
}
|
|
113
|
+
async status() {
|
|
114
|
+
const status=this.client.status();
|
|
115
|
+
if(status.status!=='available')return {...status,questionState:{status:'unavailable',reason:`selection ${status.status}`,observedAt:new Date().toISOString(),questions:[],resolved:[],newQuestionIds:[],partial:true}};
|
|
116
|
+
return this.client.transaction(async(b,e,read,save)=>{
|
|
117
|
+
const j=journal(read());const questionState=await this.questionSnapshot(b,e,j);
|
|
118
|
+
this.assertCurrent(targetKey(b));save(JSON.stringify(j));return {...this.client.status(),questionState};
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
async resync(fresh=false, waitMs=0) {
|
|
122
|
+
return this.client.transaction(async(b,e,read,save)=>{
|
|
123
|
+
const j=journal(read());const target=targetKey(b);const changed=j.target!==target;
|
|
124
|
+
const cursor=fresh||changed?{}:j.cursor;
|
|
125
|
+
const pending=j.receipts.filter(r=>r.target===target&&r.wireId&&!['result','failed'].includes(r.state)).map(r=>r.wireId!);
|
|
126
|
+
const [source,question]=await Promise.allSettled([this.adapters.read(e,b.project,cursor,waitMs,pending),this.questionSnapshot(b,e,j)]);
|
|
127
|
+
const report:SourceReport=source.status==='fulfilled'?source.value:{observedAt:new Date().toISOString(),cursor,partial:true,pane:{paneId:null,state:'unavailable',reason:'source reader unavailable'},activity:{available:false},monitor:{available:false}};
|
|
128
|
+
const questionState:QuestionState=question.status==='fulfilled'?question.value:{status:'unavailable',observedAt:new Date().toISOString(),questions:[],resolved:[],newQuestionIds:[],partial:true};
|
|
129
|
+
for(const reply of report.replies??[]){const receipt=j.receipts.find(r=>r.target===target&&r.wireId===reply.wireId);if(receipt&&!['result','failed'].includes(receipt.state)){receipt.state=reply.state;receipt.result=reply.result;receipt.reason=reply.truncated?'correlated Pi transcript reply (truncated)':'correlated Pi transcript reply';}}
|
|
130
|
+
this.assertCurrent(target);
|
|
131
|
+
j.target=target;j.cursor=report.cursor ?? {};j.report={...report,partial:!!report.partial||!!questionState.partial,questionState,binding:b,receipts:j.receipts.filter(r=>r.target===target).slice(-10)};
|
|
132
|
+
save(JSON.stringify(j));return j.report;
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
async replay():Promise<SourceReport> {const {binding,raw}=this.client.readRuntime();const j=journal(raw);if(j.target!==targetKey(binding)||!j.report)throw Error('no report for selected target');return {...j.report,replayed:true};}
|
|
136
|
+
async receipts() {const {binding,raw}=this.client.readRuntime();const j=journal(raw);return {
|
|
137
|
+
receipts:j.receipts.filter(r=>r.target===targetKey(binding)),questionReceipts:(j.questionReceipts??[]).filter(r=>r.target===targetKey(binding))};}
|
|
138
|
+
async questions(after?:string) {
|
|
139
|
+
if(after!==undefined&&!/^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$/.test(after))throw Error('invalid question cursor');
|
|
140
|
+
return this.client.transaction(async(b,e,read,save)=>{
|
|
141
|
+
const report=await this.adapters.question(e,b.project,{operation:'list',msg_id:ulid(),...(after?{after}:{})});
|
|
142
|
+
const current=this.client.status();
|
|
143
|
+
if(current.status!=='available'||!current.binding||targetKey(current.binding)!==targetKey(b))throw Error('target changed during question read');
|
|
144
|
+
const j=journal(read());
|
|
145
|
+
this.resolveQuestionReceipts(j,targetKey(b),report);
|
|
146
|
+
save(JSON.stringify(j));return {...report,observedAt:new Date().toISOString(),binding:b};
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
async answerQuestion(requestId:string,questionId:string,answer:unknown) {
|
|
150
|
+
for(const id of [requestId,questionId])if(typeof id!=='string'||!/^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$/.test(id))throw Error('invalid question/request ID');
|
|
151
|
+
const serialized=JSON.stringify(answer);
|
|
152
|
+
if(typeof serialized!=='string'||Buffer.byteLength(serialized)>16000)throw Error('invalid answer payload');
|
|
153
|
+
return this.client.transaction(async(b,e,read,save)=>{
|
|
154
|
+
const j=journal(read());const receipts=j.questionReceipts??=[];const target=targetKey(b);
|
|
155
|
+
const digest=createHash('sha256').update(serialized).digest('hex');
|
|
156
|
+
const prior=receipts.find(r=>r.requestId===requestId);
|
|
157
|
+
if(prior){if(prior.target!==target||prior.questionId!==questionId||prior.digest!==digest)throw Error('request ID already used for different answer/question/target');return prior;}
|
|
158
|
+
if(receipts.length>=1000)throw Error('question receipt journal full; no IDs were evicted');
|
|
159
|
+
const receipt:QuestionReceipt={requestId,wireId:ulid(),target,questionId,digest,status:'unknown',at:new Date().toISOString()};
|
|
160
|
+
receipts.push(receipt);save(JSON.stringify(j));
|
|
161
|
+
try {
|
|
162
|
+
const result=await this.adapters.question(e,b.project,{operation:answer===null?'cancel':'answer',msg_id:receipt.wireId,questionId,answer});
|
|
163
|
+
receipt.status=result.status;
|
|
164
|
+
}catch {receipt.status='unknown';}
|
|
165
|
+
save(JSON.stringify(j));return receipt;
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
async send(commandId:string,text:string,waitMs=1000) {
|
|
169
|
+
if(!/^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$/.test(commandId))throw Error('invalid command ID');
|
|
170
|
+
if(!text.trim()||Buffer.byteLength(text)>16000)throw Error('instruction must contain 1–16000 bytes');
|
|
171
|
+
if(!Number.isInteger(waitMs)||waitMs<100||waitMs>60000)throw Error('wait must be 100–60000 ms');
|
|
172
|
+
return this.client.transaction(async(b,e,read,save)=>{
|
|
173
|
+
const j=journal(read()); const target=targetKey(b);const digest=createHash('sha256').update(text).digest('hex');
|
|
174
|
+
const previous=j.receipts.find(r=>r.commandId===commandId);
|
|
175
|
+
if(previous){if(previous.target!==target||previous.digest!==digest)throw Error('command ID already used for different text or target');return previous;}
|
|
176
|
+
if(j.receipts.length>=1000)throw Error('receipt journal full; no IDs were evicted');
|
|
177
|
+
const source=await this.adapters.read(e,b.project,{},0);
|
|
178
|
+
const pane=source.pane?.paneId;
|
|
179
|
+
if(!pane)throw Error('no unique visible herdr Pi pane; send unsupported');
|
|
180
|
+
if(this.client.status().status!=='available')throw Error('target changed before send');
|
|
181
|
+
const receipt:Receipt={commandId,wireId:ulid(),target,digest,state:'unknown',at:new Date().toISOString(),reason:'delivery not yet confirmed; never auto-retry'};
|
|
182
|
+
j.receipts.push(receipt); save(JSON.stringify(j)); // Durable BEFORE any instruction crosses the socket.
|
|
183
|
+
try {
|
|
184
|
+
const result=await this.adapters.send(e,b.project,pane,receipt.wireId!,text,waitMs,state=>{receipt.state=state;receipt.reason='accepted as Pi follow-up; completion not yet confirmed';save(JSON.stringify(j));});
|
|
185
|
+
Object.assign(receipt,result);
|
|
186
|
+
} catch {receipt.state='unknown';receipt.reason='transport interrupted; inspect resync, do not resend';}
|
|
187
|
+
save(JSON.stringify(j)); return receipt;
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// Read-only Pi discovery and a private, per-ChatGPT selection. No peer writes.
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
|
+
import * as path from "node:path";
|
|
4
|
+
import { randomUUID } from "node:crypto";
|
|
5
|
+
import { readAllRegistryEntries, registryHeartbeatIsFresh, validateComsName, validateComsProject, type RegistryEntry } from "./coms-envelope.ts";
|
|
6
|
+
|
|
7
|
+
export interface Binding {
|
|
8
|
+
version: 1;
|
|
9
|
+
clientId: string;
|
|
10
|
+
project: string;
|
|
11
|
+
peer: string;
|
|
12
|
+
sessionId: string;
|
|
13
|
+
startedAt: string;
|
|
14
|
+
selectedAt: string;
|
|
15
|
+
}
|
|
16
|
+
interface Options {
|
|
17
|
+
stateDir: string;
|
|
18
|
+
clientId?: string;
|
|
19
|
+
readRegistry?: (project: string) => RegistryEntry[];
|
|
20
|
+
now?: () => number;
|
|
21
|
+
}
|
|
22
|
+
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
23
|
+
const nonempty = (s: unknown): s is string => typeof s === "string" && s.length > 0;
|
|
24
|
+
|
|
25
|
+
export class FleetSessionClient {
|
|
26
|
+
private options: Options;
|
|
27
|
+
constructor(options: Options) { this.options = options; }
|
|
28
|
+
private now(): number { return (this.options.now ?? Date.now)(); }
|
|
29
|
+
private id(): string {
|
|
30
|
+
const id = this.options.clientId;
|
|
31
|
+
if (!id || !UUID.test(id)) throw new Error("Valid CODEX_THREAD_ID required for binding operations");
|
|
32
|
+
return id.toLowerCase();
|
|
33
|
+
}
|
|
34
|
+
private entries(project: string): RegistryEntry[] {
|
|
35
|
+
return (this.options.readRegistry ?? readAllRegistryEntries)(validateComsProject(project));
|
|
36
|
+
}
|
|
37
|
+
private fresh(e: RegistryEntry): boolean {
|
|
38
|
+
return nonempty(e.session_id) && nonempty(e.started_at) && Number.isFinite(Date.parse(e.started_at)) && registryHeartbeatIsFresh(e, this.now());
|
|
39
|
+
}
|
|
40
|
+
private view(project: string, e: RegistryEntry) {
|
|
41
|
+
return {project, peer:e.name, sessionId:e.session_id, purpose:e.purpose, model:e.model, cwd:e.cwd,
|
|
42
|
+
startedAt:e.started_at, heartbeatAt:e.heartbeat_at ?? null, presence:this.fresh(e) ? "available" : "unavailable",
|
|
43
|
+
contextUsedPct:e.context_used_pct ?? null, queueDepth:e.queue_depth ?? null};
|
|
44
|
+
}
|
|
45
|
+
sessions(project: string) {
|
|
46
|
+
const sessions = this.entries(project).filter(e => {
|
|
47
|
+
try { validateComsName(e.name); return !e.explicit && nonempty(e.session_id); } catch { return false; }
|
|
48
|
+
}).map(e => this.view(project, e));
|
|
49
|
+
return {source:"coms_registry", observedAt:new Date(this.now()).toISOString(), sessions};
|
|
50
|
+
}
|
|
51
|
+
private file(): string { return path.join(path.resolve(this.options.stateDir), `${this.id()}.json`); }
|
|
52
|
+
private safe(p: string, directory: boolean): boolean {
|
|
53
|
+
try {
|
|
54
|
+
const s = fs.lstatSync(p);
|
|
55
|
+
if (s.isSymbolicLink() || (directory ? !s.isDirectory() : !s.isFile()) ||
|
|
56
|
+
(process.getuid && s.uid !== process.getuid()) || (s.mode & 0o077)) throw new Error("unsafe binding storage");
|
|
57
|
+
return true;
|
|
58
|
+
} catch (e) { if ((e as NodeJS.ErrnoException).code === "ENOENT") return false; throw e; }
|
|
59
|
+
}
|
|
60
|
+
private read(): Binding | null {
|
|
61
|
+
const file = this.file();
|
|
62
|
+
if (!this.safe(path.dirname(file), true) || !this.safe(file, false)) return null;
|
|
63
|
+
try {
|
|
64
|
+
if (fs.statSync(file).size > 8192) throw new Error();
|
|
65
|
+
const b = JSON.parse(fs.readFileSync(file, "utf8")) as Binding;
|
|
66
|
+
if (b.version !== 1 || b.clientId !== this.id() || !nonempty(b.project) || !nonempty(b.peer) ||
|
|
67
|
+
!nonempty(b.sessionId) || !nonempty(b.startedAt) || !nonempty(b.selectedAt) ||
|
|
68
|
+
!Number.isFinite(Date.parse(b.startedAt)) || !Number.isFinite(Date.parse(b.selectedAt))) throw new Error();
|
|
69
|
+
validateComsProject(b.project); validateComsName(b.peer);
|
|
70
|
+
return {version:1,clientId:b.clientId,project:b.project,peer:b.peer,sessionId:b.sessionId,startedAt:b.startedAt,selectedAt:b.selectedAt};
|
|
71
|
+
} catch { throw new Error("invalid binding; inspect or detach before selecting again"); }
|
|
72
|
+
}
|
|
73
|
+
private mutate(binding: Binding | null): void {
|
|
74
|
+
const file = this.file(); const dir = path.dirname(file);
|
|
75
|
+
if (!this.safe(dir, true)) {
|
|
76
|
+
if (binding === null) return;
|
|
77
|
+
fs.mkdirSync(dir, {recursive:true,mode:0o700}); this.safe(dir, true);
|
|
78
|
+
}
|
|
79
|
+
const lock = `${file}.lock`;
|
|
80
|
+
const fd = fs.openSync(lock, "wx", 0o600); // Refuse concurrent mutation; never steal a lock.
|
|
81
|
+
const tmp = `${file}.${randomUUID()}.tmp`;
|
|
82
|
+
try {
|
|
83
|
+
this.safe(file, false);
|
|
84
|
+
if (binding === null) { fs.rmSync(file, {force:true}); return; }
|
|
85
|
+
fs.writeFileSync(tmp, JSON.stringify(binding), {flag:"wx",mode:0o600});
|
|
86
|
+
fs.renameSync(tmp,file);
|
|
87
|
+
} finally {
|
|
88
|
+
fs.rmSync(tmp,{force:true}); fs.closeSync(fd); fs.unlinkSync(lock);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
select(project: string, peer: string) {
|
|
92
|
+
this.id(); validateComsProject(project); validateComsName(peer);
|
|
93
|
+
const matches = this.entries(project).filter(e => e.name === peer && !e.explicit);
|
|
94
|
+
if (matches.length > 1) throw new Error("ambiguous peer registry");
|
|
95
|
+
const e = matches[0];
|
|
96
|
+
if (!e || !this.fresh(e)) throw new Error("peer unavailable: fresh session identity required");
|
|
97
|
+
// Validate the existing record rather than silently replacing corrupt state.
|
|
98
|
+
this.read();
|
|
99
|
+
const binding: Binding = {version:1,clientId:this.id(),project,peer,sessionId:e.session_id,startedAt:e.started_at,selectedAt:new Date(this.now()).toISOString()};
|
|
100
|
+
this.mutate(binding);
|
|
101
|
+
return this.status();
|
|
102
|
+
}
|
|
103
|
+
status() {
|
|
104
|
+
const binding = this.read();
|
|
105
|
+
if (!binding) return {status:"unbound",binding:null};
|
|
106
|
+
const matches = this.entries(binding.project).filter(e => e.name === binding.peer && !e.explicit);
|
|
107
|
+
if (matches.length !== 1) return {status:matches.length ? "ambiguous" : "unavailable",binding};
|
|
108
|
+
const e = matches[0];
|
|
109
|
+
if (e.session_id !== binding.sessionId || e.started_at !== binding.startedAt) return {status:"stale",binding};
|
|
110
|
+
return {status:this.fresh(e) ? "available" : "unavailable",binding,source:"coms_registry",observedAt:new Date(this.now()).toISOString(),session:this.view(binding.project,e)};
|
|
111
|
+
}
|
|
112
|
+
/** Current exact registry entry for read-only capability probes; never selects a replacement. */
|
|
113
|
+
selectedEntry():RegistryEntry {
|
|
114
|
+
const status=this.status();
|
|
115
|
+
if(status.status!=='available'||!status.binding)throw Error(`target ${status.status}`);
|
|
116
|
+
const b=status.binding;
|
|
117
|
+
const entries=this.entries(b.project).filter(e=>!e.explicit&&e.name===b.peer);
|
|
118
|
+
if(entries.length!==1||entries[0].session_id!==b.sessionId||entries[0].started_at!==b.startedAt||!this.fresh(entries[0]))throw Error('target changed during registry read');
|
|
119
|
+
return entries[0];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
readRuntime() {
|
|
123
|
+
const binding = this.read();
|
|
124
|
+
if (!binding) throw new Error("unbound");
|
|
125
|
+
const runtime = this.file() + ".runtime";
|
|
126
|
+
if (!this.safe(runtime,false)) return {binding,raw:null};
|
|
127
|
+
if (fs.statSync(runtime).size > 4*1024*1024) throw new Error("runtime journal too large");
|
|
128
|
+
return {binding,raw:fs.readFileSync(runtime,"utf8")};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** Serialize sends, selection changes and cursor updates using the same lock. */
|
|
132
|
+
async transaction<T>(action: (binding: Binding, entry: RegistryEntry, read: () => string | null, save: (json: string) => void) => Promise<T>): Promise<T> {
|
|
133
|
+
const file = this.file();
|
|
134
|
+
if (!this.safe(path.dirname(file), true)) throw new Error("unbound");
|
|
135
|
+
const lock = file + ".lock";
|
|
136
|
+
const fd = fs.openSync(lock, "wx", 0o600);
|
|
137
|
+
const runtime = file + ".runtime";
|
|
138
|
+
try {
|
|
139
|
+
const status = this.status();
|
|
140
|
+
if (status.status !== "available" || !status.binding) throw new Error(`target ${status.status}`);
|
|
141
|
+
const binding = status.binding;
|
|
142
|
+
const entry = this.entries(binding.project).find(e => e.name === binding.peer && e.session_id === binding.sessionId && e.started_at === binding.startedAt);
|
|
143
|
+
if (!entry || !this.fresh(entry)) throw new Error("target changed");
|
|
144
|
+
const read = () => {
|
|
145
|
+
if (!this.safe(runtime,false)) return null;
|
|
146
|
+
if (fs.statSync(runtime).size > 4*1024*1024) throw new Error("runtime journal too large");
|
|
147
|
+
return fs.readFileSync(runtime,"utf8");
|
|
148
|
+
};
|
|
149
|
+
const save = (json: string) => {
|
|
150
|
+
if (Buffer.byteLength(json) > 4*1024*1024) throw new Error("runtime journal full; inspect receipts");
|
|
151
|
+
this.safe(runtime,false);
|
|
152
|
+
const temp = runtime + `.${randomUUID()}.tmp`;
|
|
153
|
+
try {
|
|
154
|
+
const output = fs.openSync(temp,"wx",0o600);
|
|
155
|
+
try { fs.writeFileSync(output,json); fs.fsyncSync(output); } finally { fs.closeSync(output); }
|
|
156
|
+
fs.renameSync(temp,runtime);
|
|
157
|
+
const directory = fs.openSync(path.dirname(file),"r");
|
|
158
|
+
try { fs.fsyncSync(directory); } finally { fs.closeSync(directory); }
|
|
159
|
+
} finally { fs.rmSync(temp,{force:true}); }
|
|
160
|
+
};
|
|
161
|
+
return await action(binding, entry, read, save);
|
|
162
|
+
} finally { fs.closeSync(fd); fs.unlinkSync(lock); }
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
detach() { this.mutate(null); return {status:"unbound",binding:null}; }
|
|
166
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as net from 'node:net';
|
|
3
|
+
import * as os from 'node:os';
|
|
4
|
+
import * as path from 'node:path';
|
|
5
|
+
import { execFile } from 'node:child_process';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import { makeEndpoint, makePromptEnvelope, readOneLine, ulid, writeAck, type RegistryEntry } from './coms-envelope.ts';
|
|
8
|
+
import { herdr } from '../../../../.pi/harnesses/lib/herdr-client.ts';
|
|
9
|
+
import type { Availability } from './fleet-codex-catalog.ts';
|
|
10
|
+
import type { JsonRecord, Receipt, SourceReport } from './fleet-codex-operations.ts';
|
|
11
|
+
|
|
12
|
+
export function readSources(entry:RegistryEntry, project:string, cursor:JsonRecord, waitMs=0, pending:string[]=[]):Promise<SourceReport> {
|
|
13
|
+
return new Promise((resolve,reject)=>{
|
|
14
|
+
const helper=fileURLToPath(new URL('../fleet-codex-read.py',import.meta.url));
|
|
15
|
+
const child=execFile('python3',[helper],{timeout:30000+waitMs,maxBuffer:1024*1024,env:{...process.env,PYTHONDONTWRITEBYTECODE:'1'}},(error,stdout)=>{
|
|
16
|
+
if(error){reject(Error('source reader unavailable; Python 3 and existing herdr/monitor access required'));return;}
|
|
17
|
+
try {const r=JSON.parse(stdout);if(r.error||!r.cursor||typeof r.cursor!=='object'||!r.pane||!r.activity||!r.monitor)throw Error();resolve(r as SourceReport);}catch{reject(Error('invalid source response'));}
|
|
18
|
+
});
|
|
19
|
+
child.stdin!.end(JSON.stringify({entry,project,cursor,waitMs,pending}));
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** One bounded coms frame; never retries a write. */
|
|
24
|
+
export async function exchange(endpoint:string, envelope:object, timeoutMs=2000):Promise<JsonRecord> {
|
|
25
|
+
const socket=net.createConnection({path:endpoint});
|
|
26
|
+
const timer=setTimeout(()=>socket.destroy(Error('coms timeout')),timeoutMs);
|
|
27
|
+
try {
|
|
28
|
+
const response=readOneLine(socket);
|
|
29
|
+
socket.once('connect',()=>socket.write(JSON.stringify(envelope)+'\n'));
|
|
30
|
+
return JSON.parse(await response);
|
|
31
|
+
} finally {clearTimeout(timer);socket.destroy();}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface QuestionRequest { operation:'list'|'answer'|'cancel'; msg_id:string; questionId?:string; answer?:unknown; after?:string; }
|
|
35
|
+
export interface QuestionResponse {
|
|
36
|
+
status:string; questions?:unknown[]; resolved?:{id:string;requestId?:string;state:string}[];
|
|
37
|
+
nextCursor?:string|null; partial?:boolean; questionId?:string; reason?:string;
|
|
38
|
+
}
|
|
39
|
+
function assertPiEndpoint(entry:RegistryEntry) {
|
|
40
|
+
if(!/^[A-Za-z0-9-]{1,64}$/.test(entry.session_id)||entry.endpoint!==makeEndpoint(entry.session_id))throw Error('unsupported noncanonical Pi endpoint');
|
|
41
|
+
const info=fs.lstatSync(entry.endpoint);
|
|
42
|
+
if(!info.isSocket()||info.isSymbolicLink()||(process.getuid&&info.uid!==process.getuid()))throw Error('unsafe Pi endpoint');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Addressed tool answers bypass the LLM prompt queue; the owning Pi validates the question. */
|
|
46
|
+
export async function requestQuestion(entry:RegistryEntry,project:string,request:QuestionRequest):Promise<QuestionResponse> {
|
|
47
|
+
assertPiEndpoint(entry);
|
|
48
|
+
const owner={project,peer:entry.name,sessionId:entry.session_id,startedAt:entry.started_at};
|
|
49
|
+
const result=await exchange(entry.endpoint,{type:'question_request',version:1,sender_session:ulid(),sender_endpoint:'',owner,...request});
|
|
50
|
+
if(result.type==='nack'&&result.msg_id===request.msg_id&&result.error==='unknown type')return {status:'unsupported',reason:'Pi runtime has no addressed question handler'};
|
|
51
|
+
const actual=result.owner as typeof owner|undefined;
|
|
52
|
+
if(result.type!=='question_response'||result.version!==1||result.msg_id!==request.msg_id||!actual||
|
|
53
|
+
Object.keys(owner).some(k=>actual[k as keyof typeof owner]!==owner[k as keyof typeof owner])||
|
|
54
|
+
!['available','accepted','invalid','conflict','late','expired','stale','unsupported','not_ready','unknown_question'].includes(String(result.status)))throw Error('invalid question response');
|
|
55
|
+
if(request.operation==='list'&&result.status==='available') {
|
|
56
|
+
const id=(value:unknown)=>typeof value==='string'&&/^[A-Za-z0-9][A-Za-z0-9._-]{0,95}$/.test(value);
|
|
57
|
+
const text=(value:unknown)=>typeof value==='string'&&value.trim().length>0;
|
|
58
|
+
if(!Array.isArray(result.questions)||!Array.isArray(result.resolved)||result.questions.length>64||result.resolved.length>64||
|
|
59
|
+
(result.nextCursor!==undefined&&result.nextCursor!==null&&!id(result.nextCursor))||
|
|
60
|
+
(result.partial!==undefined&&typeof result.partial!=='boolean')||
|
|
61
|
+
result.questions.some(q=>!q||!id(q.id)||!text(q.toolCallId)||!text(q.question)||q.state!=='pending'||
|
|
62
|
+
!q.owner||Object.keys(owner).some(k=>q.owner[k]!==owner[k as keyof typeof owner])||
|
|
63
|
+
(q.context!==undefined&&typeof q.context!=='string')||!Array.isArray(q.options)||q.options.some((o:any)=>!o||!text(o.title)||(o.description!==undefined&&typeof o.description!=='string'))||
|
|
64
|
+
['allowMultiple','allowFreeform','allowComment'].some(k=>typeof q[k]!=='boolean')||!text(q.createdAt)||q.expiresAt!==null)||
|
|
65
|
+
result.resolved.some(q=>!q||!id(q.id)||!['answered','cancelled','expired','failed'].includes(q.state)||(q.requestId!==undefined&&!id(q.requestId))))throw Error('invalid question list');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return result as unknown as QuestionResponse;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function verifyInstructionTarget(entry:RegistryEntry,project:string,pane?:string) {
|
|
72
|
+
assertPiEndpoint(entry);
|
|
73
|
+
const agents=(await herdr.agentList({timeoutMs:2000})).agents;
|
|
74
|
+
const matches=agents.filter(a=>a.agent==='pi' && (a.tokens as JsonRecord)?.coms===entry.name && (a.tokens as JsonRecord)?.proj===project);
|
|
75
|
+
if(matches.length!==1||(pane!==undefined&&matches[0].pane_id!==pane))throw Error('no unique matching visible Pi pane');
|
|
76
|
+
const foundPane=matches[0].pane_id;
|
|
77
|
+
if(typeof foundPane!=='string'||!foundPane)throw Error('missing visible Pi pane identity');
|
|
78
|
+
pane=foundPane;
|
|
79
|
+
const pingId=ulid();
|
|
80
|
+
const pong=await exchange(entry.endpoint,{type:'ping',msg_id:pingId,sender_session:ulid(),sender_endpoint:''});
|
|
81
|
+
const card=pong.agent_card as {name?:string;pane_id?:string;status?:string}|undefined;
|
|
82
|
+
if(pong.type!=='pong'||pong.msg_id!==pingId||card?.name!==entry.name||card?.pane_id!==pane)throw Error('target pane identity unavailable');
|
|
83
|
+
return card!;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** Read-only preflight shared with send; never tests support by sending a prompt. */
|
|
87
|
+
export async function probeInstruction(entry:RegistryEntry,project:string):Promise<Availability> {
|
|
88
|
+
try {await verifyInstructionTarget(entry,project);return {status:'available',reason:'unique visible Pi pane and correlated coms ping verified; future instruction acceptance is not guaranteed'};}
|
|
89
|
+
catch(error){return {status:'unavailable',reason:error instanceof Error?error.message:'instruction preflight failed'};}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export async function sendInstruction(entry:RegistryEntry,project:string,pane:string,commandId:string,text:string,waitMs:number,ack:(state:'submitted'|'queued')=>void):Promise<Pick<Receipt,'state'|'result'|'reason'>> {
|
|
93
|
+
// Pi endpoints are session-specific. Never resolve a replacement by peer name after this point.
|
|
94
|
+
const card=await verifyInstructionTarget(entry,project,pane);
|
|
95
|
+
const sender={session_id:ulid(),name:'chatgpt-client',endpoint:'',cwd:process.cwd()};
|
|
96
|
+
const dir=fs.mkdtempSync(path.join(os.tmpdir(),'fcc-'));fs.chmodSync(dir,0o700);
|
|
97
|
+
sender.endpoint=path.join(dir,'reply.sock');
|
|
98
|
+
const envelope=makePromptEnvelope(sender,text,{reply_timeout_ms:waitMs});
|
|
99
|
+
envelope.msg_id=commandId;
|
|
100
|
+
// The wire message ID is independent from the human command ID and correlated exactly on reply.
|
|
101
|
+
let resolveReply!:(r:Pick<Receipt,'state'|'result'|'reason'>)=>void;
|
|
102
|
+
const reply=new Promise<Pick<Receipt,'state'|'result'|'reason'>>(resolve=>{resolveReply=resolve;});
|
|
103
|
+
const sockets=new Set<net.Socket>();
|
|
104
|
+
const server=net.createServer(socket=>{
|
|
105
|
+
sockets.add(socket);socket.once('close',()=>sockets.delete(socket));socket.setTimeout(2000,()=>socket.destroy());
|
|
106
|
+
void readOneLine(socket).then(line=>{
|
|
107
|
+
const response=JSON.parse(line);
|
|
108
|
+
if(response.type!=='response'||response.msg_id!==envelope.msg_id||response.sender_session!==entry.session_id)throw Error('unmatched response');
|
|
109
|
+
writeAck(socket,response.msg_id);
|
|
110
|
+
resolveReply(response.error?{state:'failed',reason:'Pi reported an error',result:response.error}:{state:'result',result:response.response,reason:'correlated Pi reply received'});
|
|
111
|
+
}).catch(()=>socket.destroy());
|
|
112
|
+
});
|
|
113
|
+
let timer:NodeJS.Timeout|undefined;
|
|
114
|
+
try {
|
|
115
|
+
await new Promise<void>((resolve,reject)=>{server.once('error',reject);server.listen(sender.endpoint,resolve);});
|
|
116
|
+
const accepted=await exchange(entry.endpoint,envelope);
|
|
117
|
+
if(accepted.type==='nack' && accepted.msg_id===envelope.msg_id)return {state:'failed',reason:'Pi rejected the instruction'};
|
|
118
|
+
if(accepted.type!=='ack'||accepted.msg_id!==envelope.msg_id)throw Error('unmatched ACK');
|
|
119
|
+
const state=card.status==='working'?'queued':'submitted';ack(state);
|
|
120
|
+
return await Promise.race([reply,new Promise<Pick<Receipt,'state'|'reason'>>(resolve=>{timer=setTimeout(()=>resolve({state,reason:'reply window ended; use resync for later public output, never resend this ID'}),waitMs);})]);
|
|
121
|
+
} finally {
|
|
122
|
+
if(timer)clearTimeout(timer);for(const socket of sockets)socket.destroy();server.close();fs.rmSync(dir,{recursive:true,force:true});
|
|
123
|
+
}
|
|
124
|
+
}
|