@openrig/cli 0.7.15 → 0.7.17
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 +9 -9
- package/daemon/assets/onboarding/02-self-and-competent-action.md +5 -41
- 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/README.md +26 -7
- package/daemon/assets/plugins/openrig/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/skills/working-with-an-openrig-team/SKILL.md +22 -6
- 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/skills/claude-compaction-restore/SKILL.md +4 -1
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +1 -1
- package/daemon/assets/skills/rigs/SKILL.md +155 -41
- package/daemon/assets/skills/rigs/references/installing-for-someone.md +47 -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 +169 -40
- package/daemon/context-packs/reference/getting-started.md +12 -11
- package/daemon/context-packs/reference/manifest.yaml +4 -1
- package/daemon/context-packs/reference/product-journey-sdlc.md +348 -0
- package/daemon/context-packs/reference/rig-spec.md +92 -4
- package/daemon/context-packs/reference/whats-new.md +397 -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/SKILL.md +4 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- 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/manifest.yaml +1 -1
- 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-software-factory/references/worked-example.md +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +2 -0
- 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/SKILL.md +22 -6
- 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/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +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.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +42 -6
- 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 +4 -2
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +2 -0
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +28 -11
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +15 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +75 -28
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/openshell-driver.d.ts +1 -0
- package/daemon/dist/adapters/openshell-driver.d.ts.map +1 -1
- package/daemon/dist/adapters/openshell-driver.js +3 -0
- package/daemon/dist/adapters/openshell-driver.js.map +1 -1
- package/daemon/dist/adapters/openshell-podman-observer.d.ts +9 -7
- package/daemon/dist/adapters/openshell-podman-observer.d.ts.map +1 -1
- package/daemon/dist/adapters/openshell-podman-observer.js +20 -3
- package/daemon/dist/adapters/openshell-podman-observer.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +38 -4
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +244 -30
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +6 -0
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +17 -3
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +8 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/167_seat_handover_attempts.d.ts +14 -0
- package/daemon/dist/db/migrations/167_seat_handover_attempts.d.ts.map +1 -0
- package/daemon/dist/db/migrations/167_seat_handover_attempts.js +54 -0
- package/daemon/dist/db/migrations/167_seat_handover_attempts.js.map +1 -0
- package/daemon/dist/db/migrations/168_context_usage_occupant_generation.d.ts +6 -0
- package/daemon/dist/db/migrations/168_context_usage_occupant_generation.d.ts.map +1 -0
- package/daemon/dist/db/migrations/168_context_usage_occupant_generation.js +10 -0
- package/daemon/dist/db/migrations/168_context_usage_occupant_generation.js.map +1 -0
- package/daemon/dist/db/migrations/169_seat_runtime_home_records.d.ts +5 -0
- package/daemon/dist/db/migrations/169_seat_runtime_home_records.d.ts.map +1 -0
- package/daemon/dist/db/migrations/169_seat_runtime_home_records.js +25 -0
- package/daemon/dist/db/migrations/169_seat_runtime_home_records.js.map +1 -0
- package/daemon/dist/db/migrations/170_rig_delivery_drains.d.ts +3 -0
- package/daemon/dist/db/migrations/170_rig_delivery_drains.d.ts.map +1 -0
- package/daemon/dist/db/migrations/170_rig_delivery_drains.js +21 -0
- package/daemon/dist/db/migrations/170_rig_delivery_drains.js.map +1 -0
- package/daemon/dist/domain/claim-service.d.ts +1 -3
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +3 -1
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +11 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +83 -36
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/codex-filesystem-preflight.d.ts +33 -0
- package/daemon/dist/domain/codex-filesystem-preflight.d.ts.map +1 -0
- package/daemon/dist/domain/codex-filesystem-preflight.js +255 -0
- package/daemon/dist/domain/codex-filesystem-preflight.js.map +1 -0
- package/daemon/dist/domain/codex-member-permissions.d.ts +23 -2
- package/daemon/dist/domain/codex-member-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/codex-member-permissions.js +55 -9
- package/daemon/dist/domain/codex-member-permissions.js.map +1 -1
- package/daemon/dist/domain/codex-network-default.d.ts +13 -0
- package/daemon/dist/domain/codex-network-default.d.ts.map +1 -1
- package/daemon/dist/domain/codex-network-default.js +37 -30
- package/daemon/dist/domain/codex-network-default.js.map +1 -1
- package/daemon/dist/domain/codex-thread-id.d.ts +13 -0
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +132 -9
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.js +59 -13
- package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
- package/daemon/dist/domain/connection-contract.d.ts.map +1 -1
- package/daemon/dist/domain/connection-contract.js +2 -1
- package/daemon/dist/domain/connection-contract.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts +11 -2
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +33 -13
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/current-work.d.ts +5 -0
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +66 -4
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/destination-successor.d.ts +3 -0
- package/daemon/dist/domain/destination-successor.d.ts.map +1 -0
- package/daemon/dist/domain/destination-successor.js +49 -0
- package/daemon/dist/domain/destination-successor.js.map +1 -0
- package/daemon/dist/domain/environment-lifecycle.d.ts +15 -0
- package/daemon/dist/domain/environment-lifecycle.d.ts.map +1 -1
- package/daemon/dist/domain/environment-lifecycle.js +22 -4
- package/daemon/dist/domain/environment-lifecycle.js.map +1 -1
- package/daemon/dist/domain/expected-conversation.d.ts.map +1 -1
- package/daemon/dist/domain/expected-conversation.js +26 -11
- package/daemon/dist/domain/expected-conversation.js.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.d.ts +4 -0
- package/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.js +10 -3
- package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts +3 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js +14 -4
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/health-diagnosis.d.ts.map +1 -1
- package/daemon/dist/domain/health-diagnosis.js +4 -0
- package/daemon/dist/domain/health-diagnosis.js.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.d.ts +3 -0
- package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.js +45 -4
- package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
- package/daemon/dist/domain/hosts/fleet-scopes.d.ts +111 -0
- package/daemon/dist/domain/hosts/fleet-scopes.d.ts.map +1 -0
- package/daemon/dist/domain/hosts/fleet-scopes.js +231 -0
- package/daemon/dist/domain/hosts/fleet-scopes.js.map +1 -0
- 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 +4 -0
- package/daemon/dist/domain/hosts/read-through.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 +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/native-model-picker.d.ts +2 -0
- package/daemon/dist/domain/native-model-picker.d.ts.map +1 -1
- package/daemon/dist/domain/native-model-picker.js +8 -2
- package/daemon/dist/domain/native-model-picker.js.map +1 -1
- package/daemon/dist/domain/native-permission-store.d.ts.map +1 -1
- package/daemon/dist/domain/native-permission-store.js +12 -5
- package/daemon/dist/domain/native-permission-store.js.map +1 -1
- package/daemon/dist/domain/native-process-lineage.d.ts +11 -1
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +25 -4
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +109 -26
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/network/network-connector.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-connector.js +5 -3
- package/daemon/dist/domain/network/network-connector.js.map +1 -1
- package/daemon/dist/domain/network/network-installations.d.ts +5 -4
- package/daemon/dist/domain/network/network-installations.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-installations.js +42 -11
- package/daemon/dist/domain/network/network-installations.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +6 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +10 -3
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.d.ts +4 -1
- package/daemon/dist/domain/occupant-invalidator.d.ts.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.js +10 -2
- package/daemon/dist/domain/occupant-invalidator.js.map +1 -1
- package/daemon/dist/domain/operation-correlation.d.ts +1 -1
- package/daemon/dist/domain/operation-correlation.d.ts.map +1 -1
- package/daemon/dist/domain/operation-correlation.js +1 -1
- package/daemon/dist/domain/operation-correlation.js.map +1 -1
- package/daemon/dist/domain/permission-account.d.ts.map +1 -1
- package/daemon/dist/domain/permission-account.js +8 -6
- package/daemon/dist/domain/permission-account.js.map +1 -1
- package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift.js +1 -1
- package/daemon/dist/domain/permission-drift.js.map +1 -1
- package/daemon/dist/domain/queue-destination-check.d.ts +2 -0
- package/daemon/dist/domain/queue-destination-check.d.ts.map +1 -1
- package/daemon/dist/domain/queue-destination-check.js +8 -11
- package/daemon/dist/domain/queue-destination-check.js.map +1 -1
- package/daemon/dist/domain/queue-erasure.d.ts +7 -1
- package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
- package/daemon/dist/domain/queue-erasure.js +226 -20
- package/daemon/dist/domain/queue-erasure.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +39 -17
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +96 -64
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +49 -21
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +6 -0
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +9 -0
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts +4 -4
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js +30 -16
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +90 -24
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/receiver-context.js +1 -1
- package/daemon/dist/domain/receiver-context.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +13 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +122 -9
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +4 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +132 -48
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-preconditions.d.ts +2 -0
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +2 -0
- package/daemon/dist/domain/restore-preconditions.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +17 -4
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +64 -15
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/resume-token-capture.d.ts +6 -0
- package/daemon/dist/domain/resume-token-capture.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-capture.js +14 -8
- package/daemon/dist/domain/resume-token-capture.js.map +1 -1
- package/daemon/dist/domain/rig-delivery-drain.d.ts +46 -0
- package/daemon/dist/domain/rig-delivery-drain.d.ts.map +1 -0
- package/daemon/dist/domain/rig-delivery-drain.js +128 -0
- package/daemon/dist/domain/rig-delivery-drain.js.map +1 -0
- package/daemon/dist/domain/rig-edge-ops.js +1 -1
- package/daemon/dist/domain/rig-edge-ops.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-teardown.d.ts +20 -3
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +71 -11
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +6 -2
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +36 -1
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rosters.d.ts +19 -0
- package/daemon/dist/domain/rosters.d.ts.map +1 -1
- package/daemon/dist/domain/rosters.js +69 -12
- package/daemon/dist/domain/rosters.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +15 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +8 -2
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +38 -3
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-attempts.d.ts +50 -0
- package/daemon/dist/domain/seat-handover-attempts.d.ts.map +1 -0
- package/daemon/dist/domain/seat-handover-attempts.js +75 -0
- package/daemon/dist/domain/seat-handover-attempts.js.map +1 -0
- package/daemon/dist/domain/seat-handover-service.d.ts +64 -1
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +443 -29
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts +3 -2
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +16 -4
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +47 -2
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +48 -2
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-home-record-types.d.ts +16 -0
- package/daemon/dist/domain/seat-runtime-home-record-types.d.ts.map +1 -0
- package/daemon/dist/domain/seat-runtime-home-record-types.js +2 -0
- package/daemon/dist/domain/seat-runtime-home-record-types.js.map +1 -0
- package/daemon/dist/domain/seat-runtime-home-record.d.ts +173 -0
- package/daemon/dist/domain/seat-runtime-home-record.d.ts.map +1 -0
- package/daemon/dist/domain/seat-runtime-home-record.js +317 -0
- package/daemon/dist/domain/seat-runtime-home-record.js.map +1 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts +7 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.js +47 -2
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.d.ts +16 -1
- package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.js +178 -1
- package/daemon/dist/domain/seat-skill-storage.js.map +1 -1
- package/daemon/dist/domain/session-name.d.ts +13 -0
- package/daemon/dist/domain/session-name.d.ts.map +1 -1
- package/daemon/dist/domain/session-name.js +77 -0
- package/daemon/dist/domain/session-name.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +7 -1
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +7 -4
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +1 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +33 -9
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/shared-history-selection.d.ts +1 -0
- package/daemon/dist/domain/shared-history-selection.d.ts.map +1 -1
- package/daemon/dist/domain/shared-history-selection.js +3 -1
- package/daemon/dist/domain/shared-history-selection.js.map +1 -1
- package/daemon/dist/domain/skill-catalog.d.ts +3 -0
- package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/skill-catalog.js +7 -3
- package/daemon/dist/domain/skill-catalog.js.map +1 -1
- package/daemon/dist/domain/snapshot-capture.d.ts +4 -1
- package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-capture.js +24 -12
- package/daemon/dist/domain/snapshot-capture.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +3 -2
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +16 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +70 -38
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +43 -2
- package/daemon/dist/domain/types.d.ts.map +1 -1
- 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 +3 -1
- 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 +6 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +4 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +28 -1
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.js +13 -8
- package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.d.ts +14 -2
- package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.js +41 -4
- package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.d.ts +55 -0
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +355 -174
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-reconciliation.d.ts +7 -1
- package/daemon/dist/domain/workflow-reconciliation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-reconciliation.js +51 -13
- package/daemon/dist/domain/workflow-reconciliation.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +11 -3
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +141 -27
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +12 -7
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +6 -3
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +78 -31
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/restore-check.d.ts.map +1 -1
- package/daemon/dist/routes/restore-check.js +17 -0
- package/daemon/dist/routes/restore-check.js.map +1 -1
- package/daemon/dist/routes/rig-delivery-drain.d.ts +3 -0
- package/daemon/dist/routes/rig-delivery-drain.d.ts.map +1 -0
- package/daemon/dist/routes/rig-delivery-drain.js +46 -0
- package/daemon/dist/routes/rig-delivery-drain.js.map +1 -0
- package/daemon/dist/routes/scopes.d.ts.map +1 -1
- package/daemon/dist/routes/scopes.js +102 -19
- package/daemon/dist/routes/scopes.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +50 -2
- 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 +54 -10
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/startup.d.ts.map +1 -1
- package/daemon/dist/routes/startup.js +230 -40
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +36 -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.map +1 -1
- package/daemon/dist/routes/watchdog.js +7 -1
- 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 +23 -5
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +2 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +111 -37
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-startup-guide.md +90 -2
- package/daemon/docs/reference/daemon-http-clients.md +69 -0
- package/daemon/docs/reference/developing.md +1 -1
- package/daemon/docs/reference/gateway-participants.md +5 -3
- package/daemon/docs/reference/getting-started.md +12 -11
- package/daemon/docs/reference/hosted-members.md +4 -2
- package/daemon/docs/reference/network-connector.md +4 -3
- package/daemon/docs/reference/queue-erasure.md +16 -1
- package/daemon/docs/reference/quickstart.md +2 -2
- package/daemon/docs/reference/rig-spec.md +92 -4
- package/daemon/docs/reference/rosters.md +26 -0
- package/daemon/docs/reference/seat-delivery.md +7 -1
- package/daemon/docs/reference/whats-new.md +397 -5
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +1 -1
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +2 -0
- package/daemon/specs/agents/shared/skills/core/working-with-an-openrig-team/SKILL.md +22 -6
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +78 -18
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +9 -6
- package/dist/build-info.js +3 -3
- package/dist/client.d.ts +7 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +11 -2
- package/dist/client.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +2 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +5 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/environment.js +1 -1
- package/dist/commands/environment.js.map +1 -1
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +8 -0
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +18 -1
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/network.d.ts +2 -0
- package/dist/commands/network.d.ts.map +1 -1
- package/dist/commands/network.js +14 -1
- package/dist/commands/network.js.map +1 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +11 -5
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +49 -12
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/restore.d.ts.map +1 -1
- package/dist/commands/restore.js +6 -1
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/roster.d.ts +4 -2
- package/dist/commands/roster.d.ts.map +1 -1
- package/dist/commands/roster.js +2 -2
- package/dist/commands/roster.js.map +1 -1
- package/dist/commands/seat.d.ts +2 -0
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +201 -14
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +31 -6
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +5 -3
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +7 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/walk.d.ts.map +1 -1
- package/dist/commands/walk.js +4 -0
- package/dist/commands/walk.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +30 -4
- 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 +5 -0
- package/dist/config-store.js.map +1 -1
- package/dist/lib/bundle-check.d.ts.map +1 -1
- package/dist/lib/bundle-check.js +33 -3
- package/dist/lib/bundle-check.js.map +1 -1
- package/dist/mcp-http.d.ts +3 -0
- package/dist/mcp-http.d.ts.map +1 -1
- package/dist/mcp-http.js +13 -0
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-server.d.ts +9 -2
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +287 -69
- package/dist/mcp-server.js.map +1 -1
- package/dist/person-registration-offer.d.ts.map +1 -1
- package/dist/person-registration-offer.js +2 -1
- package/dist/person-registration-offer.js.map +1 -1
- package/package.json +2 -2
- package/tui/dist/commands/registry.d.ts.map +1 -1
- package/tui/dist/commands/registry.js +1 -0
- package/tui/dist/commands/registry.js.map +1 -1
- package/tui/dist/config/config-model.js +1 -1
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/crash-cart/start-daemon.d.ts.map +1 -1
- package/tui/dist/crash-cart/start-daemon.js +4 -2
- package/tui/dist/crash-cart/start-daemon.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +12 -1
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +44 -2
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/hydrate.d.ts +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +43 -1
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/main.js +3 -0
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/page-read.d.ts.map +1 -1
- package/tui/dist/page-read.js +2 -1
- package/tui/dist/page-read.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +110 -16
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/scopes/fleet-scopes-model.d.ts +73 -0
- package/tui/dist/scopes/fleet-scopes-model.d.ts.map +1 -0
- package/tui/dist/scopes/fleet-scopes-model.js +102 -0
- package/tui/dist/scopes/fleet-scopes-model.js.map +1 -0
- package/tui/dist/scopes/scopes-model.d.ts +2 -0
- package/tui/dist/scopes/scopes-model.d.ts.map +1 -1
- package/tui/dist/scopes/scopes-model.js +7 -4
- package/tui/dist/scopes/scopes-model.js.map +1 -1
- package/tui/dist/sections.d.ts.map +1 -1
- package/tui/dist/sections.js +5 -0
- package/tui/dist/sections.js.map +1 -1
- package/tui/dist/startup.d.ts +5 -0
- package/tui/dist/startup.d.ts.map +1 -1
- package/tui/dist/startup.js +12 -0
- package/tui/dist/startup.js.map +1 -1
- package/tui/dist/state.d.ts.map +1 -1
- package/tui/dist/state.js +12 -5
- package/tui/dist/state.js.map +1 -1
- package/tui/dist/types.d.ts +18 -1
- package/tui/dist/types.d.ts.map +1 -1
|
@@ -15,7 +15,7 @@ import { readSeatClaudeMcp } from "./claude-mcp.js";
|
|
|
15
15
|
import { isLaunchWrapperRuntime, readSeatLaunchWrapper } from "./launch-wrapper.js";
|
|
16
16
|
import { resolvePersistedRestorePosture } from "./permission-policy/persisted-restore-posture.js";
|
|
17
17
|
import { claudeResumeRotation } from "./session-registry.js";
|
|
18
|
-
import { NOTHING_STOPPED_LAUNCH_CODES } from "./node-launcher.js";
|
|
18
|
+
import { NO_TERMINAL_LAUNCH_CODES, NOTHING_STOPPED_LAUNCH_CODES } from "./node-launcher.js";
|
|
19
19
|
import { seatRuntimeHome } from "./seat-runtime-home.js";
|
|
20
20
|
import { readFreshOccupantRelations } from "./fresh-occupant-relation.js";
|
|
21
21
|
import { assessNativeResumeProbe } from "./native-resume-probe.js";
|
|
@@ -31,7 +31,7 @@ import { AppliedLaunchObservationStore } from "./applied-launch-observation-stor
|
|
|
31
31
|
import { isShellForeground } from "./shell-classifier.js";
|
|
32
32
|
import { rebindAndVerifyPaneIdentity } from "./seat-attention-reconciler.js";
|
|
33
33
|
import { SeatIdentityStore } from "./seat-identity-store.js";
|
|
34
|
-
import { validatePreRestore } from "./restore-preconditions.js";
|
|
34
|
+
import { SEAT_STARTUP_BLOCKERS, validatePreRestore } from "./restore-preconditions.js";
|
|
35
35
|
import { resolveSnapshotRestoreTopology } from "./restore-topology.js";
|
|
36
36
|
// Only these edge kinds constrain launch order
|
|
37
37
|
const LAUNCH_DEPENDENCY_KINDS = new Set(["delegates_to", "spawned_by"]);
|
|
@@ -48,8 +48,6 @@ import { pluginPathsOf } from "./claude-core-plugin-env.js";
|
|
|
48
48
|
import { seatLaunchAdditionsForLaunch, systemPromptPendingNoteForNode } from "./seat-launch-additions.js";
|
|
49
49
|
import { resolveSeatKind, seatProcessOwner } from "./seat-kinds.js";
|
|
50
50
|
export { resolveActiveSnapshotSession } from "./active-occupant.js";
|
|
51
|
-
/** Pre-restore blockers that concern one seat's own startup content; see restore(). */
|
|
52
|
-
const SEAT_STARTUP_BLOCKERS = new Set(["required_startup_file_missing", "startup_owner_root_missing"]);
|
|
53
51
|
export function rollupRestoreRigResult(nodes) {
|
|
54
52
|
if (nodes.length === 0)
|
|
55
53
|
return "failed";
|
|
@@ -62,6 +60,9 @@ export function rollupRestoreRigResult(nodes) {
|
|
|
62
60
|
// A seat running without part of its guidance keeps its own status; the rig isn't fully restored.
|
|
63
61
|
if (nodes.some((node) => (node.guidanceGaps?.length ?? 0) > 0))
|
|
64
62
|
return "partially_restored";
|
|
63
|
+
// A seat left in its external attachment wasn't restored here: the rig isn't fully restored, and the seat says why.
|
|
64
|
+
if (nodes.some((node) => node.status === "left_attached"))
|
|
65
|
+
return "partially_restored";
|
|
65
66
|
// Same for an unhealed restore gap (e.g. a current-selection re-apply
|
|
66
67
|
// that was skipped, failed, or threw): the seat runs, but the restore was not whole.
|
|
67
68
|
if (nodes.some((node) => (node.restoreGaps?.length ?? 0) > 0))
|
|
@@ -284,6 +285,23 @@ export class RestoreOrchestrator {
|
|
|
284
285
|
.map((current) => [current.logicalId, current.codexConfigProfile])),
|
|
285
286
|
});
|
|
286
287
|
const topology = resolveSnapshotRestoreTopology(snapshot.data);
|
|
288
|
+
// A seat that is still a node of this rig but isn't in the snapshot's intended roster isn't started by this restore:
|
|
289
|
+
// one claimed with rig bind or rig attach after the rig's topology was recorded, or one added or claimed after this
|
|
290
|
+
// snapshot was taken, so it isn't in the snapshot at all. It's named as skipped rather than filed as historical or left
|
|
291
|
+
// out, and the rig isn't fully restored. A roster the operator narrowed on purpose keeps the rest out without reading
|
|
292
|
+
// as a skip.
|
|
293
|
+
const liveNodes = this.rigRepo.getRig(rigId)?.nodes ?? [];
|
|
294
|
+
const liveNodeIds = new Set(liveNodes.map((current) => current.id));
|
|
295
|
+
const snapshotNodeIds = new Set(snapshot.data.nodes.map((node) => node.id));
|
|
296
|
+
const narrowedRoster = snapshot.data.topologyRoster?.source === "operator_explicit";
|
|
297
|
+
const excludedNodes = [
|
|
298
|
+
...topology.excludedNodes.map((excluded) => !narrowedRoster && liveNodeIds.has(excluded.nodeId)
|
|
299
|
+
? { ...excluded, reason: "current_seat_not_in_intended_roster" } : excluded),
|
|
300
|
+
...(narrowedRoster ? [] : liveNodes.filter((current) => !snapshotNodeIds.has(current.id)).map((current) => ({
|
|
301
|
+
nodeId: current.id, logicalId: current.logicalId, reason: "current_seat_not_in_intended_roster",
|
|
302
|
+
}))),
|
|
303
|
+
];
|
|
304
|
+
const skippedSeats = excludedNodes.filter((excluded) => excluded.reason === "current_seat_not_in_intended_roster");
|
|
287
305
|
// A required startup file that is missing holds only its own seat. That seat isn't launched, because it would start
|
|
288
306
|
// without its startup content; it's reported failed with the reason, and the rest of the rig restores. Any other
|
|
289
307
|
// blocker, or holds on every seat this restore would launch, still stops the whole restore before any mutation.
|
|
@@ -309,7 +327,7 @@ export class RestoreOrchestrator {
|
|
|
309
327
|
blockers: validation.blockers,
|
|
310
328
|
snapshotSelection,
|
|
311
329
|
intendedRoster: topology.intendedRoster,
|
|
312
|
-
excludedNodes
|
|
330
|
+
excludedNodes,
|
|
313
331
|
};
|
|
314
332
|
return {
|
|
315
333
|
ok: false,
|
|
@@ -336,7 +354,7 @@ export class RestoreOrchestrator {
|
|
|
336
354
|
snapshotId,
|
|
337
355
|
snapshotSelection,
|
|
338
356
|
intendedRoster: topology.intendedRoster,
|
|
339
|
-
excludedNodes
|
|
357
|
+
excludedNodes,
|
|
340
358
|
});
|
|
341
359
|
const attemptId = restoreStartedEvent.seq;
|
|
342
360
|
try {
|
|
@@ -364,7 +382,7 @@ export class RestoreOrchestrator {
|
|
|
364
382
|
warnings: [`Service boot failed: ${bootResult.error}`],
|
|
365
383
|
snapshotSelection,
|
|
366
384
|
intendedRoster: topology.intendedRoster,
|
|
367
|
-
excludedNodes
|
|
385
|
+
excludedNodes,
|
|
368
386
|
},
|
|
369
387
|
});
|
|
370
388
|
return { ok: false, code: "service_boot_failed", message: `Service boot failed before agent restore: ${bootResult.error}` };
|
|
@@ -394,15 +412,19 @@ export class RestoreOrchestrator {
|
|
|
394
412
|
restoreWarnings.push(`Stopped ${entry.node.logicalId}'s startup occupant for explicit replacement; replacement outcome: ${result.status}.`);
|
|
395
413
|
}
|
|
396
414
|
}
|
|
415
|
+
for (const skipped of skippedSeats) {
|
|
416
|
+
restoreWarnings.push(`Restore: ${skipped.logicalId} was skipped: it's a seat of this rig but not in this snapshot's intended roster (it was added or claimed after that roster was recorded), so restore didn't start it.`);
|
|
417
|
+
}
|
|
418
|
+
const rolledUp = rollupRestoreRigResult(nodeResults);
|
|
397
419
|
const restoreResult = {
|
|
398
420
|
snapshotId,
|
|
399
421
|
preRestoreSnapshotId: preRestoreSnapshot.id,
|
|
400
|
-
rigResult:
|
|
422
|
+
rigResult: rolledUp === "fully_restored" && skippedSeats.length > 0 ? "partially_restored" : rolledUp,
|
|
401
423
|
nodes: nodeResults,
|
|
402
424
|
warnings: restoreWarnings,
|
|
403
425
|
snapshotSelection,
|
|
404
426
|
intendedRoster: topology.intendedRoster,
|
|
405
|
-
excludedNodes
|
|
427
|
+
excludedNodes,
|
|
406
428
|
};
|
|
407
429
|
// 7. Emit restore.completed
|
|
408
430
|
this.eventBus.emit({ type: "restore.completed", rigId, snapshotId, result: restoreResult });
|
|
@@ -498,10 +520,14 @@ export class RestoreOrchestrator {
|
|
|
498
520
|
const nonTargetNodes = opts.nonTargetMode === "detach_and_hold"
|
|
499
521
|
? allNodes.filter((node) => !targetNodes.some((target) => target.id === node.id))
|
|
500
522
|
: [];
|
|
523
|
+
// Targets are written to, so they take lifecycle leases. A non-target is only recorded (a dead session marked
|
|
524
|
+
// detached, node.held), so it takes a custody lease in the same sorted pass: a paused or draft-aware seat isn't
|
|
525
|
+
// refused, and its pane, draft, mode and binding stay as they are.
|
|
501
526
|
const guard = this.tmuxAdapter.deliveryGuard;
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
|
|
527
|
+
const targetIds = targetNodes.map(node => node.id);
|
|
528
|
+
const recordedIds = nonTargetNodes.map(node => node.id);
|
|
529
|
+
if (guard && (targetIds.some(id => !guard.ownsLifecycle(id)) || recordedIds.some(id => !guard.ownsCustody(id)))) {
|
|
530
|
+
return guard.lifecycle(targetIds, () => this.launchNodeTargets(rigId, logicalIds, opts), recordedIds);
|
|
505
531
|
}
|
|
506
532
|
// Per-target tmux-liveness classification (runtime truth, fail-closed)
|
|
507
533
|
const launched = [];
|
|
@@ -608,7 +634,11 @@ export class RestoreOrchestrator {
|
|
|
608
634
|
if (opts.selectedHistory && !opts.selectedHistory.beforeEffect()) {
|
|
609
635
|
return { ok: false, code: "selection_changed", message: "The selected history or seat changed during terminal verification. No resume was started." };
|
|
610
636
|
}
|
|
611
|
-
const
|
|
637
|
+
const liveChoice = opts.selectedHistory?.currentChoices
|
|
638
|
+
? this.rigRepo.getRig(rigId)?.nodes.find(current => current.id === node.id) : undefined;
|
|
639
|
+
const currentEffort = liveChoice ? readSeatEffort(this.db, liveChoice.id) : null;
|
|
640
|
+
const planEntry = { node: liveChoice ? { ...node, cwd: liveChoice.cwd, model: liveChoice.model,
|
|
641
|
+
effort: currentEffort?.effective ?? null, effortChoice: currentEffort?.choice ?? null } : node };
|
|
612
642
|
const result = await this.restoreNodeWithCompensation(planEntry, rigId, snapshot.id, snapshot.data, { adapters: opts?.adapters, fsOps: opts?.fsOps, selectedHistory: opts.selectedHistory, resumePeriodicCarry }, subsetWarnings);
|
|
613
643
|
launched.push(result);
|
|
614
644
|
}
|
|
@@ -894,12 +924,14 @@ export class RestoreOrchestrator {
|
|
|
894
924
|
const nodeId = node.id;
|
|
895
925
|
const selectedHistory = opts?.selectedHistory;
|
|
896
926
|
if (selectedHistory && (!liveNode || selectedHistory.nodeId !== nodeId || !selectedHistory.beforeEffect())) {
|
|
897
|
-
return { nodeId, logicalId: node.logicalId, status: "failed", error: "The selected seat or history changed before launch." };
|
|
927
|
+
return { nodeId, logicalId: node.logicalId, status: "failed", error: "The selected seat or history changed before launch.", notStarted: true };
|
|
898
928
|
}
|
|
929
|
+
// A selected restore that returns before its launch says so, as a known fact for the startup that selected it.
|
|
930
|
+
const notStarted = selectedHistory ? { notStarted: true } : {};
|
|
899
931
|
// A seat joined with `rig attach` as an external CLI keeps its attachment: launching here would replace it.
|
|
900
932
|
const external = this.sessionRegistry.getBindingForNode(nodeId);
|
|
901
933
|
if (external && seatProcessOwner(resolveSeatKind(external.attachmentType)) === "external") {
|
|
902
|
-
return { nodeId, logicalId: node.logicalId, status: "left_attached", error: leftAttachedReason(external.externalSessionName ?? node.logicalId) };
|
|
934
|
+
return { nodeId, logicalId: node.logicalId, status: "left_attached", error: leftAttachedReason(external.externalSessionName ?? node.logicalId), ...notStarted };
|
|
903
935
|
}
|
|
904
936
|
// OPR.0.5.7.1 (bought ordering blocker, baton 0efd154d): D1 present-map
|
|
905
937
|
// ambiguity must be DETECTED before any continuity_state short-circuit —
|
|
@@ -909,7 +941,7 @@ export class RestoreOrchestrator {
|
|
|
909
941
|
// fall through to absent-history classification and the continuity check.
|
|
910
942
|
const selectedRows = selectedHistory ? data.sessions.filter(row => row.nodeId === nodeId && row.id === selectedHistory.historySessionId) : [];
|
|
911
943
|
if (selectedHistory && selectedRows.length !== 1) {
|
|
912
|
-
return { nodeId, logicalId: node.logicalId, status: "failed", error: "The selected history is no longer in this snapshot." };
|
|
944
|
+
return { nodeId, logicalId: node.logicalId, status: "failed", error: "The selected history is no longer in this snapshot.", notStarted: true };
|
|
913
945
|
}
|
|
914
946
|
const occupantResolution = selectedHistory
|
|
915
947
|
? { kind: "resolved", session: selectedRows[0] }
|
|
@@ -944,7 +976,7 @@ export class RestoreOrchestrator {
|
|
|
944
976
|
}
|
|
945
977
|
const runtimeError = restoreRuntimeCompatibilityError(liveNode ? liveNode.runtime : node.runtime, data.nodeStartupContext?.[nodeId]?.runtime);
|
|
946
978
|
if (runtimeError) {
|
|
947
|
-
return { nodeId, logicalId: node.logicalId, status: "awaiting-decision", error: runtimeError };
|
|
979
|
+
return { nodeId, logicalId: node.logicalId, status: "awaiting-decision", error: runtimeError, ...notStarted };
|
|
948
980
|
}
|
|
949
981
|
// Classify absent-seat history before the continuity short-circuit: a
|
|
950
982
|
// restoring seat must not report fresh while its forecast awaits a decision.
|
|
@@ -960,7 +992,7 @@ export class RestoreOrchestrator {
|
|
|
960
992
|
if (continuityRow) {
|
|
961
993
|
if (continuityRow.status === "restoring") {
|
|
962
994
|
if (selectedHistory)
|
|
963
|
-
return { nodeId, logicalId: node.logicalId, status: "failed", error: "Continuity recovery already owns this seat." };
|
|
995
|
+
return { nodeId, logicalId: node.logicalId, status: "failed", error: "Continuity recovery already owns this seat.", notStarted: true };
|
|
964
996
|
if (opts?.automaticReplacements?.some(target => target.nodeId === nodeId)) {
|
|
965
997
|
return { nodeId, logicalId: node.logicalId, status: "awaiting-decision", error: "Continuity recovery owns this seat; its startup occupant was left unchanged." };
|
|
966
998
|
}
|
|
@@ -1035,7 +1067,7 @@ export class RestoreOrchestrator {
|
|
|
1035
1067
|
// Clear stale state so NodeLauncher doesn't see already_bound. A kept pane keeps its binding through the takeover: the
|
|
1036
1068
|
// delivery guard resolves the pane through it.
|
|
1037
1069
|
if (selectedHistory && !selectedHistory.beforeEffect()) {
|
|
1038
|
-
return { nodeId, logicalId: node.logicalId, status: "failed", error: "The selected seat or history changed before launch." };
|
|
1070
|
+
return { nodeId, logicalId: node.logicalId, status: "failed", error: "The selected seat or history changed before launch.", notStarted: true };
|
|
1039
1071
|
}
|
|
1040
1072
|
this.clearStaleState(nodeId, rigId, { keepBinding: keptPane !== null });
|
|
1041
1073
|
this.tmuxAdapter.deliveryGuard?.rebindLifecycle(nodeId);
|
|
@@ -1060,16 +1092,22 @@ export class RestoreOrchestrator {
|
|
|
1060
1092
|
// derive (below) is observable, never a silent divergence.
|
|
1061
1093
|
const pinnedTarget = priorState.binding?.tmuxSession ?? null;
|
|
1062
1094
|
let pinnedTargetUsed = false;
|
|
1095
|
+
let unusablePin = null;
|
|
1063
1096
|
if (pinnedTarget) {
|
|
1064
|
-
const { validateSessionName } = await import("./session-name.js");
|
|
1065
|
-
|
|
1097
|
+
const { boundSessionNameProblem, validateSessionName } = await import("./session-name.js");
|
|
1098
|
+
// An adopted seat is bound to its own tmux session's name, which need not follow OpenRig's pattern. It is kept
|
|
1099
|
+
// when tmux and OpenRig's addressing both keep it as given, so the seat comes back at the address its peers use.
|
|
1100
|
+
const conventional = validateSessionName(pinnedTarget);
|
|
1101
|
+
const problem = conventional ? null : boundSessionNameProblem(pinnedTarget);
|
|
1102
|
+
if (!problem) {
|
|
1066
1103
|
expectedSessionName = pinnedTarget;
|
|
1067
|
-
launchOpts = { ...launchOpts, sessionName: expectedSessionName };
|
|
1104
|
+
launchOpts = { ...launchOpts, sessionName: expectedSessionName, ...(conventional ? {} : { keepsBoundSessionName: true }) };
|
|
1068
1105
|
pinnedTargetUsed = true;
|
|
1069
1106
|
}
|
|
1070
1107
|
else {
|
|
1071
|
-
// Binding present but the bound name
|
|
1072
|
-
|
|
1108
|
+
// Binding present but the bound name can't be launched again as given: the seat gets a derived address, said
|
|
1109
|
+
// old to new below.
|
|
1110
|
+
unusablePin = { name: pinnedTarget, problem };
|
|
1073
1111
|
}
|
|
1074
1112
|
}
|
|
1075
1113
|
else {
|
|
@@ -1099,6 +1137,11 @@ export class RestoreOrchestrator {
|
|
|
1099
1137
|
expectedSessionName = deriveSessionName(rig.rig.name, node.logicalId);
|
|
1100
1138
|
}
|
|
1101
1139
|
}
|
|
1140
|
+
if (unusablePin) {
|
|
1141
|
+
// Said before the launch, so it names the attempt: the launch below may still fail and put the prior state back.
|
|
1142
|
+
const planned = expectedSessionName ? `"${expectedSessionName}"` : "a derived session name";
|
|
1143
|
+
warnings?.push(`FR-5: restore starts ${node.logicalId} as ${planned}, not "${unusablePin.name}", the session name it was bound to: ${unusablePin.problem}. Once it runs there, peers that address "${unusablePin.name}" need ${planned}.`);
|
|
1144
|
+
}
|
|
1102
1145
|
// Write transcript boundary marker BEFORE launch (before pipe-pane attaches)
|
|
1103
1146
|
// so the marker appears before any post-restore terminal output.
|
|
1104
1147
|
// Uses "restore attempt" language — honest even if launch subsequently fails.
|
|
@@ -1186,14 +1229,19 @@ export class RestoreOrchestrator {
|
|
|
1186
1229
|
});
|
|
1187
1230
|
if (!launchResult.ok) {
|
|
1188
1231
|
// Launch failed — restore prior state (compensating action)
|
|
1189
|
-
|
|
1232
|
+
const compensate = !selectedHistory || (launchResult.code !== "selection_changed_after_creation" && selectedHistory.beforeRegistration());
|
|
1233
|
+
if (compensate)
|
|
1190
1234
|
this.restoreNodeState(nodeId, priorState);
|
|
1235
|
+
// Known compensation needs a failure that left no terminal: one before its creation, or tmux reporting none was
|
|
1236
|
+
// created. An unconfirmed creation, a failed write or a later failure isn't known to have left nothing.
|
|
1237
|
+
const compensated = compensate && NO_TERMINAL_LAUNCH_CODES.has(launchResult.code);
|
|
1191
1238
|
return {
|
|
1192
1239
|
nodeId,
|
|
1193
1240
|
logicalId: node.logicalId,
|
|
1194
1241
|
status: selectedHistory && launchResult.code === "selection_changed_after_creation" ? "attention_required" : "failed",
|
|
1195
1242
|
error: launchResult.message,
|
|
1196
1243
|
...(keptPane && NOTHING_STOPPED_LAUNCH_CODES.has(launchResult.code) ? { nothingStopped: true } : {}),
|
|
1244
|
+
...(selectedHistory && compensated ? { compensated: true } : {}),
|
|
1197
1245
|
};
|
|
1198
1246
|
}
|
|
1199
1247
|
// Launch succeeded — do NOT compensate on post-launch failures
|
|
@@ -1202,11 +1250,14 @@ export class RestoreOrchestrator {
|
|
|
1202
1250
|
if (launchResult.warnings?.length) {
|
|
1203
1251
|
warnings?.push(...launchResult.warnings);
|
|
1204
1252
|
}
|
|
1205
|
-
|
|
1253
|
+
// A selected launch's own blank rolled back after the shell started (postLaunchRestore has many return points).
|
|
1254
|
+
const compensation = { ran: false };
|
|
1255
|
+
const restored = await this.postLaunchRestore(entry, rigId, data, launchResult.sessionName, launchResult, { ...opts, ...(claudeExecutable ? { claudeExecutable } : {}), ...(claudeLaunch ? { claudeLaunch } : {}), compensation }, warnings, priorState, seatRehydration, resumeSession, activityHookGaps, restoredSkillCatalog);
|
|
1206
1256
|
const checked = { ...this.checkRestoredGuidance(restored, entry.node, rigId, data, warnings),
|
|
1207
1257
|
...(activityHookGaps.length > 0 ? { restoreGaps: activityHookGaps } : {}),
|
|
1208
1258
|
...(keptPane ? { launchStarted: true } : {}) };
|
|
1209
|
-
return selectedHistory ? { ...checked, sourceSessionId: selectedHistory.historySessionId, resultSessionId: launchResult.session.id
|
|
1259
|
+
return selectedHistory ? { ...checked, sourceSessionId: selectedHistory.historySessionId, resultSessionId: launchResult.session.id,
|
|
1260
|
+
...(compensation.ran ? { compensated: true } : {}) } : checked;
|
|
1210
1261
|
}
|
|
1211
1262
|
async claudeContinuationExecutable(pane, keepLaunch = false, session) {
|
|
1212
1263
|
const native = await verifyClaudePaneRuntime({ target: pane, tmux: this.tmuxAdapter,
|
|
@@ -1428,18 +1479,23 @@ export class RestoreOrchestrator {
|
|
|
1428
1479
|
* reused pane), mark its row superseded, and restore the prior state (the existing
|
|
1429
1480
|
* launch-failure compensating action). The caller fires this ONLY on a
|
|
1430
1481
|
* POSITIVE determination the session is fresh/blank — never for
|
|
1431
|
-
* unknown-but-possibly-valid continuity.
|
|
1482
|
+
* unknown-but-possibly-valid continuity. When tmux doesn't confirm the stop, the session may still be running, so
|
|
1483
|
+
* its row and binding are left as they are and the result says the stop is unconfirmed. */
|
|
1432
1484
|
async rollbackToZeroSession(nodeId, sessionName, launchedSessionId, priorState, assertCurrent, keepPane = false) {
|
|
1433
1485
|
if (assertCurrent && !assertCurrent())
|
|
1434
|
-
return false;
|
|
1486
|
+
return { rolledBack: false, terminalStopped: false };
|
|
1487
|
+
// Whether tmux confirmed the stop. A kept pane isn't stopped.
|
|
1488
|
+
let terminalStopped = false;
|
|
1435
1489
|
if (!keepPane) {
|
|
1436
1490
|
try {
|
|
1437
|
-
await this.tmuxAdapter.killSession(sessionName);
|
|
1491
|
+
terminalStopped = (await this.tmuxAdapter.killSession(sessionName)).ok === true;
|
|
1438
1492
|
}
|
|
1439
|
-
catch { /*
|
|
1493
|
+
catch { /* an unconfirmed stop, the same as a refused one */ }
|
|
1440
1494
|
}
|
|
1441
1495
|
if (assertCurrent && !assertCurrent())
|
|
1442
|
-
return false;
|
|
1496
|
+
return { rolledBack: false, terminalStopped };
|
|
1497
|
+
if (!keepPane && !terminalStopped)
|
|
1498
|
+
return { rolledBack: false, terminalStopped, stopUnconfirmed: true };
|
|
1443
1499
|
if (launchedSessionId) {
|
|
1444
1500
|
try {
|
|
1445
1501
|
this.sessionRegistry.updateStatus(launchedSessionId, "superseded");
|
|
@@ -1450,7 +1506,7 @@ export class RestoreOrchestrator {
|
|
|
1450
1506
|
// Pane takeover already ended the predecessor; keep its retired status.
|
|
1451
1507
|
this.restoreNodeState(nodeId, keepPane ? { ...priorState, sessions: [] } : priorState);
|
|
1452
1508
|
}
|
|
1453
|
-
return true;
|
|
1509
|
+
return { rolledBack: true, terminalStopped };
|
|
1454
1510
|
}
|
|
1455
1511
|
/** Retire only the provisional session created by this restore attempt. The prior
|
|
1456
1512
|
* binding must stay cleared while a replacement launch is handed off. */
|
|
@@ -1537,9 +1593,19 @@ export class RestoreOrchestrator {
|
|
|
1537
1593
|
// row ordering (cite site 2 of 2; "latest = max id" was the incident's
|
|
1538
1594
|
// defect: a superseded row with a newer ULID defeated the real occupant).
|
|
1539
1595
|
const selected = opts?.selectedHistory;
|
|
1540
|
-
|
|
1541
|
-
const
|
|
1542
|
-
|
|
1596
|
+
/** Rolls this restore's blank session back; null when it did, else the result the restore reports instead. */
|
|
1597
|
+
const rollbackOwnBlank = async () => {
|
|
1598
|
+
const { rolledBack, terminalStopped, stopUnconfirmed } = await this.rollbackToZeroSession(node.id, sessionName, launchResult?.session.id, priorState, selected ? () => selected.beforeNative(launchResult?.session.id, launchResult?.binding.id) : undefined, opts?.keepPane);
|
|
1599
|
+
// Known compensation: tmux confirmed the terminal stopped, and the earlier state was put back.
|
|
1600
|
+
if (rolledBack && terminalStopped && priorState && !opts?.keepPane && opts?.compensation)
|
|
1601
|
+
opts.compensation.ran = true;
|
|
1602
|
+
if (rolledBack)
|
|
1603
|
+
return null;
|
|
1604
|
+
return stopUnconfirmed ? { nodeId: node.id, logicalId: node.logicalId, status: "attention_required",
|
|
1605
|
+
error: `Original session unresumable, and the blank session this restore launched couldn't be confirmed stopped: it may still be running, so its session record and binding were left in place. Check it with rig capture ${sessionName}, stop it with ${this.stopSeatCommand(rigId, data, node.logicalId)}, then retry the restore.` }
|
|
1606
|
+
: { nodeId: node.id, logicalId: node.logicalId, status: "attention_required",
|
|
1607
|
+
error: "The selected terminal or source changed during cleanup. Its current owner was preserved; inspect the partial launch before retrying." };
|
|
1608
|
+
};
|
|
1543
1609
|
const selectedRows = selected ? data.sessions.filter(row => row.nodeId === node.id && row.id === selected.historySessionId) : [];
|
|
1544
1610
|
const sessionResolution = selected
|
|
1545
1611
|
? selectedRows.length === 1 ? { kind: "resolved", session: selectedRows[0] } : { kind: "none" }
|
|
@@ -1734,8 +1800,11 @@ export class RestoreOrchestrator {
|
|
|
1734
1800
|
// before any session exists. If it is somehow reached post-launch, the
|
|
1735
1801
|
// just-created session is a confirmed blank (no resume was possible) —
|
|
1736
1802
|
// roll back to zero sessions and present the decision honestly.
|
|
1737
|
-
|
|
1738
|
-
|
|
1803
|
+
{
|
|
1804
|
+
const kept = await rollbackOwnBlank();
|
|
1805
|
+
if (kept)
|
|
1806
|
+
return kept;
|
|
1807
|
+
}
|
|
1739
1808
|
return { nodeId: node.id, logicalId: node.logicalId, status: "awaiting-decision", error: `Original session unresumable: resume requested but no token available. No session is running. Restore the original session manually, or deliberately start only this seat fresh: ${this.freshSeatCommand(rigId, data, node.logicalId)}.` };
|
|
1740
1809
|
}
|
|
1741
1810
|
else {
|
|
@@ -1781,8 +1850,11 @@ export class RestoreOrchestrator {
|
|
|
1781
1850
|
// OPR.0.3.4.2 (B): resume CONCLUDED failed — the launched session is
|
|
1782
1851
|
// a confirmed blank agent (precision guard trigger (i)). Roll back to
|
|
1783
1852
|
// zero sessions; the stop-and-ask is realized as awaiting-decision.
|
|
1784
|
-
|
|
1785
|
-
|
|
1853
|
+
{
|
|
1854
|
+
const kept = await rollbackOwnBlank();
|
|
1855
|
+
if (kept)
|
|
1856
|
+
return kept;
|
|
1857
|
+
}
|
|
1786
1858
|
return { nodeId: node.id, logicalId: node.logicalId, status: "awaiting-decision", error: `Original session unresumable: resume attempted but failed. The blank session was rolled back; no session is running. Check the harness state manually, or deliberately start only this seat fresh: ${this.freshSeatCommand(rigId, data, node.logicalId)}.` };
|
|
1787
1859
|
}
|
|
1788
1860
|
}
|
|
@@ -1793,8 +1865,11 @@ export class RestoreOrchestrator {
|
|
|
1793
1865
|
// instead of silently downgrading to a fresh launch with amnesia.
|
|
1794
1866
|
if (!resumeToken) {
|
|
1795
1867
|
// Defense in depth (pre-launch classification catches this first).
|
|
1796
|
-
|
|
1797
|
-
|
|
1868
|
+
{
|
|
1869
|
+
const kept = await rollbackOwnBlank();
|
|
1870
|
+
if (kept)
|
|
1871
|
+
return kept;
|
|
1872
|
+
}
|
|
1798
1873
|
return {
|
|
1799
1874
|
nodeId: node.id,
|
|
1800
1875
|
logicalId: node.logicalId,
|
|
@@ -1810,8 +1885,11 @@ export class RestoreOrchestrator {
|
|
|
1810
1885
|
// Explicit --fresh and non-resume policies stay the only fresh-prime paths.
|
|
1811
1886
|
const resumeAdapter = seatAdapter(opts?.adapters, node.runtime, session?.communityHarness);
|
|
1812
1887
|
if (!resumeAdapter) {
|
|
1813
|
-
|
|
1814
|
-
|
|
1888
|
+
{
|
|
1889
|
+
const kept = await rollbackOwnBlank();
|
|
1890
|
+
if (kept)
|
|
1891
|
+
return kept;
|
|
1892
|
+
}
|
|
1815
1893
|
return {
|
|
1816
1894
|
nodeId: node.id,
|
|
1817
1895
|
logicalId: node.logicalId,
|
|
@@ -2064,8 +2142,11 @@ export class RestoreOrchestrator {
|
|
|
2064
2142
|
// ONLY on the concluded-fresh determination; a genuinely
|
|
2065
2143
|
// unknown-but-possibly-valid continuity never reaches here
|
|
2066
2144
|
// (continuityOutcome would not be "fresh").
|
|
2067
|
-
|
|
2068
|
-
|
|
2145
|
+
{
|
|
2146
|
+
const kept = await rollbackOwnBlank();
|
|
2147
|
+
if (kept)
|
|
2148
|
+
return kept;
|
|
2149
|
+
}
|
|
2069
2150
|
return {
|
|
2070
2151
|
nodeId: node.id,
|
|
2071
2152
|
logicalId: node.logicalId,
|
|
@@ -2106,8 +2187,11 @@ export class RestoreOrchestrator {
|
|
|
2106
2187
|
// as unresumable. A pane that went back to its shell for another reason stays failed,
|
|
2107
2188
|
// with its pane and binding kept, so its output can still be read.
|
|
2108
2189
|
if (startupResult.missingConversation) {
|
|
2109
|
-
|
|
2110
|
-
|
|
2190
|
+
{
|
|
2191
|
+
const kept = await rollbackOwnBlank();
|
|
2192
|
+
if (kept)
|
|
2193
|
+
return kept;
|
|
2194
|
+
}
|
|
2111
2195
|
// The records can't tell a seat that was never used from one whose conversation is elsewhere (a moved
|
|
2112
2196
|
// account or folder), so the seat waits for the person who knows, with the steps that start it fresh. A kept
|
|
2113
2197
|
// pane leaves the seat's own tmux session at a shell, which the fresh launch won't replace until it's stopped.
|