@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,93 @@
|
|
|
1
|
+
import type Database from "better-sqlite3";
|
|
2
|
+
import type { PolicyJob } from "./policies/types.js";
|
|
3
|
+
import type { RigRepository } from "./rig-repository.js";
|
|
4
|
+
import { type SeatPoolSpec } from "./seat-pool-spec.js";
|
|
5
|
+
import { type EnsureAutoRegistrationInput, type WatchdogJob, type WatchdogJobsRepository } from "./watchdog-jobs-repository.js";
|
|
6
|
+
/** Who registers the job. */
|
|
7
|
+
export declare const SEAT_POOL_REGISTRAR = "daemon@kernel";
|
|
8
|
+
/** How often the job is evaluated once armed, in seconds. */
|
|
9
|
+
export declare const SEAT_POOL_INTERVAL_SECONDS = 60;
|
|
10
|
+
export interface SeatPoolRegistrationDeps {
|
|
11
|
+
db: Database.Database;
|
|
12
|
+
rigRepo: Pick<RigRepository, "getNodePool">;
|
|
13
|
+
jobsRepo: WatchdogJobsRepository;
|
|
14
|
+
/** Where the start loop reports a node it could not ensure; console.warn by default. */
|
|
15
|
+
warn?: (message: string) => void;
|
|
16
|
+
}
|
|
17
|
+
/** The model member a job is for: its node, its canonical session and that session's aliases. */
|
|
18
|
+
export interface SeatPoolModel {
|
|
19
|
+
nodeId: string;
|
|
20
|
+
rigName: string;
|
|
21
|
+
sessionName: string;
|
|
22
|
+
aliases: string[];
|
|
23
|
+
}
|
|
24
|
+
export type SeatPoolEnsureResult = {
|
|
25
|
+
outcome: "active";
|
|
26
|
+
job: WatchdogJob;
|
|
27
|
+
} | {
|
|
28
|
+
outcome: "stopped";
|
|
29
|
+
job: WatchdogJob;
|
|
30
|
+
} | {
|
|
31
|
+
outcome: "registered";
|
|
32
|
+
job: WatchdogJob;
|
|
33
|
+
replaced: "none" | "terminal";
|
|
34
|
+
} | {
|
|
35
|
+
outcome: "ambiguous";
|
|
36
|
+
code: "auto_registration_ambiguous" | "auto_registration_state_invalid";
|
|
37
|
+
message: string;
|
|
38
|
+
details?: Record<string, unknown>;
|
|
39
|
+
};
|
|
40
|
+
export type SeatPoolReconcileResult = ({
|
|
41
|
+
nodeId: string;
|
|
42
|
+
} & SeatPoolEnsureResult) | {
|
|
43
|
+
nodeId: string;
|
|
44
|
+
outcome: "no_block";
|
|
45
|
+
} | {
|
|
46
|
+
nodeId: string;
|
|
47
|
+
outcome: "unusable";
|
|
48
|
+
error: string;
|
|
49
|
+
} | {
|
|
50
|
+
nodeId: string;
|
|
51
|
+
outcome: "no_model_session";
|
|
52
|
+
} | {
|
|
53
|
+
nodeId: string;
|
|
54
|
+
outcome: "failed";
|
|
55
|
+
message: string;
|
|
56
|
+
};
|
|
57
|
+
/** The model member's canonical session and aliases, or null when the node is gone or has no pod-aware name. */
|
|
58
|
+
export declare function resolveSeatPoolModel(db: Database.Database, nodeId: string): SeatPoolModel | null;
|
|
59
|
+
/** The model a job acts for, or why it has none. */
|
|
60
|
+
export type SeatPoolJobModel = {
|
|
61
|
+
found: true;
|
|
62
|
+
modelNodeId: string;
|
|
63
|
+
rigId: string;
|
|
64
|
+
model: SeatPoolModel;
|
|
65
|
+
}
|
|
66
|
+
/** The job's spec names no model node; `modelNodeId` is the spec's value as written (null when absent). */
|
|
67
|
+
| {
|
|
68
|
+
found: false;
|
|
69
|
+
modelNodeId: unknown;
|
|
70
|
+
cause: "no_model_node_id";
|
|
71
|
+
} | {
|
|
72
|
+
found: false;
|
|
73
|
+
modelNodeId: string;
|
|
74
|
+
cause: "node_gone" | "no_canonical_session";
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* The model a seat-pool job acts for: the node named by its spec's `context.model_node_id`, resolved the way the
|
|
78
|
+
* ensure resolves it (resolveSeatPoolModel). The executor finds the model only through this, never by reading the spec
|
|
79
|
+
* or the job's target itself.
|
|
80
|
+
*/
|
|
81
|
+
export declare function seatPoolModelOfJob(db: Database.Database, job: Pick<PolicyJob, "context">): SeatPoolJobModel;
|
|
82
|
+
/** The ensure input for a model's job: its identity, cadence and spec. */
|
|
83
|
+
export declare function seatPoolJobInput(model: SeatPoolModel, spec: SeatPoolSpec): EnsureAutoRegistrationInput;
|
|
84
|
+
/** Ensure one job for a model with a usable block. Throws only what is not an ambiguous or invalid job state. */
|
|
85
|
+
export declare function ensureSeatPoolJob(deps: Pick<SeatPoolRegistrationDeps, "jobsRepo">, model: SeatPoolModel, spec: SeatPoolSpec): SeatPoolEnsureResult;
|
|
86
|
+
/** Reconcile one model node to its stored block. A node with no block, or a block that can't be read, is left alone. */
|
|
87
|
+
export declare function reconcileSeatPoolNode(deps: SeatPoolRegistrationDeps, nodeId: string): SeatPoolReconcileResult;
|
|
88
|
+
/**
|
|
89
|
+
* The daemon-start loop: every node with a stored block, one at a time, each in its own try/catch, so one node that
|
|
90
|
+
* throws never stops the others. A failure and an ambiguous job state are warned with the node and the reason.
|
|
91
|
+
*/
|
|
92
|
+
export declare function reconcileSeatPoolsAtStartup(deps: SeatPoolRegistrationDeps): SeatPoolReconcileResult[];
|
|
93
|
+
//# sourceMappingURL=seat-pool-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seat-pool-registration.d.ts","sourceRoot":"","sources":["../../src/domain/seat-pool-registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAG3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AAqBvC,6BAA6B;AA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B,CAAC,IAAI,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,GAAG,uBAAuB,CAO7G;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,wBAAwB,GAAG,uBAAuB,EAAE,CA4BrG"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { stringify as stringifyYaml } from "yaml";
|
|
2
|
+
import { SEAT_POOL_POLICY_NAME } from "./policies/seat-pool.js";
|
|
3
|
+
import { deriveCanonicalSessionName, parseSessionName, validateSessionName } from "./session-name.js";
|
|
4
|
+
import { serializePoolBlock } from "./seat-pool-spec.js";
|
|
5
|
+
import { formatWatchdogRegistrationError } from "./watchdog-auto-registration.js";
|
|
6
|
+
import { WatchdogJobsError, } from "./watchdog-jobs-repository.js";
|
|
7
|
+
// #3395 (Piece 1): registering the `seat-pool` watchdog job, one per model member that has a `pool` block.
|
|
8
|
+
//
|
|
9
|
+
// Only the seat-pool executor calls this module, through `seatPoolModelOfJob`; nothing calls the ensure yet: the job
|
|
10
|
+
// stays unarmed until the activation change, which calls the ensure on launch and re-apply and the start loop at daemon
|
|
11
|
+
// start, and hands the policy to the watchdog engine.
|
|
12
|
+
//
|
|
13
|
+
// The job's identity is the model's canonical session, with no generation, registered by `daemon@kernel`; the
|
|
14
|
+
// model's other canonical session names in the same rig are passed as aliases, as the idle-gate registration passes
|
|
15
|
+
// them. Its spec carries the model node id, which is how the job (and any replacement) finds the pool's agents, and
|
|
16
|
+
// the pool block it was ensured with.
|
|
17
|
+
//
|
|
18
|
+
// Outcomes of the ensure:
|
|
19
|
+
// - an `active` job is refreshed with the new spec and keeps running;
|
|
20
|
+
// - a `stopped` job gets the new spec and stays stopped (an operator's stop is never undone here);
|
|
21
|
+
// - only a `terminal` job, or no job, means one new job;
|
|
22
|
+
// - an ambiguous or invalid state is reported and no job is picked: nothing is registered or retired.
|
|
23
|
+
// A node with no block never gets a job, and a stored block that can't be read leaves the job as it is.
|
|
24
|
+
// Stopping the job while the pool has agents is allowed: the agents stay plain members.
|
|
25
|
+
/** Who registers the job. */
|
|
26
|
+
export const SEAT_POOL_REGISTRAR = "daemon@kernel";
|
|
27
|
+
/** How often the job is evaluated once armed, in seconds. */
|
|
28
|
+
export const SEAT_POOL_INTERVAL_SECONDS = 60;
|
|
29
|
+
/** The model member's canonical session and aliases, or null when the node is gone or has no pod-aware name. */
|
|
30
|
+
export function resolveSeatPoolModel(db, nodeId) {
|
|
31
|
+
const row = db.prepare(`SELECT n.id AS node_id, n.logical_id AS logical_id, n.pod_id AS pod_id, r.name AS rig_name
|
|
32
|
+
FROM nodes n LEFT JOIN rigs r ON r.id = n.rig_id
|
|
33
|
+
WHERE n.id = ?`).get(nodeId);
|
|
34
|
+
if (!row || row.rig_name === null || row.pod_id === null)
|
|
35
|
+
return null;
|
|
36
|
+
const dot = row.logical_id.indexOf(".");
|
|
37
|
+
if (dot <= 0 || dot === row.logical_id.length - 1)
|
|
38
|
+
return null;
|
|
39
|
+
const sessionName = deriveCanonicalSessionName(row.logical_id.slice(0, dot), row.logical_id.slice(dot + 1), row.rig_name);
|
|
40
|
+
if (!isCanonicalInRig(sessionName, row.rig_name))
|
|
41
|
+
return null;
|
|
42
|
+
const recorded = db.prepare(`SELECT session_name FROM sessions WHERE node_id = ? ORDER BY created_at ASC, id ASC`).all(nodeId);
|
|
43
|
+
const aliases = [...new Set([...recorded.map((r) => r.session_name), sessionName])]
|
|
44
|
+
.filter((candidate) => isCanonicalInRig(candidate, row.rig_name));
|
|
45
|
+
return { nodeId: row.node_id, rigName: row.rig_name, sessionName, aliases };
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The model a seat-pool job acts for: the node named by its spec's `context.model_node_id`, resolved the way the
|
|
49
|
+
* ensure resolves it (resolveSeatPoolModel). The executor finds the model only through this, never by reading the spec
|
|
50
|
+
* or the job's target itself.
|
|
51
|
+
*/
|
|
52
|
+
export function seatPoolModelOfJob(db, job) {
|
|
53
|
+
const id = job.context["model_node_id"];
|
|
54
|
+
if (typeof id !== "string" || id === "")
|
|
55
|
+
return { found: false, modelNodeId: id ?? null, cause: "no_model_node_id" };
|
|
56
|
+
const node = db.prepare("SELECT rig_id FROM nodes WHERE id = ?").get(id);
|
|
57
|
+
if (!node)
|
|
58
|
+
return { found: false, modelNodeId: id, cause: "node_gone" };
|
|
59
|
+
const model = resolveSeatPoolModel(db, id);
|
|
60
|
+
if (!model)
|
|
61
|
+
return { found: false, modelNodeId: id, cause: "no_canonical_session" };
|
|
62
|
+
return { found: true, modelNodeId: id, rigId: node.rig_id, model };
|
|
63
|
+
}
|
|
64
|
+
function isCanonicalInRig(sessionName, rigName) {
|
|
65
|
+
if (!validateSessionName(sessionName))
|
|
66
|
+
return false;
|
|
67
|
+
const parsed = parseSessionName(sessionName);
|
|
68
|
+
return parsed.kind === "canonical" && parsed.rig === rigName;
|
|
69
|
+
}
|
|
70
|
+
/** The ensure input for a model's job: its identity, cadence and spec. */
|
|
71
|
+
export function seatPoolJobInput(model, spec) {
|
|
72
|
+
return {
|
|
73
|
+
policy: SEAT_POOL_POLICY_NAME,
|
|
74
|
+
targetSession: model.sessionName,
|
|
75
|
+
targetGenerationUuid: null,
|
|
76
|
+
registeredBySession: SEAT_POOL_REGISTRAR,
|
|
77
|
+
intervalSeconds: SEAT_POOL_INTERVAL_SECONDS,
|
|
78
|
+
activeWakeIntervalSeconds: null,
|
|
79
|
+
scanIntervalSeconds: null,
|
|
80
|
+
specYaml: stringifyYaml({
|
|
81
|
+
policy: SEAT_POOL_POLICY_NAME,
|
|
82
|
+
target: { session: model.sessionName },
|
|
83
|
+
context: { model_node_id: model.nodeId, pool: serializePoolBlock(spec) },
|
|
84
|
+
}),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/** Ensure one job for a model with a usable block. Throws only what is not an ambiguous or invalid job state. */
|
|
88
|
+
export function ensureSeatPoolJob(deps, model, spec) {
|
|
89
|
+
try {
|
|
90
|
+
const before = deps.jobsRepo.findAutoRegistration(SEAT_POOL_POLICY_NAME, model.sessionName, null, model.aliases);
|
|
91
|
+
const job = deps.jobsRepo.ensureAutoRegistration(seatPoolJobInput(model, spec), model.aliases);
|
|
92
|
+
if (before)
|
|
93
|
+
return { outcome: job.state === "stopped" ? "stopped" : "active", job };
|
|
94
|
+
const ended = model.aliases.some((alias) => deps.jobsRepo.listExactTuple(SEAT_POOL_POLICY_NAME, alias, null).some((row) => row.state === "terminal"));
|
|
95
|
+
return { outcome: "registered", job, replaced: ended ? "terminal" : "none" };
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
if (error instanceof WatchdogJobsError
|
|
99
|
+
&& (error.code === "auto_registration_ambiguous" || error.code === "auto_registration_state_invalid")) {
|
|
100
|
+
return { outcome: "ambiguous", code: error.code, message: error.message, ...(error.details ? { details: error.details } : {}) };
|
|
101
|
+
}
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/** Reconcile one model node to its stored block. A node with no block, or a block that can't be read, is left alone. */
|
|
106
|
+
export function reconcileSeatPoolNode(deps, nodeId) {
|
|
107
|
+
const stored = deps.rigRepo.getNodePool(nodeId);
|
|
108
|
+
if (stored === undefined)
|
|
109
|
+
return { nodeId, outcome: "no_block" };
|
|
110
|
+
if (!("spec" in stored))
|
|
111
|
+
return { nodeId, outcome: "unusable", error: stored.error };
|
|
112
|
+
const model = resolveSeatPoolModel(deps.db, nodeId);
|
|
113
|
+
if (!model)
|
|
114
|
+
return { nodeId, outcome: "no_model_session" };
|
|
115
|
+
return { nodeId, ...ensureSeatPoolJob(deps, model, stored.spec) };
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The daemon-start loop: every node with a stored block, one at a time, each in its own try/catch, so one node that
|
|
119
|
+
* throws never stops the others. A failure and an ambiguous job state are warned with the node and the reason.
|
|
120
|
+
*/
|
|
121
|
+
export function reconcileSeatPoolsAtStartup(deps) {
|
|
122
|
+
const warn = deps.warn ?? ((message) => console.warn(message));
|
|
123
|
+
const nodes = deps.db.prepare(`SELECT n.id AS id FROM nodes n JOIN rigs r ON r.id = n.rig_id
|
|
124
|
+
WHERE n.pool IS NOT NULL
|
|
125
|
+
ORDER BY r.name, n.logical_id, n.id`).all();
|
|
126
|
+
const results = [];
|
|
127
|
+
for (const { id } of nodes) {
|
|
128
|
+
let result;
|
|
129
|
+
try {
|
|
130
|
+
result = reconcileSeatPoolNode(deps, id);
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
result = { nodeId: id, outcome: "failed", message: formatWatchdogRegistrationError(error) };
|
|
134
|
+
}
|
|
135
|
+
if (result.outcome === "failed") {
|
|
136
|
+
warn(`[seat-pool] daemon start could not ensure the seat-pool job for node_id="${id}" and continued: ${result.message}`);
|
|
137
|
+
}
|
|
138
|
+
else if (result.outcome === "no_model_session") {
|
|
139
|
+
warn(`[seat-pool] node_id="${id}" has a pool block but no canonical pod member session; no seat-pool job ensured`);
|
|
140
|
+
}
|
|
141
|
+
else if (result.outcome === "ambiguous") {
|
|
142
|
+
warn(`[seat-pool] node_id="${id}" has an ambiguous seat-pool job state (${result.code}); no job picked: ${result.message}`
|
|
143
|
+
+ (result.details ? `; details=${JSON.stringify(result.details)}` : ""));
|
|
144
|
+
}
|
|
145
|
+
results.push(result);
|
|
146
|
+
}
|
|
147
|
+
return results;
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=seat-pool-registration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seat-pool-registration.js","sourceRoot":"","sources":["../../src/domain/seat-pool-registration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,OAAO,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACtG,OAAO,EAAE,kBAAkB,EAAq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EAAE,OAAO,EAAE,+BAA+B,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9F,CAAC;QACD,IAAI,MAAM,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,IAAI,CAAC,4EAA4E,EAAE,oBAAoB,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAC3H,CAAC;aAAM,IAAI,MAAM,CAAC,OAAO,KAAK,kBAAkB,EAAE,CAAC;YACjD,IAAI,CAAC,wBAAwB,EAAE,kFAAkF,CAAC,CAAC;QACrH,CAAC;aAAM,IAAI,MAAM,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;YAC1C,IAAI,CACF,wBAAwB,EAAE,2CAA2C,MAAM,CAAC,IAAI,qBAAqB,MAAM,CAAC,OAAO,EAAE;kBACnH,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CACxE,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type Database from "better-sqlite3";
|
|
2
2
|
export type SeatPoolSlotPhase = "adding" | "live" | "draining" | "drained";
|
|
3
|
+
export type SeatPoolSlotAttemptKind = "add" | "comeback";
|
|
4
|
+
export type SeatPoolSlotAttemptState = "reserved" | "issued" | "settled";
|
|
3
5
|
export interface SeatPoolSlot {
|
|
4
6
|
slotId: string;
|
|
5
7
|
modelNodeId: string;
|
|
@@ -9,6 +11,17 @@ export interface SeatPoolSlot {
|
|
|
9
11
|
nodeId: string | null;
|
|
10
12
|
phase: SeatPoolSlotPhase;
|
|
11
13
|
phaseChangedAt: string;
|
|
14
|
+
/** The slot's latest attempt; null when it has none. The add's id is its operation id. */
|
|
15
|
+
attemptId: string | null;
|
|
16
|
+
attemptKind: SeatPoolSlotAttemptKind | null;
|
|
17
|
+
attemptState: SeatPoolSlotAttemptState | null;
|
|
18
|
+
/** JSON: what the attempt was issued on. */
|
|
19
|
+
attemptBasis: string | null;
|
|
20
|
+
/** JSON: the attempt's outcome as the call returned it. */
|
|
21
|
+
attemptOutcome: string | null;
|
|
22
|
+
/** JSON: `{ nodeId, sessionId }` of the session the attempt settled with. */
|
|
23
|
+
attemptResult: string | null;
|
|
24
|
+
reuseHold: string | null;
|
|
12
25
|
createdAt: string;
|
|
13
26
|
}
|
|
14
27
|
export declare class SeatPoolSlotsRepository {
|
|
@@ -31,9 +44,38 @@ export declare class SeatPoolSlotsRepository {
|
|
|
31
44
|
phase: SeatPoolSlotPhase;
|
|
32
45
|
at: string;
|
|
33
46
|
}): SeatPoolSlot;
|
|
47
|
+
/**
|
|
48
|
+
* An add's reservation, in one transaction: the next number (nextSlot) and its row in `adding`, with a reserved add
|
|
49
|
+
* attempt under `attemptId` and no node yet.
|
|
50
|
+
*/
|
|
51
|
+
reserveAdd(input: {
|
|
52
|
+
modelNodeId: string;
|
|
53
|
+
attemptId: string;
|
|
54
|
+
at: string;
|
|
55
|
+
}): {
|
|
56
|
+
slot: SeatPoolSlot;
|
|
57
|
+
logicalId: string;
|
|
58
|
+
};
|
|
59
|
+
/** A reserved attempt becomes issued, with what it was issued on. False when the row no longer holds that reserved
|
|
60
|
+
* attempt. */
|
|
61
|
+
issueAttempt(slotId: string, attemptId: string, basis: string): boolean;
|
|
62
|
+
/** The node an attempt created, written in the transaction that creates it. */
|
|
63
|
+
recordAttemptNode(slotId: string, attemptId: string, nodeId: string): void;
|
|
64
|
+
/** An issued add that runs: settled, with its outcome and the session it settled with, and the slot `live`. */
|
|
65
|
+
settleAdd(slotId: string, attemptId: string, input: {
|
|
66
|
+
outcome: string;
|
|
67
|
+
result: string;
|
|
68
|
+
at: string;
|
|
69
|
+
}): boolean;
|
|
70
|
+
/** An issued attempt's outcome, kept while the attempt stays issued. */
|
|
71
|
+
recordAttemptOutcome(slotId: string, attemptId: string, outcome: string): boolean;
|
|
72
|
+
/** An add that ended with no node: its row goes, which frees its number. Only the row of that attempt, with no node. */
|
|
73
|
+
removeAddWithoutNode(slotId: string, attemptId: string): boolean;
|
|
34
74
|
get(slotId: string): SeatPoolSlot | undefined;
|
|
35
75
|
/** A model's slots, lowest number first. */
|
|
36
76
|
forModel(modelNodeId: string): SeatPoolSlot[];
|
|
77
|
+
/** Whether the node is a pool agent the pool drained: restore keeps it down until the pool brings it back. */
|
|
78
|
+
isDrainedPoolNode(nodeId: string): boolean;
|
|
37
79
|
/** The nodes of every pool agent in a rig, in every phase (`drained` included). */
|
|
38
80
|
poolAgentNodeIds(rigId: string): string[];
|
|
39
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-pool-slots.d.ts","sourceRoot":"","sources":["../../src/domain/seat-pool-slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"seat-pool-slots.d.ts","sourceRoot":"","sources":["../../src/domain/seat-pool-slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAU3C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;AAC3E,MAAM,MAAM,uBAAuB,GAAG,KAAK,GAAG,UAAU,CAAC;AACzD,MAAM,MAAM,wBAAwB,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzE,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,iBAAiB,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,0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AAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAM1E,+GAA+G;IAC/G,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO;IAO7G,wEAAwE;IACxE,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAKjF,wHAAwH;IACxH,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAMhE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAK7C,4CAA4C;IAC5C,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,EAAE;IAK7C,8GAA8G;IAC9G,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAI1C,mFAAmF;IACnF,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;CAM1C"}
|
|
@@ -6,6 +6,13 @@ const fromRow = (row) => ({
|
|
|
6
6
|
nodeId: row.node_id,
|
|
7
7
|
phase: row.phase,
|
|
8
8
|
phaseChangedAt: row.phase_changed_at,
|
|
9
|
+
attemptId: row.attempt_id,
|
|
10
|
+
attemptKind: row.attempt_kind,
|
|
11
|
+
attemptState: row.attempt_state,
|
|
12
|
+
attemptBasis: row.attempt_basis,
|
|
13
|
+
attemptOutcome: row.attempt_outcome,
|
|
14
|
+
attemptResult: row.attempt_result,
|
|
15
|
+
reuseHold: row.reuse_hold,
|
|
9
16
|
createdAt: row.created_at,
|
|
10
17
|
});
|
|
11
18
|
export class SeatPoolSlotsRepository {
|
|
@@ -53,6 +60,46 @@ export class SeatPoolSlotsRepository {
|
|
|
53
60
|
VALUES (?, ?, ?, ?, ?, ?, ?)`).run(slotId, input.modelNodeId, input.slotNumber, input.nodeId, input.phase, input.at, input.at);
|
|
54
61
|
return this.get(slotId);
|
|
55
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* An add's reservation, in one transaction: the next number (nextSlot) and its row in `adding`, with a reserved add
|
|
65
|
+
* attempt under `attemptId` and no node yet.
|
|
66
|
+
*/
|
|
67
|
+
reserveAdd(input) {
|
|
68
|
+
return this.db.transaction(() => {
|
|
69
|
+
const next = this.nextSlot(input.modelNodeId);
|
|
70
|
+
const slotId = ulid();
|
|
71
|
+
this.db.prepare(`INSERT INTO seat_pool_slots (slot_id, model_node_id, slot_number, node_id, phase, phase_changed_at, attempt_id, attempt_kind,
|
|
72
|
+
attempt_state, created_at)
|
|
73
|
+
VALUES (?, ?, ?, NULL, 'adding', ?, ?, 'add', 'reserved', ?)`).run(slotId, input.modelNodeId, next.slotNumber, input.at, input.attemptId, input.at);
|
|
74
|
+
return { slot: this.get(slotId), logicalId: next.logicalId };
|
|
75
|
+
})();
|
|
76
|
+
}
|
|
77
|
+
/** A reserved attempt becomes issued, with what it was issued on. False when the row no longer holds that reserved
|
|
78
|
+
* attempt. */
|
|
79
|
+
issueAttempt(slotId, attemptId, basis) {
|
|
80
|
+
return this.db.prepare("UPDATE seat_pool_slots SET attempt_state = 'issued', attempt_basis = ? WHERE slot_id = ? AND attempt_id = ? AND attempt_state = 'reserved'").run(basis, slotId, attemptId).changes === 1;
|
|
81
|
+
}
|
|
82
|
+
/** The node an attempt created, written in the transaction that creates it. */
|
|
83
|
+
recordAttemptNode(slotId, attemptId, nodeId) {
|
|
84
|
+
const changed = this.db.prepare("UPDATE seat_pool_slots SET node_id = ? WHERE slot_id = ? AND attempt_id = ? AND node_id IS NULL")
|
|
85
|
+
.run(nodeId, slotId, attemptId).changes;
|
|
86
|
+
if (changed !== 1)
|
|
87
|
+
throw new Error(`seat pool: slot ${slotId} no longer waits for the node of attempt ${attemptId}`);
|
|
88
|
+
}
|
|
89
|
+
/** An issued add that runs: settled, with its outcome and the session it settled with, and the slot `live`. */
|
|
90
|
+
settleAdd(slotId, attemptId, input) {
|
|
91
|
+
return this.db.prepare(`UPDATE seat_pool_slots SET attempt_state = 'settled', attempt_outcome = ?, attempt_result = ?, phase = 'live', phase_changed_at = ?
|
|
92
|
+
WHERE slot_id = ? AND attempt_id = ? AND attempt_state = 'issued'`).run(input.outcome, input.result, input.at, slotId, attemptId).changes === 1;
|
|
93
|
+
}
|
|
94
|
+
/** An issued attempt's outcome, kept while the attempt stays issued. */
|
|
95
|
+
recordAttemptOutcome(slotId, attemptId, outcome) {
|
|
96
|
+
return this.db.prepare("UPDATE seat_pool_slots SET attempt_outcome = ? WHERE slot_id = ? AND attempt_id = ? AND attempt_state = 'issued'")
|
|
97
|
+
.run(outcome, slotId, attemptId).changes === 1;
|
|
98
|
+
}
|
|
99
|
+
/** An add that ended with no node: its row goes, which frees its number. Only the row of that attempt, with no node. */
|
|
100
|
+
removeAddWithoutNode(slotId, attemptId) {
|
|
101
|
+
return this.db.prepare("DELETE FROM seat_pool_slots WHERE slot_id = ? AND attempt_id = ? AND attempt_kind = 'add' AND phase = 'adding' AND node_id IS NULL").run(slotId, attemptId).changes === 1;
|
|
102
|
+
}
|
|
56
103
|
get(slotId) {
|
|
57
104
|
const row = this.db.prepare("SELECT * FROM seat_pool_slots WHERE slot_id = ?").get(slotId);
|
|
58
105
|
return row ? fromRow(row) : undefined;
|
|
@@ -62,6 +109,10 @@ export class SeatPoolSlotsRepository {
|
|
|
62
109
|
return this.db.prepare("SELECT * FROM seat_pool_slots WHERE model_node_id = ? ORDER BY slot_number").all(modelNodeId)
|
|
63
110
|
.map(fromRow);
|
|
64
111
|
}
|
|
112
|
+
/** Whether the node is a pool agent the pool drained: restore keeps it down until the pool brings it back. */
|
|
113
|
+
isDrainedPoolNode(nodeId) {
|
|
114
|
+
return this.db.prepare("SELECT 1 FROM seat_pool_slots WHERE node_id = ? AND phase = 'drained'").get(nodeId) !== undefined;
|
|
115
|
+
}
|
|
65
116
|
/** The nodes of every pool agent in a rig, in every phase (`drained` included). */
|
|
66
117
|
poolAgentNodeIds(rigId) {
|
|
67
118
|
return this.db.prepare(`SELECT s.node_id FROM seat_pool_slots s JOIN nodes m ON m.id = s.model_node_id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-pool-slots.js","sourceRoot":"","sources":["../../src/domain/seat-pool-slots.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"seat-pool-slots.js","sourceRoot":"","sources":["../../src/domain/seat-pool-slots.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAqD5B,MAAM,OAAO,GAAG,CAAC,GAAY,EAAgB,EAAE,CAAC,CAAC;IAC/C,MAAM,EAAE,GAAG,CAAC,OAAO;IACnB,WAAW,EAAE,GAAG,CAAC,aAAa;IAC9B,UAAU,EAAE,GAAG,CAAC,WAAW;IAC3B,MAAM,EAAE,GAAG,CAAC,OAAO;IACnB,KAAK,EAAE,GAAG,CAAC,KAAK;IAChB,cAAc,EAAE,GAAG,CAAC,gBAAgB;IACpC,SAAS,EAAE,GAAG,CAAC,UAAU;IACzB,WAAW,EAAE,GAAG,CAAC,YAAY;IAC7B,YAAY,EAAE,GAAG,CAAC,aAAa;IAC/B,YAAY,EAAE,GAAG,CAAC,aAAa;IAC/B,cAAc,EAAE,GAAG,CAAC,eAAe;IACnC,aAAa,EAAE,GAAG,CAAC,cAAc;IACjC,SAAS,EAAE,GAAG,CAAC,UAAU;IACzB,SAAS,EAAE,GAAG,CAAC,UAAU;CAC1B,CAAC,CAAC;AAEH,MAAM,OAAO,uBAAuB;IACL;IAA7B,YAA6B,EAAqB;QAArB,OAAE,GAAF,EAAE,CAAmB;IAAG,CAAC;IAEtD;;;OAGG;IACH,QAAQ,CAAC,WAAmB;QAC1B,MAAM,KAAK,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xH,oBAAoB,CAAC,MAAc,EAAE,SAAiB;QACpD,OAAO,IAAI,CAAC,EAAE,CAAC,OAAO,CACpB,oIAAoI,CACrI,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC;IACzC,CAAC;IAED,GAAG,CAAC,MAAc;QAChB,MAAM,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,iDAAiD,CAAC,CAAC,GAAG,CAAC,MAAM,CAAwB,CAAC;QAClH,OAAO,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxC,CAAC;IAED,4CAA4C;IAC5C,QAAQ,CAAC,WAAmB;QAC1B,OAAQ,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,4EAA4E,CAAC,CAAC,GAAG,CAAC,WAAW,CAAe;aACjI,GAAG,CAAC,OAAO,CAAC,CAAC;IAClB,CAAC;IAED,8GAA8G;IAC9G,iBAAiB,CAAC,MAAc;QAC9B,OAAO,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,uEAAuE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC;IAC5H,CAAC;IAED,mFAAmF;IACnF,gBAAgB,CAAC,KAAa;QAC5B,OAAQ,IAAI,CAAC,EAAE,CAAC,OAAO,CACrB;6FACuF,CACxF,CAAC,GAAG,CAAC,KAAK,CAAgC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACxE,CAAC;CACF"}
|
|
@@ -58,11 +58,21 @@ export declare function serializePoolBlock(spec: SeatPoolSpec): Record<string, u
|
|
|
58
58
|
export declare function poolProblemAdvisories(member: string, problems: readonly SeatPoolProblem[]): string[];
|
|
59
59
|
/** The `nodes.pool` column: SQL NULL for no pool, else the block as JSON (the spec form, or the block as authored). */
|
|
60
60
|
export declare function storedPoolText(block: SeatPoolNodeBlock): string;
|
|
61
|
+
/** Why a stored `nodes.pool` value can't be read at all: it isn't text. */
|
|
62
|
+
export declare const STORED_POOL_NOT_TEXT = "pool: the stored value is not JSON text";
|
|
63
|
+
/** Why a stored `nodes.pool` value can't be read at all: it isn't JSON. */
|
|
64
|
+
export declare const STORED_POOL_NOT_JSON = "pool: the stored value is not valid JSON";
|
|
61
65
|
/**
|
|
62
66
|
* Reads `nodes.pool`. NULL is no pool. A block that can't be read comes back as stored, with why, and never throws:
|
|
63
67
|
* it holds the pool rather than removing it.
|
|
64
68
|
*/
|
|
65
69
|
export declare function parseStoredPoolBlock(stored: unknown): StoredSeatPool | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The advisories a launch from stored state reports for the block stored on a node, in the load's form:
|
|
72
|
+
* `<member> pool.<field>: <reason>; pool not used`, one per problem. A value that can't be read at all (not text,
|
|
73
|
+
* not JSON) and an empty block give one line with the read error. No block, or a usable one, gives none.
|
|
74
|
+
*/
|
|
75
|
+
export declare function storedPoolAdvisories(member: string, stored: StoredSeatPool | undefined): string[];
|
|
66
76
|
/** What a re-applied member writes to its node: a block, null to clear (`pool: {}`), or undefined to leave it. */
|
|
67
77
|
export declare function memberPoolBlock(member: {
|
|
68
78
|
pool?: SeatPoolSpec | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-pool-spec.d.ts","sourceRoot":"","sources":["../../src/domain/seat-pool-spec.ts"],"names":[],"mappings":"AAQA,yDAAyD;AACzD,MAAM,WAAW,YAAY;IAC3B,6EAA6E;IAC7E,GAAG,EAAE,MAAM,CAAC;IACZ,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,mFAAmF;IACnF,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gFAAgF;IAChF,gBAAgB,EAAE,MAAM,CAAC;IACzB,0DAA0D;IAC1D,eAAe,EAAE,MAAM,CAAC;IACxB,yFAAyF;IACzF,WAAW,EAAE,MAAM,GAAG,IAAI,CAA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;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,eAAe,EAAE,CAAA;CAAE,CAmEjI;AAED,qGAAqG;AACrG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAW9E;AAED,kFAAkF;AAClF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,EAAE,CAGpG;AAED,uHAAuH;AACvH,wBAAgB,cAAc,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAS/D;AAED,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,4CAA4C,CAAC;AAC9E,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,6CAA6C,CAAC;AAE/E;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,cAAc,GAAG,SAAS,CAehF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,SAAS,GAAG,MAAM,EAAE,CAQjG;AAED,kHAAkH;AAClH,wBAAgB,eAAe,CAAC,MAAM,EAAE;IAAE,IAAI,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAAC,YAAY,CAAC,EAAE;QAAE,GAAG,EAAE,OAAO,CAAA;KAAE,CAAA;CAAE,GAAG,iBAAiB,GAAG,IAAI,GAAG,SAAS,CAI7I"}
|
|
@@ -124,6 +124,10 @@ export function storedPoolText(block) {
|
|
|
124
124
|
throw new Error("pool: the authored block can't be stored");
|
|
125
125
|
return text;
|
|
126
126
|
}
|
|
127
|
+
/** Why a stored `nodes.pool` value can't be read at all: it isn't text. */
|
|
128
|
+
export const STORED_POOL_NOT_TEXT = "pool: the stored value is not JSON text";
|
|
129
|
+
/** Why a stored `nodes.pool` value can't be read at all: it isn't JSON. */
|
|
130
|
+
export const STORED_POOL_NOT_JSON = "pool: the stored value is not valid JSON";
|
|
127
131
|
/**
|
|
128
132
|
* Reads `nodes.pool`. NULL is no pool. A block that can't be read comes back as stored, with why, and never throws:
|
|
129
133
|
* it holds the pool rather than removing it.
|
|
@@ -132,13 +136,13 @@ export function parseStoredPoolBlock(stored) {
|
|
|
132
136
|
if (stored === undefined || stored === null)
|
|
133
137
|
return undefined;
|
|
134
138
|
if (typeof stored !== "string")
|
|
135
|
-
return { raw: stored, error:
|
|
139
|
+
return { raw: stored, error: STORED_POOL_NOT_TEXT };
|
|
136
140
|
let parsed;
|
|
137
141
|
try {
|
|
138
142
|
parsed = JSON.parse(stored);
|
|
139
143
|
}
|
|
140
144
|
catch {
|
|
141
|
-
return { raw: stored, error:
|
|
145
|
+
return { raw: stored, error: STORED_POOL_NOT_JSON };
|
|
142
146
|
}
|
|
143
147
|
const read = parsePoolBlock(parsed);
|
|
144
148
|
if (!read.ok) {
|
|
@@ -148,6 +152,22 @@ export function parseStoredPoolBlock(stored) {
|
|
|
148
152
|
return { raw: parsed, error: "pool: the stored block is empty" };
|
|
149
153
|
return { spec: read.spec };
|
|
150
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* The advisories a launch from stored state reports for the block stored on a node, in the load's form:
|
|
157
|
+
* `<member> pool.<field>: <reason>; pool not used`, one per problem. A value that can't be read at all (not text,
|
|
158
|
+
* not JSON) and an empty block give one line with the read error. No block, or a usable one, gives none.
|
|
159
|
+
*/
|
|
160
|
+
export function storedPoolAdvisories(member, stored) {
|
|
161
|
+
if (stored === undefined || "spec" in stored)
|
|
162
|
+
return [];
|
|
163
|
+
if (stored.error === STORED_POOL_NOT_TEXT || stored.error === STORED_POOL_NOT_JSON) {
|
|
164
|
+
return [`${member} ${stored.error}; pool not used`];
|
|
165
|
+
}
|
|
166
|
+
const read = parsePoolBlock(stored.raw);
|
|
167
|
+
if (!read.ok)
|
|
168
|
+
return poolProblemAdvisories(member, read.problems);
|
|
169
|
+
return [`${member} ${stored.error}; pool not used`];
|
|
170
|
+
}
|
|
151
171
|
/** What a re-applied member writes to its node: a block, null to clear (`pool: {}`), or undefined to leave it. */
|
|
152
172
|
export function memberPoolBlock(member) {
|
|
153
173
|
if (member.pool !== undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-pool-spec.js","sourceRoot":"","sources":["../../src/domain/seat-pool-spec.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,sHAAsH;AACtH,0FAA0F;AAC1F,EAAE;AACF,wHAAwH;AACxH,oHAAoH;AACpH,uFAAuF;AAkCvF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,GAAG,EAAE,CAAC;IACN,oBAAoB,EAAE,EAAE;IACxB,gBAAgB,EAAE,GAAG;IACrB,eAAe,EAAE,EAAE;CACX,CAAC;AAEX,MAAM,IAAI,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,CAAU,CAAC;AAChI,MAAM,UAAU,GAAwB,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;AAEtD,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAChF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;QACpB,OAAO,EAAE,EAAE,EAAE,KAAK,E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,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;AAC7B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAc,EAAE,MAAkC;IACrF,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,IAAI,MAAM;QAAE,OAAO,EAAE,CAAC;IACxD,IAAI,MAAM,CAAC,KAAK,KAAK,oBAAoB,IAAI,MAAM,CAAC,KAAK,KAAK,oBAAoB,EAAE,CAAC;QACnF,OAAO,CAAC,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,iBAAiB,CAAC,CAAC;IACtD,CAAC;IACD,MAAM,IAAI,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACxC,IAAI,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAClE,OAAO,CAAC,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,iBAAiB,CAAC,CAAC;AACtD,CAAC;AAED,kHAAkH;AAClH,MAAM,UAAU,eAAe,CAAC,MAAuE;IACrG,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAC1F,IAAI,MAAM,CAAC,YAAY,KAAK,SAAS;QAAE,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;IAC/E,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -23,11 +23,13 @@ import type { RunningCodexLaunch } from "../adapters/codex-runtime-adapter.js";
|
|
|
23
23
|
export type InPlaceRestartTmux = Pick<TmuxAdapter, "getPanePid" | "getPaneCommand" | "listPanes" | "getSessionEnv" | "signalPid" | "setRemainOnExit" | "signalPaneProcess" | "isPaneDead" | "respawnPane" | "getPaneLocalOption" | "restorePaneOption" | "capturePaneHistory" | "capturePaneHistoryParts"> & Partial<Pick<TmuxAdapter, "getDefaultShell" | "seatProcessLimitsSet" | "seatProcessLimitsNotApplied" | "seatProcessLimitsKeepPlan">>;
|
|
24
24
|
/** The Codex runtime adapter's resume surface this operation reuses. */
|
|
25
25
|
export interface InPlaceCodexLauncher {
|
|
26
|
+
/** `preview` builds the same command without bringing the Codex config to OpenRig's managed state. */
|
|
26
27
|
buildResumeCommand(binding: NodeBinding, opts: {
|
|
27
28
|
name: string;
|
|
28
29
|
resumeToken: string;
|
|
29
30
|
running?: RunningCodexLaunch;
|
|
30
31
|
launchShell?: string;
|
|
32
|
+
preview?: boolean;
|
|
31
33
|
}): Promise<{
|
|
32
34
|
ok: true;
|
|
33
35
|
command: string;
|
|
@@ -346,6 +348,21 @@ export declare function accountTextMark(capture: {
|
|
|
346
348
|
export declare function accountLineNames(line: string, expected: string): boolean;
|
|
347
349
|
/** argv from a /proc/<pid>/cmdline read: NUL-terminated words, each kept exactly (spaces and empty words included). */
|
|
348
350
|
export declare function procCmdlineArgv(raw: Buffer | string): string[] | null;
|
|
351
|
+
/** The OS reads behind macOS process facts; tests inject them. */
|
|
352
|
+
export interface DarwinProcessReads {
|
|
353
|
+
/** The exact launch argv and environment from KERN_PROCARGS2 (readNativeProcessLaunch); null when unreadable. */
|
|
354
|
+
launch(pid: number): Promise<{
|
|
355
|
+
argv: string[];
|
|
356
|
+
env: Record<string, string>;
|
|
357
|
+
} | null>;
|
|
358
|
+
/** `lsof -a -p <pid> -d cwd,txt -Ffn` output, run in a UTF-8 locale. */
|
|
359
|
+
lsof(pid: number): Promise<string>;
|
|
360
|
+
isDirectory(path: string): boolean;
|
|
361
|
+
}
|
|
362
|
+
/** macOS has no /proc. The exact argv and environment are the process's own launch record (KERN_PROCARGS2, the same read
|
|
363
|
+
* #2212's identity checks use), kept to CODEX_HOME and HOME; the cwd and the executable (the first txt file) come from
|
|
364
|
+
* lsof. Null when the launch record can't be read; a cwd or executable lsof can't give is null. */
|
|
365
|
+
export declare function darwinProcessFacts(pid: number, reads?: DarwinProcessReads): Promise<ProcessFacts | null>;
|
|
349
366
|
export declare function defaultInPlaceRestartIo(): InPlaceRestartIo;
|
|
350
367
|
export {};
|
|
351
368
|
//# sourceMappingURL=seat-restart-in-place.d.ts.map
|