@chankov/agent-fleet 2.0.9 → 2.0.11
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 +26 -8
- package/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +56 -12
- package/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.pi/agent-fleet/scripts/workflows/lib/run.ts +2 -2
- package/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.pi/agent-fleet/scripts/workflows/lib/trace.ts +2 -2
- package/.pi/agent-fleet/scripts/workflows/wf-scout.ts +3 -1
- package/.pi/extensions/pi-voice-stt/README.md +24 -5
- package/.pi/extensions/pi-voice-stt/examples/stt.json +4 -4
- package/.pi/harnesses/agent-hub/README.md +53 -18
- package/.pi/harnesses/agent-hub/acceptance.ts +137 -0
- package/.pi/harnesses/agent-hub/assertion-ledger.js +15 -6
- package/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
- package/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.pi/harnesses/agent-hub/budget-recovery.ts +112 -18
- package/.pi/harnesses/agent-hub/capability-packs.ts +4 -1
- package/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.pi/harnesses/agent-hub/commands/context.ts +1 -0
- package/.pi/harnesses/agent-hub/commands/retry.ts +1 -1
- package/.pi/harnesses/agent-hub/config/agents.ts +1 -0
- package/.pi/harnesses/agent-hub/config/model-profiles.ts +20 -1
- package/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +10 -2
- package/.pi/harnesses/agent-hub/context/budgets.ts +2 -0
- package/.pi/harnesses/agent-hub/delegate.ts +19 -2
- package/.pi/harnesses/agent-hub/deterministic-fs.ts +127 -0
- package/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.pi/harnesses/agent-hub/dispatch-native-complete.ts +14 -5
- package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +74 -7
- package/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +5 -1
- package/.pi/harnesses/agent-hub/dispatch-native-types.ts +15 -0
- package/.pi/harnesses/agent-hub/dispatch-native.ts +24 -11
- package/.pi/harnesses/agent-hub/filesystem-tool.ts +73 -0
- package/.pi/harnesses/agent-hub/helpers.ts +5 -1
- package/.pi/harnesses/agent-hub/hub-state-audit.js +1 -0
- package/.pi/harnesses/agent-hub/index.ts +145 -14
- package/.pi/harnesses/agent-hub/no-progress.ts +194 -64
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/policy/work-mode.ts +10 -3
- package/.pi/harnesses/agent-hub/process-obligations.ts +57 -0
- package/.pi/harnesses/agent-hub/prompts/context.ts +4 -0
- package/.pi/harnesses/agent-hub/prompts/fragments.ts +5 -2
- package/.pi/harnesses/agent-hub/prompts/system-prompt.ts +1 -1
- package/.pi/harnesses/agent-hub/recovery-contract.ts +78 -0
- package/.pi/harnesses/agent-hub/research/runtime.ts +1 -0
- package/.pi/harnesses/agent-hub/research/spawn-run.ts +20 -5
- package/.pi/harnesses/agent-hub/return-contract.js +34 -0
- package/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
- package/.pi/harnesses/agent-hub/session-audit.ts +161 -0
- package/.pi/harnesses/agent-hub/spawn.ts +61 -7
- package/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
- package/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.pi/harnesses/agent-hub/tools/action-executors.ts +41 -5
- package/.pi/harnesses/agent-hub/tools/context.ts +9 -1
- package/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +1 -1
- package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +253 -41
- package/.pi/harnesses/agent-hub/tools/run-flow.ts +122 -0
- package/.pi/harnesses/agent-hub/tools/set-task-tier.ts +5 -3
- package/.pi/harnesses/agent-hub/tools/spawn-research.ts +4 -1
- package/.pi/harnesses/agent-hub/tools/verification-contract.ts +5 -2
- package/.pi/harnesses/agent-hub/types.ts +2 -0
- package/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.pi/harnesses/agent-hub/work-mode.ts +8 -2
- package/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.pi/harnesses/ask-user-remote/runtime-ask.ts +31 -6
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/index.ts +9 -0
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.10/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.10/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/fleet.ts +216 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/flow.ts +137 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/flow-command.ts +93 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +133 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.10/.pi/agent-fleet/scripts/workflows/wf-scout.ts +38 -0
- package/.versions/2.0.10/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.10/.pi/agents/model-profiles.yaml +83 -0
- package/.versions/2.0.10/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.10/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.10/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.10/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.10/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.10/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.10/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.10/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.10/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.10/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.10/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.10/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.10/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.10/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.10/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.10/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.10/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.10/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.10/.pi/extensions/package.json +9 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.10/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/README.md +1217 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/acceptance.ts +62 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/budget-recovery.ts +97 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/capability-packs.ts +180 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/context.ts +43 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/config/agents.ts +177 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/config/model-profiles.ts +216 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/config/overrides.ts +153 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +213 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context/budgets.ts +202 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/context-window.js +106 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/delegate.ts +446 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-coms.ts +237 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-native-complete.ts +154 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +156 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +193 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-native-types.ts +230 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-native.ts +213 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/drift-watchdog.js +218 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/fixtures/registration-surface.json +57 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/helpers.ts +266 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/hub-state-audit.js +64 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/index.ts +2132 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/input/completions.ts +76 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +123 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/no-progress.ts +76 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/policy/work-mode.ts +119 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/prompts/context.ts +47 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/prompts/fragments.ts +115 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/prompts/system-prompt.ts +112 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/research/runtime.ts +192 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/research/spawn-run.ts +156 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/return-contract.js +327 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/return-extract.js +75 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/review-findings.js +102 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/run-budget.js +537 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/run-namespace.js +87 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/scope-gate.js +123 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/spawn.ts +404 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/timeline.ts +54 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/action-executors.ts +149 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/context.ts +134 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +82 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +335 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/set-task-tier.ts +29 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/spawn-research.ts +62 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/tools/verification-contract.ts +77 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/types.ts +63 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/activity-dots.ts +16 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/context-budget.ts +86 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/detail-panel.ts +178 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/fleet-actions.ts +76 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +99 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/fleet-source.ts +157 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/grid.ts +154 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/ui/zoom.ts +204 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.10/.pi/harnesses/agent-hub/work-mode.ts +167 -0
- package/.versions/2.0.10/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.10/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.10/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.10/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.10/.pi/harnesses/ask-user-remote/runtime-ask.ts +43 -0
- package/.versions/2.0.10/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.10/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.10/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.10/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.10/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.10/.pi/harnesses/damage-control-continue/index.ts +541 -0
- package/.versions/2.0.10/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.10/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.10/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.10/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.10/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.10/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.10/.pi/harnesses/lib/context-budget-child-prompt.ts +180 -0
- package/.versions/2.0.10/.pi/harnesses/lib/context-budget-hub-prompt.ts +114 -0
- package/.versions/2.0.10/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.10/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.10/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-dashboard-view.ts +134 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-detail-view.ts +247 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-read-model.ts +213 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-strip-controller.ts +74 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-strip-view.ts +132 -0
- package/.versions/2.0.10/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.10/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.10/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.10/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.10/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.10/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.10/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.10/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.10/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.10/.pi/harnesses/lib/spawned-peers.js +190 -0
- package/.versions/2.0.10/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.10/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.10/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.10/.pi/prompts/af-build.md +24 -0
- package/.versions/2.0.10/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.10/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.10/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.10/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.10/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.10/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.10/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.10/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.10/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.10/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.10/.version +1 -0
- package/.versions/2.0.10/agents/architect.md +25 -0
- package/.versions/2.0.10/agents/bowser.md +28 -0
- package/.versions/2.0.10/agents/builder.md +56 -0
- package/.versions/2.0.10/agents/code-reviewer.md +210 -0
- package/.versions/2.0.10/agents/deep-researcher.md +33 -0
- package/.versions/2.0.10/agents/documenter.md +23 -0
- package/.versions/2.0.10/agents/orchestrator.md +23 -0
- package/.versions/2.0.10/agents/plan-reviewer.md +84 -0
- package/.versions/2.0.10/agents/planner.md +106 -0
- package/.versions/2.0.10/agents/releaser.md +25 -0
- package/.versions/2.0.10/agents/researcher.md +31 -0
- package/.versions/2.0.10/agents/security-auditor.md +168 -0
- package/.versions/2.0.10/agents/test-engineer.md +154 -0
- package/.versions/2.0.10/agents/web-debugger.md +44 -0
- package/.versions/2.0.10/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.10/bin/catalog/harness-runtime-closure.json +32 -0
- package/.versions/2.0.10/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.10/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.10/docs/ARCHITECTURE.md +416 -0
- package/.versions/2.0.10/docs/agent-fleet-setup.md +586 -0
- package/.versions/2.0.10/docs/claude-code-coms-bridge.md +134 -0
- package/.versions/2.0.10/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.10/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.10/docs/getting-started.md +126 -0
- package/.versions/2.0.10/docs/npm-install.md +383 -0
- package/.versions/2.0.10/docs/pi-extensions.md +449 -0
- package/.versions/2.0.10/docs/pi-setup.md +92 -0
- package/.versions/2.0.10/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.10/install-manifest.json +2991 -0
- package/.versions/2.0.10/justfile +247 -0
- package/.versions/2.0.10/manifest-meta.json +970 -0
- package/.versions/2.0.10/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.10/references/communication-contract.md +26 -0
- package/.versions/2.0.10/references/definition-of-done.md +67 -0
- package/.versions/2.0.10/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.10/references/observability-checklist.md +92 -0
- package/.versions/2.0.10/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.10/references/performance-checklist.md +236 -0
- package/.versions/2.0.10/references/prompting-patterns.md +380 -0
- package/.versions/2.0.10/references/security-checklist.md +245 -0
- package/.versions/2.0.10/references/testing-patterns.md +235 -0
- package/.versions/2.0.10/references/workflow-authoring.md +304 -0
- package/.versions/2.0.10/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.10/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.10/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.10/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.10/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.10/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.10/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.10/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.10/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.10/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.10/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.10/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.10/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.10/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.10/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.10/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.10/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.10/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.10/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.10/skills/incremental-implementation/SKILL.md +302 -0
- package/.versions/2.0.10/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.10/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.10/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.10/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.10/skills/planning-and-task-breakdown/SKILL.md +289 -0
- package/.versions/2.0.10/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.10/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.10/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.10/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.11/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.11/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/coms-claude-bridge.ts +411 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/fleet.ts +216 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/flow.ts +155 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +210 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/flow-command.ts +93 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +177 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.11/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.11/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.11/.pi/agents/model-profiles.yaml +83 -0
- package/.versions/2.0.11/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.11/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.11/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.11/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.11/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.11/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.11/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.11/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.11/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.11/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.11/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.11/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.11/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.11/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.11/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.11/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.11/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.11/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.11/.pi/extensions/package.json +9 -0
- package/.versions/2.0.11/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.11/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.11/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.11/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.11/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.11/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.11/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/README.md +1252 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/acceptance.ts +199 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/budget-recovery.ts +191 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/capability-packs.ts +183 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/context.ts +44 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/config/agents.ts +178 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/config/model-profiles.ts +235 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/config/overrides.ts +153 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/context/budgets.ts +204 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/context-window.js +106 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/delegate.ts +463 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/deterministic-fs.ts +127 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/dispatch-coms.ts +237 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/dispatch-native-complete.ts +163 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +223 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +197 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/dispatch-native-types.ts +245 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/dispatch-native.ts +226 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/docs-lane.js +122 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/drift-watchdog.js +218 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/filesystem-tool.ts +73 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/fixtures/registration-surface.json +60 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/index.ts +2263 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/input/completions.ts +76 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +123 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/no-progress.ts +206 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/policy/work-mode.ts +126 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/process-obligations.ts +57 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/prompts/context.ts +51 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/prompts/fragments.ts +118 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/prompts/system-prompt.ts +112 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/recovery-contract.ts +78 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/research/runtime.ts +193 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/research/spawn-run.ts +171 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/return-contract.js +327 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/return-extract.js +75 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/review-findings.js +102 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/run-budget.js +537 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/run-namespace.js +87 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/scope-gate.js +123 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/session-audit.ts +161 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/spawn.ts +458 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/timeline.ts +54 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/action-executors.ts +185 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/context.ts +142 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +82 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +485 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/herdr-executors.ts +86 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/run-flow.ts +122 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/spawn-research.ts +65 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/types.ts +65 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/activity-dots.ts +16 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/context-budget.ts +86 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/detail-panel.ts +178 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/fleet-actions.ts +76 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +99 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/fleet-source.ts +157 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/grid.ts +154 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/ui/zoom.ts +204 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/work-mode.ts +173 -0
- package/.versions/2.0.11/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.11/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.11/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.11/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.11/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.11/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
- package/.versions/2.0.11/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.11/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.11/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.11/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.11/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.11/.pi/harnesses/damage-control-continue/index.ts +550 -0
- package/.versions/2.0.11/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.11/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.11/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.11/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.11/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.11/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.11/.pi/harnesses/lib/context-budget-child-prompt.ts +180 -0
- package/.versions/2.0.11/.pi/harnesses/lib/context-budget-hub-prompt.ts +114 -0
- package/.versions/2.0.11/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.11/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.11/.pi/harnesses/lib/damage-control-shared.ts +197 -0
- package/.versions/2.0.11/.pi/harnesses/lib/deterministic-handle-path.ts +23 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fleet-dashboard-view.ts +134 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fleet-detail-view.ts +247 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fleet-read-model.ts +213 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fleet-strip-controller.ts +74 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fleet-strip-view.ts +132 -0
- package/.versions/2.0.11/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.11/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.11/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.11/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.11/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.11/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.11/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.11/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.11/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.11/.pi/harnesses/lib/spawned-peers.js +190 -0
- package/.versions/2.0.11/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.11/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.11/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.11/.pi/prompts/af-build.md +24 -0
- package/.versions/2.0.11/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.11/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.11/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.11/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.11/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.11/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.11/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.11/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.11/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.11/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.11/.version +1 -0
- package/.versions/2.0.11/agents/architect.md +25 -0
- package/.versions/2.0.11/agents/bowser.md +28 -0
- package/.versions/2.0.11/agents/builder.md +56 -0
- package/.versions/2.0.11/agents/code-reviewer.md +210 -0
- package/.versions/2.0.11/agents/deep-researcher.md +33 -0
- package/.versions/2.0.11/agents/documenter.md +23 -0
- package/.versions/2.0.11/agents/orchestrator.md +23 -0
- package/.versions/2.0.11/agents/plan-reviewer.md +84 -0
- package/.versions/2.0.11/agents/planner.md +106 -0
- package/.versions/2.0.11/agents/releaser.md +25 -0
- package/.versions/2.0.11/agents/researcher.md +31 -0
- package/.versions/2.0.11/agents/security-auditor.md +168 -0
- package/.versions/2.0.11/agents/test-engineer.md +154 -0
- package/.versions/2.0.11/agents/web-debugger.md +44 -0
- package/.versions/2.0.11/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.11/bin/catalog/harness-runtime-closure.json +61 -0
- package/.versions/2.0.11/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.11/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.11/docs/ARCHITECTURE.md +595 -0
- package/.versions/2.0.11/docs/agent-fleet-setup.md +586 -0
- package/.versions/2.0.11/docs/claude-code-coms-bridge.md +134 -0
- package/.versions/2.0.11/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.11/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.11/docs/getting-started.md +126 -0
- package/.versions/2.0.11/docs/npm-install.md +383 -0
- package/.versions/2.0.11/docs/pi-extensions.md +449 -0
- package/.versions/2.0.11/docs/pi-setup.md +92 -0
- package/.versions/2.0.11/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.11/install-manifest.json +3020 -0
- package/.versions/2.0.11/justfile +247 -0
- package/.versions/2.0.11/manifest-meta.json +970 -0
- package/.versions/2.0.11/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.11/references/communication-contract.md +26 -0
- package/.versions/2.0.11/references/definition-of-done.md +67 -0
- package/.versions/2.0.11/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.11/references/observability-checklist.md +92 -0
- package/.versions/2.0.11/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.11/references/performance-checklist.md +236 -0
- package/.versions/2.0.11/references/prompting-patterns.md +380 -0
- package/.versions/2.0.11/references/security-checklist.md +245 -0
- package/.versions/2.0.11/references/testing-patterns.md +235 -0
- package/.versions/2.0.11/references/workflow-authoring.md +304 -0
- package/.versions/2.0.11/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.11/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.11/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.11/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.11/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.11/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.11/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.11/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.11/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.11/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.11/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.11/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.11/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.11/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.11/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.11/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.11/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.11/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.11/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.11/skills/incremental-implementation/SKILL.md +302 -0
- package/.versions/2.0.11/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.11/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.11/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.11/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.11/skills/planning-and-task-breakdown/SKILL.md +289 -0
- package/.versions/2.0.11/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.11/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.11/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.11/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +19 -0
- package/README.md +1 -0
- package/agents/architect.md +1 -1
- package/agents/bowser.md +1 -1
- package/agents/builder.md +1 -1
- package/agents/code-reviewer.md +1 -1
- package/agents/deep-researcher.md +1 -1
- package/agents/documenter.md +1 -1
- package/agents/orchestrator.md +1 -1
- package/agents/plan-reviewer.md +1 -1
- package/agents/planner.md +1 -1
- package/agents/releaser.md +1 -1
- package/agents/researcher.md +1 -1
- package/agents/security-auditor.md +1 -1
- package/agents/test-engineer.md +1 -1
- package/agents/web-debugger.md +1 -1
- package/agents/web-performance-auditor.md +1 -1
- package/bin/catalog/harness-runtime-closure.json +29 -0
- package/bin/cli.js +23 -9
- package/bin/lib/doctor.js +83 -1
- package/bin/lib/path-boundaries.js +5 -6
- package/bin/lib/stt-wizard.js +154 -23
- package/docs/ARCHITECTURE.md +181 -2
- package/docs/agent-fleet-setup.md +26 -8
- package/docs/npm-install.md +29 -2
- package/docs/pi-setup.md +16 -0
- package/docs/workflows.md +8 -2
- package/install-manifest.json +31 -2
- package/package.json +13 -3
- package/skills/orchestration-verification/SKILL.md +1 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { runAgentPhase, type SpawnAgent } from "./agent-phase.ts";
|
|
4
|
+
import type { DebateReport } from "./envelopes.ts";
|
|
5
|
+
import type { PersonaDefinition } from "./personas.ts";
|
|
6
|
+
import { POLL_PERMISSION_POLICY, POLL_TOOLS, pollArtifactDir } from "./poll.ts";
|
|
7
|
+
import type { Run } from "./run.ts";
|
|
8
|
+
import { resolvePanel, type Voice } from "./voices.ts";
|
|
9
|
+
|
|
10
|
+
export const DEBATE_DEFAULT_ROUNDS = 3;
|
|
11
|
+
export const DEBATE_MIN_ROUNDS = 2;
|
|
12
|
+
export const DEBATE_MAX_ROUNDS = 5;
|
|
13
|
+
export const DEBATE_FOREIGN_PACKET_MAX_BYTES = 16_384;
|
|
14
|
+
|
|
15
|
+
export interface DebateVoiceSuccess { ok: true; voice: Voice; round: number; report: DebateReport; path: string }
|
|
16
|
+
export interface DebateVoiceFailure { ok: false; voice: Voice; round: number; reason: string; path: string }
|
|
17
|
+
export type DebateVoiceResult = DebateVoiceSuccess | DebateVoiceFailure;
|
|
18
|
+
export interface DebateRoundResult { round: number; results: DebateVoiceResult[] }
|
|
19
|
+
export interface DebateResult { panel: string; directory: string; rounds: number; roundsRun: DebateRoundResult[] }
|
|
20
|
+
|
|
21
|
+
export interface DebateVoiceRoundOptions {
|
|
22
|
+
run: Run; cwd: string; persona: PersonaDefinition; voice: Voice; task: string; panel: string;
|
|
23
|
+
round: number; rounds: number; others: DebateVoiceSuccess[];
|
|
24
|
+
spawn?: SpawnAgent; runAgent?: typeof runAgentPhase<DebateReport>;
|
|
25
|
+
}
|
|
26
|
+
export interface DebateOptions {
|
|
27
|
+
run: Run; cwd: string; persona: PersonaDefinition; panel: string; task: string;
|
|
28
|
+
rounds?: number; voices?: Voice[];
|
|
29
|
+
spawn?: SpawnAgent; runAgent?: typeof runAgentPhase<DebateReport>;
|
|
30
|
+
onVoice?: (result: DebateVoiceResult, round: number) => void | Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function resolveDebateRounds(value?: number): number {
|
|
34
|
+
const rounds = value ?? DEBATE_DEFAULT_ROUNDS;
|
|
35
|
+
if (!Number.isInteger(rounds) || rounds < DEBATE_MIN_ROUNDS || rounds > DEBATE_MAX_ROUNDS) {
|
|
36
|
+
throw Object.assign(new Error(`debate --rounds must be an integer from ${DEBATE_MIN_ROUNDS} to ${DEBATE_MAX_ROUNDS} (got ${value ?? rounds})`), { exitCode: 2 });
|
|
37
|
+
}
|
|
38
|
+
return rounds;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function debateArtifactDir(cwd: string, runId: string): string {
|
|
42
|
+
return resolve(pollArtifactDir(cwd, runId), "debate");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function debateRoundDir(cwd: string, runId: string, round: number): string {
|
|
46
|
+
return resolve(debateArtifactDir(cwd, runId), `round-${round}`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function debateVoicePath(cwd: string, runId: string, round: number, voiceName: string): string {
|
|
50
|
+
return resolve(debateRoundDir(cwd, runId, round), `${voiceName}.md`);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function formatForeignPacket(others: DebateVoiceSuccess[]): string {
|
|
54
|
+
if (!others.length) return "";
|
|
55
|
+
const blocks = others.map(item => `## ${item.voice.name} (${item.voice.model})\n\n\`\`\`json\n${JSON.stringify(item.report, null, 2)}\n\`\`\``);
|
|
56
|
+
return ["Labeled positions from the previous round:", "", ...blocks].join("\n");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function assertForeignPacketSize(packet: string): void {
|
|
60
|
+
const bytes = Buffer.byteLength(packet, "utf8");
|
|
61
|
+
if (bytes > DEBATE_FOREIGN_PACKET_MAX_BYTES) {
|
|
62
|
+
throw new Error(`Debate refused: foreign opinion packet is ${bytes} bytes (cap ${DEBATE_FOREIGN_PACKET_MAX_BYTES})`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function debateRoundTask(question: string, round: number, total: number, others: DebateVoiceSuccess[]): string {
|
|
67
|
+
const packet = formatForeignPacket(others);
|
|
68
|
+
assertForeignPacketSize(packet);
|
|
69
|
+
return [
|
|
70
|
+
`Debate round ${round} of ${total}.`,
|
|
71
|
+
"You are one voice answering the same question. When labeled positions from other voices are present, address them by name.",
|
|
72
|
+
"Keep your own session; do not pretend to be another voice. There is no judge.",
|
|
73
|
+
"",
|
|
74
|
+
`Question:\n${question}`,
|
|
75
|
+
packet ? `\n${packet}` : "",
|
|
76
|
+
].filter(Boolean).join("\n");
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function readOnlyPersona(persona: PersonaDefinition): PersonaDefinition {
|
|
80
|
+
return { ...persona, tools: POLL_TOOLS, writes: [] };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function formatDebateArtifact(result: DebateVoiceResult): string {
|
|
84
|
+
const header = [`# ${result.voice.name}`, "", `- model: ${result.voice.model}`, `- round: ${result.round}`, `- thinking: ${result.voice.thinking ?? "medium"}`];
|
|
85
|
+
if (!result.ok) return `${header.join("\n")}\n- status: failed\n- reason: ${result.reason}\n`;
|
|
86
|
+
return `${header.join("\n")}\n- status: success\n\n## Report\n\n\`\`\`json\n${JSON.stringify(result.report, null, 2)}\n\`\`\`\n`;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function writeDebateArtifact(cwd: string, runId: string, result: DebateVoiceResult): string {
|
|
90
|
+
const directory = debateRoundDir(cwd, runId, result.round);
|
|
91
|
+
mkdirSync(directory, { recursive: true });
|
|
92
|
+
const path = debateVoicePath(cwd, runId, result.round, result.voice.name);
|
|
93
|
+
writeFileSync(path, formatDebateArtifact(result), "utf8");
|
|
94
|
+
return path;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export async function debateVoiceRound(options: DebateVoiceRoundOptions): Promise<DebateVoiceResult> {
|
|
98
|
+
const path = debateVoicePath(options.cwd, options.run.trace.runId, options.round, options.voice.name);
|
|
99
|
+
const agent = options.runAgent ?? runAgentPhase<DebateReport>;
|
|
100
|
+
try {
|
|
101
|
+
const report = await agent({
|
|
102
|
+
run: options.run, persona: readOnlyPersona(options.persona),
|
|
103
|
+
task: debateRoundTask(options.task, options.round, options.rounds, options.others),
|
|
104
|
+
envelope: "debate", cwd: options.cwd, spawn: options.spawn,
|
|
105
|
+
model: options.voice.model, thinking: options.voice.thinking,
|
|
106
|
+
sessionTag: options.voice.name, permissionPolicy: POLL_PERMISSION_POLICY,
|
|
107
|
+
});
|
|
108
|
+
const result: DebateVoiceSuccess = { ok: true, voice: options.voice, round: options.round, report, path };
|
|
109
|
+
result.path = writeDebateArtifact(options.cwd, options.run.trace.runId, result);
|
|
110
|
+
return result;
|
|
111
|
+
} catch (error) {
|
|
112
|
+
const result: DebateVoiceFailure = {
|
|
113
|
+
ok: false, voice: options.voice, round: options.round,
|
|
114
|
+
reason: error instanceof Error ? error.message : String(error), path,
|
|
115
|
+
};
|
|
116
|
+
result.path = writeDebateArtifact(options.cwd, options.run.trace.runId, result);
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export async function runDebate(options: DebateOptions): Promise<DebateResult> {
|
|
122
|
+
const rounds = resolveDebateRounds(options.rounds);
|
|
123
|
+
const voices = options.voices ?? resolvePanel(options.panel, options.cwd);
|
|
124
|
+
let active = [...voices];
|
|
125
|
+
const roundsRun: DebateRoundResult[] = [];
|
|
126
|
+
let previousSuccesses: DebateVoiceSuccess[] = [];
|
|
127
|
+
for (let round = 1; round <= rounds; round++) {
|
|
128
|
+
if (active.length < 2) break;
|
|
129
|
+
const results = await Promise.all(active.map(async voice => {
|
|
130
|
+
const others = previousSuccesses.filter(item => item.voice.name !== voice.name);
|
|
131
|
+
assertForeignPacketSize(formatForeignPacket(others));
|
|
132
|
+
const result = await debateVoiceRound({ ...options, voice, round, rounds, others });
|
|
133
|
+
try { await options.onVoice?.(result, round); } catch { /* progress is best-effort */ }
|
|
134
|
+
return result;
|
|
135
|
+
}));
|
|
136
|
+
roundsRun.push({ round, results });
|
|
137
|
+
const succeeded = results.filter((item): item is DebateVoiceSuccess => item.ok);
|
|
138
|
+
if (succeeded.length < 2) {
|
|
139
|
+
if (round === 1) {
|
|
140
|
+
const failures = results.filter(item => !item.ok).map(item => `${item.voice.name}: ${item.reason}`).join("; ");
|
|
141
|
+
throw new Error(`Debate failed: ${succeeded.length} of ${active.length} voices succeeded in round 1${failures ? ` (${failures})` : ""}`);
|
|
142
|
+
}
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
previousSuccesses = succeeded;
|
|
146
|
+
active = succeeded.map(item => item.voice);
|
|
147
|
+
}
|
|
148
|
+
return { panel: options.panel, directory: debateArtifactDir(options.cwd, options.run.trace.runId), rounds, roundsRun };
|
|
149
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
|
|
4
|
+
export function parseEnv(text: string): Record<string, string> {
|
|
5
|
+
const values: Record<string, string> = {};
|
|
6
|
+
for (const raw of text.split(/\r?\n/)) {
|
|
7
|
+
const line = raw.trim();
|
|
8
|
+
if (!line || line.startsWith("#")) continue;
|
|
9
|
+
const match = line.match(/^(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);
|
|
10
|
+
if (!match) continue;
|
|
11
|
+
let value = match[2].trim();
|
|
12
|
+
if ((value.startsWith('"') && value.endsWith('"')) || (value.startsWith("'") && value.endsWith("'"))) {
|
|
13
|
+
const quote = value[0];
|
|
14
|
+
value = value.slice(1, -1);
|
|
15
|
+
if (quote === '"') value = value.replace(/\\n/g, "\n").replace(/\\r/g, "\r").replace(/\\t/g, "\t").replace(/\\"/g, '"').replace(/\\\\/g, "\\");
|
|
16
|
+
} else {
|
|
17
|
+
value = value.replace(/\s+#.*$/, "").trim();
|
|
18
|
+
}
|
|
19
|
+
values[match[1]] = value;
|
|
20
|
+
}
|
|
21
|
+
return values;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function loadEnv(cwd = process.cwd(), env: NodeJS.ProcessEnv = process.env): Record<string, string> {
|
|
25
|
+
const file = resolve(cwd, ".env");
|
|
26
|
+
if (!existsSync(file)) return {};
|
|
27
|
+
const loaded: Record<string, string> = {};
|
|
28
|
+
for (const [key, value] of Object.entries(parseEnv(readFileSync(file, "utf8")))) {
|
|
29
|
+
if (env[key] !== undefined) continue;
|
|
30
|
+
env[key] = value;
|
|
31
|
+
loaded[key] = value;
|
|
32
|
+
}
|
|
33
|
+
return loaded;
|
|
34
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { Type, type Static, type TSchema } from "@sinclair/typebox";
|
|
2
|
+
import { Value } from "@sinclair/typebox/value";
|
|
3
|
+
const returnContractPath: string = "../../../../../.pi/harnesses/agent-hub/return-contract.js";
|
|
4
|
+
const { parseStructuredReturn } = await import(returnContractPath) as { parseStructuredReturn(text: string): Record<string, unknown> | null };
|
|
5
|
+
const StringArray = Type.Array(Type.String());
|
|
6
|
+
const EnvelopeBase = Type.Object({
|
|
7
|
+
status: Type.Union([Type.Literal("success"), Type.Literal("fail")]),
|
|
8
|
+
summary: Type.String(),
|
|
9
|
+
artifacts: StringArray,
|
|
10
|
+
notes_for_next_agent: Type.String(),
|
|
11
|
+
});
|
|
12
|
+
export const PlanEnvelope = Type.Intersect([EnvelopeBase, Type.Object({ commit_message: Type.String() })]);
|
|
13
|
+
export const BuildEnvelope = Type.Intersect([EnvelopeBase, Type.Object({ changed_files: StringArray, commit_message: Type.String() })]);
|
|
14
|
+
export const ReviewEnvelope = Type.Intersect([EnvelopeBase, Type.Object({
|
|
15
|
+
approved: Type.Boolean(), assertions_proven: StringArray, assertions_unproven: StringArray,
|
|
16
|
+
assertions_failed: StringArray, open_risks: StringArray, requires_user_decision: StringArray,
|
|
17
|
+
})]);
|
|
18
|
+
export const ScoutEnvelope = Type.Intersect([EnvelopeBase, Type.Object({ findings: StringArray })]);
|
|
19
|
+
export const DocumentEnvelope = Type.Intersect([EnvelopeBase, Type.Object({ document_path: Type.String(), documented_files: StringArray, commit_message: Type.String() })]);
|
|
20
|
+
const AttributedClaim = Type.Object({ voice: Type.String({ minLength: 1 }), statement: Type.String({ minLength: 1 }) });
|
|
21
|
+
const RejectedClaim = Type.Object({ voice: Type.String({ minLength: 1 }), statement: Type.String({ minLength: 1 }), reason: Type.String({ minLength: 1 }) });
|
|
22
|
+
export const PollEnvelope = Type.Intersect([EnvelopeBase, Type.Object({
|
|
23
|
+
position: Type.String(), case: StringArray,
|
|
24
|
+
confidence: Type.Union([Type.Literal("low"), Type.Literal("medium"), Type.Literal("high")]),
|
|
25
|
+
would_change_my_mind: StringArray,
|
|
26
|
+
})]);
|
|
27
|
+
export const DebateEnvelope = Type.Intersect([EnvelopeBase, Type.Object({
|
|
28
|
+
position: Type.String(), changed: Type.Boolean(), aligned_with: StringArray, refutes: StringArray, evidence_that_moved_me: StringArray,
|
|
29
|
+
})]);
|
|
30
|
+
export const MergeEnvelope = Type.Intersect([EnvelopeBase, Type.Object({
|
|
31
|
+
consensus: Type.Array(AttributedClaim), divergence: Type.Array(AttributedClaim), minority: Type.Array(AttributedClaim),
|
|
32
|
+
rejected: Type.Array(RejectedClaim), recommendation: Type.String(),
|
|
33
|
+
})]);
|
|
34
|
+
|
|
35
|
+
export const ENVELOPES = { plan: PlanEnvelope, build: BuildEnvelope, review: ReviewEnvelope, scout: ScoutEnvelope, document: DocumentEnvelope, poll: PollEnvelope, debate: DebateEnvelope, merge: MergeEnvelope } as const;
|
|
36
|
+
export type EnvelopeName = keyof typeof ENVELOPES;
|
|
37
|
+
export type ScoutReport = Static<typeof ScoutEnvelope>;
|
|
38
|
+
export type PollReport = Static<typeof PollEnvelope>;
|
|
39
|
+
export type DebateReport = Static<typeof DebateEnvelope>;
|
|
40
|
+
export type MergeReport = Static<typeof MergeEnvelope>;
|
|
41
|
+
export const JSON_FIX_ATTEMPTS = 2;
|
|
42
|
+
|
|
43
|
+
export const ENVELOPE_EXAMPLES: Record<EnvelopeName, Record<string, unknown>> = {
|
|
44
|
+
plan: { status: "success", summary: "Plan ready", artifacts: [], notes_for_next_agent: "", commit_message: "docs: add plan" },
|
|
45
|
+
build: { status: "success", summary: "Build complete", artifacts: [], notes_for_next_agent: "", changed_files: ["src/app.ts"], commit_message: "feat: build" },
|
|
46
|
+
review: { status: "success", summary: "Review clean", artifacts: [], notes_for_next_agent: "", approved: true, assertions_proven: [], assertions_unproven: [], assertions_failed: [], open_risks: [], requires_user_decision: [] },
|
|
47
|
+
scout: { status: "success", summary: "Scout complete", artifacts: [], notes_for_next_agent: "", findings: ["X lives in src/x.ts"] },
|
|
48
|
+
document: { status: "success", summary: "Docs complete", artifacts: [], notes_for_next_agent: "", document_path: "docs/x.md", documented_files: ["src/x.ts"], commit_message: "docs: explain x" },
|
|
49
|
+
poll: { status: "success", summary: "Opinion recorded", artifacts: [], notes_for_next_agent: "", position: "Prefer approach A.", case: ["It matches existing seams", "Less migration risk"], confidence: "high", would_change_my_mind: ["Evidence that A breaks the permission model"] },
|
|
50
|
+
debate: { status: "success", summary: "Round complete", artifacts: [], notes_for_next_agent: "", position: "Still prefer A.", changed: false, aligned_with: ["opus"], refutes: ["grok's rewrite is out of scope"], evidence_that_moved_me: [] },
|
|
51
|
+
merge: { status: "success", summary: "Merge complete", artifacts: [], notes_for_next_agent: "", consensus: [{ voice: "sol", statement: "Use approach A" }, { voice: "opus", statement: "Use approach A" }], divergence: [{ voice: "grok", statement: "Prefer approach B" }], minority: [{ voice: "grok", statement: "Approach B isolates failure better" }], rejected: [{ voice: "grok", statement: "Rewrite the module", reason: "Out of scope for this change" }], recommendation: "Adopt approach A; keep grok's isolation concern as a follow-up." },
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export function envelopePrompt(name: EnvelopeName): string {
|
|
55
|
+
return `Finish by emitting ONLY your Report JSON with exactly this shape:\n${JSON.stringify(ENVELOPE_EXAMPLES[name], null, 2)}`;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function reportJsonCandidates(text: string): unknown[] {
|
|
59
|
+
const candidates: unknown[] = [];
|
|
60
|
+
for (let start = text.indexOf("{"); start >= 0; start = text.indexOf("{", start + 1)) {
|
|
61
|
+
let depth = 0, inString = false, escaped = false;
|
|
62
|
+
for (let end = start; end < text.length; end++) {
|
|
63
|
+
const char = text[end];
|
|
64
|
+
if (inString) {
|
|
65
|
+
if (escaped) escaped = false;
|
|
66
|
+
else if (char === "\\") escaped = true;
|
|
67
|
+
else if (char === '"') inString = false;
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (char === '"') { inString = true; continue; }
|
|
71
|
+
if (char === "{") { depth++; continue; }
|
|
72
|
+
if (char !== "}" || --depth !== 0) continue;
|
|
73
|
+
try { candidates.push(JSON.parse(text.slice(start, end + 1))); } catch {}
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return candidates;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function explicitlyParsedHubFields(text: string, parsed: Record<string, unknown>): Record<string, unknown> {
|
|
81
|
+
const candidate: Record<string, unknown> = {};
|
|
82
|
+
for (const [field, value] of Object.entries(parsed)) {
|
|
83
|
+
const label = field.replaceAll("_", "[_ -]");
|
|
84
|
+
const declared = new RegExp(`(?:^|\\n)\\s*(?:#{1,6}\\s+)?${label}\\s*:`, "i").test(text)
|
|
85
|
+
|| (Array.isArray(value) && value.length > 0);
|
|
86
|
+
if (declared) candidate[field] = value;
|
|
87
|
+
}
|
|
88
|
+
return candidate;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const BASE_FIELDS = ["status", "summary", "artifacts", "notes_for_next_agent"];
|
|
92
|
+
const ENVELOPE_FIELDS: Record<EnvelopeName, string[]> = {
|
|
93
|
+
plan: [...BASE_FIELDS, "commit_message"],
|
|
94
|
+
build: [...BASE_FIELDS, "changed_files", "commit_message"],
|
|
95
|
+
review: [...BASE_FIELDS, "approved", "assertions_proven", "assertions_unproven", "assertions_failed", "open_risks", "requires_user_decision"],
|
|
96
|
+
scout: [...BASE_FIELDS, "findings"],
|
|
97
|
+
document: [...BASE_FIELDS, "document_path", "documented_files", "commit_message"],
|
|
98
|
+
poll: [...BASE_FIELDS, "position", "case", "confidence", "would_change_my_mind"],
|
|
99
|
+
debate: [...BASE_FIELDS, "position", "changed", "aligned_with", "refutes", "evidence_that_moved_me"],
|
|
100
|
+
merge: [...BASE_FIELDS, "consensus", "divergence", "minority", "rejected", "recommendation"],
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export interface EnvelopeValidation<T = unknown> { ok: boolean; value?: T; errors: string[] }
|
|
104
|
+
|
|
105
|
+
export function envelopeErrorField(error: { path?: unknown }): string {
|
|
106
|
+
const path = typeof error.path === "string" ? error.path : "";
|
|
107
|
+
return path.replace(/^\//, "").replaceAll("/", ".") || "response";
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function schemaErrors(name: EnvelopeName, candidate: unknown): string[] {
|
|
111
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) return ["response: expected one complete Report JSON object"];
|
|
112
|
+
const schema: TSchema = ENVELOPES[name];
|
|
113
|
+
const typeErrors = [...Value.Errors(schema, candidate)];
|
|
114
|
+
const specificErrors = typeErrors.filter(error => typeof error.path === "string" && error.path.length > 0);
|
|
115
|
+
const errors = [...new Set((specificErrors.length ? specificErrors : typeErrors).map(error => {
|
|
116
|
+
const field = envelopeErrorField(error);
|
|
117
|
+
return error.type === 45 || /required/i.test(String(error.message ?? "")) ? `missing required field: ${field}` : `${field}: ${error.message}`;
|
|
118
|
+
}))];
|
|
119
|
+
const allowed = new Set(ENVELOPE_FIELDS[name]);
|
|
120
|
+
for (const field of Object.keys(candidate)) if (!allowed.has(field)) errors.push(`${field}: unexpected field for ${name} envelope`);
|
|
121
|
+
return errors;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function selectCandidate(name: EnvelopeName, output: string, hubParsed: Record<string, unknown> | null): unknown {
|
|
125
|
+
const jsonCandidates = reportJsonCandidates(output).filter(candidate => candidate && typeof candidate === "object" && !Array.isArray(candidate));
|
|
126
|
+
for (let index = jsonCandidates.length - 1; index >= 0; index--) {
|
|
127
|
+
if (schemaErrors(name, jsonCandidates[index]).length === 0) return jsonCandidates[index];
|
|
128
|
+
}
|
|
129
|
+
const hubCandidate = hubParsed ? explicitlyParsedHubFields(output, hubParsed) : null;
|
|
130
|
+
const candidates = hubCandidate && Object.keys(hubCandidate).length > 0 ? [...jsonCandidates, hubCandidate] : jsonCandidates;
|
|
131
|
+
const expected = new Set(ENVELOPE_FIELDS[name]);
|
|
132
|
+
return candidates.reduce<unknown>((best, candidate) => {
|
|
133
|
+
if (!best) return candidate;
|
|
134
|
+
const score = Object.keys(candidate as object).filter(field => expected.has(field)).length;
|
|
135
|
+
const bestScore = Object.keys(best as object).filter(field => expected.has(field)).length;
|
|
136
|
+
return score >= bestScore ? candidate : best;
|
|
137
|
+
}, null);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function validateEnvelope<T = unknown>(name: EnvelopeName, output: string): EnvelopeValidation<T> {
|
|
141
|
+
// The shared hub parser is deliberately the first parser. Its normalized result is
|
|
142
|
+
// only an input to selection: required flow fields must still exist in the emitted
|
|
143
|
+
// object and pass the exact TypeBox envelope below.
|
|
144
|
+
const hubParsed = parseStructuredReturn(output);
|
|
145
|
+
const candidate = selectCandidate(name, output, hubParsed);
|
|
146
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) return { ok: false, errors: ["response: expected one complete Report JSON object"] };
|
|
147
|
+
const errors = schemaErrors(name, candidate);
|
|
148
|
+
if (errors.length) return { ok: false, errors };
|
|
149
|
+
const value = candidate as T;
|
|
150
|
+
if ((value as { status: string }).status === "fail") return { ok: false, errors: [`status: agent declared fail${(value as any).summary ? ` — ${(value as any).summary}` : ""}`] };
|
|
151
|
+
return { ok: true, value, errors: [] };
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function correctionPrompt(errors: string[]): string {
|
|
155
|
+
return `Your previous response failed validation:\n${errors.map(error => `- ${error}`).join("\n")}\nFix these problems, then re-emit ONLY your Report JSON.`;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export async function parseWithCorrections<T>(name: EnvelopeName, initialOutput: string, correct: (prompt: string, attempt: number) => Promise<string>, onInvalid?: (attempt: number, errors: string[]) => void): Promise<T> {
|
|
159
|
+
let output = initialOutput;
|
|
160
|
+
for (let attempt = 0; attempt <= JSON_FIX_ATTEMPTS; attempt++) {
|
|
161
|
+
const result = validateEnvelope<T>(name, output);
|
|
162
|
+
if (result.ok) return result.value!;
|
|
163
|
+
onInvalid?.(attempt, result.errors);
|
|
164
|
+
if (result.errors.some(error => error.startsWith("status: agent declared fail"))) throw Object.assign(new Error(result.errors[0]), { terminal: true });
|
|
165
|
+
if (attempt === JSON_FIX_ATTEMPTS) throw Object.assign(new Error(`${name} envelope invalid after ${attempt + 1} attempts: ${result.errors.join("; ")}`), { terminal: true });
|
|
166
|
+
output = await correct(correctionPrompt(result.errors), attempt + 1);
|
|
167
|
+
}
|
|
168
|
+
throw new Error(`${name} envelope validation exhausted`);
|
|
169
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { statSync, readFileSync } from "node:fs";
|
|
2
|
+
import { isAbsolute, resolve } from "node:path";
|
|
3
|
+
import type { Run } from "./run.ts";
|
|
4
|
+
import { executeQuality } from "./quality.ts";
|
|
5
|
+
|
|
6
|
+
export interface GateCheck { item: string; ok: boolean; note: string }
|
|
7
|
+
export class GateReport {
|
|
8
|
+
readonly gate: string;
|
|
9
|
+
readonly checks: GateCheck[] = [];
|
|
10
|
+
constructor(gate: string) { this.gate = gate; }
|
|
11
|
+
check(item: string, ok: boolean, note: string): this { this.checks.push({ item, ok, note }); return this; }
|
|
12
|
+
get ok(): boolean { return this.checks.length > 0 && this.checks.every(check => check.ok); }
|
|
13
|
+
failures(): GateCheck[] { return this.checks.filter(check => !check.ok); }
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type Gate<T = any> = (envelope: T, run: Run) => GateReport | Promise<GateReport>;
|
|
17
|
+
|
|
18
|
+
function artifactPath(path: string, run: Run): string { return isAbsolute(path) ? path : resolve(run.trace.cwd, path); }
|
|
19
|
+
|
|
20
|
+
export const artifactsExist: Gate<{ artifacts?: string[] }> = (envelope, run) => {
|
|
21
|
+
const report = new GateReport("artifactsExist");
|
|
22
|
+
for (const item of envelope.artifacts ?? []) {
|
|
23
|
+
try { const stat = statSync(artifactPath(item, run)); report.check(item, true, `${stat.size} bytes`); }
|
|
24
|
+
catch { report.check(item, false, "declared artifact does not exist"); }
|
|
25
|
+
}
|
|
26
|
+
return envelope.artifacts?.length ? report : report.check("artifacts", true, "no artifacts declared");
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const filesNonEmpty: Gate<{ artifacts?: string[] }> = (envelope, run) => {
|
|
30
|
+
const report = new GateReport("filesNonEmpty");
|
|
31
|
+
for (const item of envelope.artifacts ?? []) {
|
|
32
|
+
try { const size = statSync(artifactPath(item, run)).size; report.check(item, size > 0, `${size} bytes`); }
|
|
33
|
+
catch { report.check(item, false, "file cannot be read"); }
|
|
34
|
+
}
|
|
35
|
+
return envelope.artifacts?.length ? report : report.check("artifacts", true, "no artifacts declared");
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const jsonParses: Gate<{ artifacts?: string[] }> = (envelope, run) => {
|
|
39
|
+
const report = new GateReport("jsonParses");
|
|
40
|
+
const items = (envelope.artifacts ?? []).filter(item => item.toLowerCase().endsWith(".json"));
|
|
41
|
+
for (const item of items) {
|
|
42
|
+
try { JSON.parse(readFileSync(artifactPath(item, run), "utf8")); report.check(item, true, "JSON.parse succeeded"); }
|
|
43
|
+
catch (error) { report.check(item, false, error instanceof Error ? error.message : String(error)); }
|
|
44
|
+
}
|
|
45
|
+
return items.length ? report : report.check("json artifacts", true, "no JSON artifacts declared");
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const diffMatchesClaims: Gate<{ changed_files?: string[] }> = (envelope, run) => {
|
|
49
|
+
const report = new GateReport("diffMatchesClaims");
|
|
50
|
+
for (const item of envelope.changed_files ?? []) {
|
|
51
|
+
try { const stat = statSync(artifactPath(item, run)); report.check(item, true, `${stat.size} bytes on disk`); }
|
|
52
|
+
catch { report.check(item, false, "claimed changed file does not exist"); }
|
|
53
|
+
}
|
|
54
|
+
return envelope.changed_files?.length ? report : report.check("changed_files", true, "no changed files claimed");
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export function testsPass(argv: string[], options: { cwd?: string; timeoutSeconds?: number } = {}): Gate {
|
|
58
|
+
return async (_envelope, run) => {
|
|
59
|
+
const logPath = resolve(run.trace.directory, `gate-tests-${Date.now()}.log`);
|
|
60
|
+
const result = await executeQuality(argv, { cwd: options.cwd ?? run.trace.cwd, logPath, timeoutSeconds: options.timeoutSeconds, signal: run.signal });
|
|
61
|
+
const evidence = result.passed ? `exit 0; ${logPath}` : `${(result.stderr || result.stdout).slice(-4000)}\n${logPath}`;
|
|
62
|
+
return new GateReport("testsPass").check(argv.join(" "), result.passed, evidence);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const verdictConsistent: Gate<{ approved?: boolean; assertions_failed?: unknown[]; assertions_unproven?: unknown[]; open_risks?: unknown[]; requires_user_decision?: unknown[] }> = envelope => {
|
|
67
|
+
const report = new GateReport("verdictConsistent");
|
|
68
|
+
const failed = envelope.assertions_failed ?? [];
|
|
69
|
+
const unproven = envelope.assertions_unproven ?? [];
|
|
70
|
+
const decisions = envelope.requires_user_decision ?? [];
|
|
71
|
+
const problems = [...failed, ...unproven, ...(envelope.open_risks ?? []), ...decisions];
|
|
72
|
+
report.check("approved vs failed assertions", !envelope.approved || failed.length === 0, envelope.approved && failed.length ? "approved verdict has blocking failed assertions" : "consistent");
|
|
73
|
+
report.check("approved vs unresolved work", !envelope.approved || (unproven.length === 0 && decisions.length === 0), envelope.approved && (unproven.length || decisions.length) ? "approved verdict has unresolved assertions or decisions" : "consistent");
|
|
74
|
+
report.check("rejection names a problem", envelope.approved !== false || problems.length > 0, envelope.approved === false && problems.length === 0 ? "rejected verdict names no problem" : "consistent");
|
|
75
|
+
return report;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export function gateCorrectionPrompt(reports: GateReport[]): string {
|
|
79
|
+
const failures = reports.flatMap(report => report.failures().map(check => `- ${report.gate} / ${check.item}: ${check.note}`));
|
|
80
|
+
return `Your previous work failed executable gates:\n${failures.join("\n")}\nCorrect the work in this same session, then re-emit ONLY your Report JSON.`;
|
|
81
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import { changedPaths, permitted, rollBack, snapshot, type PermissionPolicy, type PermissionSnapshot } from "./permissions.ts";
|
|
3
|
+
|
|
4
|
+
export class StartRefusedError extends Error {
|
|
5
|
+
readonly exitCode = 3;
|
|
6
|
+
}
|
|
7
|
+
export class GitOperationError extends Error {}
|
|
8
|
+
|
|
9
|
+
export interface FlowBranchMetadata {
|
|
10
|
+
branch: string;
|
|
11
|
+
flowName?: string;
|
|
12
|
+
runId?: string;
|
|
13
|
+
baseBranch?: string;
|
|
14
|
+
baseCommit?: string;
|
|
15
|
+
result?: "accepted" | "rejected";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function git(cwd: string, args: string[]): string {
|
|
19
|
+
const result = spawnSync("git", args, { cwd, encoding: "utf8" });
|
|
20
|
+
if (result.status !== 0) throw new GitOperationError((result.stderr || result.stdout || `git ${args.join(" ")} failed`).trim());
|
|
21
|
+
return result.stdout.trim();
|
|
22
|
+
}
|
|
23
|
+
function asStartRefusal(action: () => string): string {
|
|
24
|
+
try { return action(); }
|
|
25
|
+
catch (error) { throw new StartRefusedError(error instanceof Error ? error.message : String(error)); }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function isClean(cwd = process.cwd()): boolean {
|
|
29
|
+
return asStartRefusal(() => git(cwd, ["status", "--porcelain", "--untracked-files=all"])) === "";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function requireCleanTree(cwd = process.cwd(), allowDirty = false): void {
|
|
33
|
+
if (!allowDirty && !isClean(cwd)) throw new StartRefusedError("Flow start refused: working tree is dirty; commit/stash it or pass --allow-dirty.");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function flowBranchName(name: string, runId: string): string {
|
|
37
|
+
return `flow/${name}-${runId}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function configKey(branch: string, name: string): string { return `branch.${branch}.agentFleet${name}`; }
|
|
41
|
+
function optionalGit(cwd: string, args: string[]): string | undefined {
|
|
42
|
+
try { return git(cwd, args); } catch { return undefined; }
|
|
43
|
+
}
|
|
44
|
+
function writeBranchConfig(cwd: string, branch: string, name: string, value: string): void {
|
|
45
|
+
git(cwd, ["config", "--local", "--replace-all", configKey(branch, name), value]);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function readFlowBranchMetadata(branch: string, cwd = process.cwd()): FlowBranchMetadata {
|
|
49
|
+
const value = (name: string) => optionalGit(cwd, ["config", "--local", "--get", configKey(branch, name)]);
|
|
50
|
+
const flowName = value("FlowName"), runId = value("RunId"), baseBranch = value("BaseBranch"), baseCommit = value("BaseCommit"), result = value("Result");
|
|
51
|
+
return {
|
|
52
|
+
branch,
|
|
53
|
+
...(flowName ? { flowName } : {}), ...(runId ? { runId } : {}), ...(baseBranch ? { baseBranch } : {}), ...(baseCommit ? { baseCommit } : {}),
|
|
54
|
+
...(result === "accepted" || result === "rejected" ? { result } : {}),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function recordFlowResult(branch: string, result: "accepted" | "rejected", cwd = process.cwd()): void {
|
|
59
|
+
writeBranchConfig(cwd, branch, "Result", result);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function createFlowBranch(name: string, runId: string, cwd = process.cwd()): string {
|
|
63
|
+
const branch = flowBranchName(name, runId);
|
|
64
|
+
const baseBranch = optionalGit(cwd, ["branch", "--show-current"]);
|
|
65
|
+
const baseCommit = asStartRefusal(() => git(cwd, ["rev-parse", "HEAD"]));
|
|
66
|
+
asStartRefusal(() => git(cwd, ["switch", "-c", branch]));
|
|
67
|
+
try {
|
|
68
|
+
writeBranchConfig(cwd, branch, "FlowName", name);
|
|
69
|
+
writeBranchConfig(cwd, branch, "RunId", runId);
|
|
70
|
+
writeBranchConfig(cwd, branch, "BaseCommit", baseCommit);
|
|
71
|
+
if (baseBranch) writeBranchConfig(cwd, branch, "BaseBranch", baseBranch);
|
|
72
|
+
} catch (error) {
|
|
73
|
+
throw new GitOperationError(`Flow branch was created but its metadata could not be recorded: ${error instanceof Error ? error.message : String(error)}`);
|
|
74
|
+
}
|
|
75
|
+
return branch;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function commitAll(message: string, cwd: string, baseline: PermissionSnapshot, policy: PermissionPolicy = {}): string | null {
|
|
79
|
+
let after = snapshot(cwd);
|
|
80
|
+
const changed = changedPaths(baseline, after);
|
|
81
|
+
const preDirtyChanged = changed.filter(path => baseline.paths.has(path));
|
|
82
|
+
if (preDirtyChanged.length) {
|
|
83
|
+
rollBack(baseline, preDirtyChanged);
|
|
84
|
+
after = snapshot(cwd);
|
|
85
|
+
}
|
|
86
|
+
const introduced = changedPaths(baseline, after).filter(path => !baseline.paths.has(path));
|
|
87
|
+
const violations = introduced.filter(path => !permitted(path, policy, cwd));
|
|
88
|
+
if (violations.length) {
|
|
89
|
+
rollBack(baseline, violations);
|
|
90
|
+
throw new GitOperationError(`Flow introduced paths outside the commit policy: ${violations.join(", ")}`);
|
|
91
|
+
}
|
|
92
|
+
if (!introduced.length) return null;
|
|
93
|
+
git(cwd, ["add", "--", ...introduced]);
|
|
94
|
+
git(cwd, ["commit", "--only", "-m", message, "--", ...introduced]);
|
|
95
|
+
return git(cwd, ["rev-parse", "HEAD"]);
|
|
96
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { runAgentPhase, type SpawnAgent } from "./agent-phase.ts";
|
|
3
|
+
import type { MergeReport } from "./envelopes.ts";
|
|
4
|
+
import type { PermissionPolicy } from "./permissions.ts";
|
|
5
|
+
import type { PersonaDefinition } from "./personas.ts";
|
|
6
|
+
import type { Run } from "./run.ts";
|
|
7
|
+
import { integratorVoice, resolvePanel, type Voice } from "./voices.ts";
|
|
8
|
+
import { POLL_PERMISSION_POLICY, POLL_TOOLS, pollArtifactDir, type PollVoiceResult } from "./poll.ts";
|
|
9
|
+
import { withWriterLease, writerLeaseFile, WriterLeaseHeldError } from "./writer-lease.ts";
|
|
10
|
+
|
|
11
|
+
export const MERGE_APPLY_TOOLS = "read,grep,find,ls,edit,write";
|
|
12
|
+
export const MERGE_APPLY_PERMISSION_POLICY: PermissionPolicy = { writes: ["**"] };
|
|
13
|
+
|
|
14
|
+
export class MergeUnavailableError extends Error {
|
|
15
|
+
constructor(panel: string) {
|
|
16
|
+
super(`Merge is unavailable: panel "${panel}" has no voice with integrator: true.`);
|
|
17
|
+
this.name = "MergeUnavailableError";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface MergeOptions {
|
|
22
|
+
run: Run; cwd: string; persona: PersonaDefinition; panel: string; task: string; opinions: PollVoiceResult[];
|
|
23
|
+
voices?: Voice[]; spawn?: SpawnAgent; runAgent?: typeof runAgentPhase<MergeReport>;
|
|
24
|
+
apply?: boolean; command?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function mergedPath(cwd: string, runId: string): string {
|
|
28
|
+
return `${pollArtifactDir(cwd, runId)}/merged.md`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function mergeTask(question: string, opinions: PollVoiceResult[], apply = false): string {
|
|
32
|
+
const blocks = opinions.map(opinion => {
|
|
33
|
+
const body = opinion.ok ? `\`\`\`json\n${JSON.stringify(opinion.report, null, 2)}\n\`\`\`` : `FAILED: ${opinion.reason}`;
|
|
34
|
+
return `## ${opinion.voice.name} (${opinion.voice.model})\n\n${body}`;
|
|
35
|
+
});
|
|
36
|
+
return [
|
|
37
|
+
"Merge the independent poll opinions below into one attributed recommendation.",
|
|
38
|
+
"Do not invent claims that no voice made. Every consensus, divergence, minority, and rejected item must name a voice.",
|
|
39
|
+
"A minority opinion must not be dropped silently; rejecting it requires a reason.",
|
|
40
|
+
apply ? "You have write tools. Apply the recommendation to the working tree; stay inside the writes policy." : "You are read-only. Do not modify the working tree.",
|
|
41
|
+
"",
|
|
42
|
+
`Question:\n${question}`,
|
|
43
|
+
"",
|
|
44
|
+
"Opinions:",
|
|
45
|
+
...blocks,
|
|
46
|
+
].join("\n");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function writeMerged(cwd: string, runId: string, integrator: Voice, report: MergeReport): string {
|
|
50
|
+
const directory = pollArtifactDir(cwd, runId);
|
|
51
|
+
mkdirSync(directory, { recursive: true });
|
|
52
|
+
const path = mergedPath(cwd, runId);
|
|
53
|
+
writeFileSync(path, `# Merge (${integrator.name})\n\n- model: ${integrator.model}\n\n\`\`\`json\n${JSON.stringify(report, null, 2)}\n\`\`\`\n`, "utf8");
|
|
54
|
+
return path;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export async function runMerge(options: MergeOptions): Promise<{ report: MergeReport; integrator: Voice; path: string }> {
|
|
58
|
+
const voices = options.voices ?? resolvePanel(options.panel, options.cwd);
|
|
59
|
+
const integrator = integratorVoice(voices);
|
|
60
|
+
if (!integrator) throw new MergeUnavailableError(options.panel);
|
|
61
|
+
const apply = Boolean(options.apply);
|
|
62
|
+
const agent = options.runAgent ?? runAgentPhase<MergeReport>;
|
|
63
|
+
const spawnIntegrator = () => agent({
|
|
64
|
+
run: options.run,
|
|
65
|
+
persona: {
|
|
66
|
+
...options.persona,
|
|
67
|
+
tools: apply ? MERGE_APPLY_TOOLS : POLL_TOOLS,
|
|
68
|
+
writes: apply ? MERGE_APPLY_PERMISSION_POLICY.writes : [],
|
|
69
|
+
},
|
|
70
|
+
task: mergeTask(options.task, options.opinions, apply),
|
|
71
|
+
envelope: "merge", cwd: options.cwd, spawn: options.spawn,
|
|
72
|
+
model: integrator.model, thinking: integrator.thinking,
|
|
73
|
+
sessionTag: "merge",
|
|
74
|
+
permissionPolicy: apply ? MERGE_APPLY_PERMISSION_POLICY : POLL_PERMISSION_POLICY,
|
|
75
|
+
});
|
|
76
|
+
if (!apply) {
|
|
77
|
+
const report = await spawnIntegrator();
|
|
78
|
+
return { report, integrator, path: writeMerged(options.cwd, options.run.trace.runId, integrator, report) };
|
|
79
|
+
}
|
|
80
|
+
const command = options.command ?? (options.run.command.join(" ") || "flow poll --apply");
|
|
81
|
+
try {
|
|
82
|
+
const merged = await withWriterLease({ cwd: options.cwd, owner: `merge:${integrator.name}`, command }, async lease => {
|
|
83
|
+
options.run.trace.write("log", { phase: "merge", message: "writer lease acquired", lease: lease.file, owner: lease.record.owner, ownerCommand: lease.record.command });
|
|
84
|
+
const report = await spawnIntegrator();
|
|
85
|
+
return { report, integrator, path: writeMerged(options.cwd, options.run.trace.runId, integrator, report) };
|
|
86
|
+
});
|
|
87
|
+
options.run.trace.write("log", { phase: "merge", message: "writer lease released", lease: writerLeaseFile(options.cwd) });
|
|
88
|
+
return merged;
|
|
89
|
+
} catch (error) {
|
|
90
|
+
if (error instanceof WriterLeaseHeldError) {
|
|
91
|
+
options.run.trace.write("error", { phase: "merge", message: error.message, lease: error.file, owner: error.record.owner, ownerCommand: error.record.command });
|
|
92
|
+
}
|
|
93
|
+
throw error;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// The same inherited profile governs CLI workflows spawned by the hub and their children.
|
|
2
|
+
// Dynamic loading follows agent-phase.ts so the standalone workflow TS build stays local.
|
|
3
|
+
import type { Voice } from './voices.ts';
|
|
4
|
+
const runtimePath: string = '../../../../../.pi/harnesses/agent-hub/policy/profile-runtime.ts';
|
|
5
|
+
export const { readActiveProfile, profileAgent, profileFallback, assertProfileModel, profilePanel } = await import(runtimePath) as {
|
|
6
|
+
readActiveProfile(): {
|
|
7
|
+
name: string;
|
|
8
|
+
profile: {
|
|
9
|
+
defaults: {
|
|
10
|
+
model: string;
|
|
11
|
+
thinking?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
} | undefined;
|
|
15
|
+
profileAgent(name: string): {
|
|
16
|
+
model: string;
|
|
17
|
+
thinking?: string;
|
|
18
|
+
} | undefined;
|
|
19
|
+
profileFallback(model: string | undefined): string | undefined;
|
|
20
|
+
assertProfileModel(model: string): void;
|
|
21
|
+
profilePanel(name: string): Voice[] | undefined;
|
|
22
|
+
};
|