@openrig/cli 0.7.5 → 0.7.7
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 +5 -5
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +11 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +5 -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 +30 -3
- package/daemon/context-packs/reference/getting-started.md +37 -3
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +142 -3
- package/daemon/context-packs/reference/whats-new.md +162 -164
- 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/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/SKILL.md +0 -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-upgrade/SKILL.md +0 -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/SKILL.md +2 -2
- 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/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/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 +1 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +41 -10
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +20 -4
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +5 -2
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +2 -0
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +37 -14
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js +3 -1
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +6 -5
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +15 -11
- 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 +4 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/141_node_account_home.d.ts +3 -0
- package/daemon/dist/db/migrations/141_node_account_home.d.ts.map +1 -0
- package/daemon/dist/db/migrations/141_node_account_home.js +6 -0
- package/daemon/dist/db/migrations/141_node_account_home.js.map +1 -0
- package/daemon/dist/db/migrations/141_session_agent_runner.d.ts +3 -0
- package/daemon/dist/db/migrations/141_session_agent_runner.d.ts.map +1 -0
- package/daemon/dist/db/migrations/141_session_agent_runner.js +11 -0
- package/daemon/dist/db/migrations/141_session_agent_runner.js.map +1 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts +7 -2
- package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.js +10 -2
- package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +6 -3
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +18 -10
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/claim-service.js +1 -1
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +3 -2
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-credential-precedence.d.ts +8 -0
- package/daemon/dist/domain/claude-credential-precedence.d.ts.map +1 -1
- package/daemon/dist/domain/claude-credential-precedence.js +49 -4
- package/daemon/dist/domain/claude-credential-precedence.js.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.d.ts +24 -3
- package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.js +92 -29
- package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
- package/daemon/dist/domain/claude-seat-token.d.ts +14 -2
- package/daemon/dist/domain/claude-seat-token.d.ts.map +1 -1
- package/daemon/dist/domain/claude-seat-token.js +54 -7
- package/daemon/dist/domain/claude-seat-token.js.map +1 -1
- package/daemon/dist/domain/codex-rebuild-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/codex-rebuild-permissions.js +6 -4
- package/daemon/dist/domain/codex-rebuild-permissions.js.map +1 -1
- package/daemon/dist/domain/community-harness-presets.d.ts +5 -0
- package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
- package/daemon/dist/domain/community-harness-presets.js +9 -2
- package/daemon/dist/domain/community-harness-presets.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.d.ts +7 -0
- package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.js +5 -0
- package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +4 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +11 -3
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +8 -15
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +5 -1
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +7 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +12 -5
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +19 -5
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/markdown-address.d.ts.map +1 -1
- package/daemon/dist/domain/markdown-address.js +14 -1
- package/daemon/dist/domain/markdown-address.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.d.ts +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.js.map +1 -1
- package/daemon/dist/domain/native-process-arguments.d.ts +7 -0
- package/daemon/dist/domain/native-process-arguments.d.ts.map +1 -0
- package/daemon/dist/domain/native-process-arguments.js +188 -0
- package/daemon/dist/domain/native-process-arguments.js.map +1 -0
- package/daemon/dist/domain/native-process-lineage.d.ts +8 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +104 -30
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +3 -3
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +38 -28
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +6 -4
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/pane-cutover.d.ts +1 -1
- package/daemon/dist/domain/pane-cutover.d.ts.map +1 -1
- package/daemon/dist/domain/pane-cutover.js +3 -3
- package/daemon/dist/domain/pane-cutover.js.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/process-table.d.ts +2 -0
- package/daemon/dist/domain/process-table.d.ts.map +1 -1
- package/daemon/dist/domain/process-table.js +3 -0
- package/daemon/dist/domain/process-table.js.map +1 -1
- package/daemon/dist/domain/proof/source-watch.d.ts +1 -1
- package/daemon/dist/domain/proof/source-watch.d.ts.map +1 -1
- package/daemon/dist/domain/proof/source-watch.js +14 -1
- package/daemon/dist/domain/proof/source-watch.js.map +1 -1
- package/daemon/dist/domain/provider/claude-seat-switch.d.ts.map +1 -1
- package/daemon/dist/domain/provider/claude-seat-switch.js +19 -9
- package/daemon/dist/domain/provider/claude-seat-switch.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.js +3 -0
- package/daemon/dist/domain/provider/provider-service-impl.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service.d.ts +6 -0
- package/daemon/dist/domain/provider/provider-service.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-types.d.ts +3 -2
- package/daemon/dist/domain/provider/provider-types.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +2 -2
- package/daemon/dist/domain/ps-projection.js +6 -6
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +13 -2
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +84 -21
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +2 -2
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +20 -11
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +14 -0
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +53 -0
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +18 -7
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/reply-to-choice.d.ts +3 -0
- package/daemon/dist/domain/reply-to-choice.d.ts.map +1 -1
- package/daemon/dist/domain/reply-to-choice.js +12 -0
- package/daemon/dist/domain/reply-to-choice.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +7 -2
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +69 -22
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.js +20 -35
- package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +3 -1
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +25 -5
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-codec.js +4 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +4 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +4 -1
- 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 +29 -1
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +11 -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-activity-service.d.ts +8 -1
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +92 -35
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +2 -2
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +13 -1
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts +4 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +21 -8
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +19 -11
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +66 -13
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-home.d.ts +7 -3
- package/daemon/dist/domain/seat-runtime-home.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-home.js +32 -3
- package/daemon/dist/domain/seat-runtime-home.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts +13 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.js +48 -6
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-status-service.d.ts +4 -2
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +5 -3
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +7 -2
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +19 -2
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +2 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +15 -1
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +12 -2
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-proof.d.ts +3 -1
- package/daemon/dist/domain/startup-proof.d.ts.map +1 -1
- package/daemon/dist/domain/startup-proof.js +7 -2
- package/daemon/dist/domain/startup-proof.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +2 -2
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-follow-view.d.ts +1 -1
- package/daemon/dist/domain/terminal/herdr-follow-view.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-follow-view.js +35 -18
- package/daemon/dist/domain/terminal/herdr-follow-view.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-sessions.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-sessions.js +6 -5
- package/daemon/dist/domain/terminal/herdr-sessions.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-transport.d.ts +3 -2
- package/daemon/dist/domain/terminal/herdr-transport.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-transport.js +10 -6
- package/daemon/dist/domain/terminal/herdr-transport.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-viewer.d.ts +16 -1
- package/daemon/dist/domain/terminal/herdr-viewer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-viewer.js +52 -26
- package/daemon/dist/domain/terminal/herdr-viewer.js.map +1 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts +28 -0
- package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/scope-task-terminal-view.js +268 -0
- package/daemon/dist/domain/terminal/scope-task-terminal-view.js.map +1 -0
- package/daemon/dist/domain/terminal/task-terminal-view.d.ts +10 -1
- package/daemon/dist/domain/terminal/task-terminal-view.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/task-terminal-view.js +6 -1
- package/daemon/dist/domain/terminal/task-terminal-view.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-following.js +3 -3
- package/daemon/dist/domain/terminal/terminal-following.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +1 -1
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +9 -0
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +43 -9
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +35 -2
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js +5 -0
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +1 -1
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +75 -7
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/compaction.js +4 -0
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/provider.d.ts +1 -0
- package/daemon/dist/routes/provider.d.ts.map +1 -1
- package/daemon/dist/routes/provider.js +49 -10
- package/daemon/dist/routes/provider.js.map +1 -1
- package/daemon/dist/routes/rigs.js +3 -97
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts +4 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +8 -2
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.js +4 -3
- 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 +1 -0
- package/daemon/dist/routes/slices.js.map +1 -1
- package/daemon/dist/routes/terminal.d.ts.map +1 -1
- package/daemon/dist/routes/terminal.js +5 -3
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +26 -9
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-state-taxonomy.md +21 -1
- package/daemon/docs/reference/author-contracts.md +74 -0
- package/daemon/docs/reference/community-harness-examples/cursor/cursor.yaml +1 -0
- package/daemon/docs/reference/community-harness-examples/cursor/openrig-cursor-launch +6 -0
- package/daemon/docs/reference/community-harness-examples/hermes/hermes.yaml +1 -0
- package/daemon/docs/reference/community-harness-examples/hermes/openrig-hermes-launch +15 -0
- package/daemon/docs/reference/community-harness-presets.md +78 -3
- package/daemon/docs/reference/execution-platform-contract.md +138 -0
- package/daemon/docs/reference/getting-started.md +37 -3
- package/daemon/docs/reference/harness-runner-contract.md +242 -0
- package/daemon/docs/reference/quickstart.md +1 -1
- package/daemon/docs/reference/rig-spec.md +142 -3
- package/daemon/docs/reference/slack-app-setup.md +8 -0
- package/daemon/docs/reference/terminal-sessions.md +106 -5
- package/daemon/docs/reference/whats-new.md +162 -164
- package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +0 -1
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +0 -1
- package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +2 -2
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +11 -2
- package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +2 -1
- package/dist/build-info.js +3 -3
- package/dist/client.js +3 -3
- package/dist/client.js.map +1 -1
- package/dist/commands/chatroom.d.ts +7 -0
- package/dist/commands/chatroom.d.ts.map +1 -1
- package/dist/commands/chatroom.js +21 -4
- package/dist/commands/chatroom.js.map +1 -1
- package/dist/commands/crash-cart.d.ts +6 -0
- package/dist/commands/crash-cart.d.ts.map +1 -1
- package/dist/commands/crash-cart.js +10 -5
- package/dist/commands/crash-cart.js.map +1 -1
- package/dist/commands/edge.d.ts.map +1 -1
- package/dist/commands/edge.js +8 -4
- package/dist/commands/edge.js.map +1 -1
- package/dist/commands/host.d.ts +8 -0
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +57 -6
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/provider.d.ts +1 -0
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +146 -7
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +40 -11
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/seat.d.ts +1 -0
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +61 -9
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.js +2 -2
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +2 -0
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/startup-proof.d.ts.map +1 -1
- package/dist/commands/startup-proof.js +4 -1
- package/dist/commands/startup-proof.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +3 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/terminal.js +2 -2
- package/dist/commands/terminal.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +29 -4
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/lib/account-home-switch.d.ts +6 -0
- package/dist/lib/account-home-switch.d.ts.map +1 -0
- package/dist/lib/account-home-switch.js +8 -0
- package/dist/lib/account-home-switch.js.map +1 -0
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +13 -4
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/openrig-compat.d.ts +9 -1
- package/dist/openrig-compat.d.ts.map +1 -1
- package/dist/openrig-compat.js +19 -3
- package/dist/openrig-compat.js.map +1 -1
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +1 -3
- package/dist/terminal-window.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/attention/attention-model.js +9 -7
- package/tui/dist/attention/attention-model.js.map +1 -1
- package/tui/dist/config/config-model.d.ts.map +1 -1
- package/tui/dist/config/config-model.js +2 -2
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/health/health-model.d.ts.map +1 -1
- package/tui/dist/health/health-model.js +2 -2
- package/tui/dist/health/health-model.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +11 -9
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/stylize.js +1 -1
- package/tui/dist/stylize.js.map +1 -1
- package/ui/dist/assets/{index-ozBodLrS.js → index-CMBgYrS7.js} +81 -81
- package/ui/dist/index.html +1 -1
|
@@ -6,8 +6,8 @@ import { assessSnapshotCurrentOccupants, stoppedSnapshotReason } from "./rehydra
|
|
|
6
6
|
import { nonInterruptiveNotice, nonInterruptiveSummary } from "../adapters/non-interruptive.js";
|
|
7
7
|
import { planModelAliasNotice } from "../adapters/yolo-mode.js";
|
|
8
8
|
import { effortPrecedence, readSeatEffort } from "./seat-effort.js";
|
|
9
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
10
|
-
import { join } from "node:path";
|
|
9
|
+
import { accessSync, constants, existsSync, mkdirSync, readFileSync, realpathSync, statSync, writeFileSync } from "node:fs";
|
|
10
|
+
import { isAbsolute, join } from "node:path";
|
|
11
11
|
import { ensureSeatSkillPlugin, hasSeatSkillRecords, rehydrateSeatSkills, seatSkillPaths, seatSkillPathsForNode, seatCatalogKeptNote, seatSkillReplay, writeSeatSkillCatalog, writeSeatSkillRouter, seatRouterKeptNote } from "./seat-skill-storage.js";
|
|
12
12
|
import { NativePermissionStore } from "./native-permission-store.js";
|
|
13
13
|
import { resolvePermissionPolicyAttachment } from "./permission-policy/policy-ref.js";
|
|
@@ -16,13 +16,13 @@ import { seatRuntimeHome } from "./seat-runtime-home.js";
|
|
|
16
16
|
import { readFreshOccupantRelations } from "./fresh-occupant-relation.js";
|
|
17
17
|
import { assessNativeResumeProbe } from "./native-resume-probe.js";
|
|
18
18
|
import { resumeProbeEvidence } from "./native-resume-probe-evidence.js";
|
|
19
|
-
import { observeClaudeDelivery, observeClaudeResumeLaunch, verifyClaudePaneProcess, verifyPaneIdleShell } from "./native-process-lineage.js";
|
|
19
|
+
import { observeClaudeDelivery, observeClaudeResumeLaunch, processArgv, verifyClaudePaneProcess, verifyClaudePaneRuntime, verifyPaneIdleShell } from "./native-process-lineage.js";
|
|
20
|
+
import { readNativeExecutablePaths } from "./native-process-executable.js";
|
|
20
21
|
import { reanchorBuiltinStartupFile, reanchorShippedProjectionEntry } from "./builtin-startup-files.js";
|
|
21
22
|
import { applySeatSkillsLineRule, seatGuidance, restoreMissingGuidance, missingGuidanceBlocks } from "./restore-guidance.js";
|
|
22
23
|
import { readFootprintAnswer } from "./footprint-choice.js";
|
|
23
24
|
import { SettingsStore } from "./user-settings/settings-store.js";
|
|
24
25
|
import { AppliedLaunchObservationStore } from "./applied-launch-observation-store.js";
|
|
25
|
-
import { classifyPaneRuntimeMatch } from "./seat-identity-reconciler.js";
|
|
26
26
|
import { isShellForeground } from "./shell-classifier.js";
|
|
27
27
|
import { rebindAndVerifyPaneIdentity } from "./seat-attention-reconciler.js";
|
|
28
28
|
import { SeatIdentityStore } from "./seat-identity-store.js";
|
|
@@ -450,6 +450,9 @@ export class RestoreOrchestrator {
|
|
|
450
450
|
const unmatchedIds = logicalIds.filter((id) => !matchedIds.has(id));
|
|
451
451
|
if (targetNodes.length === 0)
|
|
452
452
|
return { ok: false, code: "no_matching_nodes", message: `No nodes match logical ids: ${logicalIds.join(", ")}` };
|
|
453
|
+
if (targetNodes.some(saved => !allNodes.some(current => current.id === saved.id && current.logicalId === saved.logicalId))) {
|
|
454
|
+
return { ok: false, code: "selection_changed", message: "A snapshot seat was removed or recreated. Select history for the current seat." };
|
|
455
|
+
}
|
|
453
456
|
if (opts.selectedHistory && (targetNodes.length !== 1 || targetNodes[0].id !== opts.selectedHistory.nodeId
|
|
454
457
|
|| !allNodes.some(node => node.id === opts.selectedHistory.nodeId && node.logicalId === logicalIds[0]))) {
|
|
455
458
|
return { ok: false, code: "selection_changed", message: "The selected node is no longer this seat." };
|
|
@@ -989,6 +992,8 @@ export class RestoreOrchestrator {
|
|
|
989
992
|
if (opts?.keepPane && (!keptPane || !priorState.binding?.tmuxSession)) {
|
|
990
993
|
return { nodeId, logicalId: node.logicalId, status: "failed", error: `${node.logicalId} has no bound tmux pane to keep, so nothing was stopped.` };
|
|
991
994
|
}
|
|
995
|
+
// Read before takeover ends the process. An unavailable witness keeps normal launch resolution unchanged.
|
|
996
|
+
const claudeExecutable = keptPane && node.runtime === "claude-code" ? await this.claudeContinuationExecutable(keptPane) : undefined;
|
|
992
997
|
// Clear stale state so NodeLauncher doesn't see already_bound. A kept pane keeps its binding through the takeover: the
|
|
993
998
|
// delivery guard resolves the pane through it.
|
|
994
999
|
if (selectedHistory && !selectedHistory.beforeEffect()) {
|
|
@@ -1134,10 +1139,29 @@ export class RestoreOrchestrator {
|
|
|
1134
1139
|
if (launchResult.warnings?.length) {
|
|
1135
1140
|
warnings?.push(...launchResult.warnings);
|
|
1136
1141
|
}
|
|
1137
|
-
const restored = await this.postLaunchRestore(entry, rigId, data, launchResult.sessionName, launchResult, opts, warnings, priorState, seatRehydration, resumeSession);
|
|
1138
|
-
const checked = this.checkRestoredGuidance(restored, entry.node, rigId, data, warnings)
|
|
1142
|
+
const restored = await this.postLaunchRestore(entry, rigId, data, launchResult.sessionName, launchResult, { ...opts, ...(claudeExecutable ? { claudeExecutable } : {}) }, warnings, priorState, seatRehydration, resumeSession);
|
|
1143
|
+
const checked = { ...this.checkRestoredGuidance(restored, entry.node, rigId, data, warnings),
|
|
1144
|
+
...(keptPane ? { launchStarted: true } : {}) };
|
|
1139
1145
|
return selectedHistory ? { ...checked, sourceSessionId: selectedHistory.historySessionId, resultSessionId: launchResult.session.id } : checked;
|
|
1140
1146
|
}
|
|
1147
|
+
async claudeContinuationExecutable(pane) {
|
|
1148
|
+
const native = await verifyClaudePaneRuntime({ target: pane, tmux: this.tmuxAdapter,
|
|
1149
|
+
...(this.listProcesses ? { listProcesses: this.listProcesses } : {}) });
|
|
1150
|
+
if (!native)
|
|
1151
|
+
return undefined;
|
|
1152
|
+
const argv0 = processArgv(native.process.command)[0];
|
|
1153
|
+
const executable = argv0 && isAbsolute(argv0) ? argv0 : native.process.executablePath
|
|
1154
|
+
?? (await readNativeExecutablePaths([native.process.pid])).get(native.process.pid);
|
|
1155
|
+
try {
|
|
1156
|
+
if (!executable || !isAbsolute(executable))
|
|
1157
|
+
return undefined;
|
|
1158
|
+
accessSync(executable, constants.X_OK);
|
|
1159
|
+
return statSync(executable).isFile() ? realpathSync(executable) : undefined;
|
|
1160
|
+
}
|
|
1161
|
+
catch {
|
|
1162
|
+
return undefined;
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1141
1165
|
/** A seat that came back running should also have its role, culture and SOP guidance. If its
|
|
1142
1166
|
* guidance file still lacks a managed block it should hold, the seat keeps its true status (a
|
|
1143
1167
|
* live resumed session is still running) and the gap is disclosed on the node and in the
|
|
@@ -1181,18 +1205,20 @@ export class RestoreOrchestrator {
|
|
|
1181
1205
|
return { ...result, guidanceGaps: missing };
|
|
1182
1206
|
}
|
|
1183
1207
|
/** OPR.0.3.4.2 (B) — roll a just-launched session back to ZERO sessions for
|
|
1184
|
-
* the awaiting-decision outcome:
|
|
1185
|
-
* superseded, and restore the prior
|
|
1208
|
+
* the awaiting-decision outcome: remove a new blank terminal (preserving a
|
|
1209
|
+
* reused pane), mark its row superseded, and restore the prior state (the existing
|
|
1186
1210
|
* launch-failure compensating action). The caller fires this ONLY on a
|
|
1187
1211
|
* POSITIVE determination the session is fresh/blank — never for
|
|
1188
1212
|
* unknown-but-possibly-valid continuity. */
|
|
1189
|
-
async rollbackToZeroSession(nodeId, sessionName, launchedSessionId, priorState, assertCurrent) {
|
|
1213
|
+
async rollbackToZeroSession(nodeId, sessionName, launchedSessionId, priorState, assertCurrent, keepPane = false) {
|
|
1190
1214
|
if (assertCurrent && !assertCurrent())
|
|
1191
1215
|
return false;
|
|
1192
|
-
|
|
1193
|
-
|
|
1216
|
+
if (!keepPane) {
|
|
1217
|
+
try {
|
|
1218
|
+
await this.tmuxAdapter.killSession(sessionName);
|
|
1219
|
+
}
|
|
1220
|
+
catch { /* best-effort — the row + projection rollback below is the source of truth */ }
|
|
1194
1221
|
}
|
|
1195
|
-
catch { /* best-effort — the row + projection rollback below is the source of truth */ }
|
|
1196
1222
|
if (assertCurrent && !assertCurrent())
|
|
1197
1223
|
return false;
|
|
1198
1224
|
if (launchedSessionId) {
|
|
@@ -1202,7 +1228,8 @@ export class RestoreOrchestrator {
|
|
|
1202
1228
|
catch { /* best-effort */ }
|
|
1203
1229
|
}
|
|
1204
1230
|
if (priorState) {
|
|
1205
|
-
|
|
1231
|
+
// Pane takeover already ended the predecessor; keep its retired status.
|
|
1232
|
+
this.restoreNodeState(nodeId, keepPane ? { ...priorState, sessions: [] } : priorState);
|
|
1206
1233
|
}
|
|
1207
1234
|
return true;
|
|
1208
1235
|
}
|
|
@@ -1251,11 +1278,22 @@ export class RestoreOrchestrator {
|
|
|
1251
1278
|
}
|
|
1252
1279
|
return restoreEffort.effort;
|
|
1253
1280
|
};
|
|
1281
|
+
// The model `rig seat set-model` saved after the snapshot is the newer choice, and it says so when it differs.
|
|
1282
|
+
let restoreModel;
|
|
1283
|
+
const modelForRestore = () => {
|
|
1284
|
+
if (restoreModel === undefined) {
|
|
1285
|
+
restoreModel = this.liveModel(rigId, node, selected?.nodeId);
|
|
1286
|
+
if (node.model && restoreModel !== node.model) {
|
|
1287
|
+
warnings?.push(`Restore: ${node.logicalId}: this restore launched the seat's saved model ${restoreModel}, not ${node.model} from the snapshot.`);
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
return restoreModel;
|
|
1291
|
+
};
|
|
1254
1292
|
// OPR.0.5.7.1 D1 — the active occupant is RESOLVED, never inferred from
|
|
1255
1293
|
// row ordering (cite site 2 of 2; "latest = max id" was the incident's
|
|
1256
1294
|
// defect: a superseded row with a newer ULID defeated the real occupant).
|
|
1257
1295
|
const selected = opts?.selectedHistory;
|
|
1258
|
-
const rollbackOwnBlank = async () => this.rollbackToZeroSession(node.id, sessionName, launchResult?.session.id, priorState, selected ? () => selected.beforeNative(launchResult?.session.id, launchResult?.binding.id) : undefined);
|
|
1296
|
+
const rollbackOwnBlank = async () => this.rollbackToZeroSession(node.id, sessionName, launchResult?.session.id, priorState, selected ? () => selected.beforeNative(launchResult?.session.id, launchResult?.binding.id) : undefined, opts?.keepPane);
|
|
1259
1297
|
const changedDuringRollback = () => ({ nodeId: node.id, logicalId: node.logicalId,
|
|
1260
1298
|
status: "attention_required", error: "The selected terminal or source changed during cleanup. Its current owner was preserved; inspect the partial launch before retrying." });
|
|
1261
1299
|
const selectedRows = selected ? data.sessions.filter(row => row.nodeId === node.id && row.id === selected.historySessionId) : [];
|
|
@@ -1379,7 +1417,7 @@ export class RestoreOrchestrator {
|
|
|
1379
1417
|
}
|
|
1380
1418
|
if (selected && !selected.beforeNative(launchedSessionId, launchResult?.binding.id))
|
|
1381
1419
|
return { nodeId: node.id, logicalId: node.logicalId, status: "attention_required", error: "The selected seat, settings or history changed after shell creation; native resume was not dispatched." };
|
|
1382
|
-
const resumeOutcome = await this.attemptResume(node.id, sessionName, resumeType, resumeToken, node.cwd ?? "/", this.liveCodexProfile(rigId, node, selected?.nodeId),
|
|
1420
|
+
const resumeOutcome = await this.attemptResume(node.id, sessionName, resumeType, resumeToken, node.cwd ?? "/", this.liveCodexProfile(rigId, node, selected?.nodeId), modelForRestore(), this.resolveRestorePosture(node.id, rigId), effortForRestore(), warnings, node.advisor, selected ? () => selected.beforeNative(launchedSessionId, launchResult?.binding.id) : undefined, opts?.claudeExecutable);
|
|
1383
1421
|
if (resumeOutcome.kind === "resumed") {
|
|
1384
1422
|
baseStatus = "resumed";
|
|
1385
1423
|
if (launchedSessionId && this.claudeResume.canResume(resumeType, resumeToken)) {
|
|
@@ -1603,6 +1641,7 @@ export class RestoreOrchestrator {
|
|
|
1603
1641
|
};
|
|
1604
1642
|
const binding = {
|
|
1605
1643
|
...launchResult.binding,
|
|
1644
|
+
...(opts?.claudeExecutable ? { claudeExecutable: opts.claudeExecutable } : {}),
|
|
1606
1645
|
cwd: node.cwd ?? ".",
|
|
1607
1646
|
codexConfigProfile: this.liveCodexProfile(rigId, node, selected?.nodeId) ?? undefined,
|
|
1608
1647
|
// OPR.0.4.8.3 Seam B: the pod-aware restore path binds the restored posture too
|
|
@@ -1614,7 +1653,7 @@ export class RestoreOrchestrator {
|
|
|
1614
1653
|
// the declared provider) passed nothing through ("No API key
|
|
1615
1654
|
// found" on every resumed Pi seat). Claude/Codex silently lost
|
|
1616
1655
|
// their -m/--model on restore the same way.
|
|
1617
|
-
model:
|
|
1656
|
+
model: modelForRestore() ?? undefined,
|
|
1618
1657
|
effort: effortForRestore() ?? undefined,
|
|
1619
1658
|
advisor: node.advisor ?? undefined,
|
|
1620
1659
|
};
|
|
@@ -1811,10 +1850,7 @@ export class RestoreOrchestrator {
|
|
|
1811
1850
|
}
|
|
1812
1851
|
// Legacy resume adapters do not write native metadata. Fill only the
|
|
1813
1852
|
// launched row's empty token after proof; never overwrite a hook/operator.
|
|
1814
|
-
|
|
1815
|
-
&& classifyPaneRuntimeMatch(identity.command, node.runtime) === "mismatch"
|
|
1816
|
-
&& isShellForeground(identity.command?.trim().toLowerCase() ?? "");
|
|
1817
|
-
if ((node.runtime === "codex" || provedClaudeWrapper || managedClaudeResume) && sessionId && resumeToken) {
|
|
1853
|
+
if ((node.runtime === "codex" || node.runtime === "claude-code") && sessionId && resumeToken) {
|
|
1818
1854
|
const current = this.db.prepare("SELECT node_id, session_name, status, resume_token FROM sessions WHERE id = ?").get(sessionId);
|
|
1819
1855
|
const sameSession = current?.node_id === node.id && current.session_name === sessionName && current.status === "running";
|
|
1820
1856
|
// Startup already retained the managed token. Recheck after the awaited
|
|
@@ -1924,6 +1960,16 @@ export class RestoreOrchestrator {
|
|
|
1924
1960
|
// minimum floor, explicitly — never undefined (which would delegate to ambient YOLO).
|
|
1925
1961
|
return "floor";
|
|
1926
1962
|
}
|
|
1963
|
+
/** The live seat's current model: `rig seat set-model` saves it on the live node after the snapshot, and every
|
|
1964
|
+
* managed resume reads it at call time, so an older snapshot can't bring back the model it replaced. Found by logical
|
|
1965
|
+
* id, as effort's restore does; a seat with no live row, or no model on it, keeps the snapshot's. */
|
|
1966
|
+
liveModel(rigId, node, selectedNodeId) {
|
|
1967
|
+
const row = this.db.prepare(selectedNodeId
|
|
1968
|
+
? "SELECT model FROM nodes WHERE id = ? AND rig_id = ? AND logical_id = ?"
|
|
1969
|
+
: "SELECT model FROM nodes WHERE rig_id = ? AND logical_id = ?")
|
|
1970
|
+
.get(...(selectedNodeId ? [selectedNodeId, rigId, node.logicalId] : [rigId, node.logicalId]));
|
|
1971
|
+
return row?.model ?? node.model ?? null;
|
|
1972
|
+
}
|
|
1927
1973
|
/** The live seat's current Codex profile: a setter change made after the snapshot is the newer choice, so an older
|
|
1928
1974
|
* snapshot can't bring back the profile it replaced. The seat is found by logical id, as effort's restore does; a
|
|
1929
1975
|
* seat with no live row keeps the snapshot's value. */
|
|
@@ -1937,7 +1983,7 @@ export class RestoreOrchestrator {
|
|
|
1937
1983
|
async attemptResume(nodeId, sessionName, resumeType, resumeToken, cwd, codexConfigProfile, model,
|
|
1938
1984
|
// OPR.0.4.8.3 Seam B: the seat's restored launch posture (persisted provenance,
|
|
1939
1985
|
// custom policies re-validated when readable). Absent = env decision.
|
|
1940
|
-
resolvedPosture, effort, warnings, advisor, beforeNative) {
|
|
1986
|
+
resolvedPosture, effort, warnings, advisor, beforeNative, claudeExecutable) {
|
|
1941
1987
|
const launchGeneration = this.sessionRegistry.currentOccupantTenure(nodeId)?.generationUuid;
|
|
1942
1988
|
const node = this.db.prepare("SELECT rig_id FROM nodes WHERE id = ?").get(nodeId);
|
|
1943
1989
|
const nonInterruptive = node ? this.rigRepo.getRigNonInterruptive(node.rig_id) : false;
|
|
@@ -1976,7 +2022,8 @@ export class RestoreOrchestrator {
|
|
|
1976
2022
|
const tail = claudePermissions !== undefined
|
|
1977
2023
|
? [...claudeTail, ...Array(5 - claudeTail.length).fill(undefined), launch.additions, claudePermissions]
|
|
1978
2024
|
: launch.additions ? [...claudeTail, ...Array(5 - claudeTail.length).fill(undefined), launch.additions] : claudeTail;
|
|
1979
|
-
const guardedTail = beforeNative ? [...tail, ...Array(Math.max(0, 7 - tail.length)).fill(undefined), beforeNative
|
|
2025
|
+
const guardedTail = beforeNative || claudeExecutable ? [...tail, ...Array(Math.max(0, 7 - tail.length)).fill(undefined), beforeNative,
|
|
2026
|
+
...(claudeExecutable ? [claudeExecutable] : [])] : tail;
|
|
1980
2027
|
if (beforeNative && !beforeNative())
|
|
1981
2028
|
return { kind: "attention_required", message: "The selected seat, settings or history changed during native preparation; resume was not dispatched." };
|
|
1982
2029
|
const result = await this.claudeResume.resume(sessionName, resumeType, resumeToken, cwd, resolvedPosture, model, permissionMode, nodeId, ...guardedTail);
|