@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,413 @@
|
|
|
1
|
+
// .pi/agent-fleet/scripts/coms-hermes-bridge.ts
|
|
2
|
+
//
|
|
3
|
+
// Hermes/Telegram user-remote bridge daemon. Registers a coms peer, turns
|
|
4
|
+
// prompt envelopes into `hermes send` messages, watches the private answer-file
|
|
5
|
+
// wire, and replies to the sender with the mapped answer/error envelope.
|
|
6
|
+
|
|
7
|
+
import { spawn } from "node:child_process";
|
|
8
|
+
import * as fs from "node:fs";
|
|
9
|
+
import * as path from "node:path";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
bindEndpoint,
|
|
14
|
+
ensureComsDirs,
|
|
15
|
+
isCancelEnvelope,
|
|
16
|
+
isPromptEnvelope,
|
|
17
|
+
makeConnHandler,
|
|
18
|
+
makeEndpoint,
|
|
19
|
+
makeResponseEnvelope,
|
|
20
|
+
nowIso,
|
|
21
|
+
removeRegistryEntry,
|
|
22
|
+
resolveUniqueName,
|
|
23
|
+
sendEnvelope,
|
|
24
|
+
ulid,
|
|
25
|
+
writeAck,
|
|
26
|
+
writeNack,
|
|
27
|
+
writeRegistryAtomic,
|
|
28
|
+
type AgentCard,
|
|
29
|
+
type PromptEnvelope,
|
|
30
|
+
type RegistryEntry,
|
|
31
|
+
type SenderIdentity,
|
|
32
|
+
} from "./lib/coms-envelope.ts";
|
|
33
|
+
import {
|
|
34
|
+
formatTelegramQuestion,
|
|
35
|
+
isValidQid,
|
|
36
|
+
logPath as defaultLogPath,
|
|
37
|
+
makeLogRecord,
|
|
38
|
+
mapAnswerToAskResponse,
|
|
39
|
+
qidFromPromptEnvelope,
|
|
40
|
+
questionsDir as defaultQuestionsDir,
|
|
41
|
+
renderLogRecord,
|
|
42
|
+
timeoutMsFromEnv,
|
|
43
|
+
timeoutOutcome,
|
|
44
|
+
validateAnswerFile,
|
|
45
|
+
type BridgeEventName,
|
|
46
|
+
type QuestionOption,
|
|
47
|
+
type QuestionState,
|
|
48
|
+
} from "./lib/hermes-bridge-core.ts";
|
|
49
|
+
|
|
50
|
+
const KEEPALIVE_MS = 30_000;
|
|
51
|
+
const DEFAULT_POLL_MS = 1_000;
|
|
52
|
+
const COLOR = "#38BDF8";
|
|
53
|
+
const DEFAULT_NAME = "user-remote";
|
|
54
|
+
const DEFAULT_PURPOSE = "Remote human via Hermes/Telegram";
|
|
55
|
+
const HERMES_PROFILE_RE = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
56
|
+
|
|
57
|
+
interface PendingQuestion {
|
|
58
|
+
env: PromptEnvelope;
|
|
59
|
+
state: QuestionState;
|
|
60
|
+
options: QuestionOption[];
|
|
61
|
+
timer: NodeJS.Timeout;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface ParsedPrompt {
|
|
65
|
+
question: string;
|
|
66
|
+
context?: string;
|
|
67
|
+
options: QuestionOption[];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function flagValue(argv: string[], flag: string): string | null {
|
|
71
|
+
const positions = argv.flatMap((arg, index) => arg === flag ? [index] : []);
|
|
72
|
+
if (positions.length > 1) die(`${flag} may only be specified once`);
|
|
73
|
+
const i = positions[0] ?? -1;
|
|
74
|
+
return i >= 0 && i + 1 < argv.length ? argv[i + 1] : null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function die(msg: string): never {
|
|
78
|
+
console.error(`coms-hermes-bridge: ${msg}`);
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function parsePrompt(env: PromptEnvelope): ParsedPrompt {
|
|
83
|
+
try {
|
|
84
|
+
const parsed = JSON.parse(env.prompt) as { question?: unknown; context?: unknown; options?: unknown };
|
|
85
|
+
if (parsed && typeof parsed === "object" && typeof parsed.question === "string") {
|
|
86
|
+
const rawOptions = Array.isArray(parsed.options) ? parsed.options : [];
|
|
87
|
+
const options = rawOptions
|
|
88
|
+
.map((option): QuestionOption | null => {
|
|
89
|
+
if (typeof option === "string") return { title: option };
|
|
90
|
+
if (option && typeof option === "object" && typeof (option as { title?: unknown }).title === "string") {
|
|
91
|
+
const desc = (option as { description?: unknown }).description;
|
|
92
|
+
return typeof desc === "string"
|
|
93
|
+
? { title: (option as { title: string }).title, description: desc }
|
|
94
|
+
: { title: (option as { title: string }).title };
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
})
|
|
98
|
+
.filter((option): option is QuestionOption => option !== null);
|
|
99
|
+
const context = typeof parsed.context === "string" && parsed.context.trim() ? parsed.context : undefined;
|
|
100
|
+
return { question: parsed.question, context, options };
|
|
101
|
+
}
|
|
102
|
+
} catch {
|
|
103
|
+
// Plain coms-cli prompts are expected; fall through.
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
question: env.prompt,
|
|
107
|
+
context: `From ${env.sender_name} @ ${env.sender_cwd}`,
|
|
108
|
+
options: [],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function appendLogFile(logFile: string, qid: string, event: BridgeEventName, detail?: unknown): void {
|
|
113
|
+
fs.mkdirSync(path.dirname(logFile), { recursive: true });
|
|
114
|
+
fs.appendFileSync(logFile, renderLogRecord(makeLogRecord(qid, event, detail)));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function appendAnswerRejectLog(logFile: string, qid: string, detail: unknown): void {
|
|
118
|
+
fs.mkdirSync(path.dirname(logFile), { recursive: true });
|
|
119
|
+
fs.appendFileSync(logFile, JSON.stringify({ at: nowIso(), qid, event: "answer_rejected", detail }) + "\n");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function hermesSend(to: string, text: string, profile: string | null): Promise<void> {
|
|
123
|
+
return new Promise((resolve, reject) => {
|
|
124
|
+
const args = [...(profile ? ["--profile", profile] : []), "send", "--to", to, text];
|
|
125
|
+
const child = spawn("hermes", args, { stdio: ["ignore", "pipe", "pipe"] });
|
|
126
|
+
let stderr = "";
|
|
127
|
+
let stdout = "";
|
|
128
|
+
child.stdout?.on("data", (chunk) => { stdout += chunk.toString("utf-8"); });
|
|
129
|
+
child.stderr?.on("data", (chunk) => { stderr += chunk.toString("utf-8"); });
|
|
130
|
+
child.once("error", (err) => reject(err));
|
|
131
|
+
child.once("close", (code) => {
|
|
132
|
+
if (code === 0) {
|
|
133
|
+
resolve();
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const detail = (stderr || stdout).trim();
|
|
137
|
+
reject(new Error(`hermes send failed${code === null ? "" : ` (${code})`}${detail ? `: ${detail}` : ""}`));
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
async function main(): Promise<void> {
|
|
143
|
+
const argv = process.argv.slice(2);
|
|
144
|
+
const requestedName = flagValue(argv, "--name") ?? DEFAULT_NAME;
|
|
145
|
+
const project = flagValue(argv, "--project") ?? "default";
|
|
146
|
+
const to = flagValue(argv, "--to") ?? "telegram";
|
|
147
|
+
const hermesProfile = flagValue(argv, "--hermes-profile");
|
|
148
|
+
const timeoutMs = Number(flagValue(argv, "--timeout") ?? timeoutMsFromEnv());
|
|
149
|
+
const pollMs = Number(flagValue(argv, "--poll-ms") ?? DEFAULT_POLL_MS);
|
|
150
|
+
const qDir = flagValue(argv, "--questions-dir") ?? defaultQuestionsDir();
|
|
151
|
+
const logFile = path.join(path.dirname(qDir), path.basename(defaultLogPath()));
|
|
152
|
+
|
|
153
|
+
if (hermesProfile && (!HERMES_PROFILE_RE.test(hermesProfile) || hermesProfile === "." || hermesProfile.includes(".."))) die("--hermes-profile must be a safe profile name");
|
|
154
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) die("--timeout must be a positive number");
|
|
155
|
+
if (!Number.isFinite(pollMs) || pollMs <= 0) die("--poll-ms must be a positive number");
|
|
156
|
+
|
|
157
|
+
ensureComsDirs(project);
|
|
158
|
+
fs.mkdirSync(qDir, { recursive: true });
|
|
159
|
+
fs.mkdirSync(path.dirname(logFile), { recursive: true });
|
|
160
|
+
|
|
161
|
+
const sessionId = ulid();
|
|
162
|
+
const uniqueName = resolveUniqueName(project, requestedName);
|
|
163
|
+
const id: SenderIdentity = {
|
|
164
|
+
session_id: sessionId,
|
|
165
|
+
name: uniqueName,
|
|
166
|
+
endpoint: makeEndpoint(sessionId),
|
|
167
|
+
cwd: process.cwd(),
|
|
168
|
+
};
|
|
169
|
+
const pending = new Map<string, PendingQuestion>();
|
|
170
|
+
const closed = new Map<string, QuestionState>();
|
|
171
|
+
// Answer files the liaison may still be mid-write: an invalid_json file is
|
|
172
|
+
// kept for a short grace window (first-seen timestamps below) instead of
|
|
173
|
+
// being eaten while the write is still in flight.
|
|
174
|
+
const invalidJsonSeen = new Map<string, number>();
|
|
175
|
+
const invalidJsonGraceMs = Math.max(2 * pollMs, 1_000);
|
|
176
|
+
const CLOSED_CAP = 1_000;
|
|
177
|
+
|
|
178
|
+
function markClosed(qid: string, state: QuestionState): void {
|
|
179
|
+
closed.set(qid, state);
|
|
180
|
+
if (closed.size > CLOSED_CAP) {
|
|
181
|
+
const oldest = closed.keys().next().value;
|
|
182
|
+
if (oldest !== undefined) closed.delete(oldest);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function queueDepth(): number {
|
|
187
|
+
return pending.size;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function registryEntry(): RegistryEntry {
|
|
191
|
+
return {
|
|
192
|
+
session_id: sessionId,
|
|
193
|
+
name: uniqueName,
|
|
194
|
+
purpose: DEFAULT_PURPOSE,
|
|
195
|
+
model: "hermes-bridge",
|
|
196
|
+
color: COLOR,
|
|
197
|
+
pid: process.pid,
|
|
198
|
+
endpoint: id.endpoint,
|
|
199
|
+
cwd: id.cwd,
|
|
200
|
+
started_at: nowIso(),
|
|
201
|
+
explicit: false,
|
|
202
|
+
version: 1,
|
|
203
|
+
context_used_pct: 0,
|
|
204
|
+
queue_depth: queueDepth(),
|
|
205
|
+
heartbeat_at: nowIso(),
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
async function sendResponse(env: PromptEnvelope, response: unknown, error: string | null = null): Promise<void> {
|
|
210
|
+
await sendEnvelope(env.sender_endpoint, makeResponseEnvelope(id, env.msg_id, response, error));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
async function handleTimeout(qid: string): Promise<void> {
|
|
214
|
+
const item = pending.get(qid);
|
|
215
|
+
if (!item) return;
|
|
216
|
+
pending.delete(qid);
|
|
217
|
+
markClosed(qid, "timeout");
|
|
218
|
+
appendLogFile(logFile, qid, "timeout", { timeout_ms: timeoutMs });
|
|
219
|
+
const outcome = timeoutOutcome(qid, timeoutMs);
|
|
220
|
+
await hermesSend(to, outcome.telegramNote, hermesProfile).catch((err) => {
|
|
221
|
+
appendLogFile(logFile, qid, "delivery_error", { phase: "timeout_note", error: err instanceof Error ? err.message : String(err) });
|
|
222
|
+
});
|
|
223
|
+
await sendResponse(item.env, outcome.response, outcome.error).catch((err) => {
|
|
224
|
+
console.error(`coms-hermes-bridge: could not deliver timeout for ${qid}: ${err instanceof Error ? err.message : String(err)}`);
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
async function handlePrompt(env: PromptEnvelope): Promise<void> {
|
|
229
|
+
let qid: string;
|
|
230
|
+
try {
|
|
231
|
+
qid = qidFromPromptEnvelope(env);
|
|
232
|
+
} catch (err) {
|
|
233
|
+
await sendResponse(env, null, err instanceof Error ? err.message : String(err)).catch(() => {});
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
const parsed = parsePrompt(env);
|
|
238
|
+
const duplicate = pending.get(qid);
|
|
239
|
+
if (duplicate) clearTimeout(duplicate.timer);
|
|
240
|
+
appendLogFile(logFile, qid, "question_received", { from: env.sender_name });
|
|
241
|
+
const timer = setTimeout(() => { void handleTimeout(qid); }, timeoutMs);
|
|
242
|
+
timer.unref?.();
|
|
243
|
+
pending.set(qid, { env, state: "pending", options: parsed.options, timer });
|
|
244
|
+
|
|
245
|
+
try {
|
|
246
|
+
await hermesSend(to, formatTelegramQuestion({
|
|
247
|
+
qid,
|
|
248
|
+
project,
|
|
249
|
+
question: parsed.question,
|
|
250
|
+
context: parsed.context,
|
|
251
|
+
options: parsed.options,
|
|
252
|
+
}), hermesProfile);
|
|
253
|
+
const item = pending.get(qid);
|
|
254
|
+
if (!item) return;
|
|
255
|
+
item.state = "delivered";
|
|
256
|
+
appendLogFile(logFile, qid, "delivered", { to });
|
|
257
|
+
} catch (err) {
|
|
258
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
259
|
+
const item = pending.get(qid);
|
|
260
|
+
if (item) {
|
|
261
|
+
clearTimeout(item.timer);
|
|
262
|
+
pending.delete(qid);
|
|
263
|
+
}
|
|
264
|
+
appendLogFile(logFile, qid, "delivery_error", { error: message });
|
|
265
|
+
await sendResponse(env, null, message).catch((sendErr) => {
|
|
266
|
+
console.error(`coms-hermes-bridge: could not deliver error for ${qid}: ${sendErr instanceof Error ? sendErr.message : String(sendErr)}`);
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
async function handleCancel(refMsgId: string): Promise<void> {
|
|
272
|
+
if (!isValidQid(refMsgId)) return;
|
|
273
|
+
const item = pending.get(refMsgId);
|
|
274
|
+
if (!item) return;
|
|
275
|
+
clearTimeout(item.timer);
|
|
276
|
+
pending.delete(refMsgId);
|
|
277
|
+
markClosed(refMsgId, "cancelled");
|
|
278
|
+
appendLogFile(logFile, refMsgId, "cancelled", { reason: "cancel envelope" });
|
|
279
|
+
await hermesSend(to, `✖ [HUB-Q:${refMsgId}] The question was cancelled — it was answered from the console.`, hermesProfile).catch((err) => {
|
|
280
|
+
appendLogFile(logFile, refMsgId, "delivery_error", { phase: "cancel_note", error: err instanceof Error ? err.message : String(err) });
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
async function handleLateAnswer(qid: string): Promise<void> {
|
|
285
|
+
appendLogFile(logFile, qid, "late_answer", { state: closed.get(qid) ?? "unknown" });
|
|
286
|
+
await hermesSend(to, `ℹ [HUB-Q:${qid}] This question is already closed; the late answer was ignored.`, hermesProfile).catch((err) => {
|
|
287
|
+
appendLogFile(logFile, qid, "delivery_error", { phase: "late_note", error: err instanceof Error ? err.message : String(err) });
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
async function consumeAnswerFile(file: string): Promise<void> {
|
|
292
|
+
const full = path.join(qDir, file);
|
|
293
|
+
let raw: string;
|
|
294
|
+
try {
|
|
295
|
+
raw = fs.readFileSync(full, "utf-8");
|
|
296
|
+
} catch {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const qidFromName = file.endsWith(".answer.json") ? file.slice(0, -".answer.json".length) : file;
|
|
301
|
+
if (isValidQid(qidFromName) && closed.has(qidFromName)) {
|
|
302
|
+
invalidJsonSeen.delete(file);
|
|
303
|
+
try { fs.unlinkSync(full); } catch { /* ignore */ }
|
|
304
|
+
await handleLateAnswer(qidFromName);
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const validation = validateAnswerFile(raw, full, pending.keys());
|
|
309
|
+
if (!validation.ok) {
|
|
310
|
+
if (validation.reason === "invalid_json") {
|
|
311
|
+
// Possibly a partial write from the liaison; retry until the grace expires.
|
|
312
|
+
const firstSeen = invalidJsonSeen.get(file);
|
|
313
|
+
if (firstSeen === undefined) {
|
|
314
|
+
invalidJsonSeen.set(file, Date.now());
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
if (Date.now() - firstSeen < invalidJsonGraceMs) return;
|
|
318
|
+
}
|
|
319
|
+
invalidJsonSeen.delete(file);
|
|
320
|
+
const logQid = validation.qid && isValidQid(validation.qid) ? validation.qid : (isValidQid(qidFromName) ? qidFromName : "00000000000000000000000000");
|
|
321
|
+
// Remove the rejected file before publishing the event. Consumers use the
|
|
322
|
+
// log as the completion signal and may immediately write a corrected file
|
|
323
|
+
// at the same path; logging first lets this scan delete that replacement.
|
|
324
|
+
try { fs.unlinkSync(full); } catch { /* ignore */ }
|
|
325
|
+
appendAnswerRejectLog(logFile, logQid, { reason: validation.reason, file });
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
invalidJsonSeen.delete(file);
|
|
330
|
+
const item = pending.get(validation.qid);
|
|
331
|
+
if (!item) return;
|
|
332
|
+
clearTimeout(item.timer);
|
|
333
|
+
pending.delete(validation.qid);
|
|
334
|
+
markClosed(validation.qid, "answered");
|
|
335
|
+
try { fs.unlinkSync(full); } catch { /* ignore */ }
|
|
336
|
+
appendLogFile(logFile, validation.qid, "answered", { answered_by: validation.answer.answered_by });
|
|
337
|
+
const response = mapAnswerToAskResponse(validation.answer.answer, item.options);
|
|
338
|
+
await sendResponse(item.env, response).catch((err) => {
|
|
339
|
+
console.error(`coms-hermes-bridge: could not deliver answer for ${validation.qid}: ${err instanceof Error ? err.message : String(err)}`);
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
async function scanAnswers(): Promise<void> {
|
|
344
|
+
let files: string[];
|
|
345
|
+
try {
|
|
346
|
+
files = fs.readdirSync(qDir);
|
|
347
|
+
} catch {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
for (const file of files) {
|
|
351
|
+
await consumeAnswerFile(file);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
const server = await bindEndpoint(
|
|
356
|
+
id.endpoint,
|
|
357
|
+
makeConnHandler((env, socket) => {
|
|
358
|
+
if (isPromptEnvelope(env)) {
|
|
359
|
+
writeAck(socket, env.msg_id);
|
|
360
|
+
void handlePrompt(env);
|
|
361
|
+
} else if (isCancelEnvelope(env)) {
|
|
362
|
+
writeAck(socket, env.msg_id);
|
|
363
|
+
void handleCancel(env.ref_msg_id);
|
|
364
|
+
} else if ((env as { type?: string }).type === "ping") {
|
|
365
|
+
const card: AgentCard = {
|
|
366
|
+
name: uniqueName,
|
|
367
|
+
purpose: DEFAULT_PURPOSE,
|
|
368
|
+
model: "hermes-bridge",
|
|
369
|
+
color: COLOR,
|
|
370
|
+
context_used_pct: 0,
|
|
371
|
+
queue_depth: queueDepth(),
|
|
372
|
+
};
|
|
373
|
+
try {
|
|
374
|
+
socket.write(JSON.stringify({ type: "pong", msg_id: (env as { msg_id?: string }).msg_id ?? "", agent_card: card }) + "\n");
|
|
375
|
+
} catch { /* ignore */ }
|
|
376
|
+
try { socket.end(); } catch { /* ignore */ }
|
|
377
|
+
} else {
|
|
378
|
+
writeNack(socket, (env as { msg_id?: string }).msg_id ?? "", "bridge accepts prompts, cancels, and pings");
|
|
379
|
+
}
|
|
380
|
+
}),
|
|
381
|
+
);
|
|
382
|
+
|
|
383
|
+
const keepalive = setInterval(() => {
|
|
384
|
+
try { writeRegistryAtomic(registryEntry(), project); } catch { /* best-effort */ }
|
|
385
|
+
}, KEEPALIVE_MS);
|
|
386
|
+
keepalive.unref?.();
|
|
387
|
+
const watcher = setInterval(() => { void scanAnswers(); }, pollMs);
|
|
388
|
+
watcher.unref?.();
|
|
389
|
+
|
|
390
|
+
let shuttingDown = false;
|
|
391
|
+
function shutdown(): void {
|
|
392
|
+
if (shuttingDown) return;
|
|
393
|
+
shuttingDown = true;
|
|
394
|
+
clearInterval(keepalive);
|
|
395
|
+
clearInterval(watcher);
|
|
396
|
+
for (const item of pending.values()) clearTimeout(item.timer);
|
|
397
|
+
try { server.close(); } catch { /* ignore */ }
|
|
398
|
+
try { fs.unlinkSync(id.endpoint); } catch { /* ignore */ }
|
|
399
|
+
removeRegistryEntry(project, uniqueName);
|
|
400
|
+
process.exit(0);
|
|
401
|
+
}
|
|
402
|
+
process.on("SIGTERM", shutdown);
|
|
403
|
+
process.on("SIGINT", shutdown);
|
|
404
|
+
|
|
405
|
+
// Publish readiness only after shutdown handlers are installed. A caller may
|
|
406
|
+
// terminate the bridge as soon as its registry entry appears; publishing
|
|
407
|
+
// earlier can bypass cleanup and leave both the entry and socket behind.
|
|
408
|
+
writeRegistryAtomic(registryEntry(), project);
|
|
409
|
+
console.error(`coms-hermes-bridge: ${uniqueName}@${project} listening (${to})`);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
const isEntry = process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
|
|
413
|
+
if (isEntry) void main();
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import * as fs from 'node:fs';
|
|
3
|
+
import {spawnSync} from 'node:child_process';
|
|
4
|
+
import * as os from 'node:os';
|
|
5
|
+
import * as path from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import { FleetSessionClient } from './lib/fleet-codex-session.ts';
|
|
8
|
+
import { clientCatalog, parseClientArguments } from './lib/fleet-codex-catalog.ts';
|
|
9
|
+
import { FleetClientOperations } from './lib/fleet-codex-operations.ts';
|
|
10
|
+
|
|
11
|
+
function readInstructionFile(filePath: string): string {
|
|
12
|
+
const resolved = path.resolve(filePath);
|
|
13
|
+
const stats = fs.lstatSync(resolved);
|
|
14
|
+
if (stats.isSymbolicLink() || !stats.isFile() || (process.getuid && stats.uid !== process.getuid()) || (stats.mode & 0o077)) {
|
|
15
|
+
throw Error('unsafe text file');
|
|
16
|
+
}
|
|
17
|
+
if (stats.size > 16000) throw Error('text file must contain at most 16000 bytes');
|
|
18
|
+
const flags = fs.constants.O_RDONLY | (typeof fs.constants.O_NOFOLLOW === 'number' ? fs.constants.O_NOFOLLOW : 0);
|
|
19
|
+
const fd = fs.openSync(resolved, flags);
|
|
20
|
+
try {
|
|
21
|
+
const opened = fs.fstatSync(fd);
|
|
22
|
+
if (!opened.isFile() || opened.size > 16000 || (process.getuid && opened.uid !== process.getuid()) || (opened.mode & 0o077)) {
|
|
23
|
+
throw Error('unsafe text file');
|
|
24
|
+
}
|
|
25
|
+
return fs.readFileSync(fd, 'utf8');
|
|
26
|
+
} finally { fs.closeSync(fd); }
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export async function runClient(argv:string[],env:NodeJS.ProcessEnv=process.env,emit:(value:unknown)=>void=()=>{}) {
|
|
30
|
+
if(argv.length===1&&argv[0]==='--help')return clientCatalog();
|
|
31
|
+
const {command,flags}=parseClientArguments(argv);
|
|
32
|
+
const client=new FleetSessionClient({stateDir:flags['state-dir']??path.join(env.CODEX_HOME||path.join(os.homedir(),'.codex'),'fleet-client'),clientId:env.CODEX_THREAD_ID});
|
|
33
|
+
const operations=new FleetClientOperations(client);
|
|
34
|
+
switch(command){
|
|
35
|
+
case 'describe':return operations.describe();
|
|
36
|
+
case 'sessions':return client.sessions(flags.project);
|
|
37
|
+
case 'select':return client.select(flags.project,flags.peer);
|
|
38
|
+
case 'status':return operations.status();
|
|
39
|
+
case 'doctor': {
|
|
40
|
+
const dependency=(binary:string)=>{const r=spawnSync(binary,['--version'],{encoding:'utf8',timeout:3000,maxBuffer:4096});return {available:r.status===0,version:r.status===0?r.stdout.trim():null};};
|
|
41
|
+
return {node:process.version,python:dependency('python3'),herdr:dependency('herdr'),identityAvailable:!!env.CODEX_THREAD_ID,selection:env.CODEX_THREAD_ID?client.status():null,scope:'local client; no service lifecycle or model changes'};
|
|
42
|
+
}
|
|
43
|
+
case 'detach':return client.detach();
|
|
44
|
+
case 'activity':case 'summary':return operations.resync(true);
|
|
45
|
+
case 'resync':return operations.resync();
|
|
46
|
+
case 'replay':return operations.replay();
|
|
47
|
+
case 'receipts':return operations.receipts();
|
|
48
|
+
case 'questions':return operations.questions(flags.after);
|
|
49
|
+
case 'answer':return operations.answerQuestion(flags.id,flags.question,JSON.parse(readInstructionFile(flags['answer-file'])));
|
|
50
|
+
case 'cancel-question':return operations.answerQuestion(flags.id,flags.question,null);
|
|
51
|
+
case 'send':
|
|
52
|
+
return operations.send(flags.id,readInstructionFile(flags['text-file']),Number(flags['wait-ms']??1000));
|
|
53
|
+
case 'watch': {
|
|
54
|
+
const seconds=Number(flags.seconds);if(!Number.isInteger(seconds)||seconds<1||seconds>60)throw Error('watch seconds must be 1–60');
|
|
55
|
+
const end=Date.now()+seconds*1000;let count=0;
|
|
56
|
+
do {
|
|
57
|
+
// A source poll, not a model invocation. SIGINT ends only this local observer.
|
|
58
|
+
const start=Date.now();emit({type:'progress',...(await operations.resync(false,0))});count++;
|
|
59
|
+
const delay=Math.min(2000-(Date.now()-start),end-Date.now());if(delay>0)await new Promise(r=>setTimeout(r,delay));
|
|
60
|
+
}while(Date.now()<end);
|
|
61
|
+
return {type:'watch-ended',reason:'window elapsed; Pi continues independently',snapshots:count};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if(process.argv[1]&&fs.realpathSync(process.argv[1])===fileURLToPath(import.meta.url)){
|
|
66
|
+
const emit=(value:unknown)=>process.stdout.write(JSON.stringify(value)+'\n');
|
|
67
|
+
try {emit(await runClient(process.argv.slice(2),process.env,emit));}
|
|
68
|
+
catch(error){emit({error:error instanceof Error?error.message:'client failure'});process.exitCode=1;}
|
|
69
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Bounded read-only adapter; reuses Hermes readers without importing its server."""
|
|
3
|
+
import hashlib
|
|
4
|
+
import json
|
|
5
|
+
import os
|
|
6
|
+
import sys
|
|
7
|
+
import time
|
|
8
|
+
from datetime import datetime, timezone
|
|
9
|
+
from itertools import islice
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
# The fleet runtime root (.pi/agent-fleet), not the project root: the Hermes
|
|
13
|
+
# readers this reuses are siblings of .pi/agent-fleet/scripts/, and both move together.
|
|
14
|
+
FLEET_ROOT = Path(__file__).resolve().parent.parent
|
|
15
|
+
sys.path.insert(0, str(FLEET_ROOT / 'hermes/plugins/agent-fleet-herdr/dashboard'))
|
|
16
|
+
sys.path.insert(0, str(FLEET_ROOT / 'hermes/skills/hub-watchdog/scripts'))
|
|
17
|
+
import activity
|
|
18
|
+
import herdr_source
|
|
19
|
+
from watchdog_transport import discover, MonitorTransport
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def read_pane(project, peer):
|
|
23
|
+
try:
|
|
24
|
+
matches = [a for a in herdr_source.list_agents() if herdr_source.peer_key(a) == (project, peer) and a.get('agent') == 'pi']
|
|
25
|
+
if len(matches) != 1:
|
|
26
|
+
return {'paneId':None, 'state':'unknown', 'reason':'ambiguous' if matches else 'unavailable'}
|
|
27
|
+
a = matches[0]
|
|
28
|
+
return {'paneId':a.get('pane_id'), 'state':herdr_source.normalize_state(a.get('agent_status')), 'reason':''}
|
|
29
|
+
except herdr_source.HerdrUnavailable:
|
|
30
|
+
return {'paneId':None, 'state':'unknown', 'reason':'herdr unavailable'}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def read_activity(entry, cursor, root=None):
|
|
34
|
+
transcript, reason = activity.transcript_for_entry(entry, root=root)
|
|
35
|
+
if transcript is None:
|
|
36
|
+
return {**activity.unavailable(reason), 'cursor':cursor, 'gap':True}
|
|
37
|
+
info = transcript.stat()
|
|
38
|
+
identity = hashlib.sha256(f'{transcript}:{info.st_dev}:{info.st_ino}'.encode()).hexdigest()
|
|
39
|
+
after = cursor.get('seq', 0)
|
|
40
|
+
reset = bool(cursor) and (cursor.get('identity') != identity or after > info.st_size)
|
|
41
|
+
if reset: after = 0
|
|
42
|
+
steps = activity.steps_for_path(transcript)
|
|
43
|
+
fresh = [s for s in steps if s['seq'] > after]
|
|
44
|
+
result = activity.activity_for_entry(entry, after=after, limit=50, root=root)
|
|
45
|
+
# The canonical reader trims to newest whole lines. Surface that loss explicitly.
|
|
46
|
+
gap = reset or (info.st_size > activity.TAIL_BYTES and after < max(0, info.st_size-activity.TAIL_BYTES)) or len(fresh) > len(result['steps'])
|
|
47
|
+
return {**result, 'gap':gap, 'cursor':{'identity':identity, 'seq':result['seq']}, 'source':'pi_transcript'}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
TASK_FIELDS = ('id','generation','kind','state','specialist','parentId','parentGeneration','updatedAt','outputSequence')
|
|
51
|
+
|
|
52
|
+
def read_tasks(transport, tasks, owner, hub, cursors):
|
|
53
|
+
selected = [t for t in tasks if t.get('ownerSessionId') == owner]
|
|
54
|
+
# Fair bounded window: oldest unread outputs first, then current task metadata.
|
|
55
|
+
selected.sort(key=lambda t: (cursors.get(f"{owner}:{hub}:{t['id']}:{t['generation']}", 0) >= t.get('outputSequence', 0), t.get('updatedAt','')))
|
|
56
|
+
results, next_cursors, gap = [], dict(cursors), len(selected) > 100
|
|
57
|
+
reads, pending = 0, 0
|
|
58
|
+
for task in selected[:100]:
|
|
59
|
+
item = {k:task[k] for k in TASK_FIELDS if k in task}
|
|
60
|
+
item.update(ownerSessionId=owner, hubInstanceId=hub)
|
|
61
|
+
key = f"{owner}:{hub}:{task['id']}:{task['generation']}"
|
|
62
|
+
after = cursors.get(key, 0)
|
|
63
|
+
if reads < 8 and (key not in cursors or task.get('outputSequence', 0) > after):
|
|
64
|
+
reads += 1
|
|
65
|
+
try:
|
|
66
|
+
output = transport._call({'type':'output','taskId':task['id'],'generation':task['generation'],'afterSequence':after})['output']
|
|
67
|
+
text = output.get('text', '')
|
|
68
|
+
item['output'] = text[-32768:]
|
|
69
|
+
item['outputGap'] = bool(output.get('truncated') or len(text) > 32768 or output.get('firstSequence', 0) > after + 1)
|
|
70
|
+
gap = gap or item['outputGap']
|
|
71
|
+
next_cursors[key] = output.get('sequence', after)
|
|
72
|
+
except Exception:
|
|
73
|
+
item['outputUnavailable'] = True; gap = True
|
|
74
|
+
if reads >= 8 and (key not in next_cursors or task.get('outputSequence',0) > next_cursors.get(key,0)):
|
|
75
|
+
item['outputDeferred'] = True; pending += 1
|
|
76
|
+
results.append(item)
|
|
77
|
+
active_keys = {f"{owner}:{hub}:{t['id']}:{t['generation']}" for t in selected}
|
|
78
|
+
return {'tasks':results, 'pendingOutputs':pending, 'cursor':{k:v for k,v in next_cursors.items() if k in active_keys}, 'gap':gap}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def read_monitor(entry, cursor, wait_ms=0):
|
|
82
|
+
runtime = Path(os.environ.get('AGENT_FLEET_MONITOR_RUNTIME_DIR', f'/tmp/agent-fleet-monitor-{os.getuid()}'))
|
|
83
|
+
profile = os.environ.get('AGENT_FLEET_PROFILE_ID')
|
|
84
|
+
pattern = (hashlib.sha256(profile.encode()).hexdigest() if profile else '*') + '/*/discovery-*.json'
|
|
85
|
+
candidates = []
|
|
86
|
+
try:
|
|
87
|
+
if runtime.is_symlink() or runtime.stat().st_uid != os.getuid(): raise ValueError()
|
|
88
|
+
paths = list(islice(runtime.glob(pattern), 33))
|
|
89
|
+
if len(paths) > 32: raise ValueError()
|
|
90
|
+
for p in paths:
|
|
91
|
+
try:
|
|
92
|
+
d = discover(str(runtime), p.parent.parent.name, p.parent.name, datetime.now(timezone.utc))
|
|
93
|
+
if d['lease'].get('pid') == entry['pid']: candidates.append(d)
|
|
94
|
+
except Exception:
|
|
95
|
+
continue
|
|
96
|
+
except Exception:
|
|
97
|
+
return {'available':False, 'reason':'monitor discovery unavailable', 'tasks':[], 'cursor':cursor, 'gap':True}
|
|
98
|
+
if len(candidates) != 1:
|
|
99
|
+
return {'available':False, 'reason':'monitor missing or ambiguous for selected Pi process', 'tasks':[], 'cursor':cursor, 'gap':True}
|
|
100
|
+
d = candidates[0]; transport = MonitorTransport(d, timeout=2)
|
|
101
|
+
owner = d['owner']; hub = d['lease']['hub']
|
|
102
|
+
reset = bool(cursor) and cursor.get('owner') != owner
|
|
103
|
+
previous = {} if reset else cursor
|
|
104
|
+
gap = reset
|
|
105
|
+
try:
|
|
106
|
+
if wait_ms: time.sleep(min(wait_ms, 2000)/1000)
|
|
107
|
+
snap = transport.snapshot()['snapshot']
|
|
108
|
+
tasks = read_tasks(transport, snap.get('tasks',[]), owner, hub, previous.get('outputs',{}))
|
|
109
|
+
return {'available':True, 'source':'hub_monitor', 'tasks':tasks['tasks'], 'pendingOutputs':tasks['pendingOutputs'], 'gap':gap or tasks['gap'],
|
|
110
|
+
'cursor':{'owner':owner,'outputs':tasks['cursor']}}
|
|
111
|
+
except Exception:
|
|
112
|
+
return {'available':False, 'reason':'monitor unavailable', 'tasks':[], 'cursor':cursor, 'gap':True}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def project_replies(rows, pending):
|
|
116
|
+
"""Match Pi's own respond() audit to the assistant text it used, never a guessed next turn."""
|
|
117
|
+
replies, latest = [], None
|
|
118
|
+
wanted = set(pending)
|
|
119
|
+
for _, line in rows:
|
|
120
|
+
try: record = json.loads(line)
|
|
121
|
+
except ValueError: continue
|
|
122
|
+
if record.get('type') == 'message' and record.get('message',{}).get('role') == 'assistant':
|
|
123
|
+
content = record['message'].get('content')
|
|
124
|
+
if isinstance(content,str): latest = content
|
|
125
|
+
elif isinstance(content,list): latest = '\n'.join(c['text'] for c in content if c.get('type') == 'text' and isinstance(c.get('text'),str))
|
|
126
|
+
data = record.get('data',{})
|
|
127
|
+
if record.get('customType') == 'coms-log' and data.get('event') in ('outbound_response','outbound_response_failed') and data.get('msg_id') in wanted and latest is not None:
|
|
128
|
+
replies.append({'wireId':data['msg_id'], 'state':'failed' if data.get('error') else 'result', 'result':latest[:16000], 'truncated':len(latest)>16000})
|
|
129
|
+
return replies
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def read(request):
|
|
133
|
+
entry = request['entry']; cursor = request.get('cursor') or {}
|
|
134
|
+
pane = read_pane(request['project'], entry['name'])
|
|
135
|
+
transcript = read_activity(entry, cursor.get('activity',{}))
|
|
136
|
+
monitor = read_monitor(entry, cursor.get('monitor',{}), request.get('waitMs',0))
|
|
137
|
+
path, _ = activity.transcript_for_entry(entry)
|
|
138
|
+
replies = project_replies(activity.read_tail(path), request.get('pending', [])) if path else []
|
|
139
|
+
return {'replies':replies, 'observedAt':datetime.now(timezone.utc).isoformat(), 'pane':pane, 'activity':transcript, 'monitor':monitor,
|
|
140
|
+
'partial':not transcript['available'] or not monitor['available'] or transcript['gap'] or monitor['gap'] or bool(monitor.get('pendingOutputs')),
|
|
141
|
+
'cursor':{'activity':transcript['cursor'],'monitor':monitor['cursor']}}
|
|
142
|
+
|
|
143
|
+
if __name__ == '__main__':
|
|
144
|
+
try:
|
|
145
|
+
request = json.loads(sys.stdin.buffer.read(65537))
|
|
146
|
+
print(json.dumps(read(request), ensure_ascii=False))
|
|
147
|
+
except Exception:
|
|
148
|
+
print(json.dumps({'error':'read sources unavailable'})); sys.exit(1)
|