@chankov/agent-fleet 2.1.2 → 2.2.0
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/hooks/coms-stop-hook.mjs +53 -13
- package/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/README.md +223 -0
- package/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap-profile-0.167.json +5627 -0
- package/.pi/agent-fleet/scripts/fleet-codex-local-mcp.ts +4 -0
- package/.pi/agent-fleet/scripts/fleet.ts +13 -17
- package/.pi/agent-fleet/scripts/flow.ts +2 -2
- package/.pi/agent-fleet/scripts/lib/codex-bootstrap-files.ts +46 -0
- package/.pi/agent-fleet/scripts/lib/codex-bootstrap-probe.ts +44 -0
- package/.pi/agent-fleet/scripts/lib/codex-bootstrap-producer.ts +131 -0
- package/.pi/agent-fleet/scripts/lib/codex-daemon-observer.ts +137 -0
- package/.pi/agent-fleet/scripts/lib/codex-desktop-discovery.ts +84 -0
- package/.pi/agent-fleet/scripts/lib/codex-desktop-preflight.ts +130 -0
- package/.pi/agent-fleet/scripts/lib/codex-desktop-queue-host.ts +20 -13
- package/.pi/agent-fleet/scripts/lib/codex-measurement.ts +218 -0
- package/.pi/agent-fleet/scripts/lib/codex-native-presence.ts +61 -0
- package/.pi/agent-fleet/scripts/lib/codex-probe-transcript.ts +135 -0
- package/.pi/agent-fleet/scripts/lib/codex-send-lineage.ts +72 -0
- package/.pi/agent-fleet/scripts/lib/codex-unix-queue-rpc.ts +23 -13
- package/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist-store.ts +100 -14
- package/.pi/agent-fleet/scripts/lib/fleet-codex-answers.ts +1 -1
- package/.pi/agent-fleet/scripts/lib/fleet-codex-bootstrap.ts +204 -0
- package/.pi/agent-fleet/scripts/lib/fleet-codex-connections.ts +9 -3
- package/.pi/agent-fleet/scripts/lib/fleet-codex-event-runtime.ts +32 -16
- package/.pi/agent-fleet/scripts/lib/fleet-codex-local-mcp.ts +41 -21
- package/.pi/agent-fleet/scripts/lib/fleet-codex-permission-transport.ts +21 -0
- package/.pi/agent-fleet/scripts/lib/fleet-command.ts +4 -8
- package/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +2 -1
- package/.pi/agent-fleet/scripts/lib/team-project.ts +0 -2
- package/.pi/agent-fleet/scripts/team-up.ts +5 -12
- package/.pi/agent-fleet/scripts/workflows/lib/git.ts +9 -0
- package/.pi/agent-fleet/scripts/workflows/lib/quality.ts +17 -4
- package/.pi/agents/model-profiles.yaml +0 -2
- package/.pi/harnesses/agent-hub/README.md +116 -67
- package/.pi/harnesses/agent-hub/capability-packs.ts +7 -4
- package/.pi/harnesses/agent-hub/codex-bootstrap.ts +117 -0
- package/.pi/harnesses/agent-hub/commands/context.ts +0 -4
- package/.pi/harnesses/agent-hub/commands/recover.ts +2 -1
- package/.pi/harnesses/agent-hub/config/agents.ts +3 -1
- package/.pi/harnesses/agent-hub/config/model-profiles.ts +3 -0
- package/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +14 -1
- package/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +17 -0
- package/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +3 -1
- package/.pi/harnesses/agent-hub/dispatch-native-types.ts +4 -0
- package/.pi/harnesses/agent-hub/dispatch-native.ts +9 -3
- package/.pi/harnesses/agent-hub/drift-watchdog.js +5 -10
- package/.pi/harnesses/agent-hub/execution-trace.ts +1 -1
- package/.pi/harnesses/agent-hub/filesystem-tool.ts +1 -1
- package/.pi/harnesses/agent-hub/footer.ts +2 -3
- package/.pi/harnesses/agent-hub/helpers.ts +4 -5
- package/.pi/harnesses/agent-hub/history-projection.ts +1 -1
- package/.pi/harnesses/agent-hub/index.ts +213 -196
- package/.pi/harnesses/agent-hub/input/shortcuts.ts +0 -7
- package/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +0 -2
- package/.pi/harnesses/agent-hub/no-progress.ts +14 -9
- package/.pi/harnesses/agent-hub/operator-current-state.ts +5 -1
- package/.pi/harnesses/agent-hub/package.json +1 -1
- package/.pi/harnesses/agent-hub/policy/roster.ts +12 -3
- package/.pi/harnesses/agent-hub/policy/work-mode.ts +10 -49
- package/.pi/harnesses/agent-hub/poll-command.ts +12 -4
- package/.pi/harnesses/agent-hub/proactive-snapshot.ts +12 -4
- package/.pi/harnesses/agent-hub/process-obligations.ts +42 -9
- package/.pi/harnesses/agent-hub/prompts/context.ts +17 -0
- package/.pi/harnesses/agent-hub/prompts/fragments.ts +9 -1
- package/.pi/harnesses/agent-hub/prompts/session-start.ts +2 -3
- package/.pi/harnesses/agent-hub/prompts/system-prompt.ts +25 -8
- package/.pi/harnesses/agent-hub/provider-semaphore.js +5 -0
- package/.pi/harnesses/agent-hub/review-continuity.ts +5 -2
- package/.pi/harnesses/agent-hub/review-reuse.ts +2 -1
- package/.pi/harnesses/agent-hub/run-budget.js +22 -2
- package/.pi/harnesses/agent-hub/scope-gate.js +38 -0
- package/.pi/harnesses/agent-hub/scope-overlap.ts +46 -0
- package/.pi/harnesses/agent-hub/task-brief.ts +98 -0
- package/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +4 -0
- package/.pi/harnesses/agent-hub/tool-catalog-state.ts +5 -3
- package/.pi/harnesses/agent-hub/tools/action-executors.ts +5 -7
- package/.pi/harnesses/agent-hub/tools/context.ts +2 -0
- package/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +2 -1
- package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +184 -33
- package/.pi/harnesses/agent-hub/tools/poll-panel-core.ts +30 -0
- package/.pi/harnesses/agent-hub/tools/poll-panel.ts +33 -0
- package/.pi/harnesses/agent-hub/tools/run-flow.ts +41 -10
- package/.pi/harnesses/agent-hub/tools/team-adjust.ts +1 -1
- package/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +12 -2
- package/.pi/harnesses/agent-hub/work-mode.ts +44 -49
- package/.pi/harnesses/agent-hub/write-isolation.ts +53 -8
- package/.pi/harnesses/coms/package.json +1 -1
- package/.pi/harnesses/damage-control-continue/package.json +1 -1
- package/.pi/harnesses/lib/codex-compat.ts +97 -0
- package/.pi/harnesses/lib/codex-contract.ts +259 -0
- package/.pi/harnesses/lib/codex-notification-profile.ts +75 -0
- package/.pi/harnesses/lib/coms-core.ts +8 -4
- package/.pi/harnesses/lib/context-budget-child-prompt.ts +1 -1
- package/.pi/harnesses/lib/context-budget-hub-prompt.ts +6 -3
- package/.pi/harnesses/lib/fleet-bootstrap-channel.ts +148 -0
- package/.pi/harnesses/lib/fleet-codex-catalog.ts +30 -0
- package/.pi/harnesses/lib/fleet-codex-chat-view.ts +43 -0
- package/.pi/harnesses/lib/fleet-codex-namespace.ts +2 -0
- package/.pi/harnesses/lib/fleet-codex-policy-snapshot.ts +10 -0
- package/.pi/harnesses/lib/fleet-connection-control.ts +20 -3
- package/.pi/harnesses/lib/fleet-notification-admission.ts +32 -0
- package/.pi/harnesses/lib/fleet-notification-bootstrap.ts +152 -0
- package/.pi/harnesses/lib/fleet-notification-validation.ts +80 -25
- package/.pi/harnesses/lib/fleet-target-identity.ts +9 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/README.md +347 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
- package/.versions/2.2.0/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
- package/.versions/2.2.0/.pi/agent-fleet/hooks/coms-stop-hook.mjs +124 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/coms-claude-bridge.ts +440 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/coms-cli.ts +430 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +416 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/exec-at-target.ts +10 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/0.167-shared.json +1900 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/README.md +223 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/assessment.md +83 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap-profile-0.167.json +5627 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap-profile.md +43 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/bootstrap.md +45 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/capture-profile.ts +53 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/capture.ts +102 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/catalog.md +91 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/channel.md +21 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/measurement.md +133 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/measurements.json +74 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/notification-profile-0.167.json +2679 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/observer.md +101 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/opaque-response.md +57 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/open-sent.md +68 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/probe-reader.md +51 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/profile.md +71 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/projection.md +147 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/reconnect.md +40 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/response-unions.md +74 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/semver.md +124 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/codex-notification-contracts/surface.md +73 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/fleet-codex-allowlist-store-child.ts +31 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fixtures/response-fixture.ts +23 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fleet-codex-local-mcp.mjs +26 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fleet-codex-local-mcp.ts +63 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/fleet.ts +244 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/flow.ts +166 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-bootstrap-files.ts +46 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-bootstrap-probe.ts +44 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-bootstrap-producer.ts +131 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-daemon-observer.ts +137 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-desktop-discovery.ts +84 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-desktop-preflight.ts +130 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-desktop-queue-host.ts +113 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-measurement.ts +218 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-native-presence.ts +61 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-probe-transcript.ts +135 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-send-lineage.ts +72 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/codex-unix-queue-rpc.ts +101 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist-store.ts +453 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-allowlist.ts +175 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-answer-transport.ts +73 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-answers.ts +74 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-bootstrap.ts +204 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-connections.ts +76 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-event-reply.ts +58 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-event-runtime.ts +132 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-store.ts +428 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-instruction-transport.ts +160 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-instructions.ts +175 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-local-mcp.ts +435 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-native-history.ts +215 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-observation-store.ts +208 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-observe-transport.ts +49 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-observe.ts +93 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-overview.ts +52 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-permission-transport.ts +44 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-permissions.ts +83 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-readonly.ts +213 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-relay-latency.ts +45 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-response-read.ts +26 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-response-transport.ts +38 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-codex-resync.ts +212 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/fleet-command.ts +264 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/flow-command.ts +107 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +239 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/peer-target.ts +1 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/resource-closure.js +1 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/session-launch.ts +56 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/team-project.ts +176 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/lib/team-snapshot.ts +160 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/package-lock.json +57 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/package.json +10 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/peer-launch.ts +289 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/pi-session.ts +9 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/team-snapshot.ts +245 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/team-up.ts +378 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +181 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/env.ts +36 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/git.ts +108 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +130 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +137 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +37 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/quality.ts +78 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/run.ts +109 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/trace.ts +52 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/writer-lease-race.worker.mjs +36 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +148 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
- package/.versions/2.2.0/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
- package/.versions/2.2.0/.pi/agents/dispatch-policy.yaml +32 -0
- package/.versions/2.2.0/.pi/agents/model-profiles.yaml +132 -0
- package/.versions/2.2.0/.pi/agents/peers.yaml +147 -0
- package/.versions/2.2.0/.pi/agents/teams.yaml +41 -0
- package/.versions/2.2.0/.pi/agents/voices.yaml +13 -0
- package/.versions/2.2.0/.pi/damage-control-rules.yaml +297 -0
- package/.versions/2.2.0/.pi/extensions/btw/README.md +120 -0
- package/.versions/2.2.0/.pi/extensions/btw/index.ts +916 -0
- package/.versions/2.2.0/.pi/extensions/btw/package.json +6 -0
- package/.versions/2.2.0/.pi/extensions/btw/state.js +179 -0
- package/.versions/2.2.0/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
- package/.versions/2.2.0/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
- package/.versions/2.2.0/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/2.2.0/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/2.2.0/.pi/extensions/compact-and-continue/index.ts +136 -0
- package/.versions/2.2.0/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/2.2.0/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/2.2.0/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/2.2.0/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/2.2.0/.pi/extensions/package-lock.json +1175 -0
- package/.versions/2.2.0/.pi/extensions/package.json +9 -0
- package/.versions/2.2.0/.pi/extensions/pi-voice-stt/README.md +224 -0
- package/.versions/2.2.0/.pi/extensions/pi-voice-stt/config.ts +199 -0
- package/.versions/2.2.0/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
- package/.versions/2.2.0/.pi/extensions/pi-voice-stt/index.ts +248 -0
- package/.versions/2.2.0/.pi/extensions/pi-voice-stt/package.json +6 -0
- package/.versions/2.2.0/.pi/extensions/pi-voice-stt/providers.ts +214 -0
- package/.versions/2.2.0/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/README.md +1633 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/acceptance.ts +204 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/access-approval.ts +266 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-hub.ts +55 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/artifacts.js +146 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/assertion-ledger.js +68 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/assist-profile.ts +19 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/backend-policy.js +174 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/budget-recovery.ts +123 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/capability-packs.ts +187 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/codex-bootstrap.ts +117 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/config.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/context.ts +43 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/models.ts +10 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/recover.ts +62 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/config/agents.ts +183 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/config/model-profiles.ts +240 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/config/overrides.ts +166 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +234 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context/budgets.ts +152 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity-broker.ts +44 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity-client.ts +22 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity-compat.ts +45 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity-owners.ts +17 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-pressure.ts +222 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/context-window.js +108 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-approval.ts +83 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-hub.ts +263 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-owners.ts +59 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-state.ts +43 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/damage-guard-test-tsconfig.json +19 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/debate-command.ts +176 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/delegate.ts +478 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/deterministic-fs.ts +195 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-coms.ts +258 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-native-complete.ts +176 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +318 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +264 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-native-types.ts +297 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-native.ts +242 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/docs-lane.js +123 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/drift-watchdog.js +344 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/execution-evidence.ts +96 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/external-blocker.js +92 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/adapters.ts +88 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +62 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/broker.ts +128 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +42 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/descendant.ts +67 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +57 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/hub.ts +170 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +108 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/owners.ts +100 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/results.ts +55 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/runtime.ts +130 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/filesystem-tool.ts +166 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/fixtures/registration-surface.json +68 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/footer.ts +29 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/helpers.ts +269 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/history-projection.ts +116 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/hub-state-audit.js +41 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/index.ts +2722 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/input/completions.ts +82 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/input/shortcuts.ts +16 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +231 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +143 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +90 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/no-progress.ts +627 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/operator-current-state.ts +57 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/orchestration-activation.ts +109 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/orchestration-route.ts +68 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/package.json +7 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/permission-channel.ts +87 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/permission-relay.ts +84 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/policy/models.ts +153 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/policy/roster.ts +103 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/policy/work-mode.ts +103 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/poll-command.ts +184 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/presentation.ts +54 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/private-config-current-state.ts +81 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/private-config-fixtures.ts +26 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/private-config-review.ts +100 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-config.ts +22 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-snapshot.ts +287 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/proactive-types.ts +70 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/process-obligations.ts +210 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/prompts/context.ts +72 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/prompts/fragments.ts +94 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/prompts/session-start.ts +89 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/prompts/system-prompt.ts +142 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/provider-semaphore.js +143 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/reconcile.ts +26 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/recover-state.ts +104 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/recovery-contract.ts +151 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/research/controls.ts +74 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/research/runtime.ts +215 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/research/spawn-run.ts +221 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/return-contract.js +371 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/return-extract.js +77 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/review-closure.ts +43 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/review-continuity.ts +76 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/review-findings.js +96 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/review-reuse.ts +48 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/review-verdict.ts +6 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/run-budget.js +362 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/run-namespace.js +93 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/runtime-receipts.ts +63 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/runtime-test-check.ts +85 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/safety-routing.ts +28 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/scope-gate.js +271 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/scope-overlap.ts +46 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/session-audit.ts +331 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/session-health.js +110 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/session-start.ts +42 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/spawn.ts +702 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/specialist-result.ts +78 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/system1-communication-store.ts +225 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/system1-report.ts +275 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/system1-runtime.ts +271 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-brief.ts +98 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-continuation.ts +4 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-resume-contract.ts +80 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-authorization.ts +170 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-config.ts +21 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-obligations.ts +120 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-runtime.ts +130 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/timeline.ts +72 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +83 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tool-catalog-state.ts +125 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/action-executors.ts +214 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/context.ts +149 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +93 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +928 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/fleet-tools.ts +201 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/herdr-executors.ts +100 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/poll-panel-core.ts +30 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/poll-panel.ts +33 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/run-flow.ts +177 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tools/verification-contract.ts +81 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/tsconfig.json +22 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/types.ts +66 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/context-budget.ts +89 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +173 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/history.ts +234 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/version.ts +42 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/work-mode.ts +183 -0
- package/.versions/2.2.0/.pi/harnesses/agent-hub/write-isolation.ts +232 -0
- package/.versions/2.2.0/.pi/harnesses/ask-user-remote/README.md +59 -0
- package/.versions/2.2.0/.pi/harnesses/ask-user-remote/index.ts +571 -0
- package/.versions/2.2.0/.pi/harnesses/ask-user-remote/questions.ts +206 -0
- package/.versions/2.2.0/.pi/harnesses/ask-user-remote/race-core.js +124 -0
- package/.versions/2.2.0/.pi/harnesses/ask-user-remote/runtime-ask.ts +90 -0
- package/.versions/2.2.0/.pi/harnesses/coms/README.md +105 -0
- package/.versions/2.2.0/.pi/harnesses/coms/index.ts +308 -0
- package/.versions/2.2.0/.pi/harnesses/coms/package.json +7 -0
- package/.versions/2.2.0/.pi/harnesses/coms/version.ts +42 -0
- package/.versions/2.2.0/.pi/harnesses/damage-control-continue/README.md +161 -0
- package/.versions/2.2.0/.pi/harnesses/damage-control-continue/index.ts +659 -0
- package/.versions/2.2.0/.pi/harnesses/damage-control-continue/package.json +7 -0
- package/.versions/2.2.0/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
- package/.versions/2.2.0/.pi/harnesses/damage-control-continue/system1-child.ts +45 -0
- package/.versions/2.2.0/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
- package/.versions/2.2.0/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
- package/.versions/2.2.0/.pi/harnesses/damage-control-continue/version.ts +42 -0
- package/.versions/2.2.0/.pi/harnesses/lib/approval-wait.ts +17 -0
- package/.versions/2.2.0/.pi/harnesses/lib/bash-policy-analysis.ts +185 -0
- package/.versions/2.2.0/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
- package/.versions/2.2.0/.pi/harnesses/lib/clarification-policy.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/lib/codex-compat.ts +97 -0
- package/.versions/2.2.0/.pi/harnesses/lib/codex-contract.ts +259 -0
- package/.versions/2.2.0/.pi/harnesses/lib/codex-notification-profile.ts +75 -0
- package/.versions/2.2.0/.pi/harnesses/lib/coms-core-io.ts +422 -0
- package/.versions/2.2.0/.pi/harnesses/lib/coms-core.ts +738 -0
- package/.versions/2.2.0/.pi/harnesses/lib/coms-instruction-receipts.ts +113 -0
- package/.versions/2.2.0/.pi/harnesses/lib/coms-observation.ts +74 -0
- package/.versions/2.2.0/.pi/harnesses/lib/coms-registry-entry.ts +99 -0
- package/.versions/2.2.0/.pi/harnesses/lib/coms-response-read.ts +107 -0
- package/.versions/2.2.0/.pi/harnesses/lib/context-budget-child-prompt.ts +214 -0
- package/.versions/2.2.0/.pi/harnesses/lib/context-budget-hub-prompt.ts +124 -0
- package/.versions/2.2.0/.pi/harnesses/lib/context-budget-view.ts +112 -0
- package/.versions/2.2.0/.pi/harnesses/lib/context-budget.ts +114 -0
- package/.versions/2.2.0/.pi/harnesses/lib/context-compaction-policy.js +35 -0
- package/.versions/2.2.0/.pi/harnesses/lib/damage-action-hash.ts +28 -0
- package/.versions/2.2.0/.pi/harnesses/lib/damage-auto-policy.ts +52 -0
- package/.versions/2.2.0/.pi/harnesses/lib/damage-control-presentation.ts +14 -0
- package/.versions/2.2.0/.pi/harnesses/lib/damage-control-shared.ts +276 -0
- package/.versions/2.2.0/.pi/harnesses/lib/damage-guard-port.ts +25 -0
- package/.versions/2.2.0/.pi/harnesses/lib/damage-policy.ts +35 -0
- package/.versions/2.2.0/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
- package/.versions/2.2.0/.pi/harnesses/lib/damage-result-view.ts +16 -0
- package/.versions/2.2.0/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
- package/.versions/2.2.0/.pi/harnesses/lib/exact-permission-port.ts +38 -0
- package/.versions/2.2.0/.pi/harnesses/lib/execution-trace.ts +45 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-bootstrap-channel.ts +148 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-codex-catalog.ts +30 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-codex-chat-view.ts +43 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-codex-event-bridge.ts +82 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-codex-namespace.ts +2 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-codex-policy-snapshot.ts +10 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-config/cli-bridge.ts +111 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-config/mutations.ts +201 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-config/snapshot.ts +417 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-config/transition.ts +68 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-config/ui.ts +269 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-config/view.ts +338 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-connection-control.ts +94 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-dashboard-view.ts +174 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-event-source.ts +21 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-notification-admission.ts +32 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-notification-bootstrap.ts +152 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-notification-validation.ts +122 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-overlay.ts +26 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-panel.ts +34 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-question-reference.ts +42 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-read-model.ts +609 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-selection.ts +24 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-target-identity.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
- package/.versions/2.2.0/.pi/harnesses/lib/herdr-client.ts +472 -0
- package/.versions/2.2.0/.pi/harnesses/lib/herdr-presence.ts +399 -0
- package/.versions/2.2.0/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
- package/.versions/2.2.0/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
- package/.versions/2.2.0/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
- package/.versions/2.2.0/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
- package/.versions/2.2.0/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
- package/.versions/2.2.0/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
- package/.versions/2.2.0/.pi/harnesses/lib/identical-dialog.ts +27 -0
- package/.versions/2.2.0/.pi/harnesses/lib/installation-state.js +62 -0
- package/.versions/2.2.0/.pi/harnesses/lib/peer-target.ts +24 -0
- package/.versions/2.2.0/.pi/harnesses/lib/policy-roots.js +117 -0
- package/.versions/2.2.0/.pi/harnesses/lib/policy-roots.ts +32 -0
- package/.versions/2.2.0/.pi/harnesses/lib/process-shared.ts +9 -0
- package/.versions/2.2.0/.pi/harnesses/lib/resource-closure.js +26 -0
- package/.versions/2.2.0/.pi/harnesses/lib/safe-source-read.js +29 -0
- package/.versions/2.2.0/.pi/harnesses/lib/semantic-approval.ts +80 -0
- package/.versions/2.2.0/.pi/harnesses/lib/session-target.ts +62 -0
- package/.versions/2.2.0/.pi/harnesses/lib/spawned-peers.js +191 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/config-agentic.js +15 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/config-file-discovery.js +23 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/config-json.js +37 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/config-loader.js +53 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/config-proactive.js +68 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/config-triage.js +42 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/config-v2.js +112 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/config.js +50 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/contracts.ts +154 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/demo.ts +95 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/jev.ts +503 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/selection.js +11 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/service.ts +245 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/worktree-scopes.js +110 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/worktree-scopes.ts +13 -0
- package/.versions/2.2.0/.pi/harnesses/lib/system1/worktree-service.ts +24 -0
- package/.versions/2.2.0/.pi/harnesses/lib/target-capabilities.js +7 -0
- package/.versions/2.2.0/.pi/harnesses/lib/update-check.ts +227 -0
- package/.versions/2.2.0/.pi/harnesses/lib/workspace-context.js +115 -0
- package/.versions/2.2.0/.pi/harnesses/lib/workspace-context.ts +22 -0
- package/.versions/2.2.0/.pi/harnesses/package-lock.json +2121 -0
- package/.versions/2.2.0/.pi/harnesses/package.json +13 -0
- package/.versions/2.2.0/.pi/prompts/af-build.md +27 -0
- package/.versions/2.2.0/.pi/prompts/af-code-simplify.md +22 -0
- package/.versions/2.2.0/.pi/prompts/af-constraints.md +31 -0
- package/.versions/2.2.0/.pi/prompts/af-plan.md +17 -0
- package/.versions/2.2.0/.pi/prompts/af-review.md +16 -0
- package/.versions/2.2.0/.pi/prompts/af-set-hermes-telegram.md +15 -0
- package/.versions/2.2.0/.pi/prompts/af-set-hermes-watchdog.md +6 -0
- package/.versions/2.2.0/.pi/prompts/af-setup-rules.md +20 -0
- package/.versions/2.2.0/.pi/prompts/af-ship.md +17 -0
- package/.versions/2.2.0/.pi/prompts/af-spec.md +15 -0
- package/.versions/2.2.0/.pi/prompts/af-test.md +19 -0
- package/.versions/2.2.0/.pi/skills/bowser/SKILL.md +145 -0
- package/.versions/2.2.0/.version +1 -0
- package/.versions/2.2.0/agents/architect.md +24 -0
- package/.versions/2.2.0/agents/bowser.md +28 -0
- package/.versions/2.2.0/agents/builder.md +55 -0
- package/.versions/2.2.0/agents/code-reviewer.md +209 -0
- package/.versions/2.2.0/agents/deep-researcher.md +32 -0
- package/.versions/2.2.0/agents/documenter.md +22 -0
- package/.versions/2.2.0/agents/plan-reviewer.md +83 -0
- package/.versions/2.2.0/agents/planner.md +107 -0
- package/.versions/2.2.0/agents/releaser.md +24 -0
- package/.versions/2.2.0/agents/researcher.md +30 -0
- package/.versions/2.2.0/agents/security-auditor.md +167 -0
- package/.versions/2.2.0/agents/test-engineer.md +153 -0
- package/.versions/2.2.0/agents/web-debugger.md +44 -0
- package/.versions/2.2.0/agents/web-performance-auditor.md +194 -0
- package/.versions/2.2.0/bin/catalog/harness-runtime-closure.json +85 -0
- package/.versions/2.2.0/docs/ARCHITECTURE.md +1291 -0
- package/.versions/2.2.0/docs/agent-fleet-setup.md +1161 -0
- package/.versions/2.2.0/docs/claude-code-coms-bridge.md +147 -0
- package/.versions/2.2.0/docs/codex-local-mcp.md +520 -0
- package/.versions/2.2.0/docs/codex-session-bridge.md +44 -0
- package/.versions/2.2.0/docs/codex-setup.md +183 -0
- package/.versions/2.2.0/docs/coms-hermes-bridge.md +188 -0
- package/.versions/2.2.0/docs/fleet-native-voice.md +151 -0
- package/.versions/2.2.0/docs/getting-started.md +126 -0
- package/.versions/2.2.0/docs/npm-install.md +535 -0
- package/.versions/2.2.0/docs/pi-extensions.md +450 -0
- package/.versions/2.2.0/docs/pi-setup.md +92 -0
- package/.versions/2.2.0/docs/skill-anatomy.md +150 -0
- package/.versions/2.2.0/install-manifest.json +3226 -0
- package/.versions/2.2.0/justfile +246 -0
- package/.versions/2.2.0/manifest-meta.json +1098 -0
- package/.versions/2.2.0/references/accessibility-checklist.md +160 -0
- package/.versions/2.2.0/references/communication-contract.md +26 -0
- package/.versions/2.2.0/references/definition-of-done.md +67 -0
- package/.versions/2.2.0/references/fleet-coordination-patterns.md +171 -0
- package/.versions/2.2.0/references/observability-checklist.md +92 -0
- package/.versions/2.2.0/references/orchestration-patterns.md +370 -0
- package/.versions/2.2.0/references/performance-checklist.md +236 -0
- package/.versions/2.2.0/references/prompting-patterns.md +380 -0
- package/.versions/2.2.0/references/security-checklist.md +245 -0
- package/.versions/2.2.0/references/testing-patterns.md +235 -0
- package/.versions/2.2.0/references/workflow-authoring.md +304 -0
- package/.versions/2.2.0/skills/_internal/grilling.md +59 -0
- package/.versions/2.2.0/skills/browser-testing-with-devtools/SKILL.md +351 -0
- package/.versions/2.2.0/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.2.0/skills/compound-learning/SKILL.md +137 -0
- package/.versions/2.2.0/skills/constraint-driven-development/SKILL.md +338 -0
- package/.versions/2.2.0/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.2.0/skills/context-engineering/SKILL.md +341 -0
- package/.versions/2.2.0/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.2.0/skills/designing-agents/SKILL.md +394 -0
- package/.versions/2.2.0/skills/designing-agents/pi-harness-authoring.md +222 -0
- package/.versions/2.2.0/skills/drafting-workflows/SKILL.md +143 -0
- package/.versions/2.2.0/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
- package/.versions/2.2.0/skills/fleet-connect/SKILL.md +29 -0
- package/.versions/2.2.0/skills/fleet-connect.zip +0 -0
- package/.versions/2.2.0/skills/fleet-native-voice/SKILL.md +103 -0
- package/.versions/2.2.0/skills/fleet-native-voice/agents/openai.yaml +4 -0
- package/.versions/2.2.0/skills/fleet-native-voice.zip +0 -0
- package/.versions/2.2.0/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.2.0/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/2.2.0/skills/idea-refine/SKILL.md +182 -0
- package/.versions/2.2.0/skills/idea-refine/examples.md +238 -0
- package/.versions/2.2.0/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.2.0/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.2.0/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.2.0/skills/incremental-implementation/SKILL.md +353 -0
- package/.versions/2.2.0/skills/incremental-implementation.zip +0 -0
- package/.versions/2.2.0/skills/interview-me/SKILL.md +226 -0
- package/.versions/2.2.0/skills/orchestration-verification/SKILL.md +182 -0
- package/.versions/2.2.0/skills/peer-coms/SKILL.md +90 -0
- package/.versions/2.2.0/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.2.0/skills/planning-and-task-breakdown/SKILL.md +318 -0
- package/.versions/2.2.0/skills/planning-and-task-breakdown.zip +0 -0
- package/.versions/2.2.0/skills/repository-ai-setup/SKILL.md +135 -0
- package/.versions/2.2.0/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
- package/.versions/2.2.0/skills/repository-ai-setup/references/apply-contract.md +74 -0
- package/.versions/2.2.0/skills/repository-ai-setup/references/provenance-template.md +16 -0
- package/.versions/2.2.0/skills/repository-ai-setup/references/setup-flow.md +108 -0
- package/.versions/2.2.0/skills/repository-ai-setup/references/verify-setup.md +20 -0
- package/.versions/2.2.0/skills/repository-ai-setup.zip +0 -0
- package/.versions/2.2.0/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.2.0/skills/spec-driven-development/SKILL.md +295 -0
- package/.versions/2.2.0/skills/spec-driven-development.zip +0 -0
- package/.versions/2.2.0/skills/using-agent-skills/SKILL.md +198 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/LICENSE +21 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/README.md +430 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
- package/.versions/2.2.0/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
- package/CHANGELOG.md +33 -0
- package/README.md +7 -10
- package/bin/lib/set-codex-mcp.js +1 -1
- package/bin/lib/validate-overrides.js +8 -1
- package/docs/ARCHITECTURE.md +122 -26
- package/docs/MIGRATION-agent-fleet.md +26 -5
- package/docs/agent-fleet-setup.md +44 -26
- package/docs/claude-code-coms-bridge.md +1 -1
- package/docs/codex-local-mcp.md +29 -12
- package/docs/codex-session-bridge.md +2 -2
- package/docs/codex-setup.md +1 -1
- package/docs/fleet-native-voice.md +10 -4
- package/docs/npm-install.md +1 -1
- package/docs/pi-extensions.md +13 -18
- package/docs/system1-agentic.md +1 -1
- package/docs/system1-file-discovery.md +2 -2
- package/docs/workflows.md +24 -1
- package/install-manifest.json +15 -28
- package/justfile +3 -4
- package/manifest-meta.json +13 -2
- package/package.json +4 -2
- package/skills/fleet-connect/SKILL.md +20 -16
- package/skills/fleet-connect.zip +0 -0
- package/skills/fleet-native-voice.zip +0 -0
- package/.pi/harnesses/agent-hub/commands/work-mode.ts +0 -29
- package/.pi/harnesses/agent-hub/work-mode-controls.ts +0 -56
- package/agents/orchestrator.md +0 -22
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import {sessionRootsFromEnv,projectForSession,executionRoot} from "../../harnesses/lib/workspace-context.ts";
|
|
2
|
+
// .pi/agent-fleet/scripts/coms-claude-bridge.ts
|
|
3
|
+
//
|
|
4
|
+
// The Claude Code ↔ coms bridge: one bridge per Claude Code pane, launched
|
|
5
|
+
// next to it (the `_claude-peer` recipe backgrounds the bridge in the same
|
|
6
|
+
// herdr pane). It makes an interactive Claude Code a first-class coms peer:
|
|
7
|
+
//
|
|
8
|
+
// (a) binds a coms endpoint + registry entry under --name, so the Claude
|
|
9
|
+
// pane appears in every pool widget and is addressable via coms_send;
|
|
10
|
+
// (b) inbound prompt envelope → pane.send_text into the Claude pane
|
|
11
|
+
// (+ Enter as a separate send — spike quirk);
|
|
12
|
+
// (c) completion, primary path: the Claude Code Stop hook
|
|
13
|
+
// (.pi/agent-fleet/hooks/coms-stop-hook.mjs) writes the turn's last message to
|
|
14
|
+
// ~/.pi/coms/claude-bridge/<pane>/last-message.json; fallback when no
|
|
15
|
+
// hook has ever fired for this pane: a <<COMS_DONE:msg_id>> sentinel is
|
|
16
|
+
// requested in the prompt and scraped via pane.read after herdr reports
|
|
17
|
+
// the agent done;
|
|
18
|
+
// (d) sends the response envelope back to the sender;
|
|
19
|
+
// (e) a `blocked` agent status returns a readable error envelope instead of
|
|
20
|
+
// hanging until timeout;
|
|
21
|
+
// (f) prompts are strictly serialized per pane; queue depth is reported in
|
|
22
|
+
// the agent card + the pane's herdr peer annotation.
|
|
23
|
+
//
|
|
24
|
+
// usage: coms-claude-bridge.ts --name <peer-name> [--pane <pane_id>]
|
|
25
|
+
// [--project <p>] [--reply-timeout <ms>]
|
|
26
|
+
// --pane defaults to HERDR_PANE_ID (set inside every herdr pane).
|
|
27
|
+
|
|
28
|
+
import * as fs from "node:fs";
|
|
29
|
+
import * as os from "node:os";
|
|
30
|
+
import * as path from "node:path";
|
|
31
|
+
import { fileURLToPath } from "node:url";
|
|
32
|
+
|
|
33
|
+
import {
|
|
34
|
+
bindEndpoint,
|
|
35
|
+
ensureComsDirs,
|
|
36
|
+
isPromptEnvelope,
|
|
37
|
+
makeConnHandler,
|
|
38
|
+
makeEndpoint,
|
|
39
|
+
makeResponseEnvelope,
|
|
40
|
+
nowIso,
|
|
41
|
+
paneAgentStatusToPeerStatus,
|
|
42
|
+
removeRegistryEntry,
|
|
43
|
+
resolveUniqueName,
|
|
44
|
+
sendEnvelope,
|
|
45
|
+
ulid,
|
|
46
|
+
writeAck,
|
|
47
|
+
writeNack,
|
|
48
|
+
writeRegistryAtomic,
|
|
49
|
+
type AgentCard,
|
|
50
|
+
type PeerStatus,
|
|
51
|
+
type PromptEnvelope,
|
|
52
|
+
type RegistryEntry,
|
|
53
|
+
type SenderIdentity,
|
|
54
|
+
} from "./lib/coms-envelope.ts";
|
|
55
|
+
import {
|
|
56
|
+
extractSentinelReply,
|
|
57
|
+
formatPanePrompt,
|
|
58
|
+
idleWaitBudgetMs,
|
|
59
|
+
idleWaitDelayMs,
|
|
60
|
+
isReplyPendingError,
|
|
61
|
+
parseHookRecord,
|
|
62
|
+
PromptQueue,
|
|
63
|
+
REPLY_TIMEOUT_HARD_CAP_MS,
|
|
64
|
+
ReplyPendingError,
|
|
65
|
+
replyDeadlineAt,
|
|
66
|
+
resolveReplyTimeoutMs,
|
|
67
|
+
waitForClaudePaneReady,
|
|
68
|
+
} from "./lib/claude-bridge-core.ts";
|
|
69
|
+
import { herdr, requireHerdr, HerdrUnavailableError } from "../../../.pi/harnesses/lib/herdr-client.ts";
|
|
70
|
+
import { HerdrPresence } from "../../../.pi/harnesses/lib/herdr-presence.ts";
|
|
71
|
+
import { buildLiveRegistryEntry, type ComsIdentity } from "../../../.pi/harnesses/lib/coms-registry-entry.ts";
|
|
72
|
+
|
|
73
|
+
const KEEPALIVE_MS = 30_000;
|
|
74
|
+
const ENTER_DELAY_MS = 1_500;
|
|
75
|
+
const POLL_MS = 1_000;
|
|
76
|
+
// 30 minutes, matching coms_await's own default (PI_COMS_TIMEOUT_MS). The old
|
|
77
|
+
// 10-minute default silently truncated every longer request: a caller asking for
|
|
78
|
+
// 1_800_000ms was still failed at 600_000ms.
|
|
79
|
+
const DEFAULT_REPLY_TIMEOUT_MS = 1_800_000;
|
|
80
|
+
const COLOR = "#FF8B39";
|
|
81
|
+
|
|
82
|
+
function flagValue(argv: string[], flag: string): string | null {
|
|
83
|
+
const i = argv.indexOf(flag);
|
|
84
|
+
return i >= 0 && i + 1 < argv.length ? argv[i + 1] : null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function die(msg: string): never {
|
|
88
|
+
console.error(`coms-claude-bridge: ${msg}`);
|
|
89
|
+
process.exit(1);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function hookWatchDir(paneId: string): string {
|
|
93
|
+
return path.join(os.homedir(), ".pi", "coms", "claude-bridge", paneId.replace(/[^A-Za-z0-9_-]/g, "_"));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// ── registry record ──
|
|
97
|
+
//
|
|
98
|
+
// Split in two on purpose. The identity is built ONCE, at registration, and
|
|
99
|
+
// holds `started_at`; the entry is rebuilt on every 30s keepalive from that
|
|
100
|
+
// same identity. The bridge used to rebuild the whole record inline with
|
|
101
|
+
// `started_at: nowIso()`, so the field never held the start of anything and
|
|
102
|
+
// every bridged Claude peer reported an uptime of at most one tick — the bug
|
|
103
|
+
// the pi harnesses fixed by centralising on buildLiveRegistryEntry. Reusing it
|
|
104
|
+
// here rather than keeping a third copy is the point.
|
|
105
|
+
|
|
106
|
+
export function bridgeRegistryIdentity(reg: {
|
|
107
|
+
sessionId: string;
|
|
108
|
+
name: string;
|
|
109
|
+
purpose: string;
|
|
110
|
+
endpoint: string;
|
|
111
|
+
cwd: string;
|
|
112
|
+
startedAt: string;
|
|
113
|
+
}): ComsIdentity {
|
|
114
|
+
return {
|
|
115
|
+
session_id: reg.sessionId,
|
|
116
|
+
name: reg.name,
|
|
117
|
+
purpose: reg.purpose,
|
|
118
|
+
// A bridged pane is Claude Code by construction — there is no live ctx to
|
|
119
|
+
// re-read a model from, so the registered one is the only one.
|
|
120
|
+
model: "claude-code",
|
|
121
|
+
color: COLOR,
|
|
122
|
+
endpoint: reg.endpoint,
|
|
123
|
+
cwd: reg.cwd,
|
|
124
|
+
explicit: false,
|
|
125
|
+
started_at: reg.startedAt,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function bridgeRegistryEntry(
|
|
130
|
+
identity: ComsIdentity,
|
|
131
|
+
live: { now: string; pid: number; queueDepth: number },
|
|
132
|
+
): RegistryEntry {
|
|
133
|
+
return buildLiveRegistryEntry(identity, {
|
|
134
|
+
now: live.now,
|
|
135
|
+
pid: live.pid,
|
|
136
|
+
// External context is not observable. Unknown is not a measured zero.
|
|
137
|
+
contextUsedPct: null,
|
|
138
|
+
queueDepth: live.queueDepth,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
async function main(): Promise<void> {
|
|
143
|
+
const argv = process.argv.slice(2);
|
|
144
|
+
const name = flagValue(argv, "--name") ?? die("--name <peer-name> is required");
|
|
145
|
+
const rawProject=flagValue(argv, "--project")??"default",roots=sessionRootsFromEnv();
|
|
146
|
+
const project=roots?.mode==="targeted"?projectForSession(rawProject,roots).project:rawProject;
|
|
147
|
+
const paneId = flagValue(argv, "--pane") ?? process.env.HERDR_PANE_ID ?? die("--pane <pane_id> required (or run inside a herdr pane)");
|
|
148
|
+
const replyTimeoutMs = Number(flagValue(argv, "--reply-timeout") ?? DEFAULT_REPLY_TIMEOUT_MS);
|
|
149
|
+
|
|
150
|
+
try {
|
|
151
|
+
await requireHerdr();
|
|
152
|
+
} catch (err) {
|
|
153
|
+
if (err instanceof HerdrUnavailableError) die(err.message);
|
|
154
|
+
throw err;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// `_claude-peer` backgrounds this bridge before the shell starts Claude Code.
|
|
158
|
+
// Do not publish a coms identity during that gap: Hub peer readiness is based
|
|
159
|
+
// on registration, and an immediate prompt typed into the still-booting pane
|
|
160
|
+
// is lost while the Claude TUI replaces the shell screen.
|
|
161
|
+
const startup = await waitForClaudePaneReady(async () => (await herdr.paneGet(paneId)).pane);
|
|
162
|
+
if (!startup.ready) {
|
|
163
|
+
die(`Claude Code was not detected as ready in pane ${paneId} after ${Math.round(startup.waitedMs / 1000)}s`);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// ── identity ──
|
|
167
|
+
ensureComsDirs(project);
|
|
168
|
+
const sessionId = ulid();
|
|
169
|
+
const uniqueName = resolveUniqueName(project, name);
|
|
170
|
+
const id: SenderIdentity = {
|
|
171
|
+
session_id: sessionId,
|
|
172
|
+
name: uniqueName,
|
|
173
|
+
endpoint: makeEndpoint(sessionId),
|
|
174
|
+
cwd: executionRoot(process.cwd()),
|
|
175
|
+
};
|
|
176
|
+
const queue = new PromptQueue<PromptEnvelope>();
|
|
177
|
+
const purpose = "Claude Code (bridged pane)";
|
|
178
|
+
|
|
179
|
+
// Built once — `started_at` is registration time and stays put across every
|
|
180
|
+
// keepalive rebuild below.
|
|
181
|
+
const registryIdentity = bridgeRegistryIdentity({
|
|
182
|
+
sessionId,
|
|
183
|
+
name: uniqueName,
|
|
184
|
+
purpose,
|
|
185
|
+
endpoint: id.endpoint,
|
|
186
|
+
cwd: id.cwd,
|
|
187
|
+
startedAt: nowIso(),
|
|
188
|
+
});
|
|
189
|
+
if(roots?.mode==='targeted')registryIdentity.targetId=roots.targetId;
|
|
190
|
+
|
|
191
|
+
function registryEntry(): RegistryEntry {
|
|
192
|
+
return bridgeRegistryEntry(registryIdentity, {
|
|
193
|
+
now: nowIso(),
|
|
194
|
+
pid: process.pid,
|
|
195
|
+
queueDepth: queue.depth,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const hookDir = hookWatchDir(paneId);
|
|
200
|
+
fs.mkdirSync(hookDir, { recursive: true });
|
|
201
|
+
const hookFile = path.join(hookDir, "last-message.json");
|
|
202
|
+
// Hook mode flips on permanently the first time the Stop hook writes for
|
|
203
|
+
// this pane; until then prompts carry the sentinel instruction.
|
|
204
|
+
let hookSeen = fs.existsSync(hookFile);
|
|
205
|
+
|
|
206
|
+
// Latest known pane state. The ping handler is synchronous — a pool refresh
|
|
207
|
+
// must not block on a herdr round trip per peer — so it answers from this
|
|
208
|
+
// cache, which `paneStatus()` refreshes on the keepalive and on every poll
|
|
209
|
+
// during a turn. Starts at "booting": registered, nothing observed yet.
|
|
210
|
+
let lastPaneState: PeerStatus = "booting";
|
|
211
|
+
/** What this bridge reports to a sender: a queued prompt already means busy. */
|
|
212
|
+
const peerStatus = (): PeerStatus => (queue.depth > 0 ? "working" : lastPaneState);
|
|
213
|
+
|
|
214
|
+
// ── envelope server ──
|
|
215
|
+
const server = await bindEndpoint(
|
|
216
|
+
id.endpoint,
|
|
217
|
+
makeConnHandler((env, socket) => {
|
|
218
|
+
if (isPromptEnvelope(env)) {
|
|
219
|
+
if (env.hops >= 5) {
|
|
220
|
+
writeNack(socket, env.msg_id, "hops exceeded");
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
queue.push(env);
|
|
224
|
+
writeAck(socket, env.msg_id);
|
|
225
|
+
void pump();
|
|
226
|
+
} else if ((env as { type?: string }).type === "ping") {
|
|
227
|
+
const card: AgentCard = {
|
|
228
|
+
name: uniqueName,
|
|
229
|
+
purpose,
|
|
230
|
+
model: "claude-code",
|
|
231
|
+
color: COLOR,
|
|
232
|
+
context_used_pct: null,
|
|
233
|
+
context_measurement: 'unknown',
|
|
234
|
+
queue_depth: queue.depth,
|
|
235
|
+
pane_id: paneId,
|
|
236
|
+
status: peerStatus(),
|
|
237
|
+
};
|
|
238
|
+
try {
|
|
239
|
+
socket.write(JSON.stringify({ type: "pong", msg_id: (env as { msg_id?: string }).msg_id ?? "", agent_card: card }) + "\n");
|
|
240
|
+
} catch { /* ignore */ }
|
|
241
|
+
try { socket.end(); } catch { /* ignore */ }
|
|
242
|
+
} else {
|
|
243
|
+
writeNack(socket, (env as { msg_id?: string }).msg_id ?? "", "bridge accepts prompts and pings");
|
|
244
|
+
}
|
|
245
|
+
}),
|
|
246
|
+
);
|
|
247
|
+
writeRegistryAtomic(registryEntry(), project);
|
|
248
|
+
console.error(`coms-claude-bridge: ${uniqueName}@${project} bridging pane ${paneId}`);
|
|
249
|
+
|
|
250
|
+
// ── presence ──
|
|
251
|
+
// Annotation ONLY, never pane.report_agent: this pane's `agent_status` is
|
|
252
|
+
// herdr's own Claude detection, and driveClaude() polls it back to decide a
|
|
253
|
+
// turn is over. A state we reported ourselves would be us answering our own
|
|
254
|
+
// question. Dialect negotiation (tokens on herdr >= 0.7.4, one latched
|
|
255
|
+
// fallback to custom_status) is HerdrPresence's job — a second copy here is
|
|
256
|
+
// how the bridge stayed on the removed field while the pi path was fixed.
|
|
257
|
+
const presence = new HerdrPresence({
|
|
258
|
+
paneId,
|
|
259
|
+
source: `coms-bridge:${sessionId}`,
|
|
260
|
+
agentLabel: "claude",
|
|
261
|
+
onError: (err, dialect) =>
|
|
262
|
+
console.error(`coms-claude-bridge: herdr rejected the ${dialect} annotation: ${err.message}`),
|
|
263
|
+
});
|
|
264
|
+
async function reportPresence(): Promise<void> {
|
|
265
|
+
// context_used_pct is not observable from outside a Claude pane; 0 is
|
|
266
|
+
// what the agent card carries too, so the sidebar and the card agree.
|
|
267
|
+
await presence.annotate({ name: uniqueName, project, contextUsedPct: null, queueDepth: queue.depth });
|
|
268
|
+
}
|
|
269
|
+
const keepalive = setInterval(() => {
|
|
270
|
+
try {
|
|
271
|
+
writeRegistryAtomic(registryEntry(), project);
|
|
272
|
+
} catch { /* best-effort */ }
|
|
273
|
+
void reportPresence();
|
|
274
|
+
// Keep the ping cache warm between turns, so an idle pane is reported as
|
|
275
|
+
// idle rather than staying "booting" until someone sends to it.
|
|
276
|
+
void paneStatus();
|
|
277
|
+
}, KEEPALIVE_MS);
|
|
278
|
+
keepalive.unref?.();
|
|
279
|
+
void reportPresence();
|
|
280
|
+
void paneStatus();
|
|
281
|
+
|
|
282
|
+
// ── prompt processing (strictly serial) ──
|
|
283
|
+
async function pump(): Promise<void> {
|
|
284
|
+
const item = queue.take();
|
|
285
|
+
if (!item) return;
|
|
286
|
+
const env = item.envelope;
|
|
287
|
+
try {
|
|
288
|
+
await respondToClaudePrompt(env, id, () => driveClaude(env, drivePorts), sendEnvelope);
|
|
289
|
+
} finally {
|
|
290
|
+
queue.done();
|
|
291
|
+
void reportPresence();
|
|
292
|
+
void pump(); // next in line
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
async function paneStatus(): Promise<string> {
|
|
297
|
+
try {
|
|
298
|
+
const { pane } = await herdr.paneGet(paneId);
|
|
299
|
+
const status = (pane.agent_status as string) ?? "unknown";
|
|
300
|
+
lastPaneState = paneAgentStatusToPeerStatus(status);
|
|
301
|
+
return status;
|
|
302
|
+
} catch {
|
|
303
|
+
return "unknown";
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
const drivePorts: ClaudeDrivePorts = {
|
|
308
|
+
paneId, replyTimeoutMs, paneStatus,
|
|
309
|
+
hookSeen: () => hookSeen, markHookSeen: () => { hookSeen = true; },
|
|
310
|
+
readHook: () => {
|
|
311
|
+
try { return { mtime: fs.statSync(hookFile).mtimeMs, raw: fs.readFileSync(hookFile, "utf-8") }; }
|
|
312
|
+
catch { return null; }
|
|
313
|
+
},
|
|
314
|
+
readPane: async () => (await herdr.paneRead({ pane_id: paneId, source: "recent", lines: 200 })).read.text,
|
|
315
|
+
sendText: text => herdr.paneSendText(paneId, text),
|
|
316
|
+
sendEnter: () => herdr.paneSendKeys(paneId, ["enter"]), log: console.error,
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
// ── shutdown ──
|
|
320
|
+
let shuttingDown = false;
|
|
321
|
+
function shutdown(): void {
|
|
322
|
+
if (shuttingDown) return;
|
|
323
|
+
shuttingDown = true;
|
|
324
|
+
clearInterval(keepalive);
|
|
325
|
+
try { server.close(); } catch { /* ignore */ }
|
|
326
|
+
try { fs.unlinkSync(id.endpoint); } catch { /* ignore */ }
|
|
327
|
+
removeRegistryEntry(project, uniqueName);
|
|
328
|
+
process.exit(0);
|
|
329
|
+
}
|
|
330
|
+
process.on("SIGTERM", shutdown);
|
|
331
|
+
process.on("SIGINT", shutdown);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export interface ClaudeDrivePorts {
|
|
335
|
+
paneId: string; replyTimeoutMs: number;
|
|
336
|
+
hookSeen(): boolean; markHookSeen(): void;
|
|
337
|
+
readHook(): { mtime: number; raw: string } | null;
|
|
338
|
+
paneStatus(): Promise<string>; readPane(): Promise<string>;
|
|
339
|
+
sendText(text: string): Promise<unknown>; sendEnter(): Promise<unknown>;
|
|
340
|
+
now?(): number; sleep?(ms: number): Promise<void>; log?(text: string): void;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// The same emission path is used by the serial production pump and local tests.
|
|
344
|
+
export async function respondToClaudePrompt(env: PromptEnvelope, identity: SenderIdentity,
|
|
345
|
+
drive: () => Promise<string>, send: typeof sendEnvelope, log: (text: string) => void = console.error): Promise<void> {
|
|
346
|
+
try { await send(env.sender_endpoint, makeResponseEnvelope(identity, env.msg_id, await drive())); }
|
|
347
|
+
catch (err) {
|
|
348
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
349
|
+
if (isReplyPendingError(err)) log(`coms-claude-bridge: ${env.msg_id} remains pending: ${message}`);
|
|
350
|
+
else { try { await send(env.sender_endpoint, makeResponseEnvelope(identity, env.msg_id, null, message)); }
|
|
351
|
+
catch { log(`coms-claude-bridge: could not deliver error for ${env.msg_id}: ${message}`); } }
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export async function driveClaude(env: PromptEnvelope, d: ClaudeDrivePorts): Promise<string> {
|
|
356
|
+
const { paneId, replyTimeoutMs, paneStatus } = d;
|
|
357
|
+
const now = d.now ?? Date.now;
|
|
358
|
+
const sleep = d.sleep ?? (async (ms: number) => { await new Promise(r => setTimeout(r, ms)); });
|
|
359
|
+
const requestBoundary = `<<COMS_REQUEST:${env.msg_id}:${ulid()}>>`;
|
|
360
|
+
const sentinelMode = !d.hookSeen();
|
|
361
|
+
// The caller's declared deadline wins over the bridge default (clamped).
|
|
362
|
+
// One absolute deadline covers BOTH idle waiting and the reply; otherwise a
|
|
363
|
+
// two-minute busy wait silently extends the caller's budget.
|
|
364
|
+
const effectiveTimeoutMs = resolveReplyTimeoutMs(env.reply_timeout_ms, replyTimeoutMs);
|
|
365
|
+
const startedAt = now();
|
|
366
|
+
const replyDeadline = replyDeadlineAt(startedAt, effectiveTimeoutMs);
|
|
367
|
+
|
|
368
|
+
// Claude Code must be idle-ish before we type into its input box — but a busy
|
|
369
|
+
// pane is a wait, not a failure. Throwing here made every mid-turn moment a
|
|
370
|
+
// hard error and pushed callers into hot-retry loops.
|
|
371
|
+
const waitDeadline = Math.min(replyDeadline, startedAt + idleWaitBudgetMs(effectiveTimeoutMs));
|
|
372
|
+
const waitStarted = startedAt;
|
|
373
|
+
for (let attempt = 0; ; attempt++) {
|
|
374
|
+
if (await paneStatus() !== "working") break;
|
|
375
|
+
const remaining = waitDeadline - now();
|
|
376
|
+
if (remaining <= 0) {
|
|
377
|
+
throw new Error(
|
|
378
|
+
`Claude Code in pane ${paneId} is still mid-turn after waiting ` +
|
|
379
|
+
`${Math.round((now() - waitStarted) / 1000)}s — try again shortly`,
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
await sleep(Math.min(idleWaitDelayMs(attempt), remaining));
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// Snapshot immediately before submission, not before a potentially long busy wait.
|
|
386
|
+
const hookMtimeBefore = d.readHook()?.mtime ?? 0;
|
|
387
|
+
await d.sendText(formatPanePrompt(env, sentinelMode, requestBoundary));
|
|
388
|
+
await sleep(ENTER_DELAY_MS);
|
|
389
|
+
await d.sendEnter();
|
|
390
|
+
|
|
391
|
+
// The sender's local await returns `pending` at replyDeadline, but the
|
|
392
|
+
// bridge keeps watching the already-running turn up to the hard cap so a
|
|
393
|
+
// late completion can still resolve the original msg_id.
|
|
394
|
+
const monitorDeadline = replyDeadlineAt(startedAt, REPLY_TIMEOUT_HARD_CAP_MS);
|
|
395
|
+
let pendingLogged = false;
|
|
396
|
+
let sawWorking = false;
|
|
397
|
+
while (now() < monitorDeadline) {
|
|
398
|
+
await sleep(POLL_MS);
|
|
399
|
+
if (!pendingLogged && now() >= replyDeadline) {
|
|
400
|
+
pendingLogged = true;
|
|
401
|
+
d.log?.(`coms-claude-bridge: ${env.msg_id} exceeded its reply budget and remains pending`);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// primary: Stop hook wrote a new record
|
|
405
|
+
const hook = d.readHook();
|
|
406
|
+
if (hook) {
|
|
407
|
+
const mtime = hook.mtime;
|
|
408
|
+
if (mtime > hookMtimeBefore) {
|
|
409
|
+
const rec = parseHookRecord(hook.raw);
|
|
410
|
+
if (rec) {
|
|
411
|
+
d.markHookSeen();
|
|
412
|
+
return rec.text;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
const status = await paneStatus();
|
|
418
|
+
if (status === "working") sawWorking = true;
|
|
419
|
+
if (status === "blocked") {
|
|
420
|
+
throw new Error(
|
|
421
|
+
`Claude Code in pane ${paneId} is blocked on a permission prompt — a human must approve it in the pane`,
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
// fallback: turn ended without a hook record → scrape the sentinel
|
|
425
|
+
if (sentinelMode && sawWorking && (status === "done" || status === "idle")) {
|
|
426
|
+
const text = await d.readPane();
|
|
427
|
+
const reply = extractSentinelReply(text, env.msg_id, requestBoundary);
|
|
428
|
+
if (reply) return reply;
|
|
429
|
+
// sentinel not visible yet — keep polling until deadline
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
throw new ReplyPendingError(
|
|
433
|
+
`no reply from Claude Code before the ${REPLY_TIMEOUT_HARD_CAP_MS}ms hard monitoring cap (requested ${effectiveTimeoutMs}ms)` +
|
|
434
|
+
(sentinelMode ? " (Stop hook not installed? see .pi/agent-fleet/hooks/coms-stop-hook.mjs)" : ""),
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
const isEntry = process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
|
|
440
|
+
if (isEntry) void main();
|