@chankov/agent-fleet 2.0.17 → 2.0.19
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/coms-claude-bridge.ts +75 -49
- package/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +18 -20
- package/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +3 -1
- package/.pi/agents/model-profiles.yaml +5 -5
- package/.pi/agents/peers.yaml +3 -3
- package/.pi/agents/voices.yaml +1 -1
- package/.pi/harnesses/agent-hub/README.md +35 -8
- package/.pi/harnesses/agent-hub/agentic-sources.ts +29 -5
- package/.pi/harnesses/agent-hub/config/overrides.ts +13 -3
- package/.pi/harnesses/agent-hub/delegate.ts +16 -5
- package/.pi/harnesses/agent-hub/deterministic-fs.ts +7 -4
- package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +13 -2
- package/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +2 -0
- package/.pi/harnesses/agent-hub/dispatch-native-types.ts +7 -0
- package/.pi/harnesses/agent-hub/dispatch-native.ts +1 -1
- package/.pi/harnesses/agent-hub/file-discovery/adapters.ts +82 -0
- package/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +56 -0
- package/.pi/harnesses/agent-hub/file-discovery/broker.ts +125 -0
- package/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +33 -0
- package/.pi/harnesses/agent-hub/file-discovery/descendant.ts +63 -0
- package/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
- package/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
- package/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +48 -0
- package/.pi/harnesses/agent-hub/file-discovery/hub.ts +152 -0
- package/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
- package/.pi/harnesses/agent-hub/file-discovery/owners.ts +96 -0
- package/.pi/harnesses/agent-hub/file-discovery/results.ts +54 -0
- package/.pi/harnesses/agent-hub/file-discovery/runtime.ts +120 -0
- package/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
- package/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
- package/.pi/harnesses/agent-hub/filesystem-tool.ts +74 -26
- package/.pi/harnesses/agent-hub/index.ts +23 -5
- package/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +3 -2
- package/.pi/harnesses/agent-hub/no-progress.ts +45 -15
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/policy/work-mode.ts +2 -1
- package/.pi/harnesses/agent-hub/proactive-config.ts +8 -3
- package/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
- package/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
- package/.pi/harnesses/agent-hub/proactive-local.ts +25 -7
- package/.pi/harnesses/agent-hub/proactive-observer.ts +2 -1
- package/.pi/harnesses/agent-hub/proactive-rules.ts +39 -11
- package/.pi/harnesses/agent-hub/proactive-runtime.ts +8 -6
- package/.pi/harnesses/agent-hub/proactive-snapshot.ts +49 -6
- package/.pi/harnesses/agent-hub/proactive-types.ts +5 -1
- package/.pi/harnesses/agent-hub/prompts/fragments.ts +21 -49
- package/.pi/harnesses/agent-hub/prompts/system-prompt.ts +2 -1
- package/.pi/harnesses/agent-hub/research/runtime.ts +7 -3
- package/.pi/harnesses/agent-hub/research/spawn-run.ts +17 -6
- package/.pi/harnesses/agent-hub/spawn.ts +38 -9
- package/.pi/harnesses/agent-hub/system1-communication-store.ts +39 -0
- package/.pi/harnesses/agent-hub/tools/action-executors.ts +6 -1
- package/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
- package/.pi/harnesses/agent-hub/tools/ask-system1.ts +1 -1
- package/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +4 -4
- package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +4 -2
- package/.pi/harnesses/agent-hub/tools/set-task-tier.ts +3 -3
- package/.pi/harnesses/agent-hub/tools/spawn-research.ts +3 -1
- package/.pi/harnesses/agent-hub/ui/system1-communication.ts +1 -1
- package/.pi/harnesses/agent-hub/work-mode.ts +3 -0
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/context-budget-child-prompt.ts +3 -2
- package/.pi/harnesses/lib/deterministic-handle-path.ts +2 -0
- package/.pi/harnesses/lib/policy-roots.js +106 -0
- package/.pi/harnesses/lib/policy-roots.ts +31 -0
- package/.pi/harnesses/lib/system1/config-agentic.js +2 -1
- package/.pi/harnesses/lib/system1/config-file-discovery.js +21 -0
- package/.pi/harnesses/lib/system1/config-proactive.js +13 -2
- package/.pi/harnesses/lib/system1/config-v2.js +8 -5
- package/.versions/2.0.18/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.18/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.18/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/coms-claude-bridge.ts +437 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/fleet.ts +217 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/flow.ts +157 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +36 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.18/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.18/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.18/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.0.18/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.18/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.18/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.18/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.18/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.18/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.18/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.18/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.18/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.18/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.18/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.18/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.18/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.18/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.18/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.18/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.18/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.18/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.18/.pi/extensions/package.json +9 -0
- package/.versions/2.0.18/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.18/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.18/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.18/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.18/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.18/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.18/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/README.md +1483 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/acceptance.ts +199 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/agentic-hub.ts +54 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/context.ts +47 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/config/agents.ts +178 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/config/overrides.ts +165 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/context/budgets.ts +206 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/delegate.ts +478 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/deterministic-fs.ts +169 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +270 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +233 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-native-types.ts +267 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-native.ts +234 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/adapters.ts +82 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +56 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/broker.ts +125 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +33 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/descendant.ts +63 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +48 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/hub.ts +152 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +99 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/owners.ts +96 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/results.ts +54 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/runtime.ts +120 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/filesystem-tool.ts +185 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/fixtures/registration-surface.json +65 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/index.ts +2625 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +133 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +144 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/no-progress.ts +593 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/orchestration-activation.ts +112 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/orchestration-route.ts +76 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/policy/work-mode.ts +137 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-config.ts +21 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-external-git.ts +59 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-external.ts +77 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-snapshot.ts +258 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/proactive-types.ts +67 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/process-obligations.ts +158 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/prompts/context.ts +56 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/prompts/fragments.ts +95 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/prompts/system-prompt.ts +125 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/recovery-contract.ts +150 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/research/runtime.ts +201 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/research/spawn-run.ts +194 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/return-contract.js +349 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/review-findings.js +104 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/run-budget.js +554 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/scope-gate.js +144 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/session-audit.ts +313 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/spawn.ts +563 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/system1-communication-store.ts +190 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/system1-runtime.ts +258 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-triage-authorization.ts +122 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-triage-config.ts +29 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-triage-obligations.ts +104 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-triage-runtime.ts +125 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/action-executors.ts +213 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/context.ts +144 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +560 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/herdr-executors.ts +95 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/work-mode.ts +187 -0
- package/.versions/2.0.18/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.18/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.18/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.18/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.18/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.18/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
- package/.versions/2.0.18/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.18/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.18/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.18/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.18/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.18/.pi/harnesses/damage-control-continue/index.ts +533 -0
- package/.versions/2.0.18/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.18/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.18/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.18/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.18/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.18/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.18/.pi/harnesses/lib/context-budget-child-prompt.ts +220 -0
- package/.versions/2.0.18/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
- package/.versions/2.0.18/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.18/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.18/.pi/harnesses/lib/damage-control-shared.ts +226 -0
- package/.versions/2.0.18/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.0.18/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.18/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.18/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.18/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.18/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.18/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.18/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.18/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.18/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.18/.pi/harnesses/lib/policy-roots.ts +142 -0
- package/.versions/2.0.18/.pi/harnesses/lib/safe-source-read.js +29 -0
- package/.versions/2.0.18/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/config-agentic.js +15 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/config-file-discovery.js +21 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/config-loader.js +44 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/config-proactive.js +68 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/config-v2.js +106 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/config.js +50 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/contracts.ts +154 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/demo.ts +95 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.0.18/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.18/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.18/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.18/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.18/.pi/prompts/af-build.md +27 -0
- package/.versions/2.0.18/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.18/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.18/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.18/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.18/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.18/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.18/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.18/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.18/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.18/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.18/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.18/.version +1 -0
- package/.versions/2.0.18/agents/architect.md +24 -0
- package/.versions/2.0.18/agents/bowser.md +28 -0
- package/.versions/2.0.18/agents/builder.md +55 -0
- package/.versions/2.0.18/agents/code-reviewer.md +209 -0
- package/.versions/2.0.18/agents/deep-researcher.md +32 -0
- package/.versions/2.0.18/agents/documenter.md +22 -0
- package/.versions/2.0.18/agents/orchestrator.md +22 -0
- package/.versions/2.0.18/agents/plan-reviewer.md +83 -0
- package/.versions/2.0.18/agents/planner.md +105 -0
- package/.versions/2.0.18/agents/releaser.md +24 -0
- package/.versions/2.0.18/agents/researcher.md +30 -0
- package/.versions/2.0.18/agents/security-auditor.md +167 -0
- package/.versions/2.0.18/agents/test-engineer.md +153 -0
- package/.versions/2.0.18/agents/web-debugger.md +44 -0
- package/.versions/2.0.18/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.18/bin/catalog/harness-runtime-closure.json +73 -0
- package/.versions/2.0.18/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.18/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.18/docs/ARCHITECTURE.md +874 -0
- package/.versions/2.0.18/docs/agent-fleet-setup.md +1101 -0
- package/.versions/2.0.18/docs/claude-code-coms-bridge.md +147 -0
- package/.versions/2.0.18/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.18/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.18/docs/getting-started.md +126 -0
- package/.versions/2.0.18/docs/npm-install.md +535 -0
- package/.versions/2.0.18/docs/pi-extensions.md +454 -0
- package/.versions/2.0.18/docs/pi-setup.md +92 -0
- package/.versions/2.0.18/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.18/install-manifest.json +3193 -0
- package/.versions/2.0.18/justfile +247 -0
- package/.versions/2.0.18/manifest-meta.json +1071 -0
- package/.versions/2.0.18/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.18/references/communication-contract.md +26 -0
- package/.versions/2.0.18/references/definition-of-done.md +67 -0
- package/.versions/2.0.18/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.18/references/observability-checklist.md +92 -0
- package/.versions/2.0.18/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.18/references/performance-checklist.md +236 -0
- package/.versions/2.0.18/references/prompting-patterns.md +380 -0
- package/.versions/2.0.18/references/security-checklist.md +245 -0
- package/.versions/2.0.18/references/testing-patterns.md +235 -0
- package/.versions/2.0.18/references/workflow-authoring.md +304 -0
- package/.versions/2.0.18/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.18/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.18/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.18/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.18/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.18/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.18/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.18/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.18/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.18/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.18/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.18/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.18/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.18/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.18/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.18/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.18/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.18/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.18/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.18/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.0.18/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.18/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.18/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.18/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.18/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.0.18/skills/repository-ai-setup/SKILL.md +135 -0
- package/.versions/2.0.18/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.0.18/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.0.18/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.0.18/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.0.18/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.0.18/skills/repository-ai-setup.zip +0 -0
- package/.versions/2.0.18/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.18/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.18/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.18/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.0.19/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.0.19/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/coms-claude-bridge.ts +437 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/fleet.ts +217 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/flow.ts +157 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/package-lock.json +35 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/package.json +9 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +36 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.0.19/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.0.19/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.0.19/.pi/agents/model-profiles.yaml +134 -0
- package/.versions/2.0.19/.pi/agents/peers.yaml +147 -0
- package/.versions/2.0.19/.pi/agents/teams.yaml +41 -0
- package/.versions/2.0.19/.pi/agents/voices.yaml +13 -0
- package/.versions/2.0.19/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.0.19/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.0.19/.pi/extensions/btw/index.ts +914 -0
- package/.versions/2.0.19/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.0.19/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.0.19/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.0.19/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.0.19/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.0.19/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.0.19/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/2.0.19/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.0.19/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.0.19/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.0.19/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.0.19/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.0.19/.pi/extensions/package.json +9 -0
- package/.versions/2.0.19/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.0.19/.pi/extensions/pi-voice-stt/config.ts +198 -0
- package/.versions/2.0.19/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.0.19/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.0.19/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.0.19/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.0.19/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/README.md +1483 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/acceptance.ts +199 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/access-approval.ts +135 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/agentic-hub.ts +54 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/assist-profile.ts +16 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/budget-continuation.ts +13 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/budget-recovery.ts +214 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/budget-continue.ts +10 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/context.ts +47 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/config/agents.ts +178 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/config/model-profiles.ts +236 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/config/overrides.ts +165 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/context/budgets.ts +206 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/delegate.ts +478 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/deterministic-fs.ts +169 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-coms.ts +252 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +270 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +233 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-native-types.ts +267 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-native.ts +234 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/external-blocker.js +85 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/adapters.ts +82 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +56 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/broker.ts +125 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +33 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/descendant.ts +63 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +48 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/hub.ts +152 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +99 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/owners.ts +96 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/results.ts +54 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/runtime.ts +120 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/filesystem-tool.ts +185 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/fixtures/registration-surface.json +66 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/footer.ts +30 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/helpers.ts +270 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/hub-state-audit.js +65 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/index.ts +2625 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +133 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +144 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +74 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/no-progress.ts +593 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/orchestration-activation.ts +112 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/orchestration-route.ts +76 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/policy/work-mode.ts +137 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/poll-command.ts +176 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/presentation.ts +48 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-config.ts +21 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-snapshot.ts +271 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/proactive-types.ts +67 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/process-obligations.ts +158 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/prompts/context.ts +56 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/prompts/fragments.ts +95 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/prompts/system-prompt.ts +125 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/recovery-contract.ts +150 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/research/runtime.ts +201 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/research/spawn-run.ts +194 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/return-contract.js +349 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/review-findings.js +104 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/run-budget.js +554 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/runtime-test-check.ts +54 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/scope-gate.js +144 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/session-audit.ts +313 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/spawn.ts +563 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/system1-communication-store.ts +190 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/system1-runtime.ts +258 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-triage-authorization.ts +122 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-triage-config.ts +29 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-triage-obligations.ts +104 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-triage-runtime.ts +125 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +68 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/action-executors.ts +213 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/context.ts +144 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +560 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/herdr-executors.ts +95 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/context-budget.ts +87 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/work-mode.ts +187 -0
- package/.versions/2.0.19/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
- package/.versions/2.0.19/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.0.19/.pi/harnesses/ask-user-remote/index.ts +558 -0
- package/.versions/2.0.19/.pi/harnesses/ask-user-remote/questions.ts +161 -0
- package/.versions/2.0.19/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.0.19/.pi/harnesses/ask-user-remote/runtime-ask.ts +68 -0
- package/.versions/2.0.19/.pi/harnesses/coms/README.md +100 -0
- package/.versions/2.0.19/.pi/harnesses/coms/index.ts +282 -0
- package/.versions/2.0.19/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.0.19/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.0.19/.pi/harnesses/damage-control-continue/README.md +135 -0
- package/.versions/2.0.19/.pi/harnesses/damage-control-continue/index.ts +533 -0
- package/.versions/2.0.19/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.0.19/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.0.19/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.0.19/.pi/harnesses/lib/coms-core-io.ts +385 -0
- package/.versions/2.0.19/.pi/harnesses/lib/coms-core.ts +577 -0
- package/.versions/2.0.19/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
- package/.versions/2.0.19/.pi/harnesses/lib/context-budget-child-prompt.ts +220 -0
- package/.versions/2.0.19/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
- package/.versions/2.0.19/.pi/harnesses/lib/context-budget-view.ts +107 -0
- package/.versions/2.0.19/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.0.19/.pi/harnesses/lib/damage-control-shared.ts +226 -0
- package/.versions/2.0.19/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.0.19/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.0.19/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.0.19/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.0.19/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.0.19/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.0.19/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.0.19/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.0.19/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.0.19/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.0.19/.pi/harnesses/lib/policy-roots.js +106 -0
- package/.versions/2.0.19/.pi/harnesses/lib/policy-roots.ts +31 -0
- package/.versions/2.0.19/.pi/harnesses/lib/safe-source-read.js +29 -0
- package/.versions/2.0.19/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/config-agentic.js +15 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/config-file-discovery.js +21 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/config-loader.js +44 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/config-proactive.js +68 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/config-v2.js +106 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/config.js +50 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/contracts.ts +154 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/demo.ts +95 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.0.19/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.0.19/.pi/harnesses/lib/update-check.ts +222 -0
- package/.versions/2.0.19/.pi/harnesses/package-lock.json +2039 -0
- package/.versions/2.0.19/.pi/harnesses/package.json +10 -0
- package/.versions/2.0.19/.pi/prompts/af-build.md +27 -0
- package/.versions/2.0.19/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.0.19/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.0.19/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.0.19/.pi/prompts/af-review.md +16 -0
- package/.versions/2.0.19/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.0.19/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.0.19/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.0.19/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.0.19/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.0.19/.pi/prompts/af-test.md +19 -0
- package/.versions/2.0.19/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.0.19/.version +1 -0
- package/.versions/2.0.19/agents/architect.md +24 -0
- package/.versions/2.0.19/agents/bowser.md +28 -0
- package/.versions/2.0.19/agents/builder.md +55 -0
- package/.versions/2.0.19/agents/code-reviewer.md +209 -0
- package/.versions/2.0.19/agents/deep-researcher.md +32 -0
- package/.versions/2.0.19/agents/documenter.md +22 -0
- package/.versions/2.0.19/agents/orchestrator.md +22 -0
- package/.versions/2.0.19/agents/plan-reviewer.md +83 -0
- package/.versions/2.0.19/agents/planner.md +105 -0
- package/.versions/2.0.19/agents/releaser.md +24 -0
- package/.versions/2.0.19/agents/researcher.md +30 -0
- package/.versions/2.0.19/agents/security-auditor.md +167 -0
- package/.versions/2.0.19/agents/test-engineer.md +153 -0
- package/.versions/2.0.19/agents/web-debugger.md +44 -0
- package/.versions/2.0.19/agents/web-performance-auditor.md +194 -0
- package/.versions/2.0.19/bin/catalog/harness-runtime-closure.json +73 -0
- package/.versions/2.0.19/codex/fleet-session-client/SKILL.md +34 -0
- package/.versions/2.0.19/codex/fleet-session-client.zip +0 -0
- package/.versions/2.0.19/docs/ARCHITECTURE.md +874 -0
- package/.versions/2.0.19/docs/agent-fleet-setup.md +1101 -0
- package/.versions/2.0.19/docs/claude-code-coms-bridge.md +147 -0
- package/.versions/2.0.19/docs/codex-session-bridge.md +219 -0
- package/.versions/2.0.19/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.0.19/docs/getting-started.md +126 -0
- package/.versions/2.0.19/docs/npm-install.md +535 -0
- package/.versions/2.0.19/docs/pi-extensions.md +454 -0
- package/.versions/2.0.19/docs/pi-setup.md +92 -0
- package/.versions/2.0.19/docs/skill-anatomy.md +150 -0
- package/.versions/2.0.19/install-manifest.json +3197 -0
- package/.versions/2.0.19/justfile +247 -0
- package/.versions/2.0.19/manifest-meta.json +1075 -0
- package/.versions/2.0.19/references/accessibility-checklist.md +160 -0
- package/.versions/2.0.19/references/communication-contract.md +26 -0
- package/.versions/2.0.19/references/definition-of-done.md +67 -0
- package/.versions/2.0.19/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.0.19/references/observability-checklist.md +92 -0
- package/.versions/2.0.19/references/orchestration-patterns.md +370 -0
- package/.versions/2.0.19/references/performance-checklist.md +236 -0
- package/.versions/2.0.19/references/prompting-patterns.md +380 -0
- package/.versions/2.0.19/references/security-checklist.md +245 -0
- package/.versions/2.0.19/references/testing-patterns.md +235 -0
- package/.versions/2.0.19/references/workflow-authoring.md +304 -0
- package/.versions/2.0.19/skills/_internal/grilling.md +59 -0
- package/.versions/2.0.19/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.0.19/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.19/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.0.19/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.0.19/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.19/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.0.19/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.19/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.0.19/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.0.19/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.0.19/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.0.19/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.19/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.0.19/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.0.19/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.19/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.19/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.19/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.19/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.0.19/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.0.19/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.0.19/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.0.19/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.19/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.0.19/skills/repository-ai-setup/SKILL.md +135 -0
- package/.versions/2.0.19/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.0.19/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.0.19/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.0.19/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.0.19/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.0.19/skills/repository-ai-setup.zip +0 -0
- package/.versions/2.0.19/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.19/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.0.19/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.0.19/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +12 -0
- package/README.md +2 -2
- package/agents/architect.md +2 -2
- package/agents/bowser.md +1 -1
- package/agents/builder.md +5 -5
- package/agents/code-reviewer.md +2 -2
- package/agents/deep-researcher.md +2 -2
- package/agents/documenter.md +3 -3
- package/agents/orchestrator.md +2 -2
- package/agents/plan-reviewer.md +2 -2
- package/agents/planner.md +4 -4
- package/agents/releaser.md +2 -2
- package/agents/researcher.md +2 -2
- package/agents/security-auditor.md +2 -2
- package/agents/test-engineer.md +4 -4
- package/agents/web-debugger.md +2 -2
- package/agents/web-performance-auditor.md +2 -2
- package/bin/cli.js +3 -3
- package/bin/lib/doctor.js +8 -2
- package/bin/lib/external-content.js +33 -0
- package/bin/lib/project-provenance.js +19 -13
- package/bin/lib/system1-migration.js +17 -8
- package/bin/lib/system1-policy-context.js +57 -0
- package/bin/lib/transaction.js +33 -2
- package/docs/ARCHITECTURE.md +42 -2
- package/docs/agent-fleet-setup.md +5 -5
- package/docs/claude-code-coms-bridge.md +17 -4
- package/docs/external-project-ai-content.md +64 -0
- package/docs/npm-install.md +5 -0
- package/docs/system1-agentic.md +27 -0
- package/docs/system1-config.md +23 -1
- package/docs/system1-file-discovery.md +220 -0
- package/install-manifest.json +5 -1
- package/manifest-meta.json +4 -0
- package/package.json +15 -6
- package/skills/repository-ai-setup/SKILL.md +18 -0
- package/skills/repository-ai-setup.zip +0 -0
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent";
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
|
+
import * as net from "node:net";
|
|
4
|
+
import * as path from "node:path";
|
|
5
|
+
|
|
6
|
+
import { buildLiveRegistryEntry } from "./coms-registry-entry.ts";
|
|
7
|
+
import {
|
|
8
|
+
HerdrAgentWatch,
|
|
9
|
+
HerdrPresence,
|
|
10
|
+
herdrPaneId,
|
|
11
|
+
herdrPresenceAvailable,
|
|
12
|
+
peerNameFrom,
|
|
13
|
+
type HerdrAgentInfo,
|
|
14
|
+
} from "./herdr-presence.ts";
|
|
15
|
+
import {
|
|
16
|
+
COMS_DIR,
|
|
17
|
+
KEEPALIVE_INTERVAL_MS,
|
|
18
|
+
LINE_CAP_BYTES,
|
|
19
|
+
MAX_HOPS,
|
|
20
|
+
PING_INTERVAL_MS,
|
|
21
|
+
TIMEOUT_MS,
|
|
22
|
+
bindEndpoint,
|
|
23
|
+
fallbackColor,
|
|
24
|
+
isValidHex,
|
|
25
|
+
listProjects,
|
|
26
|
+
makeEndpoint,
|
|
27
|
+
nowIso,
|
|
28
|
+
projectAgentsDir,
|
|
29
|
+
pruneDeadEntries,
|
|
30
|
+
pruneDeadEntriesAllProjects,
|
|
31
|
+
readCliFlags,
|
|
32
|
+
readFrontmatterFromArgv,
|
|
33
|
+
removeRegistryEntry,
|
|
34
|
+
resolveUniqueName,
|
|
35
|
+
sendEnvelope,
|
|
36
|
+
ulid,
|
|
37
|
+
writeRegistryAtomic,
|
|
38
|
+
type AgentCard,
|
|
39
|
+
type ComsIdentity,
|
|
40
|
+
type InboundContext,
|
|
41
|
+
type PendingReply,
|
|
42
|
+
type PeerStatus,
|
|
43
|
+
type PingEnvelope,
|
|
44
|
+
type Pong,
|
|
45
|
+
type PromptEnvelope,
|
|
46
|
+
type RegistryEntry,
|
|
47
|
+
type ResponseEnvelope,
|
|
48
|
+
} from "./coms-core-io.ts";
|
|
49
|
+
|
|
50
|
+
export * from "./coms-core-io.ts";
|
|
51
|
+
|
|
52
|
+
export interface ComsListParams {
|
|
53
|
+
project?: string;
|
|
54
|
+
include_explicit?: boolean;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ComsSendParams {
|
|
58
|
+
target: string;
|
|
59
|
+
prompt: string;
|
|
60
|
+
conversation_id?: string | null;
|
|
61
|
+
response_schema?: object | null;
|
|
62
|
+
reply_timeout_ms?: number | null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface ComsSendResult {
|
|
66
|
+
msg_id: string;
|
|
67
|
+
target: string;
|
|
68
|
+
target_session: string;
|
|
69
|
+
hops: number;
|
|
70
|
+
promise: PendingReply["promise"];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ComsListResult {
|
|
74
|
+
agents: Array<{
|
|
75
|
+
name: string;
|
|
76
|
+
session_id: string;
|
|
77
|
+
purpose: string;
|
|
78
|
+
model: string;
|
|
79
|
+
cwd: string;
|
|
80
|
+
project: string;
|
|
81
|
+
alive: boolean;
|
|
82
|
+
context_used_pct: number | null;
|
|
83
|
+
pane_id: string | null;
|
|
84
|
+
status: PeerStatus | null;
|
|
85
|
+
queue_depth: number | null;
|
|
86
|
+
color: string;
|
|
87
|
+
}>;
|
|
88
|
+
project: string;
|
|
89
|
+
scoped: true;
|
|
90
|
+
widenRequested: boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface CreateComsPeerDeps {
|
|
94
|
+
pi: ExtensionAPI;
|
|
95
|
+
getContext: () => ExtensionContext | null;
|
|
96
|
+
onPeersChanged?: () => void;
|
|
97
|
+
acceptInbound?: () => string | null;
|
|
98
|
+
handleCustomEnvelope?: (socket: net.Socket, envelope: any) => boolean;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface ConnectComsOptions {
|
|
102
|
+
ctx: ExtensionContext;
|
|
103
|
+
defaultNamePrefix: string;
|
|
104
|
+
defaultPurpose: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type ComsConnectStage = "dirs" | "bind" | "registry";
|
|
108
|
+
|
|
109
|
+
export class ComsConnectError extends Error {
|
|
110
|
+
readonly stage: ComsConnectStage;
|
|
111
|
+
|
|
112
|
+
constructor(stage: ComsConnectStage, cause: unknown) {
|
|
113
|
+
super(cause instanceof Error ? cause.message : String(cause), { cause });
|
|
114
|
+
this.name = "ComsConnectError";
|
|
115
|
+
this.stage = stage;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function createComsPeer(deps: CreateComsPeerDeps) {
|
|
120
|
+
const { pi } = deps;
|
|
121
|
+
const peerCards = new Map<string, AgentCard & { staleCount: number }>();
|
|
122
|
+
const pendingReplies = new Map<string, PendingReply>();
|
|
123
|
+
const inboundQueue = new Map<string, InboundContext>();
|
|
124
|
+
const scope = { includeExplicit: false, displayProject: null as string | null };
|
|
125
|
+
let identity: ComsIdentity | null = null;
|
|
126
|
+
let currentInbound: InboundContext | null = null;
|
|
127
|
+
let server: net.Server | null = null;
|
|
128
|
+
let pingTimer: NodeJS.Timeout | null = null;
|
|
129
|
+
let keepaliveTimer: NodeJS.Timeout | null = null;
|
|
130
|
+
let herdrPresence: HerdrPresence | null = null;
|
|
131
|
+
let herdrWatch: HerdrAgentWatch | null = null;
|
|
132
|
+
let turnState: "idle" | "working" = "idle";
|
|
133
|
+
let shuttingDown = false;
|
|
134
|
+
|
|
135
|
+
const changed = () => deps.onPeersChanged?.();
|
|
136
|
+
const audit = (entry: Record<string, unknown>) => {
|
|
137
|
+
try { pi.appendEntry("coms-log", entry); } catch { /* best effort */ }
|
|
138
|
+
};
|
|
139
|
+
const ack = (socket: net.Socket, msgId: string) => {
|
|
140
|
+
try { socket.write(`${JSON.stringify({ type: "ack", msg_id: msgId })}\n`); } catch { /* ignore */ }
|
|
141
|
+
try { socket.end(); } catch { /* ignore */ }
|
|
142
|
+
};
|
|
143
|
+
const nack = (socket: net.Socket, msgId: string, error: string) => {
|
|
144
|
+
try { socket.write(`${JSON.stringify({ type: "nack", msg_id: msgId, error })}\n`); } catch { /* ignore */ }
|
|
145
|
+
try { socket.end(); } catch { /* ignore */ }
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
function peersInScope(): RegistryEntry[] {
|
|
149
|
+
if (!identity) return [];
|
|
150
|
+
const filter = scope.displayProject ?? identity.project;
|
|
151
|
+
const entries = filter === "*" ? pruneDeadEntriesAllProjects() : pruneDeadEntries(filter);
|
|
152
|
+
return entries.filter(entry => entry.session_id !== identity!.session_id && (scope.includeExplicit || !entry.explicit));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function resolveTarget(target: string): RegistryEntry | null {
|
|
156
|
+
const entries = peersInScope();
|
|
157
|
+
return entries.find(entry => entry.name === target) ?? entries.find(entry => entry.session_id === target) ?? null;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function herdrSyncPeerCards(agents: HerdrAgentInfo[]): void {
|
|
161
|
+
if (!identity) return;
|
|
162
|
+
const liveNames = new Set(agents.map(peerNameFrom).filter((name): name is string => !!name));
|
|
163
|
+
const liveSessions = new Set<string>();
|
|
164
|
+
let didChange = false;
|
|
165
|
+
for (const entry of peersInScope()) {
|
|
166
|
+
if (!liveNames.has(entry.name)) continue;
|
|
167
|
+
liveSessions.add(entry.session_id);
|
|
168
|
+
const next = {
|
|
169
|
+
name: entry.name, purpose: entry.purpose, model: entry.model, color: entry.color,
|
|
170
|
+
context_used_pct: entry.context_used_pct ?? 0, queue_depth: entry.queue_depth ?? 0, staleCount: 0,
|
|
171
|
+
};
|
|
172
|
+
const previous = peerCards.get(entry.session_id);
|
|
173
|
+
if (!previous || JSON.stringify(previous) !== JSON.stringify(next)) {
|
|
174
|
+
peerCards.set(entry.session_id, next);
|
|
175
|
+
didChange = true;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
for (const sessionId of [...peerCards.keys()]) {
|
|
179
|
+
if (sessionId !== identity.session_id && !liveSessions.has(sessionId)) {
|
|
180
|
+
peerCards.delete(sessionId);
|
|
181
|
+
didChange = true;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (didChange) changed();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function handlePrompt(socket: net.Socket, envelope: PromptEnvelope): void {
|
|
188
|
+
const refusal = deps.acceptInbound?.();
|
|
189
|
+
if (refusal) { nack(socket, envelope.msg_id, refusal); return; }
|
|
190
|
+
if (typeof envelope.hops !== "number" || envelope.hops >= MAX_HOPS) {
|
|
191
|
+
nack(socket, envelope.msg_id, "hops exceeded");
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
const inbound: InboundContext = {
|
|
195
|
+
msg_id: envelope.msg_id,
|
|
196
|
+
hops: envelope.hops,
|
|
197
|
+
sender_endpoint: envelope.sender_endpoint,
|
|
198
|
+
sender_session: envelope.sender_session,
|
|
199
|
+
response_schema: envelope.response_schema ?? null,
|
|
200
|
+
fulfilled: false,
|
|
201
|
+
};
|
|
202
|
+
inboundQueue.set(envelope.msg_id, inbound);
|
|
203
|
+
currentInbound = inbound;
|
|
204
|
+
try {
|
|
205
|
+
pi.sendMessage({
|
|
206
|
+
customType: "coms-inbound",
|
|
207
|
+
content: `[from ${envelope.sender_name} @ ${envelope.sender_cwd}]\n\n${envelope.prompt}`,
|
|
208
|
+
display: true,
|
|
209
|
+
details: { msg_id: envelope.msg_id, sender_session: envelope.sender_session, response_schema: envelope.response_schema ?? null },
|
|
210
|
+
}, { deliverAs: "followUp", triggerTurn: true });
|
|
211
|
+
} catch {
|
|
212
|
+
inboundQueue.delete(envelope.msg_id);
|
|
213
|
+
currentInbound = null;
|
|
214
|
+
nack(socket, envelope.msg_id, "internal error");
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
ack(socket, envelope.msg_id);
|
|
218
|
+
audit({ event: "inbound_prompt", msg_id: envelope.msg_id, sender: envelope.sender_session, hops: envelope.hops });
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function handleResponse(socket: net.Socket, envelope: ResponseEnvelope): void {
|
|
222
|
+
const pending = pendingReplies.get(envelope.msg_id);
|
|
223
|
+
if (pending) {
|
|
224
|
+
if (pending.timer) { try { clearTimeout(pending.timer); } catch { /* ignore */ } pending.timer = null; }
|
|
225
|
+
pending.result = { response: envelope.response, error: envelope.error ?? null };
|
|
226
|
+
try { pending.resolve(pending.result); } catch { /* ignore */ }
|
|
227
|
+
} else {
|
|
228
|
+
audit({ event: "orphan_response", msg_id: envelope.msg_id });
|
|
229
|
+
}
|
|
230
|
+
ack(socket, envelope.msg_id);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function handlePing(socket: net.Socket, envelope: PingEnvelope): void {
|
|
234
|
+
const ctx = deps.getContext();
|
|
235
|
+
const card: AgentCard = {
|
|
236
|
+
name: identity?.name ?? "unknown",
|
|
237
|
+
purpose: identity?.purpose ?? "",
|
|
238
|
+
model: ctx?.model?.id ?? identity?.model ?? "unknown",
|
|
239
|
+
color: identity?.color ?? "#36F9F6",
|
|
240
|
+
context_used_pct: Math.round(ctx?.getContextUsage()?.percent ?? 0),
|
|
241
|
+
queue_depth: inboundQueue.size,
|
|
242
|
+
pane_id: herdrPaneId() ?? null,
|
|
243
|
+
status: turnState === "working" || inboundQueue.size > 0 ? "working" : "idle",
|
|
244
|
+
};
|
|
245
|
+
try { socket.write(`${JSON.stringify({ type: "pong", msg_id: envelope.msg_id, agent_card: card })}\n`); } catch { /* ignore */ }
|
|
246
|
+
try { socket.end(); } catch { /* ignore */ }
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function connectionHandler(socket: net.Socket): void {
|
|
250
|
+
let buffer = "";
|
|
251
|
+
let handled = false;
|
|
252
|
+
const onData = (chunk: Buffer) => {
|
|
253
|
+
if (handled) return;
|
|
254
|
+
buffer += chunk.toString("utf8");
|
|
255
|
+
if (buffer.length > LINE_CAP_BYTES) {
|
|
256
|
+
handled = true;
|
|
257
|
+
socket.removeListener("data", onData);
|
|
258
|
+
nack(socket, "", "malformed envelope");
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
const newline = buffer.indexOf("\n");
|
|
262
|
+
if (newline < 0) return;
|
|
263
|
+
handled = true;
|
|
264
|
+
socket.removeListener("data", onData);
|
|
265
|
+
let parsed: any;
|
|
266
|
+
try { parsed = JSON.parse(buffer.slice(0, newline)); } catch { nack(socket, "", "malformed envelope"); return; }
|
|
267
|
+
if (!parsed || typeof parsed !== "object" || typeof parsed.type !== "string" || typeof parsed.msg_id !== "string" || typeof parsed.sender_session !== "string" || typeof parsed.sender_endpoint !== "string") {
|
|
268
|
+
nack(socket, typeof parsed?.msg_id === "string" ? parsed.msg_id : "", "malformed envelope");
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
try {
|
|
272
|
+
if (parsed.type === "prompt") handlePrompt(socket, parsed);
|
|
273
|
+
else if (parsed.type === "response") handleResponse(socket, parsed);
|
|
274
|
+
else if (parsed.type === "ping") handlePing(socket, parsed);
|
|
275
|
+
else if (!deps.handleCustomEnvelope?.(socket, parsed)) nack(socket, parsed.msg_id, "unknown type");
|
|
276
|
+
} catch {
|
|
277
|
+
nack(socket, parsed.msg_id, "internal error");
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
socket.on("data", onData);
|
|
281
|
+
socket.once("error", () => { try { socket.destroy(); } catch { /* ignore */ } });
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function writeLiveRegistry(): void {
|
|
285
|
+
if (!identity) return;
|
|
286
|
+
const ctx = deps.getContext();
|
|
287
|
+
try {
|
|
288
|
+
writeRegistryAtomic(buildLiveRegistryEntry(identity, {
|
|
289
|
+
now: nowIso(), pid: process.pid, model: ctx?.model?.id,
|
|
290
|
+
contextUsedPct: ctx?.getContextUsage()?.percent, queueDepth: inboundQueue.size,
|
|
291
|
+
}), identity.project);
|
|
292
|
+
} catch { /* best effort */ }
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
async function refresh(): Promise<void> {
|
|
296
|
+
if (!identity) return;
|
|
297
|
+
const peers = peersInScope();
|
|
298
|
+
const results = await Promise.allSettled(peers.map(async entry => {
|
|
299
|
+
const pong = await sendEnvelope(entry.endpoint, {
|
|
300
|
+
type: "ping", msg_id: ulid(), sender_session: identity!.session_id,
|
|
301
|
+
sender_endpoint: identity!.endpoint, hops: 0, timestamp: nowIso(),
|
|
302
|
+
} as PingEnvelope);
|
|
303
|
+
return { entry, pong: pong as Pong };
|
|
304
|
+
}));
|
|
305
|
+
const seen = new Set<string>();
|
|
306
|
+
let didChange = false;
|
|
307
|
+
for (const result of results) {
|
|
308
|
+
if (result.status !== "fulfilled" || !result.value.pong?.agent_card) continue;
|
|
309
|
+
seen.add(result.value.entry.session_id);
|
|
310
|
+
const next = { ...result.value.pong.agent_card, staleCount: 0 };
|
|
311
|
+
const previous = peerCards.get(result.value.entry.session_id);
|
|
312
|
+
if (!previous || JSON.stringify({ ...previous, staleCount: 0 }) !== JSON.stringify(next)) {
|
|
313
|
+
peerCards.set(result.value.entry.session_id, next);
|
|
314
|
+
didChange = true;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
for (const [sessionId, card] of peerCards) {
|
|
318
|
+
if (sessionId === identity.session_id || seen.has(sessionId)) continue;
|
|
319
|
+
card.staleCount = (card.staleCount ?? 0) + 1;
|
|
320
|
+
if (card.staleCount > 6) peerCards.delete(sessionId);
|
|
321
|
+
didChange = true;
|
|
322
|
+
}
|
|
323
|
+
if (didChange) changed();
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
async function ping(endpoint: string): Promise<AgentCard | null> {
|
|
327
|
+
if (!identity) return null;
|
|
328
|
+
try {
|
|
329
|
+
const response = await sendEnvelope(endpoint, {
|
|
330
|
+
type: "ping", msg_id: ulid(), sender_session: identity.session_id,
|
|
331
|
+
sender_endpoint: identity.endpoint, hops: 0, timestamp: nowIso(),
|
|
332
|
+
} as PingEnvelope);
|
|
333
|
+
return response?.type === "pong" && response.agent_card ? response.agent_card : null;
|
|
334
|
+
} catch { return null; }
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
async function connect(options: ConnectComsOptions): Promise<ComsIdentity> {
|
|
338
|
+
if (identity) return identity;
|
|
339
|
+
shuttingDown = false;
|
|
340
|
+
const flags = readCliFlags(pi);
|
|
341
|
+
const frontmatter = readFrontmatterFromArgv(process.argv);
|
|
342
|
+
const project = flags.project || "default";
|
|
343
|
+
const sessionId = ulid();
|
|
344
|
+
const sessionName = typeof pi.getSessionName === "function" ? pi.getSessionName() || undefined : undefined;
|
|
345
|
+
const desiredName = flags.name || sessionName || frontmatter.name || `${options.defaultNamePrefix}-${sessionId.slice(-6)}`;
|
|
346
|
+
const name = resolveUniqueName(project, desiredName);
|
|
347
|
+
if (name !== desiredName) audit({ event: "name_collision", desired: desiredName, assigned: name, project });
|
|
348
|
+
let color = fallbackColor(sessionId);
|
|
349
|
+
if (frontmatter.color && isValidHex(frontmatter.color)) color = frontmatter.color;
|
|
350
|
+
if (flags.color && isValidHex(flags.color)) color = flags.color;
|
|
351
|
+
const endpoint = makeEndpoint(sessionId);
|
|
352
|
+
const cwd = options.ctx.cwd || process.cwd();
|
|
353
|
+
const model = options.ctx.model?.id ?? "unknown";
|
|
354
|
+
const purpose = flags.purpose || frontmatter.description || options.defaultPurpose;
|
|
355
|
+
try {
|
|
356
|
+
fs.mkdirSync(projectAgentsDir(project), { recursive: true });
|
|
357
|
+
if (process.platform !== "win32") {
|
|
358
|
+
fs.mkdirSync(path.join(COMS_DIR, "sockets"), { recursive: true });
|
|
359
|
+
try { fs.chmodSync(COMS_DIR, 0o700); } catch { /* best effort */ }
|
|
360
|
+
}
|
|
361
|
+
} catch (error) {
|
|
362
|
+
throw new ComsConnectError("dirs", error);
|
|
363
|
+
}
|
|
364
|
+
try { server = await bindEndpoint(endpoint, connectionHandler); }
|
|
365
|
+
catch (error) { throw new ComsConnectError("bind", error); }
|
|
366
|
+
const startedAt = nowIso();
|
|
367
|
+
const entry: RegistryEntry = {
|
|
368
|
+
session_id: sessionId, name, purpose, model, color, pid: process.pid,
|
|
369
|
+
endpoint, cwd, started_at: startedAt, explicit: flags.explicit === true, version: 1,
|
|
370
|
+
};
|
|
371
|
+
let registryFile: string;
|
|
372
|
+
try { registryFile = writeRegistryAtomic(entry, project); }
|
|
373
|
+
catch (error) {
|
|
374
|
+
try { server.close(); } catch { /* ignore */ }
|
|
375
|
+
server = null;
|
|
376
|
+
throw new ComsConnectError("registry", error);
|
|
377
|
+
}
|
|
378
|
+
identity = {
|
|
379
|
+
session_id: sessionId, name, purpose, color, project, explicit: flags.explicit === true,
|
|
380
|
+
cwd, model, endpoint, registryFile, started_at: startedAt,
|
|
381
|
+
};
|
|
382
|
+
scope.includeExplicit = false;
|
|
383
|
+
scope.displayProject = project;
|
|
384
|
+
audit({ event: "boot", session_id: sessionId, name, project });
|
|
385
|
+
|
|
386
|
+
const useHerdr = await herdrPresenceAvailable();
|
|
387
|
+
if (useHerdr) {
|
|
388
|
+
const paneId = herdrPaneId()!;
|
|
389
|
+
herdrPresence = new HerdrPresence({
|
|
390
|
+
paneId,
|
|
391
|
+
source: `coms:${sessionId}`,
|
|
392
|
+
onError: (error, dialect) => audit({ event: "presence_dialect_rejected", dialect, reason: error?.message ?? String(error) }),
|
|
393
|
+
});
|
|
394
|
+
void herdrPresence.report("idle", { name, project, contextUsedPct: 0, queueDepth: 0 });
|
|
395
|
+
herdrWatch = new HerdrAgentWatch({ ownPaneId: paneId, onChange: herdrSyncPeerCards });
|
|
396
|
+
void herdrWatch.start();
|
|
397
|
+
audit({ event: "presence_backend", backend: "herdr", pane: paneId });
|
|
398
|
+
} else {
|
|
399
|
+
pingTimer = setInterval(() => { void refresh(); }, PING_INTERVAL_MS);
|
|
400
|
+
try { (pingTimer as any).unref?.(); } catch { /* ignore */ }
|
|
401
|
+
}
|
|
402
|
+
keepaliveTimer = setInterval(() => {
|
|
403
|
+
if (!identity) return;
|
|
404
|
+
const missing = !fs.existsSync(identity.registryFile);
|
|
405
|
+
writeLiveRegistry();
|
|
406
|
+
if (missing) {
|
|
407
|
+
audit({ event: "self_heal", session_id: identity.session_id, reason: "registry file missing" });
|
|
408
|
+
if (!fs.existsSync(identity.registryFile)) writeLiveRegistry();
|
|
409
|
+
}
|
|
410
|
+
if (herdrPresence) {
|
|
411
|
+
void herdrPresence.report(turnState, {
|
|
412
|
+
name: identity.name, project: identity.project,
|
|
413
|
+
contextUsedPct: Math.round(deps.getContext()?.getContextUsage()?.percent ?? 0), queueDepth: inboundQueue.size,
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
if (herdrWatch) herdrSyncPeerCards(herdrWatch.current());
|
|
417
|
+
}, KEEPALIVE_INTERVAL_MS);
|
|
418
|
+
try { (keepaliveTimer as any).unref?.(); } catch { /* ignore */ }
|
|
419
|
+
if (!useHerdr) void refresh();
|
|
420
|
+
return identity;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
async function list(params: ComsListParams = {}): Promise<ComsListResult> {
|
|
424
|
+
if (!identity) return { agents: [], project: "default", scoped: true, widenRequested: false };
|
|
425
|
+
const scopeProject = scope.displayProject ?? identity.project;
|
|
426
|
+
let widened = false;
|
|
427
|
+
let projects: string[];
|
|
428
|
+
if (scopeProject === "*") projects = params.project && params.project !== "*" ? [params.project] : listProjects();
|
|
429
|
+
else {
|
|
430
|
+
projects = [scopeProject];
|
|
431
|
+
if (params.project && params.project !== scopeProject) widened = true;
|
|
432
|
+
}
|
|
433
|
+
const includeExplicit = scope.includeExplicit && params.include_explicit !== false;
|
|
434
|
+
if (params.include_explicit === true && !scope.includeExplicit) widened = true;
|
|
435
|
+
const collected: Array<{ entry: RegistryEntry; project: string }> = [];
|
|
436
|
+
for (const project of projects) {
|
|
437
|
+
for (const entry of pruneDeadEntries(project)) {
|
|
438
|
+
if (entry.explicit && !includeExplicit) continue;
|
|
439
|
+
if (entry.session_id !== identity.session_id) collected.push({ entry, project });
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
const pongs = await Promise.allSettled(collected.map(item => ping(item.entry.endpoint)));
|
|
443
|
+
const agents = collected.map((item, index) => {
|
|
444
|
+
const result = pongs[index];
|
|
445
|
+
const pong = result.status === "fulfilled" ? result.value : null;
|
|
446
|
+
return {
|
|
447
|
+
name: item.entry.name, session_id: item.entry.session_id, purpose: item.entry.purpose,
|
|
448
|
+
model: item.entry.model, cwd: item.entry.cwd, project: item.project, alive: pong !== null,
|
|
449
|
+
context_used_pct: pong?.context_used_pct ?? null, pane_id: pong?.pane_id ?? null,
|
|
450
|
+
status: pong?.status ?? null, queue_depth: pong?.queue_depth ?? null, color: item.entry.color,
|
|
451
|
+
};
|
|
452
|
+
});
|
|
453
|
+
return { agents, project: scopeProject, scoped: true, widenRequested: widened };
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
async function send(params: ComsSendParams, auditExtra: Record<string, unknown> = {}): Promise<ComsSendResult> {
|
|
457
|
+
if (!identity) throw new Error("coms not initialised");
|
|
458
|
+
const target = resolveTarget(params.target);
|
|
459
|
+
if (!target) {
|
|
460
|
+
const project = scope.displayProject ?? identity.project;
|
|
461
|
+
throw new Error(`coms: no connected peer "${params.target}" in your pool (project ${project}). Only peers shown in the coms pool are reachable. If you expected this peer, ask the human to widen scope with /af-coms --project <name> or /af-coms --all, then retry.`);
|
|
462
|
+
}
|
|
463
|
+
const hops = currentInbound ? currentInbound.hops + 1 : 0;
|
|
464
|
+
if (hops >= MAX_HOPS) throw new Error(`coms: hop limit reached (${hops} >= ${MAX_HOPS})`);
|
|
465
|
+
const msgId = ulid();
|
|
466
|
+
await sendEnvelope(target.endpoint, {
|
|
467
|
+
type: "prompt", msg_id: msgId, sender_session: identity.session_id, sender_endpoint: identity.endpoint,
|
|
468
|
+
sender_name: identity.name, sender_cwd: identity.cwd, hops, timestamp: nowIso(), prompt: params.prompt,
|
|
469
|
+
conversation_id: params.conversation_id ?? null, response_schema: params.response_schema ?? null,
|
|
470
|
+
reply_timeout_ms: params.reply_timeout_ms ?? null,
|
|
471
|
+
} as PromptEnvelope);
|
|
472
|
+
let resolve!: PendingReply["resolve"];
|
|
473
|
+
let reject!: PendingReply["reject"];
|
|
474
|
+
const promise = new Promise<{ response?: any; error?: string | null }>((res, rej) => { resolve = res; reject = rej; });
|
|
475
|
+
pendingReplies.set(msgId, { resolve, reject, timer: null, promise, target_name: target.name, created_at: nowIso() });
|
|
476
|
+
audit({ event: "outbound_prompt", msg_id: msgId, target: target.name, hops, ...auditExtra });
|
|
477
|
+
return { msg_id: msgId, target: target.name, target_session: target.session_id, hops, promise };
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
function get(msgId: string): { status: "pending" | "complete" | "error"; response?: any; error?: string | null } {
|
|
481
|
+
const entry = pendingReplies.get(msgId);
|
|
482
|
+
if (!entry) return { status: "error", error: "unknown msg_id" };
|
|
483
|
+
if (!entry.result) return { status: "pending" };
|
|
484
|
+
return { status: "complete", response: entry.result.response, error: entry.result.error ?? null };
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
async function awaitReply(msgId: string, timeoutMs = TIMEOUT_MS): Promise<{ status: "pending" | "complete" | "error"; response?: any; error?: string | null }> {
|
|
488
|
+
const entry = pendingReplies.get(msgId);
|
|
489
|
+
if (!entry) return { status: "error", error: "unknown msg_id" };
|
|
490
|
+
const timeout = new Promise<{ error: "timeout" }>(resolve => {
|
|
491
|
+
const timer = setTimeout(() => resolve({ error: "timeout" }), timeoutMs);
|
|
492
|
+
try { (timer as any).unref?.(); } catch { /* ignore */ }
|
|
493
|
+
});
|
|
494
|
+
const result = await Promise.race([entry.promise, timeout]);
|
|
495
|
+
if (result.error === "timeout") return { status: "pending" };
|
|
496
|
+
if (result.error) return { status: "error", error: result.error };
|
|
497
|
+
return { status: "complete", response: "response" in result ? result.response : undefined };
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
async function respond(ctx: ExtensionContext): Promise<void> {
|
|
501
|
+
const inbound = [...inboundQueue.values()].reverse().find(item => !item.fulfilled);
|
|
502
|
+
if (!inbound || !identity) return;
|
|
503
|
+
let text = "";
|
|
504
|
+
for (const entry of ctx.sessionManager.getBranch()) {
|
|
505
|
+
if (entry.type !== "message" || entry.message.role !== "assistant") continue;
|
|
506
|
+
const message = entry.message as any;
|
|
507
|
+
text = typeof message.content === "string"
|
|
508
|
+
? message.content
|
|
509
|
+
: Array.isArray(message.content) ? message.content.filter((block: any) => block?.type === "text").map((block: any) => block.text).join("\n") : text;
|
|
510
|
+
}
|
|
511
|
+
let response: any = text;
|
|
512
|
+
let error: string | null = null;
|
|
513
|
+
if (inbound.response_schema && typeof inbound.response_schema === "object") {
|
|
514
|
+
try { response = JSON.parse(text); } catch { response = null; error = "response not valid JSON"; }
|
|
515
|
+
}
|
|
516
|
+
try {
|
|
517
|
+
await sendEnvelope(inbound.sender_endpoint, {
|
|
518
|
+
type: "response", msg_id: inbound.msg_id, sender_session: identity.session_id,
|
|
519
|
+
sender_endpoint: identity.endpoint, hops: 0, timestamp: nowIso(), response, error,
|
|
520
|
+
} as ResponseEnvelope);
|
|
521
|
+
audit({ event: "outbound_response", msg_id: inbound.msg_id, error });
|
|
522
|
+
} catch (sendError: any) {
|
|
523
|
+
audit({ event: "outbound_response_failed", msg_id: inbound.msg_id, reason: sendError?.message ?? String(sendError) });
|
|
524
|
+
}
|
|
525
|
+
inbound.fulfilled = true;
|
|
526
|
+
inboundQueue.delete(inbound.msg_id);
|
|
527
|
+
if (currentInbound?.msg_id === inbound.msg_id) currentInbound = null;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
async function setTurnState(state: "idle" | "working"): Promise<void> {
|
|
531
|
+
turnState = state;
|
|
532
|
+
if (!herdrPresence || !identity) return;
|
|
533
|
+
void herdrPresence.report(state, {
|
|
534
|
+
name: identity.name, project: identity.project,
|
|
535
|
+
contextUsedPct: Math.round(deps.getContext()?.getContextUsage()?.percent ?? 0), queueDepth: inboundQueue.size,
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
async function updateScope(args: string, ctx?: ExtensionContext): Promise<void> {
|
|
540
|
+
if (args.includes("--all")) {
|
|
541
|
+
scope.includeExplicit = !scope.includeExplicit;
|
|
542
|
+
try { ctx?.ui.notify(`coms: include_explicit = ${scope.includeExplicit}`, "info"); } catch { /* ignore */ }
|
|
543
|
+
}
|
|
544
|
+
const projectMatch = args.match(/--project\s+(\S+)/);
|
|
545
|
+
if (projectMatch) {
|
|
546
|
+
scope.displayProject = projectMatch[1];
|
|
547
|
+
try { ctx?.ui.notify(`coms: displaying project ${scope.displayProject}`, "info"); } catch { /* ignore */ }
|
|
548
|
+
}
|
|
549
|
+
if (herdrWatch) await herdrWatch.start();
|
|
550
|
+
else await refresh();
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
async function shutdown(): Promise<void> {
|
|
554
|
+
if (shuttingDown) return;
|
|
555
|
+
shuttingDown = true;
|
|
556
|
+
if (pingTimer) { try { clearInterval(pingTimer); } catch { /* ignore */ } pingTimer = null; }
|
|
557
|
+
if (keepaliveTimer) { try { clearInterval(keepaliveTimer); } catch { /* ignore */ } keepaliveTimer = null; }
|
|
558
|
+
if (herdrWatch) { try { herdrWatch.stop(); } catch { /* ignore */ } herdrWatch = null; }
|
|
559
|
+
if (herdrPresence) { try { void herdrPresence.release(); } catch { /* ignore */ } herdrPresence = null; }
|
|
560
|
+
if (server) { try { server.close(); } catch { /* ignore */ } server = null; }
|
|
561
|
+
if (identity) {
|
|
562
|
+
if (process.platform !== "win32") { try { fs.unlinkSync(identity.endpoint); } catch { /* ignore */ } }
|
|
563
|
+
removeRegistryEntry(identity.project, identity.name);
|
|
564
|
+
audit({ event: "shutdown", session_id: identity.session_id });
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
return {
|
|
569
|
+
connect, send, list, get, await: awaitReply, refresh, respond, shutdown,
|
|
570
|
+
setTurnState, updateScope, writeLiveRegistry, ping, peersInScope, resolveTarget,
|
|
571
|
+
peerCards, pendingReplies, inboundQueue, scope,
|
|
572
|
+
get identity() { return identity; },
|
|
573
|
+
get ready() { return identity !== null && server !== null; },
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export type ComsPeer = ReturnType<typeof createComsPeer>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// .pi/harnesses/lib/coms-registry-entry.ts
|
|
2
|
+
//
|
|
3
|
+
// The shape written to ~/.pi/coms/projects/<project>/agents/<name>.json, and
|
|
4
|
+
// the one function that builds it for the 30-second heartbeat.
|
|
5
|
+
//
|
|
6
|
+
// It exists because both harnesses (the standalone coms harness and the copy
|
|
7
|
+
// embedded in agent-hub) had their own inline copy of the same object literal,
|
|
8
|
+
// and both copies wrote `started_at: nowIso()` on EVERY heartbeat. The field
|
|
9
|
+
// therefore never held the start of anything — it was always "about 30 seconds
|
|
10
|
+
// ago", and every reader that tried to show uptime showed noise. Registration
|
|
11
|
+
// sets `started_at`; the heartbeat carries it forward unchanged and moves
|
|
12
|
+
// `heartbeat_at` instead. That distinction is the whole point of this module,
|
|
13
|
+
// so it is stated once, here, and tested.
|
|
14
|
+
//
|
|
15
|
+
// Pure module: no pi imports, no fs, no clock of its own — `now` is passed in.
|
|
16
|
+
// Erasable-TS; testable under node --test.
|
|
17
|
+
|
|
18
|
+
export interface ComsRegistryEntry {
|
|
19
|
+
session_id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
purpose: string;
|
|
22
|
+
model: string;
|
|
23
|
+
color: string;
|
|
24
|
+
pid: number;
|
|
25
|
+
endpoint: string;
|
|
26
|
+
cwd: string;
|
|
27
|
+
// When this session registered. NEVER refreshed — see the module note.
|
|
28
|
+
started_at: string;
|
|
29
|
+
explicit: boolean;
|
|
30
|
+
version: number;
|
|
31
|
+
// Live status snapshot — refreshed every keepalive tick. Optional so
|
|
32
|
+
// entries written before the heartbeat carried them still parse cleanly.
|
|
33
|
+
context_used_pct?: number;
|
|
34
|
+
queue_depth?: number;
|
|
35
|
+
heartbeat_at?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// What the session knows about itself from registration onwards. This is the
|
|
39
|
+
// harness `identity` object; it is the source of every field the heartbeat is
|
|
40
|
+
// not allowed to invent.
|
|
41
|
+
export interface ComsIdentity {
|
|
42
|
+
session_id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
purpose: string;
|
|
45
|
+
color: string;
|
|
46
|
+
cwd: string;
|
|
47
|
+
endpoint: string;
|
|
48
|
+
explicit: boolean;
|
|
49
|
+
model: string;
|
|
50
|
+
started_at: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// What is genuinely new at heartbeat time.
|
|
54
|
+
export interface LiveSnapshot {
|
|
55
|
+
now: string;
|
|
56
|
+
pid: number;
|
|
57
|
+
// The model can change mid-session (`/model`), so it is re-read rather than
|
|
58
|
+
// frozen at registration; falling back to the registered one when the ctx
|
|
59
|
+
// is not available.
|
|
60
|
+
model?: string | null;
|
|
61
|
+
contextUsedPct?: number | null;
|
|
62
|
+
queueDepth?: number | null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Percentages arrive from `ctx.getContextUsage()`, queue depths from a Map
|
|
66
|
+
// size. Both reach a human eye and a JSON file, so neither may be NaN,
|
|
67
|
+
// negative, or fractional.
|
|
68
|
+
function count(value: number | null | undefined): number {
|
|
69
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return 0;
|
|
70
|
+
return Math.max(0, Math.round(value));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// The registry entry for a heartbeat write. Also the entry used for self-heal
|
|
74
|
+
// (the file was unlinked under us and is being re-created), which is why every
|
|
75
|
+
// field is present rather than patched onto whatever is on disk: there may be
|
|
76
|
+
// nothing on disk.
|
|
77
|
+
export function buildLiveRegistryEntry(identity: ComsIdentity, live: LiveSnapshot): ComsRegistryEntry {
|
|
78
|
+
return {
|
|
79
|
+
session_id: identity.session_id,
|
|
80
|
+
name: identity.name,
|
|
81
|
+
purpose: identity.purpose,
|
|
82
|
+
model: live.model || identity.model,
|
|
83
|
+
color: identity.color,
|
|
84
|
+
pid: live.pid,
|
|
85
|
+
endpoint: identity.endpoint,
|
|
86
|
+
cwd: identity.cwd,
|
|
87
|
+
started_at: identity.started_at,
|
|
88
|
+
explicit: identity.explicit,
|
|
89
|
+
version: 1,
|
|
90
|
+
context_used_pct: count(live.contextUsedPct),
|
|
91
|
+
queue_depth: count(live.queueDepth),
|
|
92
|
+
heartbeat_at: live.now,
|
|
93
|
+
};
|
|
94
|
+
}
|