@openrig/cli 0.7.17 → 0.7.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/daemon/assets/claude-hook-bridge.cjs +146 -0
- package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/README.md +1 -1
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +14 -14
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +43 -22
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +6 -0
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +23 -0
- package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +11 -0
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +95 -7
- package/daemon/assets/skills/rigs/SKILL.md +68 -33
- package/daemon/assets/skills/rigs/references/installing-for-someone.md +2 -2
- 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 +57 -14
- package/daemon/context-packs/reference/getting-started.md +9 -4
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +197 -1
- package/daemon/context-packs/reference/whats-new.md +187 -15
- 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/SKILL.md +23 -0
- 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-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/SKILL.md +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/SKILL.md +11 -0
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +95 -7
- 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 +9 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +57 -9
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +4 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +15 -5
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +5 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +45 -10
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts +8 -1
- package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
- package/daemon/dist/adapters/kernel-authority.js +45 -10
- package/daemon/dist/adapters/kernel-authority.js.map +1 -1
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +5 -7
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +47 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +84 -1
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +799 -16
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +7 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +29 -19
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux-credential-env.d.ts +4 -0
- package/daemon/dist/adapters/tmux-credential-env.d.ts.map +1 -0
- package/daemon/dist/adapters/tmux-credential-env.js +14 -0
- package/daemon/dist/adapters/tmux-credential-env.js.map +1 -0
- package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-exec.js +4 -3
- package/daemon/dist/adapters/tmux-exec.js.map +1 -1
- package/daemon/dist/adapters/tmux-server.d.ts +2 -2
- package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-server.js +12 -4
- package/daemon/dist/adapters/tmux-server.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +242 -14
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +966 -34
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/attention-surface.d.ts +4 -1
- package/daemon/dist/attention-surface.d.ts.map +1 -1
- package/daemon/dist/attention-surface.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 +14 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/171_claude_auto_mode.d.ts +4 -0
- package/daemon/dist/db/migrations/171_claude_auto_mode.d.ts.map +1 -0
- package/daemon/dist/db/migrations/171_claude_auto_mode.js +9 -0
- package/daemon/dist/db/migrations/171_claude_auto_mode.js.map +1 -0
- package/daemon/dist/db/migrations/171_node_input_route.d.ts +4 -0
- package/daemon/dist/db/migrations/171_node_input_route.d.ts.map +1 -0
- package/daemon/dist/db/migrations/171_node_input_route.js +6 -0
- package/daemon/dist/db/migrations/171_node_input_route.js.map +1 -0
- package/daemon/dist/db/migrations/171_seat_hook_bridge.d.ts +5 -0
- package/daemon/dist/db/migrations/171_seat_hook_bridge.d.ts.map +1 -0
- package/daemon/dist/db/migrations/171_seat_hook_bridge.js +25 -0
- package/daemon/dist/db/migrations/171_seat_hook_bridge.js.map +1 -0
- package/daemon/dist/db/migrations/172_queue_return_route.d.ts +3 -0
- package/daemon/dist/db/migrations/172_queue_return_route.d.ts.map +1 -0
- package/daemon/dist/db/migrations/172_queue_return_route.js +13 -0
- package/daemon/dist/db/migrations/172_queue_return_route.js.map +1 -0
- package/daemon/dist/db/migrations/173_node_process_limits.d.ts +4 -0
- package/daemon/dist/db/migrations/173_node_process_limits.d.ts.map +1 -0
- package/daemon/dist/db/migrations/173_node_process_limits.js +6 -0
- package/daemon/dist/db/migrations/173_node_process_limits.js.map +1 -0
- package/daemon/dist/db/migrations/174_session_launched_cwd.d.ts +6 -0
- package/daemon/dist/db/migrations/174_session_launched_cwd.d.ts.map +1 -0
- package/daemon/dist/db/migrations/174_session_launched_cwd.js +8 -0
- package/daemon/dist/db/migrations/174_session_launched_cwd.js.map +1 -0
- package/daemon/dist/db/migrations/175_core_app_access.d.ts +3 -0
- package/daemon/dist/db/migrations/175_core_app_access.d.ts.map +1 -0
- package/daemon/dist/db/migrations/175_core_app_access.js +26 -0
- package/daemon/dist/db/migrations/175_core_app_access.js.map +1 -0
- package/daemon/dist/domain/activity-grants.d.ts.map +1 -1
- package/daemon/dist/domain/activity-grants.js +8 -4
- package/daemon/dist/domain/activity-grants.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +59 -1
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +250 -4
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-images/resume-token-discovery.d.ts +10 -0
- package/daemon/dist/domain/agent-images/resume-token-discovery.d.ts.map +1 -1
- package/daemon/dist/domain/agent-images/resume-token-discovery.js +21 -0
- package/daemon/dist/domain/agent-images/resume-token-discovery.js.map +1 -1
- package/daemon/dist/domain/applied-launch-observation-store.d.ts +5 -0
- package/daemon/dist/domain/applied-launch-observation-store.d.ts.map +1 -1
- package/daemon/dist/domain/applied-launch-observation-store.js +57 -21
- package/daemon/dist/domain/applied-launch-observation-store.js.map +1 -1
- package/daemon/dist/domain/builtin-startup-files.d.ts +26 -12
- package/daemon/dist/domain/builtin-startup-files.d.ts.map +1 -1
- package/daemon/dist/domain/builtin-startup-files.js +73 -34
- package/daemon/dist/domain/builtin-startup-files.js.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.d.ts +4 -2
- package/daemon/dist/domain/claude-activity-hooks.d.ts.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.js +5 -3
- package/daemon/dist/domain/claude-activity-hooks.js.map +1 -1
- package/daemon/dist/domain/claude-auto-mode.d.ts +64 -0
- package/daemon/dist/domain/claude-auto-mode.d.ts.map +1 -0
- package/daemon/dist/domain/claude-auto-mode.js +114 -0
- package/daemon/dist/domain/claude-auto-mode.js.map +1 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +66 -3
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +214 -10
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-continuation-launch.d.ts +5 -1
- package/daemon/dist/domain/claude-continuation-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-continuation-launch.js +51 -2
- package/daemon/dist/domain/claude-continuation-launch.js.map +1 -1
- package/daemon/dist/domain/claude-core-plugin-env.d.ts +7 -3
- package/daemon/dist/domain/claude-core-plugin-env.d.ts.map +1 -1
- package/daemon/dist/domain/claude-core-plugin-env.js +11 -8
- package/daemon/dist/domain/claude-core-plugin-env.js.map +1 -1
- package/daemon/dist/domain/codex-daemon-support.d.ts.map +1 -1
- package/daemon/dist/domain/codex-daemon-support.js +6 -1
- package/daemon/dist/domain/codex-daemon-support.js.map +1 -1
- package/daemon/dist/domain/community-harness-launch-result.d.ts +2 -0
- package/daemon/dist/domain/community-harness-launch-result.d.ts.map +1 -1
- package/daemon/dist/domain/community-harness-launch-result.js +5 -1
- package/daemon/dist/domain/community-harness-launch-result.js.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts +3 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.js +22 -3
- package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
- package/daemon/dist/domain/configured-account.d.ts +3 -0
- package/daemon/dist/domain/configured-account.d.ts.map +1 -0
- package/daemon/dist/domain/configured-account.js +10 -0
- package/daemon/dist/domain/configured-account.js.map +1 -0
- package/daemon/dist/domain/connection-contract.d.ts +91 -0
- package/daemon/dist/domain/connection-contract.d.ts.map +1 -1
- package/daemon/dist/domain/connection-contract.js +73 -0
- package/daemon/dist/domain/connection-contract.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts +5 -0
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +37 -2
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/core-app-access.d.ts +51 -0
- package/daemon/dist/domain/core-app-access.d.ts.map +1 -0
- package/daemon/dist/domain/core-app-access.js +107 -0
- package/daemon/dist/domain/core-app-access.js.map +1 -0
- package/daemon/dist/domain/core-app-job.d.ts +411 -0
- package/daemon/dist/domain/core-app-job.d.ts.map +1 -0
- package/daemon/dist/domain/core-app-job.js +537 -0
- package/daemon/dist/domain/core-app-job.js.map +1 -0
- package/daemon/dist/domain/current-park-arm.d.ts +4 -0
- package/daemon/dist/domain/current-park-arm.d.ts.map +1 -0
- package/daemon/dist/domain/current-park-arm.js +14 -0
- package/daemon/dist/domain/current-park-arm.js.map +1 -0
- package/daemon/dist/domain/current-work.d.ts +6 -1
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +41 -8
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/cwd-resolution.d.ts +14 -0
- package/daemon/dist/domain/cwd-resolution.d.ts.map +1 -1
- package/daemon/dist/domain/cwd-resolution.js +28 -3
- package/daemon/dist/domain/cwd-resolution.js.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.js +5 -1
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
- package/daemon/dist/domain/errors.d.ts +4 -0
- package/daemon/dist/domain/errors.d.ts.map +1 -1
- package/daemon/dist/domain/errors.js +7 -0
- package/daemon/dist/domain/errors.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +17 -4
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/existing-rig-restore.d.ts +2 -0
- package/daemon/dist/domain/existing-rig-restore.d.ts.map +1 -1
- package/daemon/dist/domain/existing-rig-restore.js +1 -0
- package/daemon/dist/domain/existing-rig-restore.js.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js +107 -3
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/participants.d.ts +2 -0
- package/daemon/dist/domain/gateway/participants.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/participants.js +5 -1
- package/daemon/dist/domain/gateway/participants.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/capabilities.d.ts +9 -1
- package/daemon/dist/domain/gateway/slack/capabilities.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/capabilities.js +6 -1
- package/daemon/dist/domain/gateway/slack/capabilities.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound-admission.js +1 -1
- package/daemon/dist/domain/gateway/slack/inbound-admission.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 +15 -1
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/manifest.d.ts +5 -1
- package/daemon/dist/domain/gateway/slack/manifest.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/manifest.js +12 -3
- package/daemon/dist/domain/gateway/slack/manifest.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +41 -18
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +1 -0
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.js +6 -5
- package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +7 -2
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +2 -0
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +4 -0
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +26 -2
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/harness-not-started-notice.d.ts +36 -0
- package/daemon/dist/domain/harness-not-started-notice.d.ts.map +1 -0
- package/daemon/dist/domain/harness-not-started-notice.js +81 -0
- package/daemon/dist/domain/harness-not-started-notice.js.map +1 -0
- package/daemon/dist/domain/hook-bridge.d.ts +345 -0
- package/daemon/dist/domain/hook-bridge.d.ts.map +1 -0
- package/daemon/dist/domain/hook-bridge.js +547 -0
- package/daemon/dist/domain/hook-bridge.js.map +1 -0
- package/daemon/dist/domain/hosted-wake.d.ts +9 -0
- package/daemon/dist/domain/hosted-wake.d.ts.map +1 -1
- package/daemon/dist/domain/hosted-wake.js +45 -6
- package/daemon/dist/domain/hosted-wake.js.map +1 -1
- package/daemon/dist/domain/hot-potato-enforcer.d.ts +1 -1
- package/daemon/dist/domain/human-ask-attention.d.ts +10 -0
- package/daemon/dist/domain/human-ask-attention.d.ts.map +1 -0
- package/daemon/dist/domain/human-ask-attention.js +22 -0
- package/daemon/dist/domain/human-ask-attention.js.map +1 -0
- package/daemon/dist/domain/input-read-diagnostic.js +1 -1
- package/daemon/dist/domain/input-read-diagnostic.js.map +1 -1
- package/daemon/dist/domain/instance-initialization.d.ts +2 -0
- package/daemon/dist/domain/instance-initialization.d.ts.map +1 -1
- package/daemon/dist/domain/instance-initialization.js +2 -1
- package/daemon/dist/domain/instance-initialization.js.map +1 -1
- package/daemon/dist/domain/member-connection.d.ts +14 -0
- package/daemon/dist/domain/member-connection.d.ts.map +1 -0
- package/daemon/dist/domain/member-connection.js +34 -0
- package/daemon/dist/domain/member-connection.js.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts +4 -0
- package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-action-log.js +8 -1
- package/daemon/dist/domain/mission-control/mission-control-action-log.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +10 -0
- 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 +64 -12
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.d.ts +3 -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 +32 -7
- package/daemon/dist/domain/model-divergence/current-model-reader.js.map +1 -1
- package/daemon/dist/domain/native-continuation-notice.d.ts +16 -0
- package/daemon/dist/domain/native-continuation-notice.d.ts.map +1 -0
- package/daemon/dist/domain/native-continuation-notice.js +79 -0
- package/daemon/dist/domain/native-continuation-notice.js.map +1 -0
- package/daemon/dist/domain/native-permission-store.d.ts +6 -2
- 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 +16 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +48 -3
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +5 -0
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +94 -10
- 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 +11 -2
- package/daemon/dist/domain/network/network-connector.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +55 -6
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +14 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +35 -6
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/outbox-handler.d.ts +69 -1
- package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/outbox-handler.js +337 -3
- package/daemon/dist/domain/outbox-handler.js.map +1 -1
- package/daemon/dist/domain/park-wake-text.d.ts +18 -0
- package/daemon/dist/domain/park-wake-text.d.ts.map +1 -1
- package/daemon/dist/domain/park-wake-text.js +44 -0
- package/daemon/dist/domain/park-wake-text.js.map +1 -1
- package/daemon/dist/domain/parked-query.d.ts.map +1 -1
- package/daemon/dist/domain/parked-query.js +3 -1
- package/daemon/dist/domain/parked-query.js.map +1 -1
- package/daemon/dist/domain/permission-account.d.ts +28 -1
- package/daemon/dist/domain/permission-account.d.ts.map +1 -1
- package/daemon/dist/domain/permission-account.js +55 -11
- package/daemon/dist/domain/permission-account.js.map +1 -1
- package/daemon/dist/domain/permission-drift.d.ts +2 -0
- package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift.js.map +1 -1
- package/daemon/dist/domain/pi-compaction-request-store.d.ts +16 -0
- package/daemon/dist/domain/pi-compaction-request-store.d.ts.map +1 -0
- package/daemon/dist/domain/pi-compaction-request-store.js +40 -0
- package/daemon/dist/domain/pi-compaction-request-store.js.map +1 -0
- package/daemon/dist/domain/pi-compaction-service.d.ts +82 -0
- package/daemon/dist/domain/pi-compaction-service.d.ts.map +1 -0
- package/daemon/dist/domain/pi-compaction-service.js +229 -0
- package/daemon/dist/domain/pi-compaction-service.js.map +1 -0
- package/daemon/dist/domain/policies/idle-gate-qitem.d.ts +3 -0
- package/daemon/dist/domain/policies/idle-gate-qitem.d.ts.map +1 -1
- package/daemon/dist/domain/policies/idle-gate-qitem.js +15 -0
- package/daemon/dist/domain/policies/idle-gate-qitem.js.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +6 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +28 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/process-limits.d.ts +47 -0
- package/daemon/dist/domain/process-limits.d.ts.map +1 -0
- package/daemon/dist/domain/process-limits.js +123 -0
- package/daemon/dist/domain/process-limits.js.map +1 -0
- package/daemon/dist/domain/process-table.d.ts +24 -0
- package/daemon/dist/domain/process-table.d.ts.map +1 -1
- package/daemon/dist/domain/process-table.js +60 -4
- package/daemon/dist/domain/process-table.js.map +1 -1
- package/daemon/dist/domain/proof/judgments.d.ts +7 -0
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +27 -1
- package/daemon/dist/domain/proof/judgments.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +2 -1
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +6 -1
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-erasure.d.ts +11 -6
- package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
- package/daemon/dist/domain/queue-erasure.js +47 -21
- package/daemon/dist/domain/queue-erasure.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +122 -21
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +448 -101
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +5 -0
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +74 -13
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +5 -3
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +9 -6
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js +28 -3
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +20 -0
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +264 -25
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts +10 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.js +79 -12
- package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
- package/daemon/dist/domain/reconciler.d.ts +18 -2
- package/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/reconciler.js +40 -0
- package/daemon/dist/domain/reconciler.js.map +1 -1
- package/daemon/dist/domain/restore-attempt-receipt.d.ts.map +1 -1
- package/daemon/dist/domain/restore-attempt-receipt.js +3 -2
- package/daemon/dist/domain/restore-attempt-receipt.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +10 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +76 -3
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +65 -3
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +311 -55
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts +28 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.js +17 -5
- package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
- package/daemon/dist/domain/restore-preconditions.d.ts +24 -0
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +61 -1
- package/daemon/dist/domain/restore-preconditions.js.map +1 -1
- package/daemon/dist/domain/restore-topology.d.ts +7 -1
- package/daemon/dist/domain/restore-topology.d.ts.map +1 -1
- package/daemon/dist/domain/restore-topology.js +21 -0
- package/daemon/dist/domain/restore-topology.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +2 -3
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +6 -25
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/resume-token-validation.d.ts +3 -1
- package/daemon/dist/domain/resume-token-validation.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-validation.js +6 -3
- package/daemon/dist/domain/resume-token-validation.js.map +1 -1
- package/daemon/dist/domain/return-route.d.ts +73 -0
- package/daemon/dist/domain/return-route.d.ts.map +1 -0
- package/daemon/dist/domain/return-route.js +124 -0
- package/daemon/dist/domain/return-route.js.map +1 -0
- package/daemon/dist/domain/rig-expansion-service.js +1 -1
- package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +12 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +74 -0
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +20 -5
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +105 -22
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-codec.js +9 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts +6 -0
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +30 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +27 -2
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +95 -26
- 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 +44 -1
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/rosters.d.ts +23 -0
- package/daemon/dist/domain/rosters.d.ts.map +1 -1
- package/daemon/dist/domain/rosters.js +37 -5
- package/daemon/dist/domain/rosters.js.map +1 -1
- package/daemon/dist/domain/runner-channel.d.ts +65 -0
- package/daemon/dist/domain/runner-channel.d.ts.map +1 -0
- package/daemon/dist/domain/runner-channel.js +348 -0
- package/daemon/dist/domain/runner-channel.js.map +1 -0
- package/daemon/dist/domain/runner-grant-launch.js +2 -2
- package/daemon/dist/domain/runner-permissions.d.ts +26 -3
- package/daemon/dist/domain/runner-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/runner-permissions.js +160 -39
- package/daemon/dist/domain/runner-permissions.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +2 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.js +4 -3
- package/daemon/dist/domain/runtime-switch-materials.js.map +1 -1
- package/daemon/dist/domain/scope/mission-parent.d.ts +19 -0
- package/daemon/dist/domain/scope/mission-parent.d.ts.map +1 -0
- package/daemon/dist/domain/scope/mission-parent.js +134 -0
- package/daemon/dist/domain/scope/mission-parent.js.map +1 -0
- package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.js +63 -3
- package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
- package/daemon/dist/domain/scope/types.d.ts +3 -1
- package/daemon/dist/domain/scope/types.d.ts.map +1 -1
- package/daemon/dist/domain/scope/types.js +5 -1
- package/daemon/dist/domain/scope/types.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +6 -4
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +17 -10
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +14 -2
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +55 -15
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +27 -4
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +210 -65
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts +12 -4
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +92 -17
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +31 -6
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +172 -24
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +9 -2
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +38 -3
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts +4 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.js +11 -3
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-skill-apply.d.ts +1 -1
- package/daemon/dist/domain/seat-skill-apply.d.ts.map +1 -1
- package/daemon/dist/domain/seat-skill-apply.js +3 -2
- package/daemon/dist/domain/seat-skill-apply.js.map +1 -1
- package/daemon/dist/domain/seat-status-service.d.ts +4 -0
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +31 -6
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +5 -1
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +12 -1
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +56 -4
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +344 -18
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/shared-conversation.d.ts +58 -0
- package/daemon/dist/domain/shared-conversation.d.ts.map +1 -0
- package/daemon/dist/domain/shared-conversation.js +98 -0
- package/daemon/dist/domain/shared-conversation.js.map +1 -0
- package/daemon/dist/domain/shared-history-selection.d.ts.map +1 -1
- package/daemon/dist/domain/shared-history-selection.js +9 -5
- package/daemon/dist/domain/shared-history-selection.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +4 -0
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +1 -0
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +6 -4
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-phase-timing.d.ts +19 -0
- package/daemon/dist/domain/startup-phase-timing.d.ts.map +1 -0
- package/daemon/dist/domain/startup-phase-timing.js +23 -0
- package/daemon/dist/domain/startup-phase-timing.js.map +1 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts +9 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +33 -10
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/team-operations.d.ts +6 -6
- package/daemon/dist/domain/team-operations.d.ts.map +1 -1
- package/daemon/dist/domain/team-operations.js +2 -4
- package/daemon/dist/domain/team-operations.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +35 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +231 -33
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-app-provider.d.ts +6 -0
- package/daemon/dist/domain/terminal/herdr-app-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-app-provider.js +23 -1
- package/daemon/dist/domain/terminal/herdr-app-provider.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-sessions.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-sessions.js +2 -1
- package/daemon/dist/domain/terminal/herdr-sessions.js.map +1 -1
- package/daemon/dist/domain/terminal/rig-viewer-records.d.ts +59 -0
- package/daemon/dist/domain/terminal/rig-viewer-records.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/rig-viewer-records.js +210 -0
- package/daemon/dist/domain/terminal/rig-viewer-records.js.map +1 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +2 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +99 -4
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +556 -36
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/tile-layout.js +1 -1
- package/daemon/dist/domain/terminal/tile-layout.js.map +1 -1
- package/daemon/dist/domain/terminal/tmux-viewer-guard.d.ts +25 -0
- package/daemon/dist/domain/terminal/tmux-viewer-guard.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/tmux-viewer-guard.js +70 -0
- package/daemon/dist/domain/terminal/tmux-viewer-guard.js.map +1 -0
- package/daemon/dist/domain/terminal-policy.js +1 -1
- package/daemon/dist/domain/terminal-policy.js.map +1 -1
- package/daemon/dist/domain/transcript-grep-worker.d.ts +2 -0
- package/daemon/dist/domain/transcript-grep-worker.d.ts.map +1 -0
- package/daemon/dist/domain/transcript-grep-worker.js +108 -0
- package/daemon/dist/domain/transcript-grep-worker.js.map +1 -0
- package/daemon/dist/domain/transcript-grep.d.ts +26 -0
- package/daemon/dist/domain/transcript-grep.d.ts.map +1 -0
- package/daemon/dist/domain/transcript-grep.js +90 -0
- package/daemon/dist/domain/transcript-grep.js.map +1 -0
- package/daemon/dist/domain/transcript-store.d.ts +8 -2
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +10 -60
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +149 -5
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts +4 -0
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-delivery-receipts.js +35 -2
- package/daemon/dist/domain/watchdog-delivery-receipts.js.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.d.ts +45 -1
- package/daemon/dist/domain/watchdog-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.js +66 -5
- package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
- package/daemon/dist/domain/watchdog-history-log.d.ts +12 -0
- package/daemon/dist/domain/watchdog-history-log.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-history-log.js +19 -1
- package/daemon/dist/domain/watchdog-history-log.js.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +32 -0
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +79 -0
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +22 -3
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +33 -9
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +1 -1
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +13 -1
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +68 -9
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-step-trail-log.d.ts +2 -2
- package/daemon/dist/domain/workflow-step-trail-log.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-step-trail-log.js.map +1 -1
- package/daemon/dist/domain/workflow-types.d.ts +3 -1
- package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-types.js.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts +7 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js +35 -7
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
- package/daemon/dist/gateway-slack-surface.d.ts +2 -2
- package/daemon/dist/gateway-slack-surface.d.ts.map +1 -1
- package/daemon/dist/gateway-slack-surface.js +1 -1
- package/daemon/dist/gateway-slack-surface.js.map +1 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +17 -2
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts +3 -0
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +3 -1
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/mission-parent-surface.d.ts +2 -0
- package/daemon/dist/mission-parent-surface.d.ts.map +1 -0
- package/daemon/dist/mission-parent-surface.js +2 -0
- package/daemon/dist/mission-parent-surface.js.map +1 -0
- package/daemon/dist/routes/activity.d.ts +18 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +150 -9
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/agent-images.d.ts.map +1 -1
- package/daemon/dist/routes/agent-images.js +6 -1
- package/daemon/dist/routes/agent-images.js.map +1 -1
- package/daemon/dist/routes/attention.d.ts.map +1 -1
- package/daemon/dist/routes/attention.js +194 -176
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +46 -7
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/core-app.d.ts +10 -0
- package/daemon/dist/routes/core-app.d.ts.map +1 -0
- package/daemon/dist/routes/core-app.js +175 -0
- package/daemon/dist/routes/core-app.js.map +1 -0
- package/daemon/dist/routes/hook-bridge.d.ts +3 -0
- package/daemon/dist/routes/hook-bridge.d.ts.map +1 -0
- package/daemon/dist/routes/hook-bridge.js +158 -0
- package/daemon/dist/routes/hook-bridge.js.map +1 -0
- package/daemon/dist/routes/missions.d.ts.map +1 -1
- package/daemon/dist/routes/missions.js +14 -2
- package/daemon/dist/routes/missions.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts +4 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +239 -38
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/require-sender-identity.d.ts +4 -3
- package/daemon/dist/routes/require-sender-identity.d.ts.map +1 -1
- package/daemon/dist/routes/require-sender-identity.js.map +1 -1
- package/daemon/dist/routes/restore-check.d.ts.map +1 -1
- package/daemon/dist/routes/restore-check.js +1 -0
- package/daemon/dist/routes/restore-check.js.map +1 -1
- package/daemon/dist/routes/rigspec.d.ts.map +1 -1
- package/daemon/dist/routes/rigspec.js +24 -4
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
- package/daemon/dist/routes/scope-audit.js +7 -1
- package/daemon/dist/routes/scope-audit.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +133 -6
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.js +14 -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 +21 -2
- package/daemon/dist/routes/slices.js.map +1 -1
- package/daemon/dist/routes/startup.js +9 -2
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/terminal.d.ts.map +1 -1
- package/daemon/dist/routes/terminal.js +47 -6
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/routes/transcripts.d.ts.map +1 -1
- package/daemon/dist/routes/transcripts.js +16 -1
- package/daemon/dist/routes/transcripts.js.map +1 -1
- package/daemon/dist/routes/up.d.ts.map +1 -1
- package/daemon/dist/routes/up.js +14 -4
- 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 +21 -3
- 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 +5 -0
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts +5 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +22 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +140 -48
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/terminal-viewer-guard-surface.d.ts +2 -0
- package/daemon/dist/terminal-viewer-guard-surface.d.ts.map +1 -0
- package/daemon/dist/terminal-viewer-guard-surface.js +2 -0
- package/daemon/dist/terminal-viewer-guard-surface.js.map +1 -0
- package/daemon/docs/reference/agent-startup-guide.md +5 -1
- package/daemon/docs/reference/claude-status-line.md +3 -2
- package/daemon/docs/reference/community-harness-examples/cursor/openrig-cursor-launch +6 -0
- package/daemon/docs/reference/community-harness-examples/dsh/README.md +8 -0
- package/daemon/docs/reference/community-harness-examples/dsh/openrig-dsh-runner.mjs +310 -20
- package/daemon/docs/reference/community-harness-examples/hermes/openrig-hermes-launch +6 -0
- package/daemon/docs/reference/community-harness-examples/openclaw/openrig-openclaw-launch +6 -0
- package/daemon/docs/reference/community-harness-examples/openshell/README.md +2 -0
- package/daemon/docs/reference/community-harness-examples/pi-tui/openrig-pi-tui-launch +6 -0
- package/daemon/docs/reference/community-harness-presets.md +7 -4
- package/daemon/docs/reference/core-app.md +212 -0
- package/daemon/docs/reference/daemon-http-clients.md +67 -12
- package/daemon/docs/reference/getting-started.md +9 -4
- package/daemon/docs/reference/harness-runner-contract.md +140 -4
- package/daemon/docs/reference/herdr-app.md +6 -0
- package/daemon/docs/reference/hosted-members.md +21 -1
- package/daemon/docs/reference/quickstart.md +4 -3
- package/daemon/docs/reference/rig-spec.md +197 -1
- package/daemon/docs/reference/rosters.md +17 -0
- package/daemon/docs/reference/sdlc-conventions.md +47 -6
- package/daemon/docs/reference/seat-delivery.md +87 -6
- package/daemon/docs/reference/slack-app-setup.md +39 -21
- package/daemon/docs/reference/terminal-sessions.md +99 -1
- package/daemon/docs/reference/whats-new.md +187 -15
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +23 -0
- package/daemon/specs/rigs/launch/factory/guidance/lead-first-move.md +27 -5
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +32 -8
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +1 -1
- package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +12 -0
- package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +27 -5
- package/dist/acp/connector.js +1 -1
- package/dist/acp/connector.js.map +1 -1
- package/dist/ask-wake.d.ts.map +1 -1
- package/dist/ask-wake.js +8 -1
- package/dist/ask-wake.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/cli-error.d.ts.map +1 -1
- package/dist/cli-error.js +7 -1
- package/dist/cli-error.js.map +1 -1
- package/dist/client.d.ts +2 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -2
- package/dist/client.js.map +1 -1
- package/dist/commands/archive.js +1 -1
- package/dist/commands/archive.js.map +1 -1
- package/dist/commands/ask.d.ts.map +1 -1
- package/dist/commands/ask.js +92 -11
- package/dist/commands/ask.js.map +1 -1
- package/dist/commands/broadcast.js +9 -5
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/compact.d.ts +3 -4
- package/dist/commands/compact.d.ts.map +1 -1
- package/dist/commands/compact.js +76 -16
- package/dist/commands/compact.js.map +1 -1
- package/dist/commands/config-init-workspace.d.ts.map +1 -1
- package/dist/commands/config-init-workspace.js +3 -0
- package/dist/commands/config-init-workspace.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +7 -0
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +8 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +2 -1
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/fork.d.ts.map +1 -1
- package/dist/commands/fork.js +2 -0
- package/dist/commands/fork.js.map +1 -1
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +11 -3
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/ps.d.ts +30 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +85 -6
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +309 -21
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/rig.d.ts +2 -0
- package/dist/commands/rig.d.ts.map +1 -1
- package/dist/commands/rig.js +36 -2
- package/dist/commands/rig.js.map +1 -1
- package/dist/commands/roster.d.ts +8 -0
- package/dist/commands/roster.d.ts.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +346 -9
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +213 -12
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts +2 -0
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +50 -7
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.js +2 -2
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/slack.d.ts +2 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +38 -2
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/terminal.d.ts +56 -0
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +199 -9
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/transcript.js +1 -1
- package/dist/commands/transcript.js.map +1 -1
- package/dist/commands/unarchive.js +1 -1
- package/dist/commands/unarchive.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +3 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/workflow-follow.d.ts +3 -1
- package/dist/commands/workflow-follow.d.ts.map +1 -1
- package/dist/commands/workflow-follow.js +25 -6
- package/dist/commands/workflow-follow.js.map +1 -1
- package/dist/commands/workflow-render.d.ts.map +1 -1
- package/dist/commands/workflow-render.js +5 -1
- package/dist/commands/workflow-render.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +18 -4
- package/dist/commands/workflow.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +12 -0
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/lib/model-observation.d.ts.map +1 -1
- package/dist/lib/model-observation.js +9 -3
- package/dist/lib/model-observation.js.map +1 -1
- package/dist/lib/scope/mission-composition.d.ts +1 -0
- package/dist/lib/scope/mission-composition.d.ts.map +1 -1
- package/dist/lib/scope/mission-composition.js +14 -0
- package/dist/lib/scope/mission-composition.js.map +1 -1
- package/dist/lib/scope/scope-audit.d.ts.map +1 -1
- package/dist/lib/scope/scope-audit.js +63 -3
- package/dist/lib/scope/scope-audit.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts +10 -0
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +60 -0
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/scope/types.d.ts +3 -1
- package/dist/lib/scope/types.d.ts.map +1 -1
- package/dist/lib/scope/types.js +5 -1
- package/dist/lib/scope/types.js.map +1 -1
- package/dist/local-db.d.ts +5 -0
- package/dist/local-db.d.ts.map +1 -0
- package/dist/local-db.js +23 -0
- package/dist/local-db.js.map +1 -0
- package/dist/local-origin.d.ts.map +1 -1
- package/dist/local-origin.js +2 -17
- package/dist/local-origin.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +138 -24
- package/dist/mcp-server.js.map +1 -1
- package/dist/restore-packet/packet-writer.d.ts.map +1 -1
- package/dist/restore-packet/packet-writer.js +8 -5
- package/dist/restore-packet/packet-writer.js.map +1 -1
- package/dist/sender-identity.d.ts +18 -6
- package/dist/sender-identity.d.ts.map +1 -1
- package/dist/sender-identity.js +67 -7
- package/dist/sender-identity.js.map +1 -1
- package/dist/terminal-window-rex.d.ts +1 -1
- package/dist/terminal-window-rex.d.ts.map +1 -1
- package/dist/terminal-window-rex.js +3 -2
- package/dist/terminal-window-rex.js.map +1 -1
- package/dist/terminal-window.d.ts +2 -1
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +570 -44
- package/dist/terminal-window.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/daemon-client.d.ts +4 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +2 -1
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/execution/execution-model.d.ts.map +1 -1
- package/tui/dist/execution/execution-model.js +22 -5
- package/tui/dist/execution/execution-model.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +6 -3
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/navigator.d.ts +1 -1
- package/tui/dist/navigator.d.ts.map +1 -1
- package/tui/dist/navigator.js +4 -2
- package/tui/dist/navigator.js.map +1 -1
- package/tui/dist/pulse/render-pulse.d.ts.map +1 -1
- package/tui/dist/pulse/render-pulse.js +7 -14
- package/tui/dist/pulse/render-pulse.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +29 -21
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/stylize.d.ts.map +1 -1
- package/tui/dist/stylize.js +3 -3
- package/tui/dist/stylize.js.map +1 -1
- package/tui/dist/terminals/terminal-model.d.ts +1 -0
- package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
- package/tui/dist/terminals/terminal-model.js +4 -2
- package/tui/dist/terminals/terminal-model.js.map +1 -1
- package/tui/dist/types.d.ts +1 -0
- package/tui/dist/types.d.ts.map +1 -1
- package/tui/dist/visual-layout.d.ts +3 -0
- package/tui/dist/visual-layout.d.ts.map +1 -1
- package/tui/dist/visual-layout.js +17 -0
- package/tui/dist/visual-layout.js.map +1 -1
- package/ui/dist/assets/{index-BvUEh33d.js → index-B-sMy02c.js} +116 -116
- package/ui/dist/assets/{index-BX8TUZ0E.css → index-DiN7RwWg.css} +1 -1
- package/ui/dist/index.html +2 -2
|
@@ -2,13 +2,16 @@ import { captureClaudeContinuation } from "./claude-continuation-launch.js";
|
|
|
2
2
|
import { observeSolePane } from "./pane-binding-observation.js";
|
|
3
3
|
import { automaticRestoreOverrides } from "./existing-rig-restore.js";
|
|
4
4
|
import { restoreRuntimeCompatibilityError } from "./restore-runtime-compatibility.js";
|
|
5
|
-
import { leftAttachedReason } from "./restore-plan-preview.js";
|
|
5
|
+
import { leftAttachedReason, restorePermissionSeat } from "./restore-plan-preview.js";
|
|
6
|
+
import { planRestorePermission } from "./permission-account.js";
|
|
6
7
|
import { assessSnapshotCurrentOccupants, stoppedSnapshotReason } from "./rehydrate-eligibility.js";
|
|
7
8
|
import { nonInterruptiveNotice, nonInterruptiveSummary } from "../adapters/non-interruptive.js";
|
|
8
9
|
import { planModelAliasNotice } from "../adapters/yolo-mode.js";
|
|
9
10
|
import { effortPrecedence, readSeatEffort } from "./seat-effort.js";
|
|
11
|
+
import { createHash } from "node:crypto";
|
|
10
12
|
import { accessSync, constants, existsSync, mkdirSync, readFileSync, realpathSync, statSync, writeFileSync } from "node:fs";
|
|
11
13
|
import { dirname, isAbsolute, join } from "node:path";
|
|
14
|
+
import { folderPresent, insideMissingFolder } from "./cwd-resolution.js";
|
|
12
15
|
import { SEAT_SKILLS_BOOTSTRAP_BLOCK_ID, ensureSeatSkillPlugin, followSeatSkills, hasFollowingSeatSkills, hasSeatSkillRecords, rehydrateSeatSkills, seatSkillPaths, seatSkillPathsForNode, seatCatalogKeptNote, seatSkillReplay, writeSeatSkillCatalog, writeSeatSkillRouter, seatRouterKeptNote } from "./seat-skill-storage.js";
|
|
13
16
|
import { NativePermissionStore } from "./native-permission-store.js";
|
|
14
17
|
import { readSeatClaudeMcp } from "./claude-mcp.js";
|
|
@@ -16,6 +19,7 @@ import { isLaunchWrapperRuntime, readSeatLaunchWrapper } from "./launch-wrapper.
|
|
|
16
19
|
import { resolvePersistedRestorePosture } from "./permission-policy/persisted-restore-posture.js";
|
|
17
20
|
import { claudeResumeRotation } from "./session-registry.js";
|
|
18
21
|
import { NO_TERMINAL_LAUNCH_CODES, NOTHING_STOPPED_LAUNCH_CODES } from "./node-launcher.js";
|
|
22
|
+
import { noticeLine } from "../adapters/tmux.js";
|
|
19
23
|
import { seatRuntimeHome } from "./seat-runtime-home.js";
|
|
20
24
|
import { readFreshOccupantRelations } from "./fresh-occupant-relation.js";
|
|
21
25
|
import { assessNativeResumeProbe } from "./native-resume-probe.js";
|
|
@@ -31,10 +35,14 @@ import { AppliedLaunchObservationStore } from "./applied-launch-observation-stor
|
|
|
31
35
|
import { isShellForeground } from "./shell-classifier.js";
|
|
32
36
|
import { rebindAndVerifyPaneIdentity } from "./seat-attention-reconciler.js";
|
|
33
37
|
import { SeatIdentityStore } from "./seat-identity-store.js";
|
|
34
|
-
import { SEAT_STARTUP_BLOCKERS, validatePreRestore } from "./restore-preconditions.js";
|
|
38
|
+
import { SEAT_STARTUP_BLOCKERS, resumingConversationSeats, validatePreRestore } from "./restore-preconditions.js";
|
|
39
|
+
import { describePartners, holdsRecordedConversation, pairableConversation } from "./shared-conversation.js";
|
|
40
|
+
import { getNodeInventoryForRigs } from "./node-inventory.js";
|
|
35
41
|
import { resolveSnapshotRestoreTopology } from "./restore-topology.js";
|
|
36
42
|
// Only these edge kinds constrain launch order
|
|
37
43
|
const LAUNCH_DEPENDENCY_KINDS = new Set(["delegates_to", "spawned_by"]);
|
|
44
|
+
/** A subset launch's refusal (selection_changed) for a saved seat no current seat matches by both id and logical id. */
|
|
45
|
+
const SNAPSHOT_SEAT_CHANGED = "A snapshot seat was removed or recreated. Select history for the current seat.";
|
|
38
46
|
// OPR.0.5.7.1 consumer alignment: the four-way active-occupant ladder lives
|
|
39
47
|
// in the pure leaf module active-occupant.ts, shared with preview, snapshot
|
|
40
48
|
// usability, and lifecycle projection. Imported and re-exported here so the
|
|
@@ -138,6 +146,14 @@ export function snapshotLaunchOutcome(data, nodeId, runtime, savedRuntime, resum
|
|
|
138
146
|
return { kind: "fresh", why: "records no resume source for this seat" };
|
|
139
147
|
return { kind: "resume" };
|
|
140
148
|
}
|
|
149
|
+
/** A restored seat's checkpoint file in its working directory, named for the seat, so seats restored into one folder (a
|
|
150
|
+
* run's `--cwd`, or a saved folder they share) each keep their own: the session name made safe for a file name, then the
|
|
151
|
+
* first 8 hex of the SHA-256 of the exact name. Names that become the same safe text (`alpha beta`, `alpha-beta`) or
|
|
152
|
+
* differ only in case (on a case-insensitive filesystem) still get different files; no name is refused. */
|
|
153
|
+
function checkpointFileName(sessionName) {
|
|
154
|
+
const digest = createHash("sha256").update(sessionName).digest("hex").slice(0, 8);
|
|
155
|
+
return `.rigged-checkpoint-${sessionName.replace(/[^A-Za-z0-9._@-]/g, "-")}-${digest}.md`;
|
|
156
|
+
}
|
|
141
157
|
export class RestoreOrchestrator {
|
|
142
158
|
db;
|
|
143
159
|
activeRestores = new Set();
|
|
@@ -164,6 +180,7 @@ export class RestoreOrchestrator {
|
|
|
164
180
|
routerLineSettings;
|
|
165
181
|
getDesiredClaudeActivityHooks;
|
|
166
182
|
appliedLaunchStore;
|
|
183
|
+
harnessNotStartedNotice;
|
|
167
184
|
constructor(deps) {
|
|
168
185
|
if (deps.db !== deps.rigRepo.db) {
|
|
169
186
|
throw new Error("RestoreOrchestrator: rigRepo must share the same db handle");
|
|
@@ -205,6 +222,7 @@ export class RestoreOrchestrator {
|
|
|
205
222
|
this.freshLaunchAvailable = deps.freshLaunchAvailable;
|
|
206
223
|
this.seatSkillSelection = deps.seatSkillSelection;
|
|
207
224
|
this.getDesiredClaudeActivityHooks = deps.getDesiredClaudeActivityHooks;
|
|
225
|
+
this.harnessNotStartedNotice = deps.harnessNotStartedNotice;
|
|
208
226
|
this.routerLineSettings = deps.routerLineSettings;
|
|
209
227
|
this.appliedLaunchStore = new AppliedLaunchObservationStore(deps.db);
|
|
210
228
|
}
|
|
@@ -275,14 +293,23 @@ export class RestoreOrchestrator {
|
|
|
275
293
|
}
|
|
276
294
|
this.activeRestores.add(rigId);
|
|
277
295
|
try {
|
|
296
|
+
const currentRuntimes = Object.fromEntries((this.rigRepo.getRig(rigId)?.nodes ?? []).map((current) => [current.logicalId, current.runtime]));
|
|
297
|
+
// One observation of the seat records for the shared-conversation report, before any restore mutation: the
|
|
298
|
+
// validation and the partner check below name every agent from it, so a stale session this restore then marks
|
|
299
|
+
// detached is not "running" in one warning and "detached" in the other (the maintainer's 3rd review of #3250).
|
|
300
|
+
// The sessions the classification above already found stale are named detached, the status this restore gives them.
|
|
301
|
+
const observed = this.observeConversationRecords(rigId, snapshot.data, opts?.freshLogicalIds, currentRuntimes, classification.stale);
|
|
278
302
|
const validation = validatePreRestore(snapshot.data, {
|
|
279
303
|
fsOps: opts?.fsOps,
|
|
280
304
|
servicesRecord: this.rigRepo.getServicesRecord(rigId),
|
|
281
305
|
freshLogicalIds: opts?.freshLogicalIds,
|
|
282
|
-
currentRuntimes
|
|
306
|
+
currentRuntimes,
|
|
283
307
|
currentCodexProfiles: Object.fromEntries((this.rigRepo.getRig(rigId)?.nodes ?? [])
|
|
284
308
|
.filter((current) => current.codexConfigProfile !== undefined)
|
|
285
309
|
.map((current) => [current.logicalId, current.codexConfigProfile])),
|
|
310
|
+
...(opts?.cwdOverride ? { cwdOverride: opts.cwdOverride } : {}),
|
|
311
|
+
currentStatuses: observed.currentStatuses,
|
|
312
|
+
attachedLogicalIds: observed.attachedLogicalIds,
|
|
286
313
|
});
|
|
287
314
|
const topology = resolveSnapshotRestoreTopology(snapshot.data);
|
|
288
315
|
// 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:
|
|
@@ -293,11 +320,13 @@ export class RestoreOrchestrator {
|
|
|
293
320
|
const liveNodes = this.rigRepo.getRig(rigId)?.nodes ?? [];
|
|
294
321
|
const liveNodeIds = new Set(liveNodes.map((current) => current.id));
|
|
295
322
|
const snapshotNodeIds = new Set(snapshot.data.nodes.map((node) => node.id));
|
|
323
|
+
const intendedLiveIds = new Set(liveNodes.filter(current => topology.intendedRoster.some(intended => intended.logicalId === current.logicalId))
|
|
324
|
+
.map(current => current.id));
|
|
296
325
|
const narrowedRoster = snapshot.data.topologyRoster?.source === "operator_explicit";
|
|
297
326
|
const excludedNodes = [
|
|
298
327
|
...topology.excludedNodes.map((excluded) => !narrowedRoster && liveNodeIds.has(excluded.nodeId)
|
|
299
328
|
? { ...excluded, reason: "current_seat_not_in_intended_roster" } : excluded),
|
|
300
|
-
...(narrowedRoster ? [] : liveNodes.filter((current) => !snapshotNodeIds.has(current.id)).map((current) => ({
|
|
329
|
+
...(narrowedRoster ? [] : liveNodes.filter((current) => !snapshotNodeIds.has(current.id) && !intendedLiveIds.has(current.id)).map((current) => ({
|
|
301
330
|
nodeId: current.id, logicalId: current.logicalId, reason: "current_seat_not_in_intended_roster",
|
|
302
331
|
}))),
|
|
303
332
|
];
|
|
@@ -395,6 +424,8 @@ export class RestoreOrchestrator {
|
|
|
395
424
|
// 5. Execute restore with compensating pattern per node
|
|
396
425
|
const nodeResults = [];
|
|
397
426
|
const restoreWarnings = [...validation.warnings];
|
|
427
|
+
const heldLogicalIds = snapshot.data.nodes.filter((node) => heldForStartup.has(node.id)).map((node) => node.logicalId);
|
|
428
|
+
restoreWarnings.push(...this.conversationPartners(rigId, snapshot.data, observed, opts?.freshLogicalIds, currentRuntimes, heldLogicalIds));
|
|
398
429
|
if (this.rigRepo.getRigNonInterruptive(rigId))
|
|
399
430
|
restoreWarnings.push(nonInterruptiveSummary(true));
|
|
400
431
|
else if (opts?.nonInterruptive === false)
|
|
@@ -426,6 +457,9 @@ export class RestoreOrchestrator {
|
|
|
426
457
|
intendedRoster: topology.intendedRoster,
|
|
427
458
|
excludedNodes,
|
|
428
459
|
};
|
|
460
|
+
const notice = await this.noticeBareShells(rigId, `restore attempt ${attemptId}`, nodeResults, restoreWarnings);
|
|
461
|
+
if (notice)
|
|
462
|
+
restoreResult.harnessNotStarted = notice;
|
|
429
463
|
// 7. Emit restore.completed
|
|
430
464
|
this.eventBus.emit({ type: "restore.completed", rigId, snapshotId, result: restoreResult });
|
|
431
465
|
return { ok: true, result: restoreResult };
|
|
@@ -476,7 +510,19 @@ export class RestoreOrchestrator {
|
|
|
476
510
|
snapshotSelection: selected.selection,
|
|
477
511
|
targetNodes: intendedNodes
|
|
478
512
|
.filter((node) => targetIds.has(node.logicalId))
|
|
479
|
-
.map((node) =>
|
|
513
|
+
.map((node) => {
|
|
514
|
+
// The permission this launch will start the seat with: restore's own posture rule through the launch's resolver.
|
|
515
|
+
// Only the saved seat itself is read, matched as the launch matches it; a seat recreated under the same name
|
|
516
|
+
// (or none) reads unknown with the launch's own refusal, never the replacement's account.
|
|
517
|
+
const live = rig.nodes.find((candidate) => candidate.id === node.id && candidate.logicalId === node.logicalId);
|
|
518
|
+
if (live && seatProcessOwner(resolveSeatKind(live.binding?.attachmentType)) === "external") {
|
|
519
|
+
return { nodeId: node.id, logicalId: node.logicalId };
|
|
520
|
+
}
|
|
521
|
+
const seat = restorePermissionSeat(rig.rig.name, live ?? { id: node.id, logicalId: node.logicalId, runtime: node.runtime ?? null }, selected.snapshot, node.id);
|
|
522
|
+
return { nodeId: node.id, logicalId: node.logicalId,
|
|
523
|
+
permission: planRestorePermission(this.db, { ...seat, ...(live ? {} : { seatChanged: SNAPSHOT_SEAT_CHANGED }),
|
|
524
|
+
restorePosture: () => this.resolveRestorePosture(seat.nodeId, rigId) }) };
|
|
525
|
+
}),
|
|
480
526
|
unmatchedIds: logicalIds.filter((id) => !targetIds.has(id) && !targetNodeIds.has(id)),
|
|
481
527
|
nonTargetEffects,
|
|
482
528
|
};
|
|
@@ -511,7 +557,7 @@ export class RestoreOrchestrator {
|
|
|
511
557
|
if (targetNodes.length === 0)
|
|
512
558
|
return { ok: false, code: "no_matching_nodes", message: `No nodes match logical ids: ${logicalIds.join(", ")}` };
|
|
513
559
|
if (targetNodes.some(saved => !allNodes.some(current => current.id === saved.id && current.logicalId === saved.logicalId))) {
|
|
514
|
-
return { ok: false, code: "selection_changed", message:
|
|
560
|
+
return { ok: false, code: "selection_changed", message: SNAPSHOT_SEAT_CHANGED };
|
|
515
561
|
}
|
|
516
562
|
if (opts.selectedHistory && (targetNodes.length !== 1 || targetNodes[0].id !== opts.selectedHistory.nodeId
|
|
517
563
|
|| !allNodes.some(node => node.id === opts.selectedHistory.nodeId && node.logicalId === logicalIds[0]))) {
|
|
@@ -581,9 +627,12 @@ export class RestoreOrchestrator {
|
|
|
581
627
|
isUnknown = true;
|
|
582
628
|
}
|
|
583
629
|
}
|
|
630
|
+
// A live session that isn't proven to be a bare shell. Nothing here shows an agent is running in it, so the pane is
|
|
631
|
+
// kept and reported as a live session, never as a running agent.
|
|
584
632
|
if (isLive) {
|
|
585
|
-
if (opts.selectedHistory)
|
|
586
|
-
return { ok: false, code: "seat_running", message: "The selected seat
|
|
633
|
+
if (opts.selectedHistory) {
|
|
634
|
+
return { ok: false, code: "seat_running", message: "The selected seat has a live session (its agent isn't proven running); no resume was started." };
|
|
635
|
+
}
|
|
587
636
|
alreadyRunning.push({ nodeId: node.id, logicalId: node.logicalId });
|
|
588
637
|
continue;
|
|
589
638
|
}
|
|
@@ -643,16 +692,19 @@ export class RestoreOrchestrator {
|
|
|
643
692
|
launched.push(result);
|
|
644
693
|
}
|
|
645
694
|
// Emit restore.subset_completed for launched targets only
|
|
695
|
+
let harnessNotStarted;
|
|
646
696
|
if (launched.length > 0) {
|
|
647
697
|
const subsetResult = {
|
|
648
698
|
snapshotId: snapshot.id,
|
|
649
699
|
preRestoreSnapshotId: null,
|
|
650
700
|
rigResult: rollupRestoreRigResult(launched),
|
|
651
701
|
nodes: launched,
|
|
652
|
-
|
|
702
|
+
// A copy: the notice below adds its warnings to the launch's result, not to the event already emitted.
|
|
703
|
+
warnings: [...subsetWarnings],
|
|
653
704
|
snapshotSelection,
|
|
654
705
|
};
|
|
655
|
-
this.eventBus.emit({ type: "restore.subset_completed", rigId, snapshotId: snapshot.id, result: subsetResult });
|
|
706
|
+
const completed = this.eventBus.emit({ type: "restore.subset_completed", rigId, snapshotId: snapshot.id, result: subsetResult });
|
|
707
|
+
harnessNotStarted = await this.noticeBareShells(rigId, `launch attempt ${completed.seq}`, launched, subsetWarnings);
|
|
656
708
|
}
|
|
657
709
|
// Emit node.held for non-running held non-targets (tri-state: running/unknown/held)
|
|
658
710
|
const held = [];
|
|
@@ -701,6 +753,7 @@ export class RestoreOrchestrator {
|
|
|
701
753
|
unmatchedIds: unmatchedIds.length > 0 ? unmatchedIds : undefined,
|
|
702
754
|
warnings: subsetWarnings.length > 0 ? subsetWarnings : undefined,
|
|
703
755
|
snapshotSelection,
|
|
756
|
+
...(harnessNotStarted ? { harnessNotStarted } : {}),
|
|
704
757
|
nonTargetEffects: {
|
|
705
758
|
mode: opts.nonTargetMode,
|
|
706
759
|
reason: opts.nonTargetMode === "detach_and_hold" ? holdReasonText : null,
|
|
@@ -837,6 +890,81 @@ export class RestoreOrchestrator {
|
|
|
837
890
|
this.sessionRegistry.updateStatus(sess.id, sess.status);
|
|
838
891
|
}
|
|
839
892
|
}
|
|
893
|
+
/**
|
|
894
|
+
* #3218 item 3 (B1 of its review; points 3 to 5 of the maintainer's): the agents this restore resumes, compared with
|
|
895
|
+
* the known agents outside it, with their recorded status (in this rig outside a replacement's selection, kept
|
|
896
|
+
* attached to an external CLI or held for startup, or in another rig), from the same rigs rig restore-check reads: the
|
|
897
|
+
* listed ones, archived rigs left out. Named in the restore's warnings; nothing is refused, stopped or picked, and an
|
|
898
|
+
* inventory that cannot be read says the comparison is unavailable. Every status comes from the one observation taken
|
|
899
|
+
* before the restore changed anything (observeConversationRecords).
|
|
900
|
+
*/
|
|
901
|
+
conversationPartners(rigId, data, observed, freshLogicalIds, currentRuntimes, heldLogicalIds) {
|
|
902
|
+
const resuming = resumingConversationSeats(data, { freshLogicalIds, currentRuntimes, currentStatuses: observed.currentStatuses,
|
|
903
|
+
attachedLogicalIds: observed.attachedLogicalIds, heldLogicalIds });
|
|
904
|
+
if (!resuming.some(pairableConversation))
|
|
905
|
+
return [];
|
|
906
|
+
if (observed.inventory === null) {
|
|
907
|
+
return [`Restore pre-validation: the shared-conversation comparison with agents outside this restore is unavailable (${observed.unavailable}).`];
|
|
908
|
+
}
|
|
909
|
+
// Left out: only the seats restore launches. One kept attached to an external CLI (left_attached) stays running
|
|
910
|
+
// with its conversation, and one held for startup keeps its current session: both are compared as agents outside
|
|
911
|
+
// the restore (the maintainer's reviews of #3250).
|
|
912
|
+
const launched = new Set(resolveSnapshotRestoreTopology(data).intendedNodes.map((node) => node.logicalId)
|
|
913
|
+
.filter((logicalId) => !observed.attachedLogicalIds.includes(logicalId) && !heldLogicalIds.includes(logicalId)));
|
|
914
|
+
const others = observed.inventory
|
|
915
|
+
.filter((entry) => !(entry.rigId === rigId && launched.has(entry.logicalId)) && holdsRecordedConversation(entry))
|
|
916
|
+
.map((entry) => ({
|
|
917
|
+
seat: entry.canonicalSessionName ?? `${entry.logicalId}@${entry.rigName}`,
|
|
918
|
+
state: entry.sessionStatus ?? "unknown",
|
|
919
|
+
resumeType: entry.resumeType,
|
|
920
|
+
resumeToken: entry.resumeToken,
|
|
921
|
+
}));
|
|
922
|
+
const rigName = data.rig?.name ?? rigId;
|
|
923
|
+
return describePartners(resuming.map((entry) => ({ ...entry, seat: `${entry.seat}@${rigName}` })), others)
|
|
924
|
+
.map((warning) => `Restore pre-validation: ${warning}`);
|
|
925
|
+
}
|
|
926
|
+
/** The one observation of the seat records the shared-conversation report names (#3250, the maintainer's 3rd
|
|
927
|
+
* review), taken before any restore mutation: the seats kept attached to an external CLI, from their bindings (the
|
|
928
|
+
* record that makes restore leave them running, left_attached, instead of launching them), and, only when this
|
|
929
|
+
* restore would resume a seat with a recorded conversation it can pair (pairableConversation), ONE read of the node inventory of the listed rigs and
|
|
930
|
+
* this rig (an archived rig's restore inclusive): this rig's seats' sessionStatus and the partners' records. A seat of
|
|
931
|
+
* this rig whose current session is recorded running and was found stale by classifyRunningSessions (no tmux session)
|
|
932
|
+
* is named detached, the status this restore gives it before it launches anything, so the report never calls it
|
|
933
|
+
* running. An inventory that cannot be read leaves the partner comparison unavailable; this rig's own statuses then
|
|
934
|
+
* come from a read of this rig alone ("unknown" when that fails too). */
|
|
935
|
+
observeConversationRecords(rigId, data, freshLogicalIds, currentRuntimes, staleSessionIds) {
|
|
936
|
+
const attachedLogicalIds = (this.rigRepo.getRig(rigId)?.nodes ?? [])
|
|
937
|
+
.filter((node) => seatProcessOwner(resolveSeatKind(this.sessionRegistry.getBindingForNode(node.id)?.attachmentType)) === "external")
|
|
938
|
+
.map((node) => node.logicalId);
|
|
939
|
+
if (!resumingConversationSeats(data, { freshLogicalIds, currentRuntimes, attachedLogicalIds }).some(pairableConversation)) {
|
|
940
|
+
return { currentStatuses: {}, attachedLogicalIds, inventory: [] };
|
|
941
|
+
}
|
|
942
|
+
const staleIds = new Set(staleSessionIds);
|
|
943
|
+
// An inventory entry is its node's newest session (node-inventory's ORDER BY id DESC). It is named detached only
|
|
944
|
+
// when that session is a stale one, not when an older session of the node is.
|
|
945
|
+
const newestByNode = new Map();
|
|
946
|
+
for (const session of this.sessionRegistry.getSessionsForRig(rigId)) {
|
|
947
|
+
const newest = newestByNode.get(session.nodeId);
|
|
948
|
+
if (newest === undefined || session.id > newest)
|
|
949
|
+
newestByNode.set(session.nodeId, session.id);
|
|
950
|
+
}
|
|
951
|
+
const staleNodeIds = new Set([...newestByNode].filter(([, sessionId]) => staleIds.has(sessionId)).map(([nodeId]) => nodeId));
|
|
952
|
+
const labelled = (entry) => entry.rigId === rigId && entry.sessionStatus === "running" && staleNodeIds.has(entry.nodeId) ? { ...entry, sessionStatus: "detached" } : entry;
|
|
953
|
+
const statusesOf = (entries) => Object.fromEntries(entries.map((entry) => [entry.logicalId, entry.sessionStatus ?? null]));
|
|
954
|
+
try {
|
|
955
|
+
const byRig = getNodeInventoryForRigs(this.db, new Set([...this.rigRepo.listRigs().map((rig) => rig.id), rigId]));
|
|
956
|
+
const inventory = [...byRig.values()].flat().map(labelled);
|
|
957
|
+
return { currentStatuses: statusesOf(inventory.filter((entry) => entry.rigId === rigId)), attachedLogicalIds, inventory };
|
|
958
|
+
}
|
|
959
|
+
catch (err) {
|
|
960
|
+
let currentStatuses = {};
|
|
961
|
+
try {
|
|
962
|
+
currentStatuses = statusesOf((getNodeInventoryForRigs(this.db, new Set([rigId])).get(rigId) ?? []).map(labelled));
|
|
963
|
+
}
|
|
964
|
+
catch { /* every seat "unknown" */ }
|
|
965
|
+
return { currentStatuses, attachedLogicalIds, inventory: null, unavailable: err instanceof Error ? err.message : String(err) };
|
|
966
|
+
}
|
|
967
|
+
}
|
|
840
968
|
computeRestorePlan(data) {
|
|
841
969
|
const nodes = resolveSnapshotRestoreTopology(data).intendedNodes;
|
|
842
970
|
const edges = data.edges;
|
|
@@ -914,6 +1042,9 @@ export class RestoreOrchestrator {
|
|
|
914
1042
|
* Preserve prior state so a failed launch or resume can be compensated.
|
|
915
1043
|
*/
|
|
916
1044
|
async restoreNodeWithCompensation(entry, rigId, snapshotId, data, opts, warnings, preserveStoppedCurrent = false) {
|
|
1045
|
+
// `--cwd`: the seat launches, resumes and gets its guidance and checkpoint in the given directory, for this run only.
|
|
1046
|
+
if (opts?.cwdOverride)
|
|
1047
|
+
entry = { ...entry, node: { ...entry.node, cwd: opts.cwdOverride } };
|
|
917
1048
|
// Compare against the live logical target without changing saved post-launch inputs.
|
|
918
1049
|
const node = entry.node;
|
|
919
1050
|
// Activity-hook restore gaps (#1530) are collected out-of-band: postLaunchRestore
|
|
@@ -933,6 +1064,16 @@ export class RestoreOrchestrator {
|
|
|
933
1064
|
if (external && seatProcessOwner(resolveSeatKind(external.attachmentType)) === "external") {
|
|
934
1065
|
return { nodeId, logicalId: node.logicalId, status: "left_attached", error: leftAttachedReason(external.externalSessionName ?? node.logicalId), ...notStarted };
|
|
935
1066
|
}
|
|
1067
|
+
// A seat's saved directory that isn't on this machine (a workspace restored onto another home) is named plainly, with
|
|
1068
|
+
// the way to launch elsewhere; nothing is refused here, and the launch below goes on as before.
|
|
1069
|
+
const savedCwd = node.cwd ?? liveNode?.cwd;
|
|
1070
|
+
const launchElsewhere = `To launch this rig's seats in another directory for this run: rig up ${data.rig?.name ?? rigId} --existing --cwd <dir>.`;
|
|
1071
|
+
// Where the line is, so that once the launch below has run it can also name the folder the seat started in.
|
|
1072
|
+
let missingCwdAt = -1;
|
|
1073
|
+
// Only a confirmed absence is named missing (folderPresent): a folder that can't be looked into isn't.
|
|
1074
|
+
if (!opts?.cwdOverride && savedCwd && isAbsolute(savedCwd) && opts?.fsOps && !folderPresent(savedCwd) && warnings) {
|
|
1075
|
+
missingCwdAt = warnings.push(`Restore: ${node.logicalId}'s working directory ${savedCwd} doesn't exist on this machine. ${launchElsewhere}`) - 1;
|
|
1076
|
+
}
|
|
936
1077
|
// OPR.0.5.7.1 (bought ordering blocker, baton 0efd154d): D1 present-map
|
|
937
1078
|
// ambiguity must be DETECTED before any continuity_state short-circuit —
|
|
938
1079
|
// a pod node in 'restoring' otherwise returns a silent status "fresh"
|
|
@@ -1222,6 +1363,9 @@ export class RestoreOrchestrator {
|
|
|
1222
1363
|
const onSessionLaunched = opts?.onSessionLaunched;
|
|
1223
1364
|
const launchResult = await this.nodeLauncher.launchNode(rigId, node.logicalId, {
|
|
1224
1365
|
...launchOpts,
|
|
1366
|
+
// #3253: a restore or resume is a recovery: nothing of the seat runs, so a limit that can't be applied doesn't stop
|
|
1367
|
+
// it. It goes ahead with a structured warning, and the request stays stored for a fresh launch to apply.
|
|
1368
|
+
processLimitsMode: "recovery",
|
|
1225
1369
|
...(selectedHistory ? { expectedNodeId: nodeId, beforeEffect: selectedHistory.beforeNative,
|
|
1226
1370
|
beforeRegistration: selectedHistory.beforeRegistration } : {}),
|
|
1227
1371
|
...(savedStartup ? { pluginPaths: pluginPathsOf(savedStartup.projectionEntries) } : {}),
|
|
@@ -1250,12 +1394,35 @@ export class RestoreOrchestrator {
|
|
|
1250
1394
|
if (launchResult.warnings?.length) {
|
|
1251
1395
|
warnings?.push(...launchResult.warnings);
|
|
1252
1396
|
}
|
|
1397
|
+
// Where the seat started, from its own bound pane only (boundPaneFolder): unread, the line names no folder.
|
|
1398
|
+
if (missingCwdAt >= 0 && warnings) {
|
|
1399
|
+
const startedIn = await this.boundPaneFolder(launchResult.sessionName, launchResult.binding.tmuxPane);
|
|
1400
|
+
if (startedIn && startedIn !== savedCwd) {
|
|
1401
|
+
warnings[missingCwdAt] = `Restore: ${node.logicalId}'s working directory ${savedCwd} doesn't exist on this machine, so it started in `
|
|
1402
|
+
+ `${startedIn}. ${launchElsewhere}`;
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
// A folder given with `--cwd` that isn't on this machine is named the same way. Where the seat started is read now,
|
|
1406
|
+
// before the harness and its startup are replayed, which can change the pane's folder.
|
|
1407
|
+
const givenMissing = opts?.cwdOverride && isAbsolute(opts.cwdOverride) && opts.fsOps && warnings && !folderPresent(opts.cwdOverride)
|
|
1408
|
+
? opts.cwdOverride : null;
|
|
1409
|
+
const givenStartedIn = givenMissing ? await this.boundPaneFolder(launchResult.sessionName, launchResult.binding.tmuxPane) : null;
|
|
1253
1410
|
// A selected launch's own blank rolled back after the shell started (postLaunchRestore has many return points).
|
|
1254
1411
|
const compensation = { ran: false };
|
|
1255
1412
|
const restored = await this.postLaunchRestore(entry, rigId, data, launchResult.sessionName, launchResult, { ...opts, ...(claudeExecutable ? { claudeExecutable } : {}), ...(claudeLaunch ? { claudeLaunch } : {}), compensation }, warnings, priorState, seatRehydration, resumeSession, activityHookGaps, restoredSkillCatalog);
|
|
1256
|
-
|
|
1413
|
+
// Whether it's still missing is decided once the launch has run: a fresh launch creates it, and a restore doesn't, so the
|
|
1414
|
+
// seat's terminal started in tmux's fallback folder.
|
|
1415
|
+
if (givenMissing && warnings && !folderPresent(givenMissing)) {
|
|
1416
|
+
warnings.push(`Restore: ${node.logicalId}'s working directory ${givenMissing}, given with --cwd, doesn't exist on this machine`
|
|
1417
|
+
+ (givenStartedIn && givenStartedIn !== givenMissing ? `, so it started in ${givenStartedIn}. ` : ". ") + launchElsewhere);
|
|
1418
|
+
}
|
|
1419
|
+
// Saved inputs stay keyed by the snapshot; the result names the seat that the launcher actually registered.
|
|
1420
|
+
const checked = { ...this.checkRestoredGuidance(restored, entry.node, rigId, data, warnings), nodeId: launchResult.session.nodeId,
|
|
1421
|
+
...(launchResult.session.nodeId !== node.id ? { intendedNodeId: node.id } : {}),
|
|
1257
1422
|
...(activityHookGaps.length > 0 ? { restoreGaps: activityHookGaps } : {}),
|
|
1258
|
-
...(keptPane ? { launchStarted: true } : {})
|
|
1423
|
+
...(keptPane ? { launchStarted: true } : {}),
|
|
1424
|
+
// #3253: the provisional shell's notice, unless a replacement retired it and reported its own (the key is set).
|
|
1425
|
+
...(launchResult.processLimits && !("processLimits" in restored) ? { processLimits: launchResult.processLimits } : {}) };
|
|
1259
1426
|
return selectedHistory ? { ...checked, sourceSessionId: selectedHistory.historySessionId, resultSessionId: launchResult.session.id,
|
|
1260
1427
|
...(compensation.ran ? { compensated: true } : {}) } : checked;
|
|
1261
1428
|
}
|
|
@@ -1407,6 +1574,7 @@ export class RestoreOrchestrator {
|
|
|
1407
1574
|
if (!["resumed", "fresh-primed", "fresh", "rebuilt", "attention_required"].includes(result.status))
|
|
1408
1575
|
return result;
|
|
1409
1576
|
let guidance;
|
|
1577
|
+
let guidanceCwd;
|
|
1410
1578
|
try {
|
|
1411
1579
|
// The seat was launched in the snapshot node's cwd when set, else the
|
|
1412
1580
|
// live node's cwd — the same resolved launch directory the hook
|
|
@@ -1414,7 +1582,7 @@ export class RestoreOrchestrator {
|
|
|
1414
1582
|
// no guidance at all when the snapshot node has no cwd. No "." fallback:
|
|
1415
1583
|
// when neither cwd exists the old skip is kept, so no guidance file is
|
|
1416
1584
|
// written into the daemon's own working directory.
|
|
1417
|
-
|
|
1585
|
+
guidanceCwd = node.cwd
|
|
1418
1586
|
?? this.rigRepo.getRig(rigId)?.nodes.find(current => current.logicalId === node.logicalId)?.cwd;
|
|
1419
1587
|
guidance = seatGuidance(data.nodeStartupContext?.[node.id] ?? null, guidanceCwd, this.rigRepo.getRigClaudeManagedBlockFile(rigId), existsSync, (path) => readFileSync(path, "utf-8"));
|
|
1420
1588
|
}
|
|
@@ -1441,7 +1609,9 @@ export class RestoreOrchestrator {
|
|
|
1441
1609
|
}
|
|
1442
1610
|
if (missing.length === 0)
|
|
1443
1611
|
return noted;
|
|
1444
|
-
|
|
1612
|
+
// A saved folder this machine doesn't have got nothing put back (see postLaunchRestore): say why the blocks are missing.
|
|
1613
|
+
const gap = `${node.logicalId} is running without part of its guidance: ${guidance.targetPath} lacks the OpenRig blocks ${missing.join(", ")}`
|
|
1614
|
+
+ (insideMissingFolder(guidance.targetPath, guidanceCwd, folderPresent) ? `, because ${guidanceCwd} doesn't exist on this machine.` : ".");
|
|
1445
1615
|
warnings?.push(`Restore: ${gap}`);
|
|
1446
1616
|
return { ...noted, guidanceGaps: missing };
|
|
1447
1617
|
}
|
|
@@ -1508,6 +1678,49 @@ export class RestoreOrchestrator {
|
|
|
1508
1678
|
}
|
|
1509
1679
|
return { rolledBack: true, terminalStopped };
|
|
1510
1680
|
}
|
|
1681
|
+
/** The notice for the seats an attempt positively left as bare shells, each with its own cause. Its warnings join the
|
|
1682
|
+
* attempt's, and a failure to send it is a warning too: it never changes or blocks the attempt's own result. Seats not
|
|
1683
|
+
* positively left as shells stay in the roll call. */
|
|
1684
|
+
async noticeBareShells(rigId, attempt, results, warnings) {
|
|
1685
|
+
const shells = results.filter((n) => n.stage === "harness_not_started");
|
|
1686
|
+
if (shells.length === 0 || !this.harnessNotStartedNotice)
|
|
1687
|
+
return undefined;
|
|
1688
|
+
try {
|
|
1689
|
+
// The launcher finds a seat by its logical id in the live rig, so a seat recreated since the snapshot was launched
|
|
1690
|
+
// under its live node, while its result keeps the snapshot's node id: the notice reads the node the shell is on.
|
|
1691
|
+
const liveNodes = this.rigRepo.getRig(rigId)?.nodes ?? [];
|
|
1692
|
+
const seats = shells.map(({ nodeId, logicalId, error }) => ({ nodeId: liveNodes.find((node) => node.logicalId === logicalId)?.id ?? nodeId,
|
|
1693
|
+
logicalId, ...(error ? { cause: error } : {}) }));
|
|
1694
|
+
const report = await this.harnessNotStartedNotice({ rigId, attempt, seats });
|
|
1695
|
+
for (const warning of report.warnings ?? [])
|
|
1696
|
+
warnings.push(`Restore: ${warning}`);
|
|
1697
|
+
return report;
|
|
1698
|
+
}
|
|
1699
|
+
catch (err) {
|
|
1700
|
+
warnings.push(`Restore: the notice for the seats left as a bare shell wasn't recorded (${err instanceof Error ? err.message : String(err)}).`);
|
|
1701
|
+
return undefined;
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
/** Restore left this pane as a bare shell, which the launcher registered as a running session. Mark that session, with
|
|
1705
|
+
* the stage that says no harness started, so nothing counts the shell as a running seat. Nothing is stopped. The node
|
|
1706
|
+
* is the session's own: a seat recreated since the snapshot is launched under its live node. */
|
|
1707
|
+
markHarnessNotStarted(rigId, nodeId, sessionId, error) {
|
|
1708
|
+
this.sessionRegistry.updateStartupStatus(sessionId, "attention_required");
|
|
1709
|
+
this.eventBus.emit({ type: "node.startup_failed", rigId, nodeId, error, sessionId, stage: "harness_not_started" });
|
|
1710
|
+
}
|
|
1711
|
+
/** tmux starts a terminal whose folder is missing in a fallback folder of its own (its server's HOME), which the launch's
|
|
1712
|
+
* record doesn't hold, so the folder a seat started in is read from the seat's own bound pane, in any window. Another
|
|
1713
|
+
* pane's folder is never named: when that pane isn't listed or can't be read, this is null. */
|
|
1714
|
+
async boundPaneFolder(sessionName, pane) {
|
|
1715
|
+
if (!pane)
|
|
1716
|
+
return null;
|
|
1717
|
+
try {
|
|
1718
|
+
return (await this.tmuxAdapter.listPanes(sessionName, true)).find((listed) => listed.id === pane)?.cwd ?? null;
|
|
1719
|
+
}
|
|
1720
|
+
catch {
|
|
1721
|
+
return null;
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1511
1724
|
/** Retire only the provisional session created by this restore attempt. The prior
|
|
1512
1725
|
* binding must stay cleared while a replacement launch is handed off. */
|
|
1513
1726
|
async retireProvisionalSession(nodeId, sessionName, launchedSessionId) {
|
|
@@ -1677,7 +1890,9 @@ export class RestoreOrchestrator {
|
|
|
1677
1890
|
const recoveryRuntime = startupCtx?.runtime
|
|
1678
1891
|
?? (!isPodAware && liveRuntime === node.runtime ? node.runtime : null);
|
|
1679
1892
|
if (resumeRequested && resumeToken && launchResult && recoveryRuntime === "claude-code") {
|
|
1680
|
-
|
|
1893
|
+
// The saved hooks resource ships under the install's specs: read it from the running install, as replay does.
|
|
1894
|
+
const entries = (startupCtx?.projectionEntries ?? []).filter(e => e.category === "runtime_resource" && e.resourceType === "claude_activity_hooks")
|
|
1895
|
+
.map((e) => reanchorShippedProjectionEntry(e, undefined, opts?.fsOps?.exists ?? (() => true)));
|
|
1681
1896
|
if (entries.length > 0 && activityAdapter)
|
|
1682
1897
|
try {
|
|
1683
1898
|
const result = await activityAdapter.project({
|
|
@@ -1691,10 +1906,16 @@ export class RestoreOrchestrator {
|
|
|
1691
1906
|
warnings?.push(`Restore activity hooks: skipped ${skipped}; saved hooks could not be reapplied.`);
|
|
1692
1907
|
for (const failure of result.failed)
|
|
1693
1908
|
warnings?.push(`Restore activity hooks: ${failure.error}`);
|
|
1909
|
+
// Saved hooks that couldn't be reapplied are a restore gap, as for the current selection (restoreCurrentActivityHooks),
|
|
1910
|
+
// so the rig doesn't read fully restored. Hooks already in the seat's settings may remain: a failed check writes nothing.
|
|
1911
|
+
const detail = [...result.skipped.map((skipped) => `skipped ${skipped}`), ...result.failed.map((failure) => failure.error)].join("; ");
|
|
1912
|
+
if (detail)
|
|
1913
|
+
activityHookGaps?.push(`claude_activity_hooks: the saved hooks could not be reapplied: ${detail}.`);
|
|
1694
1914
|
}
|
|
1695
1915
|
catch (error) {
|
|
1696
1916
|
// Activity delivery remains best-effort, as on an ordinary fresh launch.
|
|
1697
1917
|
warnings?.push(`Restore activity hooks: ${error.message}`);
|
|
1918
|
+
activityHookGaps?.push(`claude_activity_hooks: the saved hooks could not be reapplied: ${error.message}.`);
|
|
1698
1919
|
}
|
|
1699
1920
|
else if (entries.length === 0) {
|
|
1700
1921
|
await this.restoreCurrentActivityHooks(node, activityAdapter, launchResult, warnings, activityHookGaps, launchCwd);
|
|
@@ -1717,11 +1938,12 @@ export class RestoreOrchestrator {
|
|
|
1717
1938
|
// reaches the conversation; no action, skill or plugin runs. Never blocks the resume.
|
|
1718
1939
|
if (resumeRequested && resumeToken && launchResult) {
|
|
1719
1940
|
let guidance = null;
|
|
1941
|
+
let guidanceCwd;
|
|
1720
1942
|
try {
|
|
1721
1943
|
// Same resolved directory as launchCwd, without its "." fallback:
|
|
1722
1944
|
// when neither the snapshot nor the live node has a cwd, keep the
|
|
1723
1945
|
// old skip instead of writing guidance into the daemon's folder.
|
|
1724
|
-
|
|
1946
|
+
guidanceCwd = node.cwd
|
|
1725
1947
|
?? this.rigRepo.getRig(rigId)?.nodes.find(current => current.logicalId === node.logicalId
|
|
1726
1948
|
&& (!selected || current.id === node.id))?.cwd;
|
|
1727
1949
|
guidance = seatGuidance(startupCtx, guidanceCwd, this.rigRepo.getRigClaudeManagedBlockFile(rigId), existsSync, (path) => readFileSync(path, "utf-8"));
|
|
@@ -1772,6 +1994,11 @@ export class RestoreOrchestrator {
|
|
|
1772
1994
|
deliveryHint: "guidance_merge", required: false, appliesOn: ["fresh_start", "restore"] }));
|
|
1773
1995
|
guidance = { ...guidance, items: guidance.items.filter((item) => !carried.includes(item)) };
|
|
1774
1996
|
}
|
|
1997
|
+
// A saved folder this machine doesn't have isn't created just to hold the file (insideMissingFolder); a file outside
|
|
1998
|
+
// it, such as a Pi agent folder's own AGENTS.md, is read wherever the seat runs. The check after the launch reports
|
|
1999
|
+
// the blocks the seat lacks.
|
|
2000
|
+
if (guidance && insideMissingFolder(guidance.targetPath, guidanceCwd, folderPresent))
|
|
2001
|
+
guidance = null;
|
|
1775
2002
|
if (guidance && guidance.items.length > 0) {
|
|
1776
2003
|
// #2456: a block OpenRig wrote whose source changed since is refreshed too; an edited one, or one with no record, is
|
|
1777
2004
|
// left as it is and named (the check after the launch carries the names onto the seat's result).
|
|
@@ -1903,7 +2130,7 @@ export class RestoreOrchestrator {
|
|
|
1903
2130
|
if (!node.cwd) {
|
|
1904
2131
|
return { nodeId: node.id, logicalId: node.logicalId, status: "failed", error: "Checkpoint available but node has no cwd" };
|
|
1905
2132
|
}
|
|
1906
|
-
const written = this.writeCheckpointFile(node.cwd, checkpoint);
|
|
2133
|
+
const written = this.writeCheckpointFile(node.cwd, sessionName, checkpoint);
|
|
1907
2134
|
if (written) {
|
|
1908
2135
|
baseStatus = "rebuilt";
|
|
1909
2136
|
}
|
|
@@ -1967,27 +2194,41 @@ export class RestoreOrchestrator {
|
|
|
1967
2194
|
if (this.freshLaunchAvailable && !this.freshLaunchAvailable(rigId, node.id)) {
|
|
1968
2195
|
const error = `Harness not started: no usable persisted launch recipe for ${node.logicalId}.`;
|
|
1969
2196
|
warnings?.push(`Restore: ${error}`);
|
|
1970
|
-
|
|
2197
|
+
this.markHarnessNotStarted(rigId, launchResult.session.nodeId, launchResult.session.id, error);
|
|
2198
|
+
return { nodeId: node.id, logicalId: node.logicalId, status: "attention_required", error, stage: "harness_not_started" };
|
|
1971
2199
|
}
|
|
1972
2200
|
const retired = await this.retireProvisionalSession(node.id, sessionName, launchResult.session.id);
|
|
1973
2201
|
if (!retired.ok) {
|
|
1974
2202
|
warnings?.push(`Restore: ${retired.error}`);
|
|
1975
2203
|
return { nodeId: node.id, logicalId: node.logicalId, status: "attention_required", error: retired.error };
|
|
1976
2204
|
}
|
|
2205
|
+
// The retired provisional shell's process-limits line no longer describes the seat: the replacement reports its
|
|
2206
|
+
// own (or none, when it applied the limit), and a replacement that fails to launch runs nothing, so the line
|
|
2207
|
+
// goes before the launch is awaited and the same notice is never printed twice.
|
|
2208
|
+
const staleLimits = launchResult.processLimits ? noticeLine(launchResult.processLimits) : undefined;
|
|
2209
|
+
const stale = staleLimits && warnings ? warnings.lastIndexOf(staleLimits) : -1;
|
|
2210
|
+
if (stale >= 0)
|
|
2211
|
+
warnings.splice(stale, 1);
|
|
1977
2212
|
const replacementExists = () => this.sessionRegistry.getSessionsForRig(rigId)
|
|
1978
2213
|
.some((candidate) => candidate.nodeId === node.id
|
|
1979
2214
|
&& candidate.status === "running"
|
|
1980
2215
|
&& candidate.id !== launchResult.session.id);
|
|
1981
2216
|
try {
|
|
1982
|
-
|
|
2217
|
+
// #3253: this replaces the provisional shell of a restore, so it is a recovery too: a limit that can't be
|
|
2218
|
+
// applied doesn't stop the seat, and its notice is the node's. The replacement launches where the provisional
|
|
2219
|
+
// shell did: this run's `--cwd`, else the saved folder.
|
|
2220
|
+
const fresh = await this.freshLaunch(rigId, node.id, { processLimitsMode: "recovery", ...(opts?.cwdOverride ? { cwdOverride: opts.cwdOverride } : {}) });
|
|
1983
2221
|
if (fresh.warnings?.length)
|
|
1984
2222
|
warnings?.push(...fresh.warnings);
|
|
2223
|
+
// The replacement's own outcome, also when it applied the limit (no notice): the retired provisional shell's
|
|
2224
|
+
// notice no longer describes the seat (the key is set either way, so the caller doesn't fall back to it).
|
|
2225
|
+
const limits = { processLimits: fresh.processLimits };
|
|
1985
2226
|
if (fresh.status === "launched") {
|
|
1986
|
-
return { nodeId: node.id, logicalId: node.logicalId, status: "fresh-primed" };
|
|
2227
|
+
return { nodeId: node.id, logicalId: node.logicalId, status: "fresh-primed", ...limits };
|
|
1987
2228
|
}
|
|
1988
2229
|
if (priorState && !replacementExists())
|
|
1989
2230
|
this.restoreNodeState(node.id, priorState);
|
|
1990
|
-
return { nodeId: node.id, logicalId: node.logicalId, status: fresh.status, error: fresh.error };
|
|
2231
|
+
return { nodeId: node.id, logicalId: node.logicalId, status: fresh.status, error: fresh.error, ...limits };
|
|
1991
2232
|
}
|
|
1992
2233
|
catch (err) {
|
|
1993
2234
|
if (priorState && !replacementExists())
|
|
@@ -1996,6 +2237,7 @@ export class RestoreOrchestrator {
|
|
|
1996
2237
|
nodeId: node.id,
|
|
1997
2238
|
logicalId: node.logicalId,
|
|
1998
2239
|
status: "failed",
|
|
2240
|
+
processLimits: undefined,
|
|
1999
2241
|
error: `Fresh launch failed: ${err.message}`,
|
|
2000
2242
|
};
|
|
2001
2243
|
}
|
|
@@ -2003,7 +2245,8 @@ export class RestoreOrchestrator {
|
|
|
2003
2245
|
const cause = replayCtx ? `no ${startupRuntime} runtime adapter` : "no startup context";
|
|
2004
2246
|
const error = `Harness not started: ${cause} for ${node.logicalId}.`;
|
|
2005
2247
|
warnings?.push(`Restore: ${error}`);
|
|
2006
|
-
|
|
2248
|
+
this.markHarnessNotStarted(rigId, launchResult.session.nodeId, launchResult.session.id, error);
|
|
2249
|
+
return { nodeId: node.id, logicalId: node.logicalId, status: "attention_required", error, stage: "harness_not_started" };
|
|
2007
2250
|
}
|
|
2008
2251
|
// Attempt restore-safe startup replay if context available
|
|
2009
2252
|
if ((data.nodeStartupContext || replayCtx) && opts?.adapters && launchResult) {
|
|
@@ -2395,6 +2638,7 @@ export class RestoreOrchestrator {
|
|
|
2395
2638
|
let kernelAuthority = false;
|
|
2396
2639
|
let teamPermissionDefault = false;
|
|
2397
2640
|
let claudePermissions;
|
|
2641
|
+
let claudeAutoMode;
|
|
2398
2642
|
let claudeMcp;
|
|
2399
2643
|
let launchWrapper;
|
|
2400
2644
|
let codexPermissions;
|
|
@@ -2406,6 +2650,7 @@ export class RestoreOrchestrator {
|
|
|
2406
2650
|
kernelAuthority = override.kernelAuthority === true;
|
|
2407
2651
|
teamPermissionDefault = override.teamPermissionDefault === true;
|
|
2408
2652
|
claudePermissions = override.claudePermissions;
|
|
2653
|
+
claudeAutoMode = override.claudeAutoMode;
|
|
2409
2654
|
claudeMcp = runtime === "claude-code" ? readSeatClaudeMcp(this.db, nodeId) : undefined;
|
|
2410
2655
|
launchWrapper = isLaunchWrapperRuntime(runtime) ? readSeatLaunchWrapper(this.db, nodeId) : undefined;
|
|
2411
2656
|
codexPermissions = override.codexPermissions;
|
|
@@ -2435,7 +2680,8 @@ export class RestoreOrchestrator {
|
|
|
2435
2680
|
...(claudeExecutable ? [claudeExecutable] : [])] : tail;
|
|
2436
2681
|
const mcpTail = claudeMcp === undefined ? guardedTail : [...guardedTail, ...Array(Math.max(0, 9 - guardedTail.length)).fill(undefined), claudeMcp];
|
|
2437
2682
|
const wrapperTail = launchWrapper?.length ? [...mcpTail, ...Array(Math.max(0, 10 - mcpTail.length)).fill(undefined), launchWrapper] : mcpTail;
|
|
2438
|
-
const
|
|
2683
|
+
const continuationTail = claudeLaunch ? [...wrapperTail, ...Array(Math.max(0, 11 - wrapperTail.length)).fill(undefined), claudeLaunch] : wrapperTail;
|
|
2684
|
+
const wrappedTail = claudeAutoMode !== undefined ? [...continuationTail, ...Array(Math.max(0, 12 - continuationTail.length)).fill(undefined), claudeAutoMode] : continuationTail;
|
|
2439
2685
|
if (beforeNative && !beforeNative())
|
|
2440
2686
|
return { kind: "attention_required", message: "The selected seat, settings or history changed during native preparation; resume was not dispatched." };
|
|
2441
2687
|
const result = await this.claudeResume.resume(sessionName, resumeType, resumeToken, cwd, resolvedPosture, model, permissionMode, nodeId, ...wrappedTail);
|
|
@@ -2531,6 +2777,8 @@ export class RestoreOrchestrator {
|
|
|
2531
2777
|
if (this.ompResume?.canResume(resumeType, resumeToken)) {
|
|
2532
2778
|
const result = await this.ompResume.resume(sessionName, resumeType, resumeToken, cwd, model, resolvedPosture);
|
|
2533
2779
|
if (result.ok) {
|
|
2780
|
+
for (const note of result.warnings ?? [])
|
|
2781
|
+
warnings?.push(`${sessionName}: ${note}`);
|
|
2534
2782
|
if (result.appliedLaunch && launchGeneration)
|
|
2535
2783
|
this.appliedLaunchStore.recordGeneration(launchGeneration, result.appliedLaunch);
|
|
2536
2784
|
return { kind: "resumed" };
|
|
@@ -2558,33 +2806,16 @@ export class RestoreOrchestrator {
|
|
|
2558
2806
|
* to reconcile).
|
|
2559
2807
|
*/
|
|
2560
2808
|
async reconcileNodeRuntimeTruth(rigId, nodeId) {
|
|
2561
|
-
// Locate the latest restore attempt
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
// failed or attention_required, the reconciler has nothing to upgrade.
|
|
2570
|
-
const completedRow = this.db.prepare("SELECT payload FROM events WHERE rig_id = ? AND type = 'restore.completed' AND seq > ? ORDER BY seq DESC LIMIT 1").get(rigId, attemptId);
|
|
2571
|
-
let nodeStatus = null;
|
|
2572
|
-
let nodeLogicalId = null;
|
|
2573
|
-
if (completedRow) {
|
|
2574
|
-
try {
|
|
2575
|
-
const parsed = JSON.parse(completedRow.payload);
|
|
2576
|
-
const found = parsed.result?.nodes?.find((n) => n.nodeId === nodeId);
|
|
2577
|
-
if (found) {
|
|
2578
|
-
nodeStatus = found.status;
|
|
2579
|
-
nodeLogicalId = found.logicalId;
|
|
2580
|
-
}
|
|
2581
|
-
}
|
|
2582
|
-
catch {
|
|
2583
|
-
// payload corruption — treat as no node record found
|
|
2584
|
-
}
|
|
2585
|
-
}
|
|
2809
|
+
// Locate the node's latest restore attempt and its outcome there. If the
|
|
2810
|
+
// outcome is not failed or attention_required, there is nothing to upgrade.
|
|
2811
|
+
const attempt = this.currentRestoreAttempt(rigId, nodeId);
|
|
2812
|
+
if (!attempt) {
|
|
2813
|
+
return { ok: false, code: "no_attempt", detail: "No restore.started or restore.subset_completed event recorded for this rig." };
|
|
2814
|
+
}
|
|
2815
|
+
const attemptId = attempt.attemptId;
|
|
2816
|
+
const nodeStatus = attempt.status;
|
|
2586
2817
|
if (!nodeStatus) {
|
|
2587
|
-
return { ok: false, code: "node_not_found", detail: `Node ${nodeId} has no record in
|
|
2818
|
+
return { ok: false, code: "node_not_found", detail: `Node ${nodeId} has no record in its latest restore attempt for rig ${rigId}.` };
|
|
2588
2819
|
}
|
|
2589
2820
|
if (nodeStatus !== "failed" && nodeStatus !== "attention_required") {
|
|
2590
2821
|
return { ok: false, code: "outcome_not_upgradable", detail: `Reconciliation only upgrades failed or attention_required; current outcome is ${nodeStatus}.` };
|
|
@@ -2687,12 +2918,12 @@ export class RestoreOrchestrator {
|
|
|
2687
2918
|
}
|
|
2688
2919
|
return { ok: false, code: "pane_not_usable", probe: evidence, attemptId, detail: `Pane state is ${probe.status} (${probe.code}); reconciliation requires resumed.` };
|
|
2689
2920
|
}
|
|
2690
|
-
// The checks above awaited native reads. A restore
|
|
2691
|
-
// makes this proof one for an older subject, so it can't settle the current outcome.
|
|
2692
|
-
const
|
|
2921
|
+
// The checks above awaited native reads. A restore or subset launch recorded since, or a changed binding or expected
|
|
2922
|
+
// token, makes this proof one for an older subject, so it can't settle the current outcome.
|
|
2923
|
+
const latestAttempt = this.currentRestoreAttempt(rigId, nodeId);
|
|
2693
2924
|
const latestBinding = this.db.prepare("SELECT tmux_session FROM bindings WHERE node_id = ?").get(nodeId);
|
|
2694
2925
|
const latestSession = this.db.prepare("SELECT session_name, resume_token FROM sessions WHERE node_id = ? ORDER BY created_at DESC, id DESC LIMIT 1").get(nodeId);
|
|
2695
|
-
if (
|
|
2926
|
+
if (latestAttempt?.attemptId !== attemptId || latestBinding?.tmux_session !== sessionName
|
|
2696
2927
|
|| latestSession?.session_name !== sessionName || latestSession.resume_token !== expectedResumeToken) {
|
|
2697
2928
|
return { ok: false, code: "proof_superseded", attemptId, detail: "A newer restore attempt, binding or resume token was recorded while the live seat was checked, so this proof doesn't settle the current outcome." };
|
|
2698
2929
|
}
|
|
@@ -2705,9 +2936,34 @@ export class RestoreOrchestrator {
|
|
|
2705
2936
|
}
|
|
2706
2937
|
return { ok: true, attemptId, from: fromStatus, to: "operator_recovered", evidence };
|
|
2707
2938
|
}
|
|
2708
|
-
|
|
2939
|
+
/** A node's latest restore attempt and its outcome there (null when that attempt has no record of it). A full restore's
|
|
2940
|
+
* attempt is its `restore.started`, with the outcome in the `restore.completed` after it. A subset launch
|
|
2941
|
+
* (`rig launch --seats`) records only its `restore.subset_completed`, which is its attempt; a later one that names the
|
|
2942
|
+
* node is the node's latest attempt. */
|
|
2943
|
+
currentRestoreAttempt(rigId, nodeId) {
|
|
2944
|
+
const nodeStatusIn = (payload) => {
|
|
2945
|
+
try {
|
|
2946
|
+
return JSON.parse(payload).result?.nodes?.find((n) => n.nodeId === nodeId)?.status ?? null;
|
|
2947
|
+
}
|
|
2948
|
+
catch {
|
|
2949
|
+
return null; // payload corruption — treat as no node record found
|
|
2950
|
+
}
|
|
2951
|
+
};
|
|
2952
|
+
const started = this.db.prepare("SELECT seq FROM events WHERE rig_id = ? AND type = 'restore.started' ORDER BY seq DESC LIMIT 1").get(rigId);
|
|
2953
|
+
const subsets = this.db.prepare("SELECT seq, payload FROM events WHERE rig_id = ? AND type = 'restore.subset_completed' AND seq > ? ORDER BY seq DESC").all(rigId, started?.seq ?? 0);
|
|
2954
|
+
for (const subset of subsets) {
|
|
2955
|
+
const status = nodeStatusIn(subset.payload);
|
|
2956
|
+
if (status)
|
|
2957
|
+
return { attemptId: subset.seq, status };
|
|
2958
|
+
}
|
|
2959
|
+
if (!started)
|
|
2960
|
+
return null;
|
|
2961
|
+
const completed = this.db.prepare("SELECT payload FROM events WHERE rig_id = ? AND type = 'restore.completed' AND seq > ? ORDER BY seq DESC LIMIT 1").get(rigId, started.seq);
|
|
2962
|
+
return { attemptId: started.seq, status: completed ? nodeStatusIn(completed.payload) : null };
|
|
2963
|
+
}
|
|
2964
|
+
writeCheckpointFile(cwd, sessionName, checkpoint) {
|
|
2709
2965
|
try {
|
|
2710
|
-
const filePath = join(cwd,
|
|
2966
|
+
const filePath = join(cwd, checkpointFileName(sessionName));
|
|
2711
2967
|
const content = [
|
|
2712
2968
|
"# OpenRig Checkpoint",
|
|
2713
2969
|
"",
|