@openrig/cli 0.7.21 → 0.7.23
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/README.md +7 -7
- package/daemon/assets/onboarding/01-world-and-purpose.md +2 -1
- package/daemon/assets/onboarding/02-self-and-competent-action.md +6 -0
- package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +22 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +23 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/compaction-restore-bridge.cjs +82 -9
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +138 -20
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +110 -35
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +7 -5
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +32 -6
- package/daemon/assets/skills/rigs/SKILL.md +27 -6
- package/daemon/context-packs/help/help.md +12 -0
- package/daemon/context-packs/help/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +27 -7
- package/daemon/context-packs/reference/acp-agents.md +2 -1
- package/daemon/context-packs/reference/getting-started.md +129 -13
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +210 -7
- package/daemon/context-packs/reference/tmux-servers.md +46 -2
- package/daemon/context-packs/reference/whats-new.md +167 -5
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +138 -20
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +110 -35
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/SKILL.md +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +3 -3
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/SKILL.md +7 -5
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +32 -6
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts +14 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +98 -23
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +3 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +35 -11
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/claude-settings-transport.d.ts +10 -0
- package/daemon/dist/adapters/claude-settings-transport.d.ts.map +1 -0
- package/daemon/dist/adapters/claude-settings-transport.js +95 -0
- package/daemon/dist/adapters/claude-settings-transport.js.map +1 -0
- package/daemon/dist/adapters/codex-activity-relay.d.ts +6 -0
- package/daemon/dist/adapters/codex-activity-relay.d.ts.map +1 -0
- package/daemon/dist/adapters/codex-activity-relay.js +29 -0
- package/daemon/dist/adapters/codex-activity-relay.js.map +1 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +2 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +30 -17
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +19 -4
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-recovery-rpc.d.ts +17 -0
- package/daemon/dist/adapters/pi-recovery-rpc.d.ts.map +1 -0
- package/daemon/dist/adapters/pi-recovery-rpc.js +94 -0
- package/daemon/dist/adapters/pi-recovery-rpc.js.map +1 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +6 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +77 -0
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +644 -43
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +6 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +11 -0
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-recovery.d.ts +10 -0
- package/daemon/dist/adapters/pi-runtime-recovery.d.ts.map +1 -0
- package/daemon/dist/adapters/pi-runtime-recovery.js +82 -0
- package/daemon/dist/adapters/pi-runtime-recovery.js.map +1 -0
- package/daemon/dist/adapters/replace-file.d.ts +5 -2
- package/daemon/dist/adapters/replace-file.d.ts.map +1 -1
- package/daemon/dist/adapters/replace-file.js +6 -3
- package/daemon/dist/adapters/replace-file.js.map +1 -1
- package/daemon/dist/adapters/seat-slice.d.ts +19 -0
- package/daemon/dist/adapters/seat-slice.d.ts.map +1 -0
- package/daemon/dist/adapters/seat-slice.js +29 -0
- package/daemon/dist/adapters/seat-slice.js.map +1 -0
- package/daemon/dist/adapters/shell-quote.d.ts +1 -0
- package/daemon/dist/adapters/shell-quote.d.ts.map +1 -1
- package/daemon/dist/adapters/shell-quote.js +6 -0
- package/daemon/dist/adapters/shell-quote.js.map +1 -1
- package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-exec.js +4 -2
- package/daemon/dist/adapters/tmux-exec.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +78 -13
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +361 -82
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/daemon-shutdown.d.ts +8 -0
- package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
- package/daemon/dist/daemon-shutdown.js +18 -2
- package/daemon/dist/daemon-shutdown.js.map +1 -1
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +24 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrate.d.ts +15 -1
- package/daemon/dist/db/migrate.d.ts.map +1 -1
- package/daemon/dist/db/migrate.js +41 -6
- package/daemon/dist/db/migrate.js.map +1 -1
- package/daemon/dist/db/migrations/179_remote_control_observations.d.ts +10 -0
- package/daemon/dist/db/migrations/179_remote_control_observations.d.ts.map +1 -0
- package/daemon/dist/db/migrations/179_remote_control_observations.js +20 -0
- package/daemon/dist/db/migrations/179_remote_control_observations.js.map +1 -0
- package/daemon/dist/db/migrations/180_session_stop_attempt.d.ts +5 -0
- package/daemon/dist/db/migrations/180_session_stop_attempt.d.ts.map +1 -0
- package/daemon/dist/db/migrations/180_session_stop_attempt.js +7 -0
- package/daemon/dist/db/migrations/180_session_stop_attempt.js.map +1 -0
- package/daemon/dist/db/migrations/181_node_keep_alive.d.ts +8 -0
- package/daemon/dist/db/migrations/181_node_keep_alive.d.ts.map +1 -0
- package/daemon/dist/db/migrations/181_node_keep_alive.js +26 -0
- package/daemon/dist/db/migrations/181_node_keep_alive.js.map +1 -0
- package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.d.ts +7 -0
- package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.d.ts.map +1 -0
- package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.js +11 -0
- package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.js.map +1 -0
- package/daemon/dist/db/migrations/183_queue_items_scan_indexes.d.ts +8 -0
- package/daemon/dist/db/migrations/183_queue_items_scan_indexes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/183_queue_items_scan_indexes.js +13 -0
- package/daemon/dist/db/migrations/183_queue_items_scan_indexes.js.map +1 -0
- package/daemon/dist/db/migrations/184_network_requests.d.ts +11 -0
- package/daemon/dist/db/migrations/184_network_requests.d.ts.map +1 -0
- package/daemon/dist/db/migrations/184_network_requests.js +32 -0
- package/daemon/dist/db/migrations/184_network_requests.js.map +1 -0
- package/daemon/dist/db/migrations/185_seat_cold_starts.d.ts +9 -0
- package/daemon/dist/db/migrations/185_seat_cold_starts.d.ts.map +1 -0
- package/daemon/dist/db/migrations/185_seat_cold_starts.js +19 -0
- package/daemon/dist/db/migrations/185_seat_cold_starts.js.map +1 -0
- package/daemon/dist/db/migrations/186_queue_relayed_answers.d.ts +3 -0
- package/daemon/dist/db/migrations/186_queue_relayed_answers.d.ts.map +1 -0
- package/daemon/dist/db/migrations/186_queue_relayed_answers.js +5 -0
- package/daemon/dist/db/migrations/186_queue_relayed_answers.js.map +1 -0
- package/daemon/dist/db/migrations/189_rig_seat_slice.d.ts +5 -0
- package/daemon/dist/db/migrations/189_rig_seat_slice.d.ts.map +1 -0
- package/daemon/dist/db/migrations/189_rig_seat_slice.js +7 -0
- package/daemon/dist/db/migrations/189_rig_seat_slice.js.map +1 -0
- package/daemon/dist/db/migrations/190_queue_transfer_staging.d.ts +3 -0
- package/daemon/dist/db/migrations/190_queue_transfer_staging.d.ts.map +1 -0
- package/daemon/dist/db/migrations/190_queue_transfer_staging.js +20 -0
- package/daemon/dist/db/migrations/190_queue_transfer_staging.js.map +1 -0
- package/daemon/dist/db/migrations/191_network_binding_providers.d.ts +3 -0
- package/daemon/dist/db/migrations/191_network_binding_providers.d.ts.map +1 -0
- package/daemon/dist/db/migrations/191_network_binding_providers.js +27 -0
- package/daemon/dist/db/migrations/191_network_binding_providers.js.map +1 -0
- package/daemon/dist/db/migrations/194_workflow_run_title.d.ts +4 -0
- package/daemon/dist/db/migrations/194_workflow_run_title.d.ts.map +1 -0
- package/daemon/dist/db/migrations/194_workflow_run_title.js +6 -0
- package/daemon/dist/db/migrations/194_workflow_run_title.js.map +1 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts +14 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +61 -0
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +261 -48
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +6 -0
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +14 -3
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +58 -2
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +142 -9
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-continuation-launch.d.ts +3 -2
- package/daemon/dist/domain/claude-continuation-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-continuation-launch.js +12 -11
- package/daemon/dist/domain/claude-continuation-launch.js.map +1 -1
- package/daemon/dist/domain/codex-thread-id.d.ts +20 -2
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +69 -4
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts +14 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.js +174 -19
- package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
- package/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/seat-recap-store.js +20 -3
- package/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -1
- package/daemon/dist/domain/continuity-policy-materializer.d.ts.map +1 -1
- package/daemon/dist/domain/continuity-policy-materializer.js +11 -3
- package/daemon/dist/domain/continuity-policy-materializer.js.map +1 -1
- package/daemon/dist/domain/core-app-job.d.ts +4 -4
- package/daemon/dist/domain/core-app-job.d.ts.map +1 -1
- package/daemon/dist/domain/core-app-job.js +4 -59
- package/daemon/dist/domain/core-app-job.js.map +1 -1
- package/daemon/dist/domain/current-work.d.ts +12 -0
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +4 -0
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/escalation-owner.d.ts +3 -0
- package/daemon/dist/domain/escalation-owner.d.ts.map +1 -1
- package/daemon/dist/domain/escalation-owner.js +9 -3
- package/daemon/dist/domain/escalation-owner.js.map +1 -1
- package/daemon/dist/domain/execution-candidate-reader.d.ts +3 -0
- package/daemon/dist/domain/execution-candidate-reader.d.ts.map +1 -1
- package/daemon/dist/domain/execution-candidate-reader.js +8 -2
- package/daemon/dist/domain/execution-candidate-reader.js.map +1 -1
- package/daemon/dist/domain/existing-rig-restore.d.ts +2 -0
- package/daemon/dist/domain/existing-rig-restore.d.ts.map +1 -1
- package/daemon/dist/domain/existing-rig-restore.js +11 -1
- package/daemon/dist/domain/existing-rig-restore.js.map +1 -1
- package/daemon/dist/domain/expected-conversation.js +2 -2
- package/daemon/dist/domain/expected-conversation.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +3 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +56 -11
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +1 -4
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +17 -5
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/notice-content-dedup.d.ts +23 -0
- package/daemon/dist/domain/gateway/slack/notice-content-dedup.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/notice-content-dedup.js +87 -0
- package/daemon/dist/domain/gateway/slack/notice-content-dedup.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +7 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +1 -0
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.js +17 -3
- package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +0 -17
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +10 -40
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +3 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +21 -7
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/harness-not-started-notice.d.ts +5 -2
- package/daemon/dist/domain/harness-not-started-notice.d.ts.map +1 -1
- package/daemon/dist/domain/harness-not-started-notice.js +46 -15
- package/daemon/dist/domain/harness-not-started-notice.js.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.js +3 -2
- package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
- package/daemon/dist/domain/hosts/read-through.d.ts +1 -1
- package/daemon/dist/domain/hosts/read-through.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/read-through.js +3 -2
- package/daemon/dist/domain/hosts/read-through.js.map +1 -1
- package/daemon/dist/domain/hosts/remote-daemon-http.d.ts +2 -0
- package/daemon/dist/domain/hosts/remote-daemon-http.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/remote-daemon-http.js +1 -1
- package/daemon/dist/domain/hosts/remote-daemon-http.js.map +1 -1
- package/daemon/dist/domain/hot-potato-enforcer.d.ts +3 -3
- package/daemon/dist/domain/hot-potato-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/hot-potato-enforcer.js +2 -2
- package/daemon/dist/domain/hot-potato-enforcer.js.map +1 -1
- package/daemon/dist/domain/human-questions.d.ts +1 -1
- package/daemon/dist/domain/human-questions.d.ts.map +1 -1
- package/daemon/dist/domain/human-questions.js +2 -0
- package/daemon/dist/domain/human-questions.js.map +1 -1
- package/daemon/dist/domain/input-read-diagnostic.js +1 -1
- package/daemon/dist/domain/input-read-diagnostic.js.map +1 -1
- package/daemon/dist/domain/install-planner.d.ts +8 -0
- package/daemon/dist/domain/install-planner.d.ts.map +1 -1
- package/daemon/dist/domain/install-planner.js +26 -6
- package/daemon/dist/domain/install-planner.js.map +1 -1
- package/daemon/dist/domain/keep-alive-supervisor.d.ts +178 -0
- package/daemon/dist/domain/keep-alive-supervisor.d.ts.map +1 -0
- package/daemon/dist/domain/keep-alive-supervisor.js +523 -0
- package/daemon/dist/domain/keep-alive-supervisor.js.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts +6 -0
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js +39 -9
- package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +29 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts +4 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js +18 -2
- package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/daemon/dist/domain/mutation-trace.d.ts +28 -0
- package/daemon/dist/domain/mutation-trace.d.ts.map +1 -0
- package/daemon/dist/domain/mutation-trace.js +38 -0
- package/daemon/dist/domain/mutation-trace.js.map +1 -0
- package/daemon/dist/domain/native-resume-probe.d.ts +13 -3
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +54 -17
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/network/hub-client.d.ts +30 -1
- package/daemon/dist/domain/network/hub-client.d.ts.map +1 -1
- package/daemon/dist/domain/network/hub-client.js +62 -9
- package/daemon/dist/domain/network/hub-client.js.map +1 -1
- package/daemon/dist/domain/network/network-bindings.d.ts +52 -2
- package/daemon/dist/domain/network/network-bindings.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-bindings.js +217 -23
- package/daemon/dist/domain/network/network-bindings.js.map +1 -1
- package/daemon/dist/domain/network/network-connector.d.ts +9 -1
- package/daemon/dist/domain/network/network-connector.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-connector.js +95 -7
- package/daemon/dist/domain/network/network-connector.js.map +1 -1
- package/daemon/dist/domain/network/network-installations.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-installations.js +22 -7
- package/daemon/dist/domain/network/network-installations.js.map +1 -1
- package/daemon/dist/domain/network/network-provider-removal.d.ts +9 -0
- package/daemon/dist/domain/network/network-provider-removal.d.ts.map +1 -0
- package/daemon/dist/domain/network/network-provider-removal.js +75 -0
- package/daemon/dist/domain/network/network-provider-removal.js.map +1 -0
- package/daemon/dist/domain/network/network-requests.d.ts +59 -0
- package/daemon/dist/domain/network/network-requests.d.ts.map +1 -0
- package/daemon/dist/domain/network/network-requests.js +476 -0
- package/daemon/dist/domain/network/network-requests.js.map +1 -0
- package/daemon/dist/domain/node-inventory.d.ts +26 -0
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +93 -9
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.d.ts +1 -1
- package/daemon/dist/domain/occupant-invalidator.d.ts.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.js +1 -1
- package/daemon/dist/domain/occupant-invalidator.js.map +1 -1
- package/daemon/dist/domain/outbox-handler.d.ts +11 -0
- package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/outbox-handler.js +20 -0
- package/daemon/dist/domain/outbox-handler.js.map +1 -1
- package/daemon/dist/domain/package-install-service.d.ts +1 -0
- package/daemon/dist/domain/package-install-service.d.ts.map +1 -1
- package/daemon/dist/domain/package-install-service.js +1 -0
- package/daemon/dist/domain/package-install-service.js.map +1 -1
- package/daemon/dist/domain/parked-owner-escalation.d.ts +16 -0
- package/daemon/dist/domain/parked-owner-escalation.d.ts.map +1 -0
- package/daemon/dist/domain/parked-owner-escalation.js +53 -0
- package/daemon/dist/domain/parked-owner-escalation.js.map +1 -0
- package/daemon/dist/domain/parked-query.d.ts +6 -0
- package/daemon/dist/domain/parked-query.d.ts.map +1 -1
- package/daemon/dist/domain/parked-query.js +20 -7
- package/daemon/dist/domain/parked-query.js.map +1 -1
- package/daemon/dist/domain/permission-stop-observation.d.ts +8 -1
- package/daemon/dist/domain/permission-stop-observation.d.ts.map +1 -1
- package/daemon/dist/domain/permission-stop-observation.js +19 -2
- package/daemon/dist/domain/permission-stop-observation.js.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +13 -0
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +24 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/policies/seat-pool.d.ts +15 -1
- package/daemon/dist/domain/policies/seat-pool.d.ts.map +1 -1
- package/daemon/dist/domain/policies/seat-pool.js +31 -8
- package/daemon/dist/domain/policies/seat-pool.js.map +1 -1
- package/daemon/dist/domain/process-census.d.ts +5 -1
- package/daemon/dist/domain/process-census.d.ts.map +1 -1
- package/daemon/dist/domain/process-census.js +20 -11
- package/daemon/dist/domain/process-census.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts +7 -1
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +7 -0
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/progress/progress-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/progress/progress-indexer.js +11 -0
- package/daemon/dist/domain/progress/progress-indexer.js.map +1 -1
- package/daemon/dist/domain/project-lifecycle-compiler.d.ts.map +1 -1
- package/daemon/dist/domain/project-lifecycle-compiler.js +4 -1
- package/daemon/dist/domain/project-lifecycle-compiler.js.map +1 -1
- package/daemon/dist/domain/proof/judgments.d.ts +10 -0
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +31 -11
- package/daemon/dist/domain/proof/judgments.js.map +1 -1
- package/daemon/dist/domain/proof/source-watch.js +4 -4
- package/daemon/dist/domain/proof/source-watch.js.map +1 -1
- package/daemon/dist/domain/provider/claude-interruption.d.ts +6 -0
- package/daemon/dist/domain/provider/claude-interruption.d.ts.map +1 -1
- package/daemon/dist/domain/provider/claude-interruption.js +18 -0
- package/daemon/dist/domain/provider/claude-interruption.js.map +1 -1
- package/daemon/dist/domain/provider/codex-limit-banner.d.ts +17 -1
- package/daemon/dist/domain/provider/codex-limit-banner.d.ts.map +1 -1
- package/daemon/dist/domain/provider/codex-limit-banner.js +38 -5
- package/daemon/dist/domain/provider/codex-limit-banner.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +17 -1
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +41 -6
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-erasure.d.ts +3 -0
- package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
- package/daemon/dist/domain/queue-erasure.js +2 -2
- package/daemon/dist/domain/queue-erasure.js.map +1 -1
- package/daemon/dist/domain/queue-owner.d.ts +5 -0
- package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
- package/daemon/dist/domain/queue-owner.js +16 -8
- package/daemon/dist/domain/queue-owner.js.map +1 -1
- package/daemon/dist/domain/queue-read-wait.d.ts +12 -0
- package/daemon/dist/domain/queue-read-wait.d.ts.map +1 -0
- package/daemon/dist/domain/queue-read-wait.js +43 -0
- package/daemon/dist/domain/queue-read-wait.js.map +1 -0
- package/daemon/dist/domain/queue-recorded-graph.d.ts +32 -0
- package/daemon/dist/domain/queue-recorded-graph.d.ts.map +1 -0
- package/daemon/dist/domain/queue-recorded-graph.js +84 -0
- package/daemon/dist/domain/queue-recorded-graph.js.map +1 -0
- package/daemon/dist/domain/queue-repository.d.ts +143 -8
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +689 -59
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-retention.d.ts +1 -1
- package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
- package/daemon/dist/domain/queue-retention.js +4 -0
- package/daemon/dist/domain/queue-retention.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +10 -4
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +169 -21
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transfer-export.d.ts +75 -0
- package/daemon/dist/domain/queue-transfer-export.d.ts.map +1 -0
- package/daemon/dist/domain/queue-transfer-export.js +156 -0
- package/daemon/dist/domain/queue-transfer-export.js.map +1 -0
- package/daemon/dist/domain/queue-transfer-format.d.ts +15 -0
- package/daemon/dist/domain/queue-transfer-format.d.ts.map +1 -0
- package/daemon/dist/domain/queue-transfer-format.js +32 -0
- package/daemon/dist/domain/queue-transfer-format.js.map +1 -0
- package/daemon/dist/domain/queue-transfer-parse.d.ts +40 -0
- package/daemon/dist/domain/queue-transfer-parse.d.ts.map +1 -0
- package/daemon/dist/domain/queue-transfer-parse.js +131 -0
- package/daemon/dist/domain/queue-transfer-parse.js.map +1 -0
- package/daemon/dist/domain/queue-transfer-review.d.ts +22 -0
- package/daemon/dist/domain/queue-transfer-review.d.ts.map +1 -0
- package/daemon/dist/domain/queue-transfer-review.js +81 -0
- package/daemon/dist/domain/queue-transfer-review.js.map +1 -0
- package/daemon/dist/domain/queue-transfer-staging.d.ts +79 -0
- package/daemon/dist/domain/queue-transfer-staging.d.ts.map +1 -0
- package/daemon/dist/domain/queue-transfer-staging.js +67 -0
- package/daemon/dist/domain/queue-transfer-staging.js.map +1 -0
- package/daemon/dist/domain/queue-transition-log.js +3 -3
- package/daemon/dist/domain/queue-wake-ladder.d.ts +20 -3
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +299 -41
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/reconciler.d.ts +27 -2
- package/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/reconciler.js +184 -16
- package/daemon/dist/domain/reconciler.js.map +1 -1
- package/daemon/dist/domain/refusal-trace.d.ts +15 -0
- package/daemon/dist/domain/refusal-trace.d.ts.map +1 -0
- package/daemon/dist/domain/refusal-trace.js +23 -0
- package/daemon/dist/domain/refusal-trace.js.map +1 -0
- package/daemon/dist/domain/relayed-answers.d.ts +80 -0
- package/daemon/dist/domain/relayed-answers.d.ts.map +1 -0
- package/daemon/dist/domain/relayed-answers.js +8 -0
- package/daemon/dist/domain/relayed-answers.js.map +1 -0
- package/daemon/dist/domain/remote-control-observations.d.ts +50 -0
- package/daemon/dist/domain/remote-control-observations.d.ts.map +1 -0
- package/daemon/dist/domain/remote-control-observations.js +72 -0
- package/daemon/dist/domain/remote-control-observations.js.map +1 -0
- package/daemon/dist/domain/restore-attempt-receipt.d.ts.map +1 -1
- package/daemon/dist/domain/restore-attempt-receipt.js +8 -2
- package/daemon/dist/domain/restore-attempt-receipt.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +3 -2
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +70 -14
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +429 -107
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/return-route.d.ts +9 -2
- package/daemon/dist/domain/return-route.d.ts.map +1 -1
- package/daemon/dist/domain/return-route.js +22 -1
- package/daemon/dist/domain/return-route.js.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.js +4 -1
- package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +38 -3
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +95 -3
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +22 -7
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +108 -24
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-codec.js +12 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts +14 -0
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +56 -14
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +32 -3
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +135 -29
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +4 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +9 -1
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +30 -4
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/rosters.d.ts +1 -0
- package/daemon/dist/domain/rosters.d.ts.map +1 -1
- package/daemon/dist/domain/rosters.js +5 -4
- package/daemon/dist/domain/rosters.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +2 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-recovery.d.ts +41 -0
- package/daemon/dist/domain/runtime-recovery.d.ts.map +1 -0
- package/daemon/dist/domain/runtime-recovery.js +2 -0
- package/daemon/dist/domain/runtime-recovery.js.map +1 -0
- package/daemon/dist/domain/seat-activity-service.d.ts +37 -1
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +160 -7
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +7 -0
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +149 -65
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-cold-start.d.ts +150 -0
- package/daemon/dist/domain/seat-cold-start.d.ts.map +1 -0
- package/daemon/dist/domain/seat-cold-start.js +371 -0
- package/daemon/dist/domain/seat-cold-start.js.map +1 -0
- package/daemon/dist/domain/seat-delivery-guard.d.ts +11 -2
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +34 -6
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts +43 -0
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +109 -23
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-identity-store.d.ts +5 -3
- package/daemon/dist/domain/seat-identity-store.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-store.js +7 -3
- package/daemon/dist/domain/seat-identity-store.js.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts +2 -0
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +9 -1
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +17 -0
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +180 -23
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-pool-executor.d.ts +116 -0
- package/daemon/dist/domain/seat-pool-executor.d.ts.map +1 -0
- package/daemon/dist/domain/seat-pool-executor.js +565 -0
- package/daemon/dist/domain/seat-pool-executor.js.map +1 -0
- package/daemon/dist/domain/seat-pool-registration.d.ts +93 -0
- package/daemon/dist/domain/seat-pool-registration.d.ts.map +1 -0
- package/daemon/dist/domain/seat-pool-registration.js +149 -0
- package/daemon/dist/domain/seat-pool-registration.js.map +1 -0
- package/daemon/dist/domain/seat-pool-slots.d.ts +42 -0
- package/daemon/dist/domain/seat-pool-slots.d.ts.map +1 -1
- package/daemon/dist/domain/seat-pool-slots.js +51 -0
- package/daemon/dist/domain/seat-pool-slots.js.map +1 -1
- package/daemon/dist/domain/seat-pool-spec.d.ts +10 -0
- package/daemon/dist/domain/seat-pool-spec.d.ts.map +1 -1
- package/daemon/dist/domain/seat-pool-spec.js +22 -2
- package/daemon/dist/domain/seat-pool-spec.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +17 -0
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +57 -4
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-home-record.d.ts +8 -0
- package/daemon/dist/domain/seat-runtime-home-record.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-home-record.js +1 -1
- package/daemon/dist/domain/seat-runtime-home-record.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +25 -3
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +47 -6
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +28 -1
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +80 -33
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +59 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +288 -63
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/slow-op-recorder.d.ts +3 -1
- package/daemon/dist/domain/slow-op-recorder.d.ts.map +1 -1
- package/daemon/dist/domain/slow-op-recorder.js +7 -1
- package/daemon/dist/domain/slow-op-recorder.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +75 -23
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-proof.d.ts +6 -0
- package/daemon/dist/domain/startup-proof.d.ts.map +1 -1
- package/daemon/dist/domain/startup-proof.js +11 -0
- package/daemon/dist/domain/startup-proof.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +2 -0
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +31 -3
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/stream-intake.d.ts +10 -1
- package/daemon/dist/domain/stream-intake.d.ts.map +1 -1
- package/daemon/dist/domain/stream-intake.js +27 -0
- package/daemon/dist/domain/stream-intake.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +7 -0
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +5 -3
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-follow-view.d.ts +13 -0
- package/daemon/dist/domain/terminal/herdr-follow-view.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-follow-view.js +126 -3
- package/daemon/dist/domain/terminal/herdr-follow-view.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-viewer.d.ts +10 -0
- package/daemon/dist/domain/terminal/herdr-viewer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-viewer.js +38 -12
- package/daemon/dist/domain/terminal/herdr-viewer.js.map +1 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts +2 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.js +80 -38
- package/daemon/dist/domain/terminal/scope-task-terminal-view.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +2 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +3 -0
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +30 -26
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.d.ts +22 -0
- package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.js +71 -0
- package/daemon/dist/domain/terminal/tile-attach.js.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.d.ts +2 -0
- package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.js +4 -2
- package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
- package/daemon/dist/domain/terminal-server-reachability.d.ts +14 -7
- package/daemon/dist/domain/terminal-server-reachability.d.ts.map +1 -1
- package/daemon/dist/domain/terminal-server-reachability.js +29 -11
- package/daemon/dist/domain/terminal-server-reachability.js.map +1 -1
- package/daemon/dist/domain/terminal-server-seats.d.ts +1 -1
- package/daemon/dist/domain/terminal-server-seats.d.ts.map +1 -1
- package/daemon/dist/domain/terminal-server-seats.js +4 -1
- package/daemon/dist/domain/terminal-server-seats.js.map +1 -1
- package/daemon/dist/domain/topology/remote-up-leaf.d.ts.map +1 -1
- package/daemon/dist/domain/topology/remote-up-leaf.js +41 -2
- package/daemon/dist/domain/topology/remote-up-leaf.js.map +1 -1
- package/daemon/dist/domain/topology-trace.d.ts +40 -0
- package/daemon/dist/domain/topology-trace.d.ts.map +1 -0
- package/daemon/dist/domain/topology-trace.js +106 -0
- package/daemon/dist/domain/topology-trace.js.map +1 -0
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +12 -1
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +111 -14
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js +3 -2
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.js +6 -2
- package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +26 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +11 -3
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +23 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +35 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +99 -23
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.d.ts +2 -0
- package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.js +11 -2
- package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.d.ts +3 -1
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +58 -10
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-run-title.d.ts +4 -0
- package/daemon/dist/domain/workflow-run-title.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-run-title.js +5 -0
- package/daemon/dist/domain/workflow-run-title.js.map +1 -0
- package/daemon/dist/domain/workflow-runtime.d.ts +4 -0
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +45 -14
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.d.ts +2 -2
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +20 -1
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/domain/workflow-types.d.ts +15 -0
- package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-types.js +4 -0
- package/daemon/dist/domain/workflow-types.js.map +1 -1
- package/daemon/dist/domain/workspace/project-catalog.d.ts +7 -0
- package/daemon/dist/domain/workspace/project-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/project-catalog.js +20 -3
- package/daemon/dist/domain/workspace/project-catalog.js.map +1 -1
- package/daemon/dist/domain/workspace/project-read.d.ts +12 -0
- package/daemon/dist/domain/workspace/project-read.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/project-read.js +37 -5
- package/daemon/dist/domain/workspace/project-read.js.map +1 -1
- package/daemon/dist/index.d.ts +2 -2
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +40 -4
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/queue-transfer-export-surface.d.ts +33 -0
- package/daemon/dist/queue-transfer-export-surface.d.ts.map +1 -0
- package/daemon/dist/queue-transfer-export-surface.js +13 -0
- package/daemon/dist/queue-transfer-export-surface.js.map +1 -0
- package/daemon/dist/queue-transfer-staging-surface.d.ts +86 -0
- package/daemon/dist/queue-transfer-staging-surface.d.ts.map +1 -0
- package/daemon/dist/queue-transfer-staging-surface.js +91 -0
- package/daemon/dist/queue-transfer-staging-surface.js.map +1 -0
- package/daemon/dist/routes/activity.d.ts +9 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +79 -3
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +7 -2
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/daemon/dist/routes/context-packs.js +23 -1
- package/daemon/dist/routes/context-packs.js.map +1 -1
- package/daemon/dist/routes/events.js +7 -4
- package/daemon/dist/routes/events.js.map +1 -1
- package/daemon/dist/routes/missions.js +4 -4
- package/daemon/dist/routes/missions.js.map +1 -1
- package/daemon/dist/routes/network.d.ts +2 -0
- package/daemon/dist/routes/network.d.ts.map +1 -1
- package/daemon/dist/routes/network.js +62 -1
- package/daemon/dist/routes/network.js.map +1 -1
- package/daemon/dist/routes/packages.js +2 -0
- package/daemon/dist/routes/packages.js.map +1 -1
- package/daemon/dist/routes/ps.js +13 -2
- package/daemon/dist/routes/ps.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts +22 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +250 -69
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/require-sender-identity.d.ts.map +1 -1
- package/daemon/dist/routes/require-sender-identity.js +6 -3
- package/daemon/dist/routes/require-sender-identity.js.map +1 -1
- package/daemon/dist/routes/rigs.js +2 -0
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +12 -5
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +16 -2
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/slices.d.ts.map +1 -1
- package/daemon/dist/routes/slices.js +16 -7
- package/daemon/dist/routes/slices.js.map +1 -1
- package/daemon/dist/routes/startup.d.ts.map +1 -1
- package/daemon/dist/routes/startup.js +49 -4
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/stream.d.ts.map +1 -1
- package/daemon/dist/routes/stream.js +9 -0
- package/daemon/dist/routes/stream.js.map +1 -1
- package/daemon/dist/routes/terminal-ws.js +28 -2
- package/daemon/dist/routes/terminal-ws.js.map +1 -1
- package/daemon/dist/routes/terminal.d.ts.map +1 -1
- package/daemon/dist/routes/terminal.js +3 -2
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +14 -2
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/routes/up.js +2 -0
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/watchdog.d.ts +1 -1
- package/daemon/dist/routes/watchdog.d.ts.map +1 -1
- package/daemon/dist/routes/watchdog.js +7 -2
- package/daemon/dist/routes/watchdog.js.map +1 -1
- package/daemon/dist/routes/workflow.d.ts.map +1 -1
- package/daemon/dist/routes/workflow.js +9 -3
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts +7 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +8 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts +3 -0
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +226 -17
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts +10 -0
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.js +63 -4
- package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
- package/daemon/dist/tmux-server-start.d.ts +18 -0
- package/daemon/dist/tmux-server-start.d.ts.map +1 -1
- package/daemon/dist/tmux-server-start.js +29 -0
- package/daemon/dist/tmux-server-start.js.map +1 -1
- package/daemon/dist/topology-trace-surface.d.ts +2 -0
- package/daemon/dist/topology-trace-surface.d.ts.map +1 -0
- package/daemon/dist/topology-trace-surface.js +2 -0
- package/daemon/dist/topology-trace-surface.js.map +1 -0
- package/daemon/docs/reference/acp-agents.md +2 -1
- package/daemon/docs/reference/agent-spec.md +3 -1
- package/daemon/docs/reference/agent-startup-guide.md +3 -1
- package/daemon/docs/reference/agent-state-taxonomy.md +39 -1
- package/daemon/docs/reference/author-contracts.md +4 -0
- package/daemon/docs/reference/checked-seat-stop.md +11 -1
- package/daemon/docs/reference/claude-status-line.md +7 -0
- package/daemon/docs/reference/community-harness-examples/agy/agy-plain.yaml +28 -0
- package/daemon/docs/reference/community-harness-examples/agy/agy.yaml +27 -0
- package/daemon/docs/reference/community-harness-examples/agy/openrig-agy-launch +81 -0
- package/daemon/docs/reference/community-harness-examples/agy/openrig-agy-runner.mjs +667 -0
- package/daemon/docs/reference/community-harness-presets.md +78 -0
- package/daemon/docs/reference/daemon-http-clients.md +133 -20
- package/daemon/docs/reference/gateway-participants.md +6 -0
- package/daemon/docs/reference/getting-started.md +129 -13
- package/daemon/docs/reference/harness-runner-contract.md +7 -5
- package/daemon/docs/reference/help.md +12 -0
- package/daemon/docs/reference/hosted-members.md +163 -2
- package/daemon/docs/reference/inventory-request-diagnostics.md +22 -0
- package/daemon/docs/reference/network-connector.md +112 -4
- package/daemon/docs/reference/project-workspace.md +19 -2
- package/daemon/docs/reference/queue-erasure.md +1 -1
- package/daemon/docs/reference/queue-transfer-export.md +38 -0
- package/daemon/docs/reference/queue-transfer-staging.md +39 -0
- package/daemon/docs/reference/quickstart.md +4 -4
- package/daemon/docs/reference/refocus-channel.md +5 -2
- package/daemon/docs/reference/rig-bundle.md +1 -1
- package/daemon/docs/reference/rig-spec.md +210 -7
- package/daemon/docs/reference/rosters.md +18 -3
- package/daemon/docs/reference/sdlc-conventions.md +6 -2
- package/daemon/docs/reference/seat-delivery.md +41 -7
- package/daemon/docs/reference/seat-pools.md +116 -0
- package/daemon/docs/reference/terminal-sessions.md +57 -11
- package/daemon/docs/reference/tmux-servers.md +46 -2
- package/daemon/docs/reference/whats-new.md +167 -5
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +1 -1
- package/dist/build-info.js +3 -3
- package/dist/bundle-behaviour.d.ts +1 -1
- package/dist/client.d.ts +2 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -2
- package/dist/client.js.map +1 -1
- package/dist/commands/broadcast.d.ts.map +1 -1
- package/dist/commands/broadcast.js +89 -8
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/bundle.js +1 -1
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/chatroom.d.ts +3 -0
- package/dist/commands/chatroom.d.ts.map +1 -1
- package/dist/commands/chatroom.js +9 -2
- package/dist/commands/chatroom.js.map +1 -1
- package/dist/commands/config-init-workspace.d.ts +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +4 -2
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +24 -19
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/exec.js +22 -13
- package/dist/commands/exec.js.map +1 -1
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +5 -1
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/gateway.d.ts +4 -0
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +37 -0
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +4 -2
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/network.d.ts.map +1 -1
- package/dist/commands/network.js +54 -1
- package/dist/commands/network.js.map +1 -1
- package/dist/commands/package.d.ts.map +1 -1
- package/dist/commands/package.js +10 -0
- package/dist/commands/package.js.map +1 -1
- package/dist/commands/parked.d.ts.map +1 -1
- package/dist/commands/parked.js +12 -6
- package/dist/commands/parked.js.map +1 -1
- package/dist/commands/project-jev.d.ts +1 -1
- package/dist/commands/project-worker.d.ts +3 -3
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +3 -2
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +12 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +43 -10
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue-export.d.ts +3 -0
- package/dist/commands/queue-export.d.ts.map +1 -0
- package/dist/commands/queue-export.js +67 -0
- package/dist/commands/queue-export.js.map +1 -0
- package/dist/commands/queue-import.d.ts +4 -0
- package/dist/commands/queue-import.d.ts.map +1 -0
- package/dist/commands/queue-import.js +47 -0
- package/dist/commands/queue-import.js.map +1 -0
- package/dist/commands/queue.d.ts +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +56 -1
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/restore.d.ts.map +1 -1
- package/dist/commands/restore.js +51 -8
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/roster.d.ts +1 -1
- package/dist/commands/roster.js +1 -1
- package/dist/commands/roster.js.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +30 -18
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +26 -2
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +24 -8
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/slack.d.ts +1 -1
- package/dist/commands/snapshot.d.ts.map +1 -1
- package/dist/commands/snapshot.js +29 -10
- package/dist/commands/snapshot.js.map +1 -1
- package/dist/commands/start.d.ts +14 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +203 -110
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/stream-outcome.d.ts +96 -32
- package/dist/commands/stream-outcome.d.ts.map +1 -1
- package/dist/commands/stream-outcome.js +25 -2
- package/dist/commands/stream-outcome.js.map +1 -1
- package/dist/commands/up.d.ts +2 -4
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +35 -3
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/watchdog.js +2 -2
- package/dist/commands/watchdog.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +8 -1
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.d.ts +3 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +27 -1
- package/dist/config-store.js.map +1 -1
- package/dist/cross-host-executor.d.ts +3 -0
- package/dist/cross-host-executor.d.ts.map +1 -1
- package/dist/cross-host-executor.js +5 -0
- package/dist/cross-host-executor.js.map +1 -1
- package/dist/daemon-auto-start.d.ts.map +1 -1
- package/dist/daemon-auto-start.js +1 -0
- package/dist/daemon-auto-start.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +9 -3
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +109 -37
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/daemon-start-lock.d.ts +38 -3
- package/dist/daemon-start-lock.d.ts.map +1 -1
- package/dist/daemon-start-lock.js +201 -48
- package/dist/daemon-start-lock.js.map +1 -1
- package/dist/daemon-transport.d.ts +10 -0
- package/dist/daemon-transport.d.ts.map +1 -0
- package/dist/daemon-transport.js +89 -0
- package/dist/daemon-transport.js.map +1 -0
- package/dist/decisions/stream-consumer.d.ts +2 -2
- package/dist/lib/bundle-source.d.ts.map +1 -1
- package/dist/lib/bundle-source.js +2 -1
- package/dist/lib/bundle-source.js.map +1 -1
- package/dist/lib/codex-auth.d.ts +1 -1
- package/dist/lib/context-git.d.ts.map +1 -1
- package/dist/lib/context-git.js +8 -3
- package/dist/lib/context-git.js.map +1 -1
- package/dist/lib/scope/progress-edit.d.ts.map +1 -1
- package/dist/lib/scope/progress-edit.js +10 -0
- package/dist/lib/scope/progress-edit.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +13 -10
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/topology-trace.d.ts +3 -34
- package/dist/lib/topology-trace.d.ts.map +1 -1
- package/dist/lib/topology-trace.js +3 -97
- package/dist/lib/topology-trace.js.map +1 -1
- package/dist/lib/work-install.d.ts +1 -1
- package/dist/local-db.d.ts +2 -0
- package/dist/local-db.d.ts.map +1 -1
- package/dist/local-db.js +14 -11
- package/dist/local-db.js.map +1 -1
- package/dist/long-request-fetch.d.ts +2 -1
- package/dist/long-request-fetch.d.ts.map +1 -1
- package/dist/long-request-fetch.js +39 -35
- package/dist/long-request-fetch.js.map +1 -1
- package/dist/mcp-caller-resolver.d.ts +36 -0
- package/dist/mcp-caller-resolver.d.ts.map +1 -0
- package/dist/mcp-caller-resolver.js +82 -0
- package/dist/mcp-caller-resolver.js.map +1 -0
- package/dist/mcp-http.d.ts +48 -5
- package/dist/mcp-http.d.ts.map +1 -1
- package/dist/mcp-http.js +303 -61
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-server.d.ts +31 -3
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +191 -58
- package/dist/mcp-server.js.map +1 -1
- package/dist/mcp-surface.d.ts +8 -0
- package/dist/mcp-surface.d.ts.map +1 -0
- package/dist/mcp-surface.js +5 -0
- package/dist/mcp-surface.js.map +1 -0
- package/dist/node-support.d.ts.map +1 -1
- package/dist/node-support.js +10 -0
- package/dist/node-support.js.map +1 -1
- package/dist/release-surface/extract-surface.d.ts.map +1 -1
- package/dist/release-surface/extract-surface.js +14 -2
- package/dist/release-surface/extract-surface.js.map +1 -1
- package/dist/remote-host-ops.d.ts +3 -0
- package/dist/remote-host-ops.d.ts.map +1 -1
- package/dist/remote-host-ops.js +15 -1
- package/dist/remote-host-ops.js.map +1 -1
- package/dist/snapshot-rig-handle.d.ts +12 -0
- package/dist/snapshot-rig-handle.d.ts.map +1 -0
- package/dist/snapshot-rig-handle.js +39 -0
- package/dist/snapshot-rig-handle.js.map +1 -0
- package/mcp.d.ts +1 -0
- package/mcp.js +1 -0
- package/package.json +8 -5
- package/scripts/check-abi.mjs +15 -0
- package/tui/dist/attention/attention-model.d.ts +1 -1
- package/tui/dist/attention/attention-model.d.ts.map +1 -1
- package/tui/dist/attention/attention-model.js +8 -4
- package/tui/dist/attention/attention-model.js.map +1 -1
- package/tui/dist/attention/source-continuity.d.ts +1 -1
- package/tui/dist/crash-cart/start-daemon.d.ts +20 -0
- package/tui/dist/crash-cart/start-daemon.d.ts.map +1 -1
- package/tui/dist/crash-cart/start-daemon.js +56 -0
- package/tui/dist/crash-cart/start-daemon.js.map +1 -1
- package/tui/dist/execution/execution-model.d.ts +2 -0
- package/tui/dist/execution/execution-model.d.ts.map +1 -1
- package/tui/dist/execution/execution-model.js +27 -5
- package/tui/dist/execution/execution-model.js.map +1 -1
- package/tui/dist/execution/workflow-model.d.ts.map +1 -1
- package/tui/dist/execution/workflow-model.js +2 -1
- package/tui/dist/execution/workflow-model.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +4 -2
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/main.js +26 -9
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/print-for-copy.d.ts +7 -1
- package/tui/dist/print-for-copy.d.ts.map +1 -1
- package/tui/dist/print-for-copy.js +10 -3
- package/tui/dist/print-for-copy.js.map +1 -1
- package/tui/dist/render.d.ts +2 -0
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +75 -19
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/socket-copy.d.ts +6 -0
- package/tui/dist/socket-copy.d.ts.map +1 -0
- package/tui/dist/socket-copy.js +13 -0
- package/tui/dist/socket-copy.js.map +1 -0
- package/tui/dist/terminal-safe-text.d.ts +39 -0
- package/tui/dist/terminal-safe-text.d.ts.map +1 -0
- package/tui/dist/terminal-safe-text.js +44 -0
- package/tui/dist/terminal-safe-text.js.map +1 -0
- package/tui/dist/topology/host-label.js +5 -5
- package/tui/dist/topology/host-label.js.map +1 -1
- package/tui/dist/types.d.ts +3 -3
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type Database from "better-sqlite3";
|
|
2
|
+
import { type QueueRepository } from "../queue-repository.js";
|
|
3
|
+
import { type NetworkBinding, type NetworkBindingStore } from "./network-bindings.js";
|
|
4
|
+
import { HubError, type HubConnect, type HubSession, type HubTeam } from "./hub-client.js";
|
|
5
|
+
export interface NetworkRequestDeps {
|
|
6
|
+
db: Database.Database;
|
|
7
|
+
queueRepo: QueueRepository;
|
|
8
|
+
bindings: NetworkBindingStore;
|
|
9
|
+
home: string;
|
|
10
|
+
connect?: HubConnect;
|
|
11
|
+
now?: () => Date;
|
|
12
|
+
/** How long a create or a team read may wait on the hub; a create past it reads unknown and the next pass checks it. */
|
|
13
|
+
hubTimeoutMs?: number;
|
|
14
|
+
}
|
|
15
|
+
export type NetworkRequestState = "sent" | "unknown" | "refused";
|
|
16
|
+
export interface NetworkRequestResult {
|
|
17
|
+
localQitemId: string;
|
|
18
|
+
hubQitemId: string;
|
|
19
|
+
peer: string;
|
|
20
|
+
state: NetworkRequestState;
|
|
21
|
+
message: string;
|
|
22
|
+
}
|
|
23
|
+
/** The hub item for a request, by what it is. A retry, a restart or a new binding for the same seat, hub and
|
|
24
|
+
* participant names the same hub item. */
|
|
25
|
+
export declare function networkHubRequestId(binding: Pick<NetworkBinding, "nodeId" | "hubUrl" | "hubSeat">, requestId: string): string;
|
|
26
|
+
/** What a request's local item waits on: the hub item, outside this daemon. */
|
|
27
|
+
export declare function networkRequestBlocker(hubQitemId: string): string;
|
|
28
|
+
/** The peers this binding's participant may address, as the hub's rig_team answers: a member grant names its rig, which
|
|
29
|
+
* is the rig part of the participant's own hub address. */
|
|
30
|
+
export declare function listNetworkPeers(deps: Pick<NetworkRequestDeps, "home" | "connect" | "hubTimeoutMs">, binding: NetworkBinding): Promise<{
|
|
31
|
+
bindingId: string;
|
|
32
|
+
hubSeat: string;
|
|
33
|
+
team: HubTeam;
|
|
34
|
+
}>;
|
|
35
|
+
/** A hub URL as queue text shows it. A query string can carry a credential the person pasted, so it's hidden there, as
|
|
36
|
+
* rig network status hides it; the full URL stays only in the binding, the connection and the receipt. */
|
|
37
|
+
export declare function shownHubUrl(hubUrl: string): string;
|
|
38
|
+
/** Send a request to a peer through the binding's hub. It's recorded first, as an item from the seat to OpenRig under
|
|
39
|
+
* `requestId`, parked on the hub item; then created on the hub. A create the hub refused closes the local item failed
|
|
40
|
+
* with the hub's words; one whose outcome isn't known stays parked, and the connector's next pass finds or creates it by
|
|
41
|
+
* its id. The same `requestId` with the same request returns where it stands; with another request it's refused. A local
|
|
42
|
+
* item closed or erased here since it was recorded starts no peer work. */
|
|
43
|
+
export declare function originateNetworkRequest(deps: NetworkRequestDeps, binding: NetworkBinding, input: {
|
|
44
|
+
peer: unknown;
|
|
45
|
+
requestId: unknown;
|
|
46
|
+
body: unknown;
|
|
47
|
+
summary?: unknown;
|
|
48
|
+
}): Promise<NetworkRequestResult>;
|
|
49
|
+
/** One pass's reading of this binding's open requests, on the pass's hub session. Open requests of an ended binding for
|
|
50
|
+
* the same seat, hub and participant are taken over first. A refusal on one request is recorded on it and the rest go
|
|
51
|
+
* on; a hub that stops answering leaves the rest for the next pass; a revoked credential ends the pass, as the
|
|
52
|
+
* connector's own calls do. A local write the queue refuses never stops the pass. Returns the hub's unavailable answer
|
|
53
|
+
* that stopped the reading, if one did, for the pass to report and back off on. */
|
|
54
|
+
export declare function reconcileNetworkRequests(deps: NetworkRequestDeps, binding: NetworkBinding, hub: HubSession, now?: () => Date, live?: () => boolean): Promise<HubError | null>;
|
|
55
|
+
/** A binding the hub ended: each open request sent through it says once, on its local item, that its answer can't be read
|
|
56
|
+
* here. The requests stay open, so a new binding for the same seat, hub and participant takes them over. It never throws:
|
|
57
|
+
* it runs while the connector records the revoke. A note that can't be written is skipped and the others go on. */
|
|
58
|
+
export declare function noteEndedBindingRequests(deps: Pick<NetworkRequestDeps, "db" | "queueRepo">, binding: NetworkBinding, log?: (line: string) => void): void;
|
|
59
|
+
//# sourceMappingURL=network-requests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network-requests.d.ts","sourceRoot":"","sources":["../../../src/domain/network/network-requests.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAwC,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEpG,OAAO,EAA8C,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAClI,OAAO,EAAiB,QAAQ,EAAE,KAAK,UAAU,EAAgB,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAExH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACtB,SAAS,EAAE,eAAe,CAAC;IAC3B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;IACjB,wHAAwH;IACxH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,mBAAmB,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAoBD;2CAC2C;AAC3C,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,cAA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AAG,IAAI,CAkBxJ"}
|
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { QueueRepositoryError } from "../queue-repository.js";
|
|
3
|
+
import { OPENRIG_SENDER } from "../../lib/pane-envelope.js";
|
|
4
|
+
import { NetworkBindingError, readNetworkCredential } from "./network-bindings.js";
|
|
5
|
+
import { connectMcpHub, HubError } from "./hub-client.js";
|
|
6
|
+
const HUB_TIMEOUT_MS = 30_000;
|
|
7
|
+
/** Open requests read per pass, the least recently read first, so a long backlog still gives every request a turn. */
|
|
8
|
+
const REQUEST_LIMIT = 50;
|
|
9
|
+
/** The states a hub item ends in. A handed-off one ends at its successor, which is followed while it can be read. */
|
|
10
|
+
const HUB_FINAL = new Set(["done", "canceled", "denied", "failed"]);
|
|
11
|
+
const LOCAL_CLOSED = new Set(["done", "canceled", "denied", "failed", "handed-off"]);
|
|
12
|
+
/** The closure reasons a local done close takes from the hub's. Any other reads as no-follow-on, with the hub's reason in
|
|
13
|
+
* the note: escalation and handed_off_to need a closure target here, which a hub item can't give. */
|
|
14
|
+
const CLOSURE_REASONS = new Set(["no-follow-on", "canceled", "denied"]);
|
|
15
|
+
const HANDED_ON_UNREADABLE = "The hub item was handed on to an item this connection can't read, so its answer isn't visible here. The outcome is unknown, and this item stays open.";
|
|
16
|
+
const BINDING_ENDED = "The network binding this request was sent through has ended, so its answer can't be read here. The outcome is unknown; this item stays open, and a new binding for the same seat, hub and participant picks it up again.";
|
|
17
|
+
/** The hub item for a request, by what it is. A retry, a restart or a new binding for the same seat, hub and
|
|
18
|
+
* participant names the same hub item. */
|
|
19
|
+
export function networkHubRequestId(binding, requestId) {
|
|
20
|
+
return `qitem-netout-${createHash("sha256").update([binding.nodeId, binding.hubUrl, binding.hubSeat, requestId].join("\n")).digest("hex").slice(0, 20)}`;
|
|
21
|
+
}
|
|
22
|
+
/** What a request's local item waits on: the hub item, outside this daemon. */
|
|
23
|
+
export function networkRequestBlocker(hubQitemId) {
|
|
24
|
+
return `external:network-request/${hubQitemId}`;
|
|
25
|
+
}
|
|
26
|
+
/** The seat's current address: the node's latest session, as the connector reads it. */
|
|
27
|
+
function currentSession(db, nodeId) {
|
|
28
|
+
const row = db.prepare("SELECT session_name FROM sessions WHERE node_id = ? ORDER BY created_at DESC, id DESC LIMIT 1")
|
|
29
|
+
.get(nodeId);
|
|
30
|
+
return row?.session_name ?? null;
|
|
31
|
+
}
|
|
32
|
+
/** The participant's token, once the binding can carry a request: active, its plain-http choice recorded where needed. */
|
|
33
|
+
function usableToken(deps, binding) {
|
|
34
|
+
if (binding.state !== "active")
|
|
35
|
+
throw new NetworkBindingError("binding_not_active", `${binding.id} is ${binding.state}, so nothing can be sent through it.`, 409);
|
|
36
|
+
if (binding.unencrypted && !binding.allowHttp) {
|
|
37
|
+
throw new NetworkBindingError("http_not_allowed", `${binding.hubUrl} is plain http and this binding has no --allow-http choice, so its token isn't sent.`, 409);
|
|
38
|
+
}
|
|
39
|
+
return readNetworkCredential(deps.home, binding.id);
|
|
40
|
+
}
|
|
41
|
+
/** A hub failure as the routes report it. */
|
|
42
|
+
function hubRefusal(error) {
|
|
43
|
+
if (!(error instanceof HubError))
|
|
44
|
+
return error;
|
|
45
|
+
if (error.kind === "unavailable")
|
|
46
|
+
return new NetworkBindingError("hub_unavailable", error.message, 503);
|
|
47
|
+
if (error.kind === "revoked")
|
|
48
|
+
return new NetworkBindingError("hub_revoked", error.message, 502);
|
|
49
|
+
return new NetworkBindingError("hub_refused", error.code ? `${error.message} (${error.code})` : error.message, 502);
|
|
50
|
+
}
|
|
51
|
+
/** One call on the hub as this binding's participant, bounded: past the deadline the connection closes and the call
|
|
52
|
+
* reads unavailable. */
|
|
53
|
+
async function withHub(deps, binding, token, use) {
|
|
54
|
+
const timeoutMs = deps.hubTimeoutMs ?? HUB_TIMEOUT_MS;
|
|
55
|
+
const deadline = new AbortController();
|
|
56
|
+
const timer = setTimeout(() => deadline.abort(), timeoutMs);
|
|
57
|
+
timer.unref?.();
|
|
58
|
+
let hub = null;
|
|
59
|
+
try {
|
|
60
|
+
hub = await (deps.connect ?? connectMcpHub)(binding.hubUrl, token, deadline.signal);
|
|
61
|
+
return await use(hub);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
if (deadline.signal.aborted)
|
|
65
|
+
throw new HubError("unavailable", `The hub didn't answer within ${timeoutMs >= 1000 ? `${Math.round(timeoutMs / 1000)} s` : `${timeoutMs} ms`}.`);
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
finally {
|
|
69
|
+
clearTimeout(timer);
|
|
70
|
+
await hub?.end();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/** The peers this binding's participant may address, as the hub's rig_team answers: a member grant names its rig, which
|
|
74
|
+
* is the rig part of the participant's own hub address. */
|
|
75
|
+
export async function listNetworkPeers(deps, binding) {
|
|
76
|
+
const token = usableToken(deps, binding);
|
|
77
|
+
const rig = binding.hubSeat.slice(binding.hubSeat.lastIndexOf("@") + 1);
|
|
78
|
+
try {
|
|
79
|
+
return { bindingId: binding.id, hubSeat: binding.hubSeat, team: await withHub(deps, binding, token, (hub) => hub.team(rig || undefined)) };
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
throw hubRefusal(error);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
const text = (value) => (typeof value === "string" ? value.trim() : "");
|
|
86
|
+
const sha256 = (value) => createHash("sha256").update(value).digest("hex");
|
|
87
|
+
/** A hub URL as queue text shows it. A query string can carry a credential the person pasted, so it's hidden there, as
|
|
88
|
+
* rig network status hides it; the full URL stays only in the binding, the connection and the receipt. */
|
|
89
|
+
export function shownHubUrl(hubUrl) {
|
|
90
|
+
try {
|
|
91
|
+
const url = new URL(hubUrl);
|
|
92
|
+
if (!url.search)
|
|
93
|
+
return hubUrl;
|
|
94
|
+
url.search = "";
|
|
95
|
+
return `${url.toString()} (query hidden)`;
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
return hubUrl;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/** The local item's text around the request, built from the receipt's fields, so the request reads back out of the local
|
|
102
|
+
* item: the receipt keeps only its hash, and erasing the local item erases the only copy. */
|
|
103
|
+
const requestHead = (r) => `To ${r.peer} through the network hub ${shownHubUrl(r.hub_url)}, as ${r.hub_seat} (hub item ${r.hub_qitem_id}).\n\n`;
|
|
104
|
+
const requestFoot = (requestId) => `\n\n---\nWhen the hub item closes, OpenRig closes this item with its answer and says who gave it. Read it with rig queue show ${requestId}.`;
|
|
105
|
+
const summaryLead = (peer) => `To ${peer} via network hub`;
|
|
106
|
+
/** What a create sends: the request's body and summary, read from its local item. Null when that text is gone (the item
|
|
107
|
+
* was erased) or isn't the request the receipt names; such a request is never sent. */
|
|
108
|
+
function requestPayload(local, receipt) {
|
|
109
|
+
const head = requestHead(receipt), foot = requestFoot(receipt.local_qitem_id), all = local.body ?? "";
|
|
110
|
+
if (all.length < head.length + foot.length || !all.startsWith(head) || !all.endsWith(foot))
|
|
111
|
+
return null;
|
|
112
|
+
const body = all.slice(head.length, all.length - foot.length);
|
|
113
|
+
if (sha256(body) !== receipt.body_sha256)
|
|
114
|
+
return null;
|
|
115
|
+
const lead = `${summaryLead(receipt.peer)}: `;
|
|
116
|
+
return { body, summary: local.summary?.startsWith(lead) ? local.summary.slice(lead.length) : null };
|
|
117
|
+
}
|
|
118
|
+
/** A hub item that was handed on there: handed off, or closed done by a handoff-and-complete. Its answer is its successor's. */
|
|
119
|
+
const handedOn = (item) => item.state === "handed-off" || (item.state === "done" && item.closureReason === "handed_off_to");
|
|
120
|
+
/** Create the request on the hub under its derived id. A refusal with the hub's own code, or the hub holding a different
|
|
121
|
+
* request under that id, is definite; anything else (a timeout, a lost connection, an answer that can't be read) leaves
|
|
122
|
+
* the outcome unknown. A revoked credential is thrown, for the caller to handle. */
|
|
123
|
+
async function createOnHub(hub, receipt, payload) {
|
|
124
|
+
try {
|
|
125
|
+
const created = await hub.create({ qitemId: receipt.hub_qitem_id, destination: receipt.peer, body: payload.body, summary: payload.summary });
|
|
126
|
+
if (created.createWarning)
|
|
127
|
+
return { kind: "refused", error: new HubError("refused", "The hub already holds a different request under this id.", created.createWarning) };
|
|
128
|
+
return { kind: "created", item: created };
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
if (!(error instanceof HubError) || error.kind === "revoked")
|
|
132
|
+
throw error;
|
|
133
|
+
// The id is taken: another create of this request (a command retry and a pass can overlap) may have landed first and
|
|
134
|
+
// been moved on there since. That isn't a refusal of this request, so it's read back by the same id; if it can't be
|
|
135
|
+
// read, the outcome stays unknown, a refused credential included: the hub may hold the request all the same.
|
|
136
|
+
if (error.kind === "refused" && error.code === "qitem_id_reuse") {
|
|
137
|
+
try {
|
|
138
|
+
return { kind: "found", item: await hub.show(receipt.hub_qitem_id) };
|
|
139
|
+
}
|
|
140
|
+
catch (shown) {
|
|
141
|
+
if (!(shown instanceof HubError))
|
|
142
|
+
throw shown;
|
|
143
|
+
return { kind: "unknown", error: shown };
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return { kind: error.kind === "refused" && error.code ? "refused" : "unknown", error };
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/** Read right before a remote create, never from a copy taken before an await: the binding the create goes through and the
|
|
150
|
+
* local item, with the request's payload from that item as it is now. A close, erasure or disconnect here meanwhile
|
|
151
|
+
* stops the create. */
|
|
152
|
+
function beforeCreate(deps, bindingId, receipt, live) {
|
|
153
|
+
if (!live() || deps.bindings.get(bindingId)?.state !== "active")
|
|
154
|
+
return { kind: "stopped", stop: "binding" };
|
|
155
|
+
const local = deps.queueRepo.getById(receipt.local_qitem_id);
|
|
156
|
+
if (local && LOCAL_CLOSED.has(local.state))
|
|
157
|
+
return { kind: "stopped", stop: "closed" };
|
|
158
|
+
const payload = local ? requestPayload(local, receipt) : null;
|
|
159
|
+
return payload ? { kind: "ready", payload } : { kind: "stopped", stop: "erased" };
|
|
160
|
+
}
|
|
161
|
+
/** The request's hub item, read before any create. With `showFirst` (a request the hub may already hold), it's shown by
|
|
162
|
+
* its id first, and only a refusal with qitem_not_found, for a request the hub never confirmed, goes on to the create
|
|
163
|
+
* under that id; any other answer to the show (unavailable whatever its code, out of scope, unreadable) leaves the
|
|
164
|
+
* outcome unknown. The command's
|
|
165
|
+
* retry and the connector's pass both go through here. A revoked credential is thrown. */
|
|
166
|
+
async function reachOnHub(deps, hub, bindingId, receipt, showFirst, live = () => true) {
|
|
167
|
+
if (showFirst) {
|
|
168
|
+
try {
|
|
169
|
+
return { kind: "found", item: await hub.show(receipt.hub_qitem_id) };
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
if (!(error instanceof HubError) || error.kind === "revoked")
|
|
173
|
+
throw error;
|
|
174
|
+
if (receipt.hub_created_at || error.kind !== "refused" || error.code !== "qitem_not_found")
|
|
175
|
+
return { kind: "unknown", error };
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
const ready = beforeCreate(deps, bindingId, receipt, live);
|
|
179
|
+
if (ready.kind === "stopped")
|
|
180
|
+
return ready;
|
|
181
|
+
return createOnHub(hub, receipt, ready.payload);
|
|
182
|
+
}
|
|
183
|
+
/** Why a create didn't start, on the receipt. A close or erasure here settles the request; an ended binding leaves it open
|
|
184
|
+
* for a new binding for the same seat, hub and participant to take over. */
|
|
185
|
+
function stopBeforeCreate(deps, receipt, stop, now) {
|
|
186
|
+
if (stop === "closed")
|
|
187
|
+
settle(deps, receipt, "local_closed", now);
|
|
188
|
+
else if (stop === "erased")
|
|
189
|
+
settle(deps, receipt, "unknown", now, "The request's text is gone here, so it can't be sent.");
|
|
190
|
+
else
|
|
191
|
+
noteError(deps, receipt, "The binding wasn't active at the create, so nothing was sent through it.");
|
|
192
|
+
}
|
|
193
|
+
/** Send a request to a peer through the binding's hub. It's recorded first, as an item from the seat to OpenRig under
|
|
194
|
+
* `requestId`, parked on the hub item; then created on the hub. A create the hub refused closes the local item failed
|
|
195
|
+
* with the hub's words; one whose outcome isn't known stays parked, and the connector's next pass finds or creates it by
|
|
196
|
+
* its id. The same `requestId` with the same request returns where it stands; with another request it's refused. A local
|
|
197
|
+
* item closed or erased here since it was recorded starts no peer work. */
|
|
198
|
+
export async function originateNetworkRequest(deps, binding, input) {
|
|
199
|
+
const now = deps.now ?? (() => new Date());
|
|
200
|
+
const peer = text(input.peer);
|
|
201
|
+
const requestId = text(input.requestId);
|
|
202
|
+
const body = typeof input.body === "string" ? input.body : "";
|
|
203
|
+
const summary = text(input.summary) || null;
|
|
204
|
+
if (!peer)
|
|
205
|
+
throw new NetworkBindingError("invalid_peer", "Name the peer as rig network peers lists it.");
|
|
206
|
+
if (!requestId || /\s/.test(requestId))
|
|
207
|
+
throw new NetworkBindingError("invalid_request_id", "Give the request an id of your own with no spaces, unique to this request; retry only with the same id.");
|
|
208
|
+
if (!body.trim())
|
|
209
|
+
throw new NetworkBindingError("invalid_body", "The request needs a body: what to do and what to return.");
|
|
210
|
+
const token = usableToken(deps, binding);
|
|
211
|
+
const session = currentSession(deps.db, binding.nodeId);
|
|
212
|
+
if (!session)
|
|
213
|
+
throw new NetworkBindingError("no_session", `${binding.localSession} has no session here, so there's no seat to record the request for.`, 409);
|
|
214
|
+
const hubId = networkHubRequestId(binding, requestId);
|
|
215
|
+
const bodySha = sha256(body);
|
|
216
|
+
const reused = () => new NetworkBindingError("request_id_reused", `${requestId} already names another request or item here. Use a new id for a new request; the same id retries only the same request.`, 409);
|
|
217
|
+
const existing = deps.db.prepare("SELECT * FROM network_requests WHERE local_qitem_id = ?").get(requestId);
|
|
218
|
+
if (existing) {
|
|
219
|
+
if (existing.node_id !== binding.nodeId || existing.hub_url !== binding.hubUrl || existing.hub_seat !== binding.hubSeat
|
|
220
|
+
|| existing.peer !== peer || existing.body_sha256 !== bodySha)
|
|
221
|
+
throw reused();
|
|
222
|
+
if (existing.outcome === "refused")
|
|
223
|
+
return result(existing, "refused", `The hub refused this request earlier: ${existing.last_error ?? "no reason recorded"}. ${requestId} is closed failed.`);
|
|
224
|
+
if (existing.hub_created_at) {
|
|
225
|
+
return result(existing, "sent", `${requestId} was already sent to ${peer} as hub item ${hubId}. Its answer comes back to ${requestId}: read it with rig queue show ${requestId}.`);
|
|
226
|
+
}
|
|
227
|
+
if (existing.settled_at) {
|
|
228
|
+
return result(existing, "unknown", `${requestId} was settled (${existing.outcome}) before the hub confirmed hub item ${hubId}, so nothing more is read for it. ${existing.last_error ?? ""}`.trim());
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
// Recorded first: the seat's request, held by OpenRig until the answer closes it. Nothing wakes anyone for it.
|
|
233
|
+
try {
|
|
234
|
+
const local = await deps.queueRepo.create({
|
|
235
|
+
qitemId: requestId,
|
|
236
|
+
sourceSession: session,
|
|
237
|
+
destinationSession: OPENRIG_SENDER,
|
|
238
|
+
summary: summary ? `${summaryLead(peer)}: ${summary}` : summaryLead(peer),
|
|
239
|
+
body: `${requestHead({ peer, hub_url: binding.hubUrl, hub_seat: binding.hubSeat, hub_qitem_id: hubId })}${body}${requestFoot(requestId)}`,
|
|
240
|
+
tags: [`network-binding:${binding.id}`, `network-peer:${peer}`, `network-hub-item:${hubId}`, "network-direction:outbound"],
|
|
241
|
+
nudge: false,
|
|
242
|
+
});
|
|
243
|
+
if (local.createWarning)
|
|
244
|
+
throw reused();
|
|
245
|
+
const blocker = networkRequestBlocker(hubId);
|
|
246
|
+
if (local.state !== "blocked" || local.blockedOn !== blocker) {
|
|
247
|
+
if (LOCAL_CLOSED.has(local.state))
|
|
248
|
+
throw reused();
|
|
249
|
+
deps.queueRepo.update({ qitemId: requestId, actorSession: session, state: "blocked", blockedOn: blocker,
|
|
250
|
+
transitionNote: `Waiting on ${peer}'s answer through the network hub (hub item ${hubId}).` });
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
catch (error) {
|
|
254
|
+
if (error instanceof QueueRepositoryError && (error.code === "qitem_id_reuse" || error.code === "qitem_erased"))
|
|
255
|
+
throw reused();
|
|
256
|
+
throw error;
|
|
257
|
+
}
|
|
258
|
+
deps.db.prepare(`INSERT INTO network_requests (local_qitem_id, binding_id, node_id, hub_url, hub_seat, peer, hub_qitem_id, body_sha256, created_at)
|
|
259
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT DO NOTHING`)
|
|
260
|
+
.run(requestId, binding.id, binding.nodeId, binding.hubUrl, binding.hubSeat, peer, hubId, bodySha, now().toISOString());
|
|
261
|
+
}
|
|
262
|
+
const receipt = deps.db.prepare("SELECT * FROM network_requests WHERE local_qitem_id = ?").get(requestId);
|
|
263
|
+
// The payload comes from the local item, so a retry sends what the first attempt recorded, summary included.
|
|
264
|
+
const local = deps.queueRepo.getById(requestId);
|
|
265
|
+
const payload = local && !LOCAL_CLOSED.has(local.state) ? requestPayload(local, receipt) : null;
|
|
266
|
+
if (!payload) {
|
|
267
|
+
const closedHere = !!local && LOCAL_CLOSED.has(local.state);
|
|
268
|
+
settle(deps, receipt, closedHere ? "local_closed" : "unknown", now, closedHere ? null : "The request's text is gone here, so it can't be sent.");
|
|
269
|
+
return result(receipt, "unknown", `${requestId} was ${closedHere ? "closed" : "erased"} here before the hub confirmed hub item ${hubId}, so it isn't sent.`);
|
|
270
|
+
}
|
|
271
|
+
/** A refused credential when the hub may hold the request anyway: it stays open and unknown, said once, for a new
|
|
272
|
+
* binding for the same seat, hub and participant to read. */
|
|
273
|
+
const keptOpen = (error) => {
|
|
274
|
+
const note = `The hub refused this binding's credential, so whether it holds hub item ${hubId} is unknown. This item stays open; a new binding for the same seat, hub and participant reads it.`;
|
|
275
|
+
if (receipt.last_error !== note && writeLocal(deps, receipt, now, () => deps.queueRepo.update({ qitemId: requestId, actorSession: OPENRIG_SENDER, transitionNote: note })))
|
|
276
|
+
noteError(deps, receipt, note);
|
|
277
|
+
return result(receipt, "unknown", `${note} (${error.message})`);
|
|
278
|
+
};
|
|
279
|
+
// A request recorded before whose create wasn't confirmed: its hub item is shown first, as the connector's pass does.
|
|
280
|
+
let outcome;
|
|
281
|
+
try {
|
|
282
|
+
outcome = await withHub(deps, binding, token, (hub) => reachOnHub(deps, hub, binding.id, receipt, !!existing));
|
|
283
|
+
}
|
|
284
|
+
catch (error) {
|
|
285
|
+
if (!(error instanceof HubError))
|
|
286
|
+
throw error;
|
|
287
|
+
// The credential refused: nothing can be sent through this binding. For a new request whose own create was refused
|
|
288
|
+
// that's definite. One whose earlier create wasn't confirmed may still be on the hub, so it stays open and unknown.
|
|
289
|
+
if (error.kind === "revoked" && existing)
|
|
290
|
+
return keptOpen(error);
|
|
291
|
+
outcome = error.kind === "revoked" ? { kind: "refused", error } : { kind: "unknown", error };
|
|
292
|
+
}
|
|
293
|
+
if (outcome.kind === "stopped") {
|
|
294
|
+
stopBeforeCreate(deps, receipt, outcome.stop, now);
|
|
295
|
+
return result(receipt, "unknown", outcome.stop === "binding"
|
|
296
|
+
? `${binding.id} wasn't active when ${requestId} was to be created on the hub, so nothing was sent. A new binding for the same seat, hub and participant picks it up.`
|
|
297
|
+
: `${requestId} was ${outcome.stop === "closed" ? "closed" : "erased"} here before the hub confirmed hub item ${hubId}, so it isn't sent.`);
|
|
298
|
+
}
|
|
299
|
+
if (outcome.kind === "refused") {
|
|
300
|
+
refuse(deps, receipt, outcome.error, now);
|
|
301
|
+
return result(receipt, "refused", `The hub refused it: ${outcome.error.message}${outcome.error.code ? ` (${outcome.error.code})` : ""}. ${requestId} is closed failed with that reason.`);
|
|
302
|
+
}
|
|
303
|
+
if (outcome.kind === "unknown") {
|
|
304
|
+
// A credential refused while reading back a taken id: the hub may already hold this request, even on a first try.
|
|
305
|
+
if (outcome.error.kind === "revoked")
|
|
306
|
+
return keptOpen(outcome.error);
|
|
307
|
+
deps.db.prepare("UPDATE network_requests SET last_error = ? WHERE local_qitem_id = ?").run(outcome.error.message.slice(0, 500), requestId);
|
|
308
|
+
return result(receipt, "unknown", `${requestId} is recorded, and whether the hub has it yet is unknown (${outcome.error.message}). The connector checks hub item ${hubId} on its next pass and creates it there under the same id if it's missing. Retry only with the same --id.`);
|
|
309
|
+
}
|
|
310
|
+
deps.db.prepare("UPDATE network_requests SET hub_created_at = ?, last_error = NULL WHERE local_qitem_id = ?").run(now().toISOString(), requestId);
|
|
311
|
+
return result(receipt, "sent", `${outcome.kind === "found" ? `${requestId} is already on the hub as hub item ${hubId}` : `Sent to ${peer} as hub item ${hubId}`}. `
|
|
312
|
+
+ `Its answer comes back to ${requestId}: read it with rig queue show ${requestId}.`);
|
|
313
|
+
}
|
|
314
|
+
function result(receipt, state, message) {
|
|
315
|
+
return { localQitemId: receipt.local_qitem_id, hubQitemId: receipt.hub_qitem_id, peer: receipt.peer, state, message };
|
|
316
|
+
}
|
|
317
|
+
function settle(deps, receipt, outcome, now, lastError = null) {
|
|
318
|
+
deps.db.prepare("UPDATE network_requests SET settled_at = ?, outcome = ?, last_error = ? WHERE local_qitem_id = ?")
|
|
319
|
+
.run(now().toISOString(), outcome, lastError, receipt.local_qitem_id);
|
|
320
|
+
}
|
|
321
|
+
function noteError(deps, receipt, message) {
|
|
322
|
+
deps.db.prepare("UPDATE network_requests SET last_error = ? WHERE local_qitem_id = ?").run(message.slice(0, 500), receipt.local_qitem_id);
|
|
323
|
+
}
|
|
324
|
+
/** A write to the local item that can't stop a pass. If the queue refuses it because someone here closed the item
|
|
325
|
+
* meanwhile, that close stands and the request settles as theirs; any other refusal is recorded on the receipt, and the
|
|
326
|
+
* next pass tries again. */
|
|
327
|
+
function writeLocal(deps, receipt, now, write) {
|
|
328
|
+
try {
|
|
329
|
+
write();
|
|
330
|
+
return true;
|
|
331
|
+
}
|
|
332
|
+
catch (error) {
|
|
333
|
+
if (!(error instanceof QueueRepositoryError))
|
|
334
|
+
throw error;
|
|
335
|
+
const local = deps.queueRepo.getById(receipt.local_qitem_id);
|
|
336
|
+
if (!local || LOCAL_CLOSED.has(local.state))
|
|
337
|
+
settle(deps, receipt, local ? "local_closed" : "unknown", now);
|
|
338
|
+
else
|
|
339
|
+
noteError(deps, receipt, error.message);
|
|
340
|
+
return false;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
/** The hub refused the request: the local item closes failed with the hub's words, and nothing more is read. */
|
|
344
|
+
function refuse(deps, receipt, error, now) {
|
|
345
|
+
const why = `${error.message}${error.code ? ` (${error.code})` : ""}`.slice(0, 500);
|
|
346
|
+
const local = deps.queueRepo.getById(receipt.local_qitem_id);
|
|
347
|
+
if (local && !LOCAL_CLOSED.has(local.state) && !writeLocal(deps, receipt, now, () => deps.queueRepo.update({ qitemId: local.qitemId,
|
|
348
|
+
actorSession: OPENRIG_SENDER, expectState: local.state, state: "failed", resolution: `The network hub refused this request: ${why}`,
|
|
349
|
+
transitionNote: `Refused by the network hub ${shownHubUrl(receipt.hub_url)} (hub item ${receipt.hub_qitem_id}).` })))
|
|
350
|
+
return;
|
|
351
|
+
settle(deps, receipt, "refused", now, why);
|
|
352
|
+
}
|
|
353
|
+
/** One pass's reading of this binding's open requests, on the pass's hub session. Open requests of an ended binding for
|
|
354
|
+
* the same seat, hub and participant are taken over first. A refusal on one request is recorded on it and the rest go
|
|
355
|
+
* on; a hub that stops answering leaves the rest for the next pass; a revoked credential ends the pass, as the
|
|
356
|
+
* connector's own calls do. A local write the queue refuses never stops the pass. Returns the hub's unavailable answer
|
|
357
|
+
* that stopped the reading, if one did, for the pass to report and back off on. */
|
|
358
|
+
export async function reconcileNetworkRequests(deps, binding, hub, now = deps.now ?? (() => new Date()), live = () => true) {
|
|
359
|
+
deps.db.prepare(`UPDATE network_requests SET binding_id = ? WHERE node_id = ? AND hub_url = ? AND hub_seat = ? AND settled_at IS NULL AND binding_id != ?`)
|
|
360
|
+
.run(binding.id, binding.nodeId, binding.hubUrl, binding.hubSeat, binding.id);
|
|
361
|
+
const open = deps.db.prepare(`SELECT * FROM network_requests WHERE binding_id = ? AND settled_at IS NULL
|
|
362
|
+
ORDER BY COALESCE(checked_at, ''), created_at LIMIT ?`).all(binding.id, REQUEST_LIMIT);
|
|
363
|
+
for (const receipt of open) {
|
|
364
|
+
if (!live())
|
|
365
|
+
break;
|
|
366
|
+
deps.db.prepare("UPDATE network_requests SET checked_at = ? WHERE local_qitem_id = ?").run(now().toISOString(), receipt.local_qitem_id);
|
|
367
|
+
const local = deps.queueRepo.getById(receipt.local_qitem_id);
|
|
368
|
+
if (!local) {
|
|
369
|
+
settle(deps, receipt, "unknown", now, "The local item is gone, so the answer has nowhere to land.");
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
// Someone here closed it first: that disposition stands, and the hub item is left as it is.
|
|
373
|
+
if (LOCAL_CLOSED.has(local.state)) {
|
|
374
|
+
settle(deps, receipt, "local_closed", now);
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
// Only a confirmed not-found means a create never landed. Any other refusal of the show (out of scope after a lost
|
|
378
|
+
// reply, say) is recorded, and the request is neither created again nor closed on it.
|
|
379
|
+
const reached = await reachOnHub(deps, hub, binding.id, receipt, true, live);
|
|
380
|
+
if (reached.kind === "stopped") {
|
|
381
|
+
stopBeforeCreate(deps, receipt, reached.stop, now);
|
|
382
|
+
if (reached.stop === "binding")
|
|
383
|
+
break;
|
|
384
|
+
continue;
|
|
385
|
+
}
|
|
386
|
+
if (reached.kind === "refused") {
|
|
387
|
+
refuse(deps, receipt, reached.error, now);
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
if (reached.kind === "unknown") {
|
|
391
|
+
// A refused credential ends the pass, as on any other call: the connector marks the binding revoked.
|
|
392
|
+
if (reached.error.kind === "revoked")
|
|
393
|
+
throw reached.error;
|
|
394
|
+
noteError(deps, receipt, reached.error.message);
|
|
395
|
+
// The hub stopped answering partway: the rest wait for the next pass, and the work taken in this pass stands.
|
|
396
|
+
if (reached.error.kind === "unavailable")
|
|
397
|
+
return reached.error;
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
const shown = reached.item;
|
|
401
|
+
if (!receipt.hub_created_at) {
|
|
402
|
+
deps.db.prepare("UPDATE network_requests SET hub_created_at = ?, last_error = NULL WHERE local_qitem_id = ?").run(now().toISOString(), receipt.local_qitem_id);
|
|
403
|
+
}
|
|
404
|
+
// A hub item handed on there: its answer is its successor's, followed while this participant can read it.
|
|
405
|
+
let end = shown;
|
|
406
|
+
let stopped = null;
|
|
407
|
+
for (let hop = 0; hop < 20 && end && handedOn(end); hop++) {
|
|
408
|
+
if (!end.successor) {
|
|
409
|
+
end = null;
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
try {
|
|
413
|
+
end = await hub.show(end.successor);
|
|
414
|
+
}
|
|
415
|
+
catch (error) {
|
|
416
|
+
if (!(error instanceof HubError) || error.kind === "revoked")
|
|
417
|
+
throw error;
|
|
418
|
+
if (error.kind === "unavailable") {
|
|
419
|
+
noteError(deps, receipt, error.message);
|
|
420
|
+
stopped = error;
|
|
421
|
+
}
|
|
422
|
+
end = null;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
if (stopped)
|
|
426
|
+
return stopped;
|
|
427
|
+
if (!end || handedOn(end)) {
|
|
428
|
+
if (receipt.last_error !== HANDED_ON_UNREADABLE && writeLocal(deps, receipt, now, () => deps.queueRepo.update({ qitemId: local.qitemId, actorSession: OPENRIG_SENDER, transitionNote: HANDED_ON_UNREADABLE }))) {
|
|
429
|
+
noteError(deps, receipt, HANDED_ON_UNREADABLE);
|
|
430
|
+
}
|
|
431
|
+
continue;
|
|
432
|
+
}
|
|
433
|
+
if (!HUB_FINAL.has(end.state))
|
|
434
|
+
continue;
|
|
435
|
+
// The local item closes the way the hub item did: failed as failed, a cancel or a refusal as itself, never as success.
|
|
436
|
+
// A reason the local queue takes only with a target here (escalation) is named in the note, and the close is no-follow-on.
|
|
437
|
+
const state = end.state === "failed" ? "failed" : "done";
|
|
438
|
+
const closureReason = end.state === "canceled" ? "canceled" : end.state === "denied" ? "denied"
|
|
439
|
+
: end.closureReason && CLOSURE_REASONS.has(end.closureReason) ? end.closureReason : "no-follow-on";
|
|
440
|
+
const named = state === "done" && end.closureReason && end.closureReason !== closureReason ? `; closed there as ${end.closureReason}` : "";
|
|
441
|
+
const answeredBy = end.destinationSession || receipt.peer, endItem = end;
|
|
442
|
+
if (writeLocal(deps, receipt, now, () => deps.queueRepo.update({ qitemId: local.qitemId, actorSession: OPENRIG_SENDER, expectState: local.state,
|
|
443
|
+
state, ...(state === "done" ? { closureReason } : {}), resolution: endItem.resolution || "Closed without a stated result.",
|
|
444
|
+
transitionNote: `Answered by ${answeredBy} via network hub ${shownHubUrl(receipt.hub_url)} (hub item ${endItem.qitemId})${named}.` }))) {
|
|
445
|
+
settle(deps, receipt, end.state, now);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
return null;
|
|
449
|
+
}
|
|
450
|
+
/** A binding the hub ended: each open request sent through it says once, on its local item, that its answer can't be read
|
|
451
|
+
* here. The requests stay open, so a new binding for the same seat, hub and participant takes them over. It never throws:
|
|
452
|
+
* it runs while the connector records the revoke. A note that can't be written is skipped and the others go on. */
|
|
453
|
+
export function noteEndedBindingRequests(deps, binding, log) {
|
|
454
|
+
let open;
|
|
455
|
+
try {
|
|
456
|
+
open = deps.db.prepare("SELECT * FROM network_requests WHERE binding_id = ? AND settled_at IS NULL").all(binding.id);
|
|
457
|
+
}
|
|
458
|
+
catch (error) {
|
|
459
|
+
log?.(`network ${binding.id}: couldn't read its open requests: ${error instanceof Error ? error.message : String(error)}`);
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
for (const receipt of open) {
|
|
463
|
+
if (receipt.last_error === BINDING_ENDED)
|
|
464
|
+
continue;
|
|
465
|
+
try {
|
|
466
|
+
const local = deps.queueRepo.getById(receipt.local_qitem_id);
|
|
467
|
+
if (local && !LOCAL_CLOSED.has(local.state))
|
|
468
|
+
deps.queueRepo.update({ qitemId: local.qitemId, actorSession: OPENRIG_SENDER, transitionNote: BINDING_ENDED });
|
|
469
|
+
deps.db.prepare("UPDATE network_requests SET last_error = ? WHERE local_qitem_id = ?").run(BINDING_ENDED, receipt.local_qitem_id);
|
|
470
|
+
}
|
|
471
|
+
catch (error) {
|
|
472
|
+
log?.(`network ${binding.id}: couldn't note request ${receipt.local_qitem_id}: ${error instanceof Error ? error.message : String(error)}`);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
//# sourceMappingURL=network-requests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network-requests.js","sourceRoot":"","sources":["../../../src/domain/network/network-requests.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAwC,MAAM,wBAAwB,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAiD,MAAM,uBAAuB,CAAC;AAClI,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAgE,MAAM,iBAAiB,CAAC;AA6BxH,MAAM,cAAc,GAAG,MAAM,CAAC;AAC9B,sHAAsH;AACtH,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,qHAAqH;AACrH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AACpE,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;AACrF;sGACsG;AACtG,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AACxE,MAAM,oBAAoB,GAAG,uJAAuJ,CAAC;AACrL,MAAM,aAAa,GAAG,0NAA0N,CAAC;AAEjP;2CAC2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Database.Database, rigId: s
|
|
|
85
85
|
* (`hookOrPaneActivity`), which sees a prompt no hook reported. Stale hooks
|
|
86
86
|
* arrive as `unknown` and contribute nothing — never guessed. The rig total
|
|
87
87
|
* and the seat row must not disagree about the same seat.
|
|
88
|
+
* - a fresh Claude authentication or billing failure (`providerFailureNeedsAttention`, #3571). It keeps the
|
|
89
|
+
* hook's `unknown` state, so it is never a `needs_input` request and an arbitrated clear doesn't cancel it.
|
|
88
90
|
* - a held seat, except an unlaunched hold with no assigned work and no recorded
|
|
89
91
|
* launch or restore result (`isUnlaunchedHeldWithoutWork`)
|
|
90
92
|
* - a recorded startup error (`latestError` present)
|
|
@@ -101,6 +103,30 @@ export declare function seatNeedsAttention(entry: NodeInventoryEntry, activity:
|
|
|
101
103
|
* with no session left and no startup error would silently lose its attention.
|
|
102
104
|
*/
|
|
103
105
|
export declare function isUnlaunchedHeldWithoutWork(entry: NodeInventoryEntry, assignedWorkCount: number | undefined): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* A Claude StopFailure whose typed reason is an authentication or billing failure (#3571), from the seat's own runtime,
|
|
108
|
+
* still current: fresh, generation-valid and normalized as such (a stale or mismatched row comes back demoted). Only
|
|
109
|
+
* the documented auth and billing values qualify; a generic or unlisted provider error never asks for a person.
|
|
110
|
+
*/
|
|
111
|
+
export declare function providerFailureNeedsAttention(activity: AgentActivity | null | undefined, seatRuntime: string | null | undefined): boolean;
|
|
112
|
+
/** #3571: the current occupant's last Claude authentication or billing failure that no newer turn has superseded, for
|
|
113
|
+
* a Claude seat whose newest hook isn't a turn. A store that can't read it (a partial double) gives the newest hook,
|
|
114
|
+
* which providerFailureActivity still judges as before. */
|
|
115
|
+
export declare function retainedProviderFailure(store: Partial<Pick<AgentActivityStore, "latestUnsupersededProviderFailure">> | null | undefined, seat: {
|
|
116
|
+
nodeId?: string | null;
|
|
117
|
+
sessionName: string | null | undefined;
|
|
118
|
+
runtime: string | null | undefined;
|
|
119
|
+
now?: Date;
|
|
120
|
+
}, newest: AgentActivity | null | undefined): AgentActivity | null;
|
|
121
|
+
/**
|
|
122
|
+
* The served activity for a seat with a current Claude authentication or billing failure (`retainedProviderFailure`):
|
|
123
|
+
* that hook, ahead of the cached pane reading, so the row shows the reason it counts for attention. Only a native prompt from a
|
|
124
|
+
* capture that began strictly after the failure outranks it (a capture's completion can lag the bytes it read, and
|
|
125
|
+
* without a start time the failure stays); a draft in the input box doesn't. Kept out of `hookOrPaneActivity`, whose
|
|
126
|
+
* other readers (prompt-clear and reachable wake recovery, the usage-limit watchdog) keep the pane's reading: the
|
|
127
|
+
* report holds no send or wake.
|
|
128
|
+
*/
|
|
129
|
+
export declare function providerFailureActivity(hookActivity: AgentActivity | null | undefined, structural: StructuralObservation | null, runtime: string | null | undefined): AgentActivity | null;
|
|
104
130
|
/**
|
|
105
131
|
* #180 review — the arbitrated needs-input answer is TRI-STATE; collapsing it to
|
|
106
132
|
* `needsInput.count > 0` treats `count: 0` as a definite "no" even when no source said
|