@openrig/cli 0.7.22 → 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/scripts/activity-relay.cjs +13 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +4 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +31 -5
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +32 -6
- package/daemon/assets/skills/rigs/SKILL.md +14 -5
- 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 +15 -6
- package/daemon/context-packs/reference/acp-agents.md +2 -1
- package/daemon/context-packs/reference/getting-started.md +119 -12
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +193 -3
- package/daemon/context-packs/reference/tmux-servers.md +27 -2
- package/daemon/context-packs/reference/whats-new.md +92 -12
- 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 +4 -0
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +31 -5
- 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/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 +86 -17
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +8 -4
- package/daemon/dist/adapters/claude-resume.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/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.d.ts +32 -8
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +253 -59
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/daemon-shutdown.d.ts +5 -0
- package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
- package/daemon/dist/daemon-shutdown.js +10 -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 +3 -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 +17 -0
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +101 -45
- 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/claude-compaction-enforcer.d.ts +30 -2
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +53 -12
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts +12 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.js +130 -2
- package/daemon/dist/domain/compaction-restore-notice.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/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +49 -8
- 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/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 +15 -2
- 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/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/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/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/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 +38 -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/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 +87 -7
- 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/parked-query.d.ts +6 -0
- package/daemon/dist/domain/parked-query.d.ts.map +1 -1
- package/daemon/dist/domain/parked-query.js +14 -4
- package/daemon/dist/domain/parked-query.js.map +1 -1
- package/daemon/dist/domain/policies/seat-pool.d.ts +13 -0
- package/daemon/dist/domain/policies/seat-pool.d.ts.map +1 -1
- package/daemon/dist/domain/policies/seat-pool.js +18 -3
- package/daemon/dist/domain/policies/seat-pool.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 +3 -0
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +13 -3
- 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/ps-projection.d.ts +8 -1
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +11 -3
- 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-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 +74 -4
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +398 -25
- 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.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +43 -9
- 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-wake-ladder.d.ts +4 -0
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +161 -20
- 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-orchestrator.d.ts +67 -6
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +345 -51
- package/daemon/dist/domain/restore-orchestrator.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 +21 -3
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +67 -2
- 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 +121 -23
- package/daemon/dist/domain/rigspec-instantiator.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/seat-activity-service.d.ts +4 -0
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +24 -5
- 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 +13 -0
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +63 -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 +176 -22
- 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-restart-in-place.d.ts +15 -0
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +54 -2
- 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 +22 -3
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +38 -6
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +18 -2
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +65 -38
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +55 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +259 -50
- package/daemon/dist/domain/slices/slice-indexer.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/terminal/herdr-adapter.d.ts +2 -0
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +2 -0
- package/daemon/dist/domain/terminal/herdr-adapter.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/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 +104 -8
- 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 +2 -0
- 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 +13 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +5 -3
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +6 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +8 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +6 -2
- 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 +1 -0
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +3 -1
- 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-read.d.ts +10 -0
- package/daemon/dist/domain/workspace/project-read.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/project-read.js +34 -2
- package/daemon/dist/domain/workspace/project-read.js.map +1 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +7 -1
- 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.map +1 -1
- package/daemon/dist/routes/activity.js +46 -0
- 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/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/ps.js +12 -1
- package/daemon/dist/routes/ps.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +155 -52
- 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 +14 -0
- 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/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/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 +133 -7
- 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/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 +35 -1
- package/daemon/docs/reference/checked-seat-stop.md +11 -1
- package/daemon/docs/reference/claude-status-line.md +7 -0
- package/daemon/docs/reference/daemon-http-clients.md +120 -18
- package/daemon/docs/reference/gateway-participants.md +6 -0
- package/daemon/docs/reference/getting-started.md +119 -12
- package/daemon/docs/reference/hosted-members.md +114 -0
- 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 +11 -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-spec.md +193 -3
- package/daemon/docs/reference/rosters.md +18 -3
- package/daemon/docs/reference/sdlc-conventions.md +1 -1
- package/daemon/docs/reference/seat-delivery.md +21 -4
- 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 +27 -2
- package/daemon/docs/reference/whats-new.md +92 -12
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +1 -1
- package/dist/build-info.js +3 -3
- package/dist/client.d.ts +2 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/commands/broadcast.d.ts.map +1 -1
- package/dist/commands/broadcast.js +87 -8
- package/dist/commands/broadcast.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 +7 -1
- package/dist/commands/chatroom.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +2 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +18 -15
- 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/network.d.ts.map +1 -1
- package/dist/commands/network.js +54 -1
- package/dist/commands/network.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/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 +50 -1
- package/dist/commands/queue.js.map +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 +20 -2
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +15 -3
- package/dist/commands/send.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 +54 -5
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +4 -0
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.d.ts +2 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +14 -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 +6 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +90 -30
- 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/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/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/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/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 +43 -2
- package/dist/mcp-http.d.ts.map +1 -1
- package/dist/mcp-http.js +223 -46
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-server.d.ts +23 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +108 -39
- package/dist/mcp-server.js.map +1 -1
- package/dist/mcp-surface.d.ts +3 -2
- package/dist/mcp-surface.d.ts.map +1 -1
- 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/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/package.json +3 -3
- package/scripts/check-abi.mjs +15 -0
- 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/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/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 +24 -8
- package/tui/dist/main.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 +41 -9
- package/tui/dist/render.js.map +1 -1
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type Database from "better-sqlite3";
|
|
2
|
+
import type { RigSpec } from "./types.js";
|
|
3
|
+
import type { SeatDeliveryGuard } from "./seat-delivery-guard.js";
|
|
4
|
+
/** Minimum time between cold-start attempts for one seat. */
|
|
5
|
+
export declare const COLD_START_MIN_INTERVAL_MS = 60000;
|
|
6
|
+
/** Consecutive-failure cap; cleared only by observed liveness or a successful launch, never by time (R6). */
|
|
7
|
+
export declare const COLD_START_MAX_CONSECUTIVE_FAILURES = 3;
|
|
8
|
+
export declare const COLD_START_EVALUATION_TTL_MS = 1000;
|
|
9
|
+
/**
|
|
10
|
+
* The stops the daemon itself may undo on new work. A resource-reclaiming stop is not an
|
|
11
|
+
* end to the seat's work: the idle reaper (a separate slice) stops a seat as
|
|
12
|
+
* `daemon:seat-reaper` with reason `idle_reap` precisely so the next queue row can wake
|
|
13
|
+
* it. Every other operator — a human `rig seat stop`, `rig down`, a removal — records an
|
|
14
|
+
* end state, and cold start never revives it.
|
|
15
|
+
*/
|
|
16
|
+
export declare const COLD_START_REVIVABLE_STOPS: ReadonlyArray<{
|
|
17
|
+
operator: string;
|
|
18
|
+
reason: string;
|
|
19
|
+
}>;
|
|
20
|
+
/** Why a seat is stopped, from the daemon's own records. Only `dormant` and `daemon_reclaim`
|
|
21
|
+
* may be woken; `failed_start` and `intentional` are refused (the latter carries operator/reason for the log). */
|
|
22
|
+
export type ColdStartStopIntent = {
|
|
23
|
+
kind: "dormant";
|
|
24
|
+
} | {
|
|
25
|
+
kind: "failed_start";
|
|
26
|
+
} | {
|
|
27
|
+
kind: "daemon_reclaim";
|
|
28
|
+
operator: string;
|
|
29
|
+
reason: string;
|
|
30
|
+
} | {
|
|
31
|
+
kind: "intentional";
|
|
32
|
+
operator: string | null;
|
|
33
|
+
reason: string | null;
|
|
34
|
+
};
|
|
35
|
+
/** What the single-seat launch door reported for this one seat. Structural subset of the
|
|
36
|
+
* restore orchestrator's `NarrowLaunchResult`, so this module never imports it. */
|
|
37
|
+
export interface ColdStartLaunchResult {
|
|
38
|
+
ok: boolean;
|
|
39
|
+
code?: string;
|
|
40
|
+
message?: string;
|
|
41
|
+
launched?: Array<{
|
|
42
|
+
logicalId: string;
|
|
43
|
+
status: string;
|
|
44
|
+
error?: string;
|
|
45
|
+
}>;
|
|
46
|
+
alreadyRunning?: Array<{
|
|
47
|
+
logicalId: string;
|
|
48
|
+
}>;
|
|
49
|
+
failedTargets?: Array<{
|
|
50
|
+
logicalId: string;
|
|
51
|
+
reason: string;
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
54
|
+
/** The launch door's outcome for one seat. `resumed`/`fresh_primed`/`already_running` are the
|
|
55
|
+
* only success shapes; `awaiting_decision` means the door refused to replace an unresumable
|
|
56
|
+
* conversation with a fresh one (the maintainer's continuity term), not a launch. */
|
|
57
|
+
export type ColdStartLaunchOutcome = {
|
|
58
|
+
kind: "resumed";
|
|
59
|
+
} | {
|
|
60
|
+
kind: "fresh_primed";
|
|
61
|
+
} | {
|
|
62
|
+
kind: "already_running";
|
|
63
|
+
} | {
|
|
64
|
+
kind: "awaiting_decision";
|
|
65
|
+
error: string;
|
|
66
|
+
} | {
|
|
67
|
+
kind: "failed";
|
|
68
|
+
error: string;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Classify why a seat is not running, keyed on WHO stopped it.
|
|
72
|
+
*
|
|
73
|
+
* The stop path records a boolean intent on the session row (`intentionally_stopped`) and,
|
|
74
|
+
* a `session.stopped` event carrying the session id, operator and reason. The
|
|
75
|
+
* boolean alone cannot express the difference the maintainer asked for — the reaper and a
|
|
76
|
+
* human both set it — so eligibility reads the event when the flag is set. Attribution
|
|
77
|
+
* uses the existing transactional event ledger, not a reusable tmux name: a missing or
|
|
78
|
+
* legacy event without this exact session id is conservative, never revivable.
|
|
79
|
+
*
|
|
80
|
+
* | Latest session state | Classification | May cold-start |
|
|
81
|
+
* | No row | dormant (never ran) | yes |
|
|
82
|
+
* | Explicit stop + exact reaper/idle_reap attribution | daemon_reclaim | yes |
|
|
83
|
+
* | Explicit stop + any other, legacy or absent attribution | intentional | no |
|
|
84
|
+
* | Superseded, without explicit stop intent | failed_start | no (refused) |
|
|
85
|
+
* | Other row, without explicit stop intent (crash/lost session) | dormant | yes |
|
|
86
|
+
*
|
|
87
|
+
* All yes cases still require opt-in, an unchanged seat, no live target and a live peer.
|
|
88
|
+
*/
|
|
89
|
+
export declare function classifyColdStartStop(db: Database.Database, nodeId: string): ColdStartStopIntent;
|
|
90
|
+
/** Read the single-seat launch door's result for one seat without assuming `ok` means launched:
|
|
91
|
+
* the door also reports held/awaiting seats and already-running ones with `ok: true`. */
|
|
92
|
+
export declare function classifyColdStartLaunch(logicalId: string, result: ColdStartLaunchResult): ColdStartLaunchOutcome;
|
|
93
|
+
export interface SeatColdStartDeps {
|
|
94
|
+
db: Database.Database;
|
|
95
|
+
deliveryGuard: Pick<SeatDeliveryGuard, "lifecycle">;
|
|
96
|
+
/** The existing single-seat launch door (`rig launch`): resumes or fresh-primes per restore policy. */
|
|
97
|
+
launchSingleNode: (rigId: string, logicalId: string) => Promise<ColdStartLaunchResult>;
|
|
98
|
+
/** Three-state tmux probe; the same adapter the queue's transport uses. Cold start may
|
|
99
|
+
* proceed only on positive absence — present and transport_unavailable both refuse. */
|
|
100
|
+
probeSession: (sessionName: string) => Promise<import("../adapters/tmux.js").SessionProbe>;
|
|
101
|
+
/** Reads the seat's persisted rig spec (opt-in source of truth). */
|
|
102
|
+
getNodeLaunchRecipe: (nodeId: string) => {
|
|
103
|
+
rigSpec: RigSpec;
|
|
104
|
+
} | null;
|
|
105
|
+
log?: (line: string) => void;
|
|
106
|
+
now?: () => Date;
|
|
107
|
+
}
|
|
108
|
+
/** One cold-start attempt ledger row. */
|
|
109
|
+
export interface SeatColdStartLedgerRow {
|
|
110
|
+
last_attempt_at: string;
|
|
111
|
+
last_outcome: string;
|
|
112
|
+
consecutive_failures: number;
|
|
113
|
+
last_success_at: string | null;
|
|
114
|
+
}
|
|
115
|
+
export declare class SeatColdStarter {
|
|
116
|
+
private readonly deps;
|
|
117
|
+
private readonly inFlight;
|
|
118
|
+
private readonly evaluations;
|
|
119
|
+
private readonly drainEvaluations;
|
|
120
|
+
constructor(deps: SeatColdStartDeps);
|
|
121
|
+
/** Queue hook entry: a wake for `destinationSession` found no receiver. Fire-and-forget; never throws. */
|
|
122
|
+
notify(destinationSession: string, drainPass?: object): void;
|
|
123
|
+
private log;
|
|
124
|
+
/** Joins concurrent notifications for the same node into one launch attempt; undefined when the address is not a resolvable seat. */
|
|
125
|
+
private start;
|
|
126
|
+
/** Resolve a canonical destination address to exactly one seat row of one unarchived rig. */
|
|
127
|
+
private resolveSeat;
|
|
128
|
+
private currentTime;
|
|
129
|
+
private attempt;
|
|
130
|
+
/** Every maintainer-term gate; each refusal is a no-op (the queue keeps today's semantics). */
|
|
131
|
+
private eligible;
|
|
132
|
+
/** Positive presence of another running seat of the rig, by awaited tmux probes. */
|
|
133
|
+
private livePeerExists;
|
|
134
|
+
/** Opt-in gate: the seat must still be in its persisted rig spec with the flag set
|
|
135
|
+
* (member wins over pod default). No recipe — pre-recipe seat, terminal node, or a
|
|
136
|
+
* member removed from the spec (deleted seat) — never cold-starts. Checked first and
|
|
137
|
+
* silently in eligible(): a default-off seat is not noteworthy (maintainer opt). */
|
|
138
|
+
private optInRefusal;
|
|
139
|
+
/** WHO stopped the seat decides whether new work may wake it (maintainer term 1). */
|
|
140
|
+
private stopRefusal;
|
|
141
|
+
/** Combined gate for the pre-launch recheck (opt-in may have changed under the lease). */
|
|
142
|
+
private selectionRefusal;
|
|
143
|
+
/** Durable ledger: the attempt window opens at launch, then records the outcome.
|
|
144
|
+
* `in_flight` leaves the failure count alone: a crash mid-launch is neither a launch nor
|
|
145
|
+
* a proven failure, and the interval alone already prevents a second launch in the window. */
|
|
146
|
+
private record;
|
|
147
|
+
/** Ledger gates: a too-recent attempt, or too many consecutive failures. */
|
|
148
|
+
ledgerRefuses(nodeId: string, now: Date): "interval" | "failures" | null;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=seat-cold-start.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seat-cold-start.d.ts","sourceRoot":"","sources":["../../src/domain/seat-cold-start.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,6DAA6D;AAC7D,eAAO,MAAM,0BAA0B,QAAS,CAAC;AACjD,6GAA6G;AAC7G,eAAO,MAAM,mCAAmC,IAAI,CAAC;AACrD,eAAO,MAAM,4BAA4B,OAAQ,CAAC;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,EAAE,aAAa,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAE1F,CAAC;AAEF;mHACmH;AACnH,MAAM,MAAM,mBAAmB,GAC3B;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,GACxB;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC5D;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAE5E;oFACoF;AACpF,MAAM,WAAW,qBA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gBAAgB;IAIxB;;mGAE+F;IAC/F,OAAO,CAAC,MAAM;IAgBd,4EAA4E;IAC5E,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI;CAwBzE"}
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { parseSessionName } from "./session-name.js";
|
|
2
|
+
/** Minimum time between cold-start attempts for one seat. */
|
|
3
|
+
export const COLD_START_MIN_INTERVAL_MS = 60_000;
|
|
4
|
+
/** Consecutive-failure cap; cleared only by observed liveness or a successful launch, never by time (R6). */
|
|
5
|
+
export const COLD_START_MAX_CONSECUTIVE_FAILURES = 3;
|
|
6
|
+
export const COLD_START_EVALUATION_TTL_MS = 1_000;
|
|
7
|
+
/**
|
|
8
|
+
* The stops the daemon itself may undo on new work. A resource-reclaiming stop is not an
|
|
9
|
+
* end to the seat's work: the idle reaper (a separate slice) stops a seat as
|
|
10
|
+
* `daemon:seat-reaper` with reason `idle_reap` precisely so the next queue row can wake
|
|
11
|
+
* it. Every other operator — a human `rig seat stop`, `rig down`, a removal — records an
|
|
12
|
+
* end state, and cold start never revives it.
|
|
13
|
+
*/
|
|
14
|
+
export const COLD_START_REVIVABLE_STOPS = [
|
|
15
|
+
{ operator: "daemon:seat-reaper", reason: "idle_reap" },
|
|
16
|
+
];
|
|
17
|
+
/** Does a recorded stop belong to one of the revivable daemon stops? */
|
|
18
|
+
function isRevivableStop(operator, reason) {
|
|
19
|
+
return COLD_START_REVIVABLE_STOPS.some(stop => stop.operator === operator && stop.reason === reason);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Classify why a seat is not running, keyed on WHO stopped it.
|
|
23
|
+
*
|
|
24
|
+
* The stop path records a boolean intent on the session row (`intentionally_stopped`) and,
|
|
25
|
+
* a `session.stopped` event carrying the session id, operator and reason. The
|
|
26
|
+
* boolean alone cannot express the difference the maintainer asked for — the reaper and a
|
|
27
|
+
* human both set it — so eligibility reads the event when the flag is set. Attribution
|
|
28
|
+
* uses the existing transactional event ledger, not a reusable tmux name: a missing or
|
|
29
|
+
* legacy event without this exact session id is conservative, never revivable.
|
|
30
|
+
*
|
|
31
|
+
* | Latest session state | Classification | May cold-start |
|
|
32
|
+
* | No row | dormant (never ran) | yes |
|
|
33
|
+
* | Explicit stop + exact reaper/idle_reap attribution | daemon_reclaim | yes |
|
|
34
|
+
* | Explicit stop + any other, legacy or absent attribution | intentional | no |
|
|
35
|
+
* | Superseded, without explicit stop intent | failed_start | no (refused) |
|
|
36
|
+
* | Other row, without explicit stop intent (crash/lost session) | dormant | yes |
|
|
37
|
+
*
|
|
38
|
+
* All yes cases still require opt-in, an unchanged seat, no live target and a live peer.
|
|
39
|
+
*/
|
|
40
|
+
export function classifyColdStartStop(db, nodeId) {
|
|
41
|
+
const latest = db.prepare(`SELECT id AS sessionId, session_name AS sessionName, status, intentionally_stopped AS intentionallyStopped
|
|
42
|
+
FROM sessions WHERE node_id = ? ORDER BY created_at DESC, id DESC LIMIT 1`)
|
|
43
|
+
.get(nodeId);
|
|
44
|
+
// A seat that never ran has nothing to replace: the door legitimately fresh-primes it.
|
|
45
|
+
if (!latest)
|
|
46
|
+
return { kind: "dormant" };
|
|
47
|
+
// No recorded stop intent: an observed exit (crash), a detached session, or a session the
|
|
48
|
+
// daemon lost. None of those is a decision to keep the seat down.
|
|
49
|
+
if (latest.intentionallyStopped !== 1) {
|
|
50
|
+
return { kind: latest.status === "superseded" ? "failed_start" : "dormant" };
|
|
51
|
+
}
|
|
52
|
+
const event = db.prepare(`SELECT payload FROM events
|
|
53
|
+
WHERE node_id = ? AND type = 'session.stopped' ORDER BY seq DESC LIMIT 1`)
|
|
54
|
+
.get(nodeId);
|
|
55
|
+
if (event) {
|
|
56
|
+
try {
|
|
57
|
+
const payload = JSON.parse(event.payload);
|
|
58
|
+
// Only an event for this exact session row attributes this stop. An older event cannot
|
|
59
|
+
// explain a newer flag, so it stays intentional rather than reviving on stale evidence.
|
|
60
|
+
if (typeof payload === "object" && payload !== null && "sessionId" in payload && payload.sessionId === latest.sessionId) {
|
|
61
|
+
const operator = "operator" in payload && typeof payload.operator === "string" ? payload.operator : null;
|
|
62
|
+
const reason = "reason" in payload && typeof payload.reason === "string" ? payload.reason : null;
|
|
63
|
+
if (operator && reason && isRevivableStop(operator, reason))
|
|
64
|
+
return { kind: "daemon_reclaim", operator, reason };
|
|
65
|
+
return { kind: "intentional", operator, reason };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
/* an unparseable event explains nothing: stay conservative below */
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return { kind: "intentional", operator: null, reason: null };
|
|
73
|
+
}
|
|
74
|
+
/** Read the single-seat launch door's result for one seat without assuming `ok` means launched:
|
|
75
|
+
* the door also reports held/awaiting seats and already-running ones with `ok: true`. */
|
|
76
|
+
export function classifyColdStartLaunch(logicalId, result) {
|
|
77
|
+
const failed = result.failedTargets?.find(target => target.logicalId === logicalId);
|
|
78
|
+
if (failed)
|
|
79
|
+
return { kind: "failed", error: failed.reason };
|
|
80
|
+
const launched = result.launched?.find(node => node.logicalId === logicalId);
|
|
81
|
+
if (launched) {
|
|
82
|
+
if (launched.status === "resumed" || launched.status === "rebuilt" || launched.status === "operator_recovered")
|
|
83
|
+
return { kind: "resumed" };
|
|
84
|
+
if (launched.status === "fresh-primed" || launched.status === "fresh")
|
|
85
|
+
return { kind: "fresh_primed" };
|
|
86
|
+
if (launched.status === "awaiting-decision") {
|
|
87
|
+
return { kind: "awaiting_decision", error: launched.error ?? "the launch door stopped for an operator decision" };
|
|
88
|
+
}
|
|
89
|
+
if (launched.status === "attention_required") {
|
|
90
|
+
return { kind: "awaiting_decision", error: launched.error ?? "the seat started and parked on a runtime prompt" };
|
|
91
|
+
}
|
|
92
|
+
if (launched.status === "left_attached")
|
|
93
|
+
return { kind: "already_running" };
|
|
94
|
+
return { kind: "failed", error: launched.error ?? `launch reported status '${launched.status}'` };
|
|
95
|
+
}
|
|
96
|
+
if (result.alreadyRunning?.some(node => node.logicalId === logicalId))
|
|
97
|
+
return { kind: "already_running" };
|
|
98
|
+
// Fail closed: an unreported target is not evidence that the seat came up.
|
|
99
|
+
if (!result.ok)
|
|
100
|
+
return { kind: "failed", error: result.message ?? result.code ?? "the launch door refused" };
|
|
101
|
+
return { kind: "failed", error: result.message ?? "the launch door returned no outcome for this seat" };
|
|
102
|
+
}
|
|
103
|
+
export class SeatColdStarter {
|
|
104
|
+
deps;
|
|
105
|
+
inFlight = new Map();
|
|
106
|
+
evaluations = new Map();
|
|
107
|
+
drainEvaluations = new WeakMap();
|
|
108
|
+
constructor(deps) {
|
|
109
|
+
this.deps = deps;
|
|
110
|
+
}
|
|
111
|
+
/** Queue hook entry: a wake for `destinationSession` found no receiver. Fire-and-forget; never throws. */
|
|
112
|
+
notify(destinationSession, drainPass) {
|
|
113
|
+
try {
|
|
114
|
+
const started = this.start(destinationSession, drainPass);
|
|
115
|
+
if (started)
|
|
116
|
+
started.catch(() => { });
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
this.log(`notify failed for ${destinationSession}: ${err instanceof Error ? err.message : String(err)}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
log(line) {
|
|
123
|
+
(this.deps.log ?? ((msg) => console.log(msg)))(`[seat-cold-start] ${line}`);
|
|
124
|
+
}
|
|
125
|
+
/** Joins concurrent notifications for the same node into one launch attempt; undefined when the address is not a resolvable seat. */
|
|
126
|
+
start(destinationSession, drainPass) {
|
|
127
|
+
const parsed = parseSessionName(destinationSession);
|
|
128
|
+
if (parsed.kind !== "canonical")
|
|
129
|
+
return undefined;
|
|
130
|
+
const evaluations = drainPass ? this.drainEvaluations.get(drainPass) ?? new Map() : this.evaluations;
|
|
131
|
+
if (drainPass)
|
|
132
|
+
this.drainEvaluations.set(drainPass, evaluations);
|
|
133
|
+
const now = this.currentTime().getTime();
|
|
134
|
+
if (!drainPass)
|
|
135
|
+
for (const [key, expiry] of evaluations)
|
|
136
|
+
if (expiry <= now)
|
|
137
|
+
evaluations.delete(key);
|
|
138
|
+
const address = `${parsed.member.replace(".", "-")}@${parsed.rig}`;
|
|
139
|
+
if (evaluations.has(address))
|
|
140
|
+
return undefined;
|
|
141
|
+
evaluations.set(address, now + COLD_START_EVALUATION_TTL_MS);
|
|
142
|
+
const seat = this.resolveSeat(parsed.member, parsed.rig, destinationSession);
|
|
143
|
+
if (!seat)
|
|
144
|
+
return undefined;
|
|
145
|
+
const existing = this.inFlight.get(seat.nodeId);
|
|
146
|
+
if (existing)
|
|
147
|
+
return existing;
|
|
148
|
+
const attempt = this.attempt(seat).finally(() => this.inFlight.delete(seat.nodeId));
|
|
149
|
+
this.inFlight.set(seat.nodeId, attempt);
|
|
150
|
+
return attempt;
|
|
151
|
+
}
|
|
152
|
+
/** Resolve a canonical destination address to exactly one seat row of one unarchived rig. */
|
|
153
|
+
resolveSeat(memberRef, rigName, destinationSession) {
|
|
154
|
+
const rows = this.deps.db.prepare(`SELECT n.id AS nodeId, n.rig_id AS rigId, r.name AS rigName, r.archived_at AS archivedAt,
|
|
155
|
+
n.logical_id AS logicalId, b.tmux_session AS boundSession
|
|
156
|
+
FROM nodes n JOIN rigs r ON r.id = n.rig_id LEFT JOIN bindings b ON b.node_id = n.id
|
|
157
|
+
WHERE r.name = ?
|
|
158
|
+
AND (n.logical_id = ? OR b.tmux_session = ?
|
|
159
|
+
OR (replace(n.logical_id, '.', '-') || '@' || r.name = ?))`)
|
|
160
|
+
.all(rigName, memberRef, destinationSession, destinationSession);
|
|
161
|
+
const eligible = rows.filter(row => row.archivedAt === null);
|
|
162
|
+
// Exactly one seat may own the address; ambiguity is never launched into.
|
|
163
|
+
return eligible.length === 1 ? eligible[0] : null;
|
|
164
|
+
}
|
|
165
|
+
currentTime() {
|
|
166
|
+
return (this.deps.now ?? (() => new Date()))();
|
|
167
|
+
}
|
|
168
|
+
async attempt(seat) {
|
|
169
|
+
const now = this.currentTime();
|
|
170
|
+
try {
|
|
171
|
+
if (!await this.eligible(seat, now))
|
|
172
|
+
return;
|
|
173
|
+
let launchStarted = false;
|
|
174
|
+
try {
|
|
175
|
+
await this.deps.deliveryGuard.lifecycle([seat.nodeId], async () => {
|
|
176
|
+
launchStarted = true;
|
|
177
|
+
// No await between the final eligibility read and the launch door. The door joins
|
|
178
|
+
// this same lease, so a supported stop cannot commit in its launch preflight.
|
|
179
|
+
const current = this.resolveSeat(seat.logicalId, seat.rigName, seat.boundSession ?? `${seat.logicalId.replace(".", "-")}@${seat.rigName}`);
|
|
180
|
+
if (!current || current.nodeId !== seat.nodeId || current.rigId !== seat.rigId
|
|
181
|
+
|| current.logicalId !== seat.logicalId || current.boundSession !== seat.boundSession)
|
|
182
|
+
return;
|
|
183
|
+
const refusal = this.selectionRefusal(current) ?? this.ledgerRefuses(seat.nodeId, this.currentTime());
|
|
184
|
+
if (refusal) {
|
|
185
|
+
this.log(`${seat.logicalId}: not cold-starting: ${refusal}`);
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
// B (#3173 review round 3): the live-peer proof ran before this lease, and we may
|
|
189
|
+
// have waited behind queued sends. A `rig down` in that window must not leave a
|
|
190
|
+
// reviving seat in a rig that was taken down — recheck the positive eligibility
|
|
191
|
+
// here, probes included.
|
|
192
|
+
if (!await this.livePeerExists(current.rigId, current.nodeId)) {
|
|
193
|
+
this.log(`${seat.logicalId}: not cold-starting: no other seat of this rig is live (rig down)`);
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
// The awaited probes took time: the final stop and identity check happens after them.
|
|
197
|
+
const afterProbes = this.selectionRefusal(current)
|
|
198
|
+
?? ((this.resolveSeat(seat.logicalId, seat.rigName, seat.boundSession ?? `${seat.logicalId.replace(".", "-")}@${seat.rigName}`)?.nodeId !== seat.nodeId)
|
|
199
|
+
? "the seat changed during the probes" : null);
|
|
200
|
+
if (afterProbes) {
|
|
201
|
+
this.log(`${seat.logicalId}: not cold-starting: ${afterProbes}`);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
// Claim the attempt window BEFORE the (slow) launch. The in-memory join above covers
|
|
205
|
+
// simultaneous arrivals; this row covers a second drain pass, a ladder retry, or a
|
|
206
|
+
// restart mid-launch, so one dormant seat still gets exactly one launch per window.
|
|
207
|
+
this.record(seat.nodeId, "launching", "in_flight", now.toISOString());
|
|
208
|
+
const result = await this.deps.launchSingleNode(seat.rigId, seat.logicalId);
|
|
209
|
+
const outcome = classifyColdStartLaunch(seat.logicalId, result);
|
|
210
|
+
const success = outcome.kind === "resumed" || outcome.kind === "fresh_primed" || outcome.kind === "already_running";
|
|
211
|
+
const label = outcome.kind === "failed" || outcome.kind === "awaiting_decision"
|
|
212
|
+
? `${outcome.kind}:${outcome.error}`
|
|
213
|
+
: outcome.kind;
|
|
214
|
+
this.record(seat.nodeId, label, success ? "succeeded" : "failed", this.currentTime().toISOString());
|
|
215
|
+
this.log(`${seat.logicalId}: ${label}`);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
catch (err) {
|
|
219
|
+
// #3173 review: a refusal the guard raises BEFORE the launch callback runs (a draft
|
|
220
|
+
// sitting in the input box, a target that changed under us) is not a failed launch.
|
|
221
|
+
// It must not increment consecutive_failures — a seat that keeps refusing would
|
|
222
|
+
// otherwise cap itself out and stay blocked after the refusal clears.
|
|
223
|
+
const code = err.code;
|
|
224
|
+
const beforeLaunch = !launchStarted;
|
|
225
|
+
if (beforeLaunch && (code === "draft_aware_lifecycle" || code === "typing_guard_enabled"
|
|
226
|
+
|| code === "guard_target_changed" || code === "guard_target_unknown")) {
|
|
227
|
+
this.record(seat.nodeId, `refused:${code}`, "refused", this.currentTime().toISOString());
|
|
228
|
+
this.log(`${seat.logicalId}: not cold-starting: ${code}`);
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
throw err;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
catch (err) {
|
|
235
|
+
this.record(seat.nodeId, "failed:exception", "failed", this.currentTime().toISOString());
|
|
236
|
+
this.log(`${seat.logicalId}: attempt threw: ${err instanceof Error ? err.message : String(err)}`);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
/** Every maintainer-term gate; each refusal is a no-op (the queue keeps today's semantics). */
|
|
240
|
+
async eligible(seat, now) {
|
|
241
|
+
const refuse = (why) => {
|
|
242
|
+
this.log(`${seat.logicalId}: not cold-starting: ${why}`);
|
|
243
|
+
return false;
|
|
244
|
+
};
|
|
245
|
+
// Opt-in first, silently: a default-off seat is the common case and must not log on
|
|
246
|
+
// every evaluation (maintainer opt). Only opted-in seats reach the logged gates below.
|
|
247
|
+
if (this.optInRefusal(seat))
|
|
248
|
+
return false;
|
|
249
|
+
const stop = this.stopRefusal(seat);
|
|
250
|
+
if (stop)
|
|
251
|
+
return refuse(stop);
|
|
252
|
+
// The queue said no receiver; verify — a live session means someone is there.
|
|
253
|
+
const physical = seat.boundSession ?? `${seat.logicalId.replace(".", "-")}@${seat.rigName}`;
|
|
254
|
+
const probe = await this.deps.probeSession(physical).catch(() => ({ state: "transport_unavailable", cause: "probe threw" }));
|
|
255
|
+
// R5/#3173 review: only positive absence is evidence the seat is gone. Present means
|
|
256
|
+
// someone is there; a transport failure is not absence — fail closed either way.
|
|
257
|
+
if (probe.state === "present") {
|
|
258
|
+
this.deps.db.prepare("UPDATE seat_cold_starts SET consecutive_failures=0, last_success_at=?, last_outcome='observed_running' WHERE node_id=?")
|
|
259
|
+
.run(now.toISOString(), seat.nodeId);
|
|
260
|
+
return refuse("seat's tmux session is live");
|
|
261
|
+
}
|
|
262
|
+
if (probe.state !== "absent") {
|
|
263
|
+
return refuse("seat's tmux probe could not establish absence; leaving the seat alone");
|
|
264
|
+
}
|
|
265
|
+
const ledger = this.ledgerRefuses(seat.nodeId, now);
|
|
266
|
+
if (ledger === "interval")
|
|
267
|
+
return refuse("an attempt was made recently");
|
|
268
|
+
if (ledger === "failures")
|
|
269
|
+
return refuse("too many consecutive failed attempts");
|
|
270
|
+
// The rig must be up: another seat of the same rig must be live in tmux. A down
|
|
271
|
+
// rig keeps whole-rig restore semantics (the operator's/autoscaler's job).
|
|
272
|
+
if (await this.livePeerExists(seat.rigId, seat.nodeId))
|
|
273
|
+
return true;
|
|
274
|
+
return refuse("no other seat of this rig is live (rig down)");
|
|
275
|
+
}
|
|
276
|
+
/** Positive presence of another running seat of the rig, by awaited tmux probes. */
|
|
277
|
+
async livePeerExists(rigId, excludeNodeId) {
|
|
278
|
+
const peers = this.deps.db.prepare(`SELECT DISTINCT s.session_name FROM sessions s JOIN nodes n ON n.id = s.node_id
|
|
279
|
+
WHERE n.rig_id = ? AND n.id != ? AND s.status = 'running'
|
|
280
|
+
AND s.id = (SELECT latest.id FROM sessions latest WHERE latest.node_id = n.id
|
|
281
|
+
ORDER BY latest.created_at DESC, latest.id DESC LIMIT 1)
|
|
282
|
+
ORDER BY s.id DESC`)
|
|
283
|
+
.all(rigId, excludeNodeId);
|
|
284
|
+
for (const peer of peers) {
|
|
285
|
+
const peerProbe = await this.deps.probeSession(peer.session_name).catch(() => null);
|
|
286
|
+
if (peerProbe?.state === "present")
|
|
287
|
+
return true; /* otherwise try the next peer */
|
|
288
|
+
}
|
|
289
|
+
return false;
|
|
290
|
+
}
|
|
291
|
+
/** Opt-in gate: the seat must still be in its persisted rig spec with the flag set
|
|
292
|
+
* (member wins over pod default). No recipe — pre-recipe seat, terminal node, or a
|
|
293
|
+
* member removed from the spec (deleted seat) — never cold-starts. Checked first and
|
|
294
|
+
* silently in eligible(): a default-off seat is not noteworthy (maintainer opt). */
|
|
295
|
+
optInRefusal(seat) {
|
|
296
|
+
const recipe = this.deps.getNodeLaunchRecipe(seat.nodeId);
|
|
297
|
+
const dot = seat.logicalId.indexOf(".");
|
|
298
|
+
const podId = dot > 0 ? seat.logicalId.slice(0, dot) : seat.logicalId;
|
|
299
|
+
const memberId = dot > 0 ? seat.logicalId.slice(dot + 1) : seat.logicalId;
|
|
300
|
+
const specPod = recipe?.rigSpec.pods.find(pod => pod.id === podId);
|
|
301
|
+
const specMember = specPod?.members.find(member => member.id === memberId);
|
|
302
|
+
if (!recipe || !specMember)
|
|
303
|
+
return "seat is not in the current rig spec";
|
|
304
|
+
if (!((specMember.coldStart ?? specPod?.coldStart) === true))
|
|
305
|
+
return "no cold_start opt-in for this seat";
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
/** WHO stopped the seat decides whether new work may wake it (maintainer term 1). */
|
|
309
|
+
stopRefusal(seat) {
|
|
310
|
+
const stop = classifyColdStartStop(this.deps.db, seat.nodeId);
|
|
311
|
+
if (stop.kind === "intentional") {
|
|
312
|
+
return stop.operator
|
|
313
|
+
? `seat was stopped intentionally by '${stop.operator}'${stop.reason ? ` (${stop.reason})` : ""}`
|
|
314
|
+
: "seat was stopped intentionally (no revivable daemon stop recorded)";
|
|
315
|
+
}
|
|
316
|
+
if (stop.kind === "failed_start") {
|
|
317
|
+
return "seat's latest start failed (superseded launch); a failed start is never auto-revived";
|
|
318
|
+
}
|
|
319
|
+
return null;
|
|
320
|
+
}
|
|
321
|
+
/** Combined gate for the pre-launch recheck (opt-in may have changed under the lease). */
|
|
322
|
+
selectionRefusal(seat) {
|
|
323
|
+
return this.optInRefusal(seat) ?? this.stopRefusal(seat);
|
|
324
|
+
}
|
|
325
|
+
/** Durable ledger: the attempt window opens at launch, then records the outcome.
|
|
326
|
+
* `in_flight` leaves the failure count alone: a crash mid-launch is neither a launch nor
|
|
327
|
+
* a proven failure, and the interval alone already prevents a second launch in the window. */
|
|
328
|
+
record(nodeId, outcome, state, iso) {
|
|
329
|
+
const existing = this.deps.db.prepare("SELECT * FROM seat_cold_starts WHERE node_id = ?").get(nodeId);
|
|
330
|
+
const failures = state === "succeeded" ? 0
|
|
331
|
+
: state === "failed" ? (existing?.consecutive_failures ?? 0) + 1
|
|
332
|
+
: state === "refused" ? (existing?.consecutive_failures ?? 0)
|
|
333
|
+
: (existing?.consecutive_failures ?? 0);
|
|
334
|
+
const success = state === "succeeded";
|
|
335
|
+
if (existing) {
|
|
336
|
+
this.deps.db.prepare("UPDATE seat_cold_starts SET last_attempt_at = ?, last_outcome = ?, consecutive_failures = ?, last_success_at = COALESCE(?, last_success_at) WHERE node_id = ?")
|
|
337
|
+
.run(iso, outcome, failures, success ? iso : null, nodeId);
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
this.deps.db.prepare("INSERT INTO seat_cold_starts (node_id, last_attempt_at, last_outcome, consecutive_failures, last_success_at) VALUES (?, ?, ?, ?, ?)")
|
|
341
|
+
.run(nodeId, iso, outcome, failures, success ? iso : null);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
/** Ledger gates: a too-recent attempt, or too many consecutive failures. */
|
|
345
|
+
ledgerRefuses(nodeId, now) {
|
|
346
|
+
const row = this.deps.db.prepare("SELECT * FROM seat_cold_starts WHERE node_id = ?").get(nodeId);
|
|
347
|
+
if (!row)
|
|
348
|
+
return null;
|
|
349
|
+
// R6: a failed or awaiting-decision attempt is never retried on a timer. The cap clears
|
|
350
|
+
// only when the seat is observed running (eligible()'s observed_running reset, which a
|
|
351
|
+
// person's manual launch also produces) or a launch succeeds — not by quiet-window expiry.
|
|
352
|
+
// A (#3173 review round 3): a session created after our last attempt means somebody
|
|
353
|
+
// relaunched the seat outside this ledger. Their fix must clear the cap, or the seat
|
|
354
|
+
// stays cold-start-blocked for good (eligibility never observes a running seat that
|
|
355
|
+
// a person launched). Times, not strings: created_at is SQLite datetime text,
|
|
356
|
+
// last_attempt_at is ISO — compare through julianday().
|
|
357
|
+
if (row.consecutive_failures > 0) {
|
|
358
|
+
const newer = this.deps.db.prepare("SELECT count(*) AS count FROM sessions WHERE node_id = ? AND created_at IS NOT NULL AND julianday(created_at) > julianday(?)").get(nodeId, row.last_attempt_at);
|
|
359
|
+
if (newer.count > 0) {
|
|
360
|
+
this.deps.db.prepare("UPDATE seat_cold_starts SET consecutive_failures = 0, last_outcome = 'cleared:new_session' WHERE node_id = ?").run(nodeId);
|
|
361
|
+
row.consecutive_failures = 0;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
if (row.consecutive_failures >= COLD_START_MAX_CONSECUTIVE_FAILURES)
|
|
365
|
+
return "failures";
|
|
366
|
+
if (Date.parse(row.last_attempt_at) + COLD_START_MIN_INTERVAL_MS > now.getTime())
|
|
367
|
+
return "interval";
|
|
368
|
+
return null;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
//# sourceMappingURL=seat-cold-start.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seat-cold-start.js","sourceRoot":"","sources":["../../src/domain/seat-cold-start.ts"],"names":[],"mappings":"AAmCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAIrD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;AACjD,6GAA6G;AAC7G,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC;AACrD,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAwD;IAC7F,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,EAAE,WAAW,EAAE;CACxD,CAAC;AA+BF,wEAAwE;AACxE,SAAS,eAAe,CAAC,QAAgB,EAAE,MAAc;IACvD,OAAO,0BAA0B,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;AACvG,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAqB,EAAE,MAAc;IACzE,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC;8EACkD,CAAC;SAC1E,GAAG,CAAC,MAAM,CAAyG,CAAC;IACvH,u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AAE,CAAC,OAAO,CAAC,8GAA8G,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACjJ,GAAG,CAAC,oBAAoB,GAAG,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC;QACD,IAAI,GAAG,CAAC,oBAAoB,IAAI,mCAAmC;YAAE,OAAO,UAAU,CAAC;QACvF,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,0BAA0B,GAAG,GAAG,CAAC,OAAO,EAAE;YAAE,OAAO,UAAU,CAAC;QACpG,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -114,8 +114,13 @@ export declare class SeatDeliveryGuard {
|
|
|
114
114
|
/** Multi-seat restore takes leases in stable order before any rig mutation.
|
|
115
115
|
* Nested per-seat launch joins these leases; it must not reacquire them.
|
|
116
116
|
* `custodyIds` are seats the operation only records (metadata, never input): they get a custody lease in the same sorted
|
|
117
|
-
* pass, so a paused or draft-aware seat isn't refused and its mode, draft and binding stay as they are.
|
|
118
|
-
|
|
117
|
+
* pass, so a paused or draft-aware seat isn't refused and its mode, draft and binding stay as they are.
|
|
118
|
+
* `draftChecked`: managed compaction's writes (preparation, /compact, restore) go to a live seat through draft-aware's
|
|
119
|
+
* own write checks, so a draft-aware seat isn't refused for being active; a draft or an unreadable input still holds each
|
|
120
|
+
* write. Launch, snapshot restore and runtime switch don't pass it and keep the refusal. */
|
|
121
|
+
lifecycle<T>(nodeIds: string[], fn: () => Promise<T>, custodyIds?: readonly string[], { draftChecked }?: {
|
|
122
|
+
draftChecked?: boolean;
|
|
123
|
+
}): Promise<T>;
|
|
119
124
|
/** One custody lease taken inside lifecycle's sorted pass. Its target is read when the pass reaches this seat, as
|
|
120
125
|
* lifecycle's own leases are, not up front the way custody() reads every target before waiting. A target that changed
|
|
121
126
|
* while waiting on this seat refuses the whole operation before any effect, as a lifecycle lease's would. */
|
|
@@ -143,6 +148,10 @@ export declare class SeatDeliveryGuard {
|
|
|
143
148
|
* the notice beside the person's draft. In the tested append-mode schedule the Enter is then refused and nothing is
|
|
144
149
|
* submitted or deleted; that isn't a guarantee for every interleaving (#3076). */
|
|
145
150
|
private quietBeforePaste;
|
|
151
|
+
/** Whether a writable client of the seat was active since `since` (epoch ms). tmux reports whole seconds, so activity
|
|
152
|
+
* in that second counts, and so does a time tmux can't report or a paste time that wasn't seen. With no activity
|
|
153
|
+
* reader, as before a paste, there's nothing to check. */
|
|
154
|
+
private clientActiveSince;
|
|
146
155
|
/** A leftover paste is OpenRig's only while it's exactly there: the same occupant, no person's input through OpenRig
|
|
147
156
|
* since, and its text or the label recorded for it. A label first seen later proves nothing (#1871). */
|
|
148
157
|
private ownsLeftover;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seat-delivery-guard.d.ts","sourceRoot":"","sources":["../../src/domain/seat-delivery-guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAI3F,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAA4G,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE7L,6FAA6F;AAC7F,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"seat-delivery-guard.d.ts","sourceRoot":"","sources":["../../src/domain/seat-delivery-guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAI3F,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAA4G,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE7L,6FAA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