@openrig/cli 0.6.10 → 0.6.12
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 -4
- package/daemon/assets/claude-statusline-context.cjs +2 -0
- package/daemon/assets/guidance/openrig-start.md +2 -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 +30 -7
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +7 -7
- package/daemon/assets/plugins/openrig-core/hooks/codex.json +2 -2
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +77 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/compaction-restore-bridge.cjs +23 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus-health.cjs +4 -2
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +69 -16
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +24 -0
- package/daemon/assets/plugins/openrig-core/skills/delegating-work/SKILL.md +25 -5
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +4 -2
- package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +10 -1
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +2 -2
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +172 -11
- package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +7 -4
- package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +8 -0
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +6 -1
- package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +5 -2
- package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +19 -0
- package/daemon/assets/skills/rigs/SKILL.md +56 -10
- 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 +131 -37
- package/daemon/context-packs/reference/getting-started.md +39 -6
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +66 -5
- package/daemon/context-packs/reference/whats-new.md +169 -147
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +24 -0
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +2 -2
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +3 -3
- package/daemon/context-packs/skills/core/openrig-software-factory/SKILL.md +0 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +7 -4
- 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/SKILL.md +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/SKILL.md +25 -5
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +3 -3
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/SKILL.md +4 -2
- 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 +10 -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 +172 -11
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/SKILL.md +7 -4
- 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/SKILL.md +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/SKILL.md +8 -0
- 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 +6 -1
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/SKILL.md +5 -2
- 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/SKILL.md +19 -0
- 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/bounded-probe-exec.d.ts +45 -0
- package/daemon/dist/adapters/bounded-probe-exec.d.ts.map +1 -0
- package/daemon/dist/adapters/bounded-probe-exec.js +204 -0
- package/daemon/dist/adapters/bounded-probe-exec.js.map +1 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts +17 -15
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +200 -105
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +14 -3
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +5 -0
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +17 -3
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +73 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +230 -48
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +46 -0
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -0
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +102 -0
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -0
- package/daemon/dist/adapters/compose-services-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/compose-services-adapter.js +2 -1
- package/daemon/dist/adapters/compose-services-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 +35 -10
- package/daemon/dist/adapters/kernel-authority.js.map +1 -1
- package/daemon/dist/adapters/omp-rpc-frame.d.ts +51 -0
- package/daemon/dist/adapters/omp-rpc-frame.d.ts.map +1 -0
- package/daemon/dist/adapters/omp-rpc-frame.js +153 -0
- package/daemon/dist/adapters/omp-rpc-frame.js.map +1 -0
- package/daemon/dist/adapters/pi-openrouter-charge.d.ts +67 -0
- package/daemon/dist/adapters/pi-openrouter-charge.d.ts.map +1 -0
- package/daemon/dist/adapters/pi-openrouter-charge.js +228 -0
- package/daemon/dist/adapters/pi-openrouter-charge.js.map +1 -0
- package/daemon/dist/adapters/pi-readiness.d.ts +81 -5
- package/daemon/dist/adapters/pi-readiness.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-readiness.js +193 -27
- package/daemon/dist/adapters/pi-readiness.js.map +1 -1
- package/daemon/dist/adapters/pi-resume.d.ts +4 -0
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +2 -0
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.d.ts +4 -0
- package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner-protocol.js +5 -0
- package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +67 -2
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +336 -13
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +16 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +18 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/preflight-exec.d.ts +3 -0
- package/daemon/dist/adapters/preflight-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/preflight-exec.js +15 -7
- package/daemon/dist/adapters/preflight-exec.js.map +1 -1
- package/daemon/dist/adapters/replace-file.d.ts +8 -0
- package/daemon/dist/adapters/replace-file.d.ts.map +1 -0
- package/daemon/dist/adapters/replace-file.js +32 -0
- package/daemon/dist/adapters/replace-file.js.map +1 -0
- package/daemon/dist/adapters/tmux-control.d.ts +119 -0
- package/daemon/dist/adapters/tmux-control.d.ts.map +1 -0
- package/daemon/dist/adapters/tmux-control.js +547 -0
- package/daemon/dist/adapters/tmux-control.js.map +1 -0
- package/daemon/dist/adapters/tmux-exec.d.ts +18 -4
- package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-exec.js +98 -17
- package/daemon/dist/adapters/tmux-exec.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +75 -15
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +352 -57
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/composer-prompts-surface.d.ts +2 -0
- package/daemon/dist/composer-prompts-surface.d.ts.map +1 -0
- package/daemon/dist/composer-prompts-surface.js +2 -0
- package/daemon/dist/composer-prompts-surface.js.map +1 -0
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +26 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/100_typing_guard_modes.d.ts +3 -0
- package/daemon/dist/db/migrations/100_typing_guard_modes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/100_typing_guard_modes.js +10 -0
- package/daemon/dist/db/migrations/100_typing_guard_modes.js.map +1 -0
- package/daemon/dist/db/migrations/103_session_stop_intent.d.ts +4 -0
- package/daemon/dist/db/migrations/103_session_stop_intent.d.ts.map +1 -0
- package/daemon/dist/db/migrations/103_session_stop_intent.js +9 -0
- package/daemon/dist/db/migrations/103_session_stop_intent.js.map +1 -0
- package/daemon/dist/db/migrations/104_node_effort_choice.d.ts +3 -0
- package/daemon/dist/db/migrations/104_node_effort_choice.d.ts.map +1 -0
- package/daemon/dist/db/migrations/104_node_effort_choice.js +10 -0
- package/daemon/dist/db/migrations/104_node_effort_choice.js.map +1 -0
- package/daemon/dist/db/migrations/105_usage_samples_client_cost.d.ts +9 -0
- package/daemon/dist/db/migrations/105_usage_samples_client_cost.d.ts.map +1 -0
- package/daemon/dist/db/migrations/105_usage_samples_client_cost.js +14 -0
- package/daemon/dist/db/migrations/105_usage_samples_client_cost.js.map +1 -0
- package/daemon/dist/db/migrations/107_pi_usage_entries.d.ts +10 -0
- package/daemon/dist/db/migrations/107_pi_usage_entries.d.ts.map +1 -0
- package/daemon/dist/db/migrations/107_pi_usage_entries.js +38 -0
- package/daemon/dist/db/migrations/107_pi_usage_entries.js.map +1 -0
- package/daemon/dist/db/migrations/108_pi_usage_charges.d.ts +12 -0
- package/daemon/dist/db/migrations/108_pi_usage_charges.d.ts.map +1 -0
- package/daemon/dist/db/migrations/108_pi_usage_charges.js +39 -0
- package/daemon/dist/db/migrations/108_pi_usage_charges.js.map +1 -0
- package/daemon/dist/db/migrations/109_mode_posture_coexist.d.ts +5 -0
- package/daemon/dist/db/migrations/109_mode_posture_coexist.d.ts.map +1 -0
- package/daemon/dist/db/migrations/109_mode_posture_coexist.js +11 -0
- package/daemon/dist/db/migrations/109_mode_posture_coexist.js.map +1 -0
- package/daemon/dist/db/migrations/110_workflow_instance_scope.d.ts +10 -0
- package/daemon/dist/db/migrations/110_workflow_instance_scope.d.ts.map +1 -0
- package/daemon/dist/db/migrations/110_workflow_instance_scope.js +14 -0
- package/daemon/dist/db/migrations/110_workflow_instance_scope.js.map +1 -0
- package/daemon/dist/db/migrations/111_seat_env.d.ts +6 -0
- package/daemon/dist/db/migrations/111_seat_env.d.ts.map +1 -0
- package/daemon/dist/db/migrations/111_seat_env.js +11 -0
- package/daemon/dist/db/migrations/111_seat_env.js.map +1 -0
- package/daemon/dist/db/migrations/112_queue_transitions_ts_qitem.d.ts +3 -0
- package/daemon/dist/db/migrations/112_queue_transitions_ts_qitem.d.ts.map +1 -0
- package/daemon/dist/db/migrations/112_queue_transitions_ts_qitem.js +14 -0
- package/daemon/dist/db/migrations/112_queue_transitions_ts_qitem.js.map +1 -0
- package/daemon/dist/db/migrations/113_applied_launch_daemon_opt_out.d.ts +3 -0
- package/daemon/dist/db/migrations/113_applied_launch_daemon_opt_out.d.ts.map +1 -0
- package/daemon/dist/db/migrations/113_applied_launch_daemon_opt_out.js +9 -0
- package/daemon/dist/db/migrations/113_applied_launch_daemon_opt_out.js.map +1 -0
- package/daemon/dist/db/migrations/114_session_agent_app.d.ts +3 -0
- package/daemon/dist/db/migrations/114_session_agent_app.d.ts.map +1 -0
- package/daemon/dist/db/migrations/114_session_agent_app.js +11 -0
- package/daemon/dist/db/migrations/114_session_agent_app.js.map +1 -0
- package/daemon/dist/db/migrations/115_thread_seat_map_channel_key.d.ts +3 -0
- package/daemon/dist/db/migrations/115_thread_seat_map_channel_key.d.ts.map +1 -0
- package/daemon/dist/db/migrations/115_thread_seat_map_channel_key.js +28 -0
- package/daemon/dist/db/migrations/115_thread_seat_map_channel_key.js.map +1 -0
- package/daemon/dist/domain/active-occupant.d.ts +14 -0
- package/daemon/dist/domain/active-occupant.d.ts.map +1 -1
- package/daemon/dist/domain/active-occupant.js +17 -0
- package/daemon/dist/domain/active-occupant.js.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.d.ts +13 -5
- package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.js +14 -2
- package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +2 -0
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +14 -8
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-images/agent-image-library-service.js +1 -1
- package/daemon/dist/domain/agent-images/agent-image-library-service.js.map +1 -1
- package/daemon/dist/domain/agent-images/manifest-parser.js +1 -1
- package/daemon/dist/domain/agent-images/manifest-parser.js.map +1 -1
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +21 -3
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/applied-launch-observation-store.d.ts +2 -0
- package/daemon/dist/domain/applied-launch-observation-store.d.ts.map +1 -1
- package/daemon/dist/domain/applied-launch-observation-store.js +27 -3
- package/daemon/dist/domain/applied-launch-observation-store.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts +3 -0
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +49 -16
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/built-in-runtimes.d.ts +10 -0
- package/daemon/dist/domain/built-in-runtimes.d.ts.map +1 -0
- package/daemon/dist/domain/built-in-runtimes.js +14 -0
- package/daemon/dist/domain/built-in-runtimes.js.map +1 -0
- package/daemon/dist/domain/bundle-archive.d.ts +3 -1
- package/daemon/dist/domain/bundle-archive.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-archive.js +5 -3
- package/daemon/dist/domain/bundle-archive.js.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.d.ts +20 -0
- package/daemon/dist/domain/bundle-behaviour.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.js +57 -1
- package/daemon/dist/domain/bundle-behaviour.js.map +1 -1
- package/daemon/dist/domain/bundle-integrity.d.ts +5 -2
- package/daemon/dist/domain/bundle-integrity.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-integrity.js +39 -8
- package/daemon/dist/domain/bundle-integrity.js.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.d.ts +3 -1
- package/daemon/dist/domain/bundle-source-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.js +7 -2
- package/daemon/dist/domain/bundle-source-resolver.js.map +1 -1
- package/daemon/dist/domain/bundle-types.d.ts +6 -0
- package/daemon/dist/domain/bundle-types.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-types.js +26 -0
- package/daemon/dist/domain/bundle-types.js.map +1 -1
- package/daemon/dist/domain/chat-repository.d.ts.map +1 -1
- package/daemon/dist/domain/chat-repository.js +3 -2
- package/daemon/dist/domain/chat-repository.js.map +1 -1
- package/daemon/dist/domain/claim-service.d.ts +6 -0
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +20 -1
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +63 -2
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +154 -16
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-core-plugin-env.d.ts +26 -0
- package/daemon/dist/domain/claude-core-plugin-env.d.ts.map +1 -0
- package/daemon/dist/domain/claude-core-plugin-env.js +86 -0
- package/daemon/dist/domain/claude-core-plugin-env.js.map +1 -0
- package/daemon/dist/domain/claude-managed-launch.d.ts +13 -6
- package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.js +58 -5
- package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
- package/daemon/dist/domain/codex-network-default.d.ts +3 -0
- package/daemon/dist/domain/codex-network-default.d.ts.map +1 -1
- package/daemon/dist/domain/codex-network-default.js +1 -1
- package/daemon/dist/domain/codex-network-default.js.map +1 -1
- package/daemon/dist/domain/codex-pane-patterns.d.ts +2 -0
- package/daemon/dist/domain/codex-pane-patterns.d.ts.map +1 -0
- package/daemon/dist/domain/codex-pane-patterns.js +5 -0
- package/daemon/dist/domain/codex-pane-patterns.js.map +1 -0
- package/daemon/dist/domain/codex-thread-id.d.ts +22 -3
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +65 -16
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/community-harness-presets.d.ts +38 -0
- package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -0
- package/daemon/dist/domain/community-harness-presets.js +155 -0
- package/daemon/dist/domain/community-harness-presets.js.map +1 -0
- package/daemon/dist/domain/composer-prompts.d.ts +118 -0
- package/daemon/dist/domain/composer-prompts.d.ts.map +1 -0
- package/daemon/dist/domain/composer-prompts.js +165 -0
- package/daemon/dist/domain/composer-prompts.js.map +1 -0
- package/daemon/dist/domain/context-monitor.d.ts +3 -0
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +59 -23
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/context-packs/context-pack-library-service.js +2 -2
- package/daemon/dist/domain/context-packs/context-pack-library-service.js.map +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.js +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts +4 -0
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +1 -0
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/current-work.js +2 -2
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/cwd-resolution.d.ts +8 -0
- package/daemon/dist/domain/cwd-resolution.d.ts.map +1 -1
- package/daemon/dist/domain/cwd-resolution.js +24 -3
- package/daemon/dist/domain/cwd-resolution.js.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.d.ts +32 -0
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -0
- package/daemon/dist/domain/draft-aware-delivery.js +156 -0
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -0
- package/daemon/dist/domain/event-bus.d.ts +10 -1
- package/daemon/dist/domain/event-bus.d.ts.map +1 -1
- package/daemon/dist/domain/event-bus.js +25 -0
- package/daemon/dist/domain/event-bus.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +76 -10
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/frontmatter.d.ts +11 -0
- package/daemon/dist/domain/frontmatter.d.ts.map +1 -0
- package/daemon/dist/domain/frontmatter.js +20 -0
- package/daemon/dist/domain/frontmatter.js.map +1 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.d.ts +11 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/gateway-subsystem.js +7 -0
- package/daemon/dist/domain/gateway/gateway-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts +6 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +7 -0
- package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/bot-inbox.d.ts +54 -0
- package/daemon/dist/domain/gateway/slack/bot-inbox.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/bot-inbox.js +86 -0
- package/daemon/dist/domain/gateway/slack/bot-inbox.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/capabilities.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/capabilities.js +1 -0
- package/daemon/dist/domain/gateway/slack/capabilities.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/channel-map.d.ts +11 -1
- package/daemon/dist/domain/gateway/slack/channel-map.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/channel-map.js +31 -6
- package/daemon/dist/domain/gateway/slack/channel-map.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/channel-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/channel-recovery.js +4 -3
- package/daemon/dist/domain/gateway/slack/channel-recovery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.d.ts +14 -0
- package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/config.js +28 -0
- package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/forwarding.d.ts +32 -0
- package/daemon/dist/domain/gateway/slack/forwarding.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/forwarding.js +76 -0
- package/daemon/dist/domain/gateway/slack/forwarding.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +99 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +325 -7
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +28 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +105 -4
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.js +1 -0
- package/daemon/dist/domain/gateway/slack/outbound-driver.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +10 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +13 -0
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +12 -2
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +133 -20
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.d.ts +9 -2
- package/daemon/dist/domain/gateway/slack/state-store.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/state-store.js +24 -2
- package/daemon/dist/domain/gateway/slack/state-store.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/thread-routing.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-routing.js +18 -7
- package/daemon/dist/domain/gateway/slack/thread-routing.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts +17 -6
- package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/thread-seat-map.js +41 -23
- package/daemon/dist/domain/gateway/slack/thread-seat-map.js.map +1 -1
- package/daemon/dist/domain/history-query.d.ts.map +1 -1
- package/daemon/dist/domain/history-query.js +2 -1
- package/daemon/dist/domain/history-query.js.map +1 -1
- package/daemon/dist/domain/home-isolation.d.ts +18 -0
- package/daemon/dist/domain/home-isolation.d.ts.map +1 -0
- package/daemon/dist/domain/home-isolation.js +75 -0
- package/daemon/dist/domain/home-isolation.js.map +1 -0
- package/daemon/dist/domain/hosts/remote-daemon-http.d.ts +22 -0
- package/daemon/dist/domain/hosts/remote-daemon-http.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/remote-daemon-http.js +43 -3
- package/daemon/dist/domain/hosts/remote-daemon-http.js.map +1 -1
- package/daemon/dist/domain/inbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/inbox-handler.js +34 -32
- package/daemon/dist/domain/inbox-handler.js.map +1 -1
- package/daemon/dist/domain/mission-control/notification-adapter-ntfy.js +12 -2
- package/daemon/dist/domain/mission-control/notification-adapter-ntfy.js.map +1 -1
- package/daemon/dist/domain/mission-control/notification-dispatcher.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/notification-dispatcher.js +2 -1
- package/daemon/dist/domain/mission-control/notification-dispatcher.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts +63 -0
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js +130 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/daemon/dist/domain/model-divergence/effective-model-readers.d.ts +42 -0
- package/daemon/dist/domain/model-divergence/effective-model-readers.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/effective-model-readers.js +160 -5
- package/daemon/dist/domain/model-divergence/effective-model-readers.js.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +8 -2
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js +10 -5
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
- package/daemon/dist/domain/native-process-lineage.d.ts +54 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +181 -29
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +3 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +43 -6
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +41 -16
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +18 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +62 -3
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/openrouter-charge.d.ts +42 -0
- package/daemon/dist/domain/openrouter-charge.d.ts.map +1 -0
- package/daemon/dist/domain/openrouter-charge.js +57 -0
- package/daemon/dist/domain/openrouter-charge.js.map +1 -0
- package/daemon/dist/domain/pane-cutover.d.ts +27 -0
- package/daemon/dist/domain/pane-cutover.d.ts.map +1 -0
- package/daemon/dist/domain/pane-cutover.js +37 -0
- package/daemon/dist/domain/pane-cutover.js.map +1 -0
- package/daemon/dist/domain/parent-session-env.d.ts +8 -0
- package/daemon/dist/domain/parent-session-env.d.ts.map +1 -0
- package/daemon/dist/domain/parent-session-env.js +37 -0
- package/daemon/dist/domain/parent-session-env.js.map +1 -0
- package/daemon/dist/domain/parked-query.d.ts +5 -0
- package/daemon/dist/domain/parked-query.d.ts.map +1 -1
- package/daemon/dist/domain/parked-query.js +9 -2
- package/daemon/dist/domain/parked-query.js.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
- package/daemon/dist/domain/periodic-snapshot-scheduler.js +27 -3
- package/daemon/dist/domain/periodic-snapshot-scheduler.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/permission-policy/policy-spec.d.ts.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-spec.js +5 -7
- package/daemon/dist/domain/permission-policy/policy-spec.js.map +1 -1
- package/daemon/dist/domain/pi-usage-entries-store.d.ts +41 -0
- package/daemon/dist/domain/pi-usage-entries-store.d.ts.map +1 -0
- package/daemon/dist/domain/pi-usage-entries-store.js +173 -0
- package/daemon/dist/domain/pi-usage-entries-store.js.map +1 -0
- package/daemon/dist/domain/pi-usage-facts.d.ts +90 -0
- package/daemon/dist/domain/pi-usage-facts.d.ts.map +1 -0
- package/daemon/dist/domain/pi-usage-facts.js +165 -0
- package/daemon/dist/domain/pi-usage-facts.js.map +1 -0
- package/daemon/dist/domain/pod-bundle-assembler.d.ts +2 -0
- package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.js +4 -0
- package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
- package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts.map +1 -1
- package/daemon/dist/domain/policies/artifact-pool-helpers.js +6 -4
- package/daemon/dist/domain/policies/artifact-pool-helpers.js.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +11 -0
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +81 -11
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts +2 -0
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +6 -3
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/progress/progress-indexer.js +1 -1
- package/daemon/dist/domain/progress/progress-indexer.js.map +1 -1
- package/daemon/dist/domain/project-lifecycle-compiler.d.ts +4 -0
- package/daemon/dist/domain/project-lifecycle-compiler.d.ts.map +1 -1
- package/daemon/dist/domain/project-lifecycle-compiler.js +63 -3
- package/daemon/dist/domain/project-lifecycle-compiler.js.map +1 -1
- package/daemon/dist/domain/proof/judgments.d.ts +10 -5
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +57 -20
- package/daemon/dist/domain/proof/judgments.js.map +1 -1
- package/daemon/dist/domain/provider/claude-auth-status-reader.d.ts +33 -0
- package/daemon/dist/domain/provider/claude-auth-status-reader.d.ts.map +1 -0
- package/daemon/dist/domain/provider/claude-auth-status-reader.js +195 -0
- package/daemon/dist/domain/provider/claude-auth-status-reader.js.map +1 -0
- package/daemon/dist/domain/provider/claude-usage-windows.d.ts +68 -0
- package/daemon/dist/domain/provider/claude-usage-windows.d.ts.map +1 -0
- package/daemon/dist/domain/provider/claude-usage-windows.js +260 -0
- package/daemon/dist/domain/provider/claude-usage-windows.js.map +1 -0
- package/daemon/dist/domain/provider/codex-auth-reader.d.ts +14 -0
- package/daemon/dist/domain/provider/codex-auth-reader.d.ts.map +1 -1
- package/daemon/dist/domain/provider/codex-auth-reader.js +41 -12
- package/daemon/dist/domain/provider/codex-auth-reader.js.map +1 -1
- package/daemon/dist/domain/provider/codex-limit-banner.d.ts +2 -2
- package/daemon/dist/domain/provider/codex-limit-banner.d.ts.map +1 -1
- package/daemon/dist/domain/provider/codex-limit-banner.js +56 -9
- package/daemon/dist/domain/provider/codex-limit-banner.js.map +1 -1
- package/daemon/dist/domain/provider/codex-usage-reader.d.ts +33 -0
- package/daemon/dist/domain/provider/codex-usage-reader.d.ts.map +1 -0
- package/daemon/dist/domain/provider/codex-usage-reader.js +117 -0
- package/daemon/dist/domain/provider/codex-usage-reader.js.map +1 -0
- package/daemon/dist/domain/provider/codex-usage-windows.d.ts +39 -0
- package/daemon/dist/domain/provider/codex-usage-windows.d.ts.map +1 -0
- package/daemon/dist/domain/provider/codex-usage-windows.js +101 -0
- package/daemon/dist/domain/provider/codex-usage-windows.js.map +1 -0
- package/daemon/dist/domain/provider/provider-seat-accounts.d.ts +18 -0
- package/daemon/dist/domain/provider/provider-seat-accounts.d.ts.map +1 -0
- package/daemon/dist/domain/provider/provider-seat-accounts.js +159 -0
- package/daemon/dist/domain/provider/provider-seat-accounts.js.map +1 -0
- package/daemon/dist/domain/provider/provider-service-impl.d.ts +15 -0
- package/daemon/dist/domain/provider/provider-service-impl.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.js +45 -1
- package/daemon/dist/domain/provider/provider-service-impl.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service.d.ts +7 -0
- package/daemon/dist/domain/provider/provider-service.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-types.d.ts +133 -0
- package/daemon/dist/domain/provider/provider-types.d.ts.map +1 -1
- package/daemon/dist/domain/provider/reactive-tap.js +2 -0
- package/daemon/dist/domain/provider/reactive-tap.js.map +1 -1
- package/daemon/dist/domain/provider/subscription-moves.d.ts +77 -0
- package/daemon/dist/domain/provider/subscription-moves.d.ts.map +1 -0
- package/daemon/dist/domain/provider/subscription-moves.js +140 -0
- package/daemon/dist/domain/provider/subscription-moves.js.map +1 -0
- package/daemon/dist/domain/provider/usage-across-hosts.d.ts +162 -0
- package/daemon/dist/domain/provider/usage-across-hosts.d.ts.map +1 -0
- package/daemon/dist/domain/provider/usage-across-hosts.js +563 -0
- package/daemon/dist/domain/provider/usage-across-hosts.js.map +1 -0
- package/daemon/dist/domain/provider/usage-windows.d.ts +88 -0
- package/daemon/dist/domain/provider/usage-windows.d.ts.map +1 -0
- package/daemon/dist/domain/provider/usage-windows.js +189 -0
- package/daemon/dist/domain/provider/usage-windows.js.map +1 -0
- package/daemon/dist/domain/ps-projection.d.ts +5 -2
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +27 -25
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-owner.d.ts +6 -0
- package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
- package/daemon/dist/domain/queue-owner.js +22 -0
- package/daemon/dist/domain/queue-owner.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +91 -14
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +347 -89
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +29 -27
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +23 -2
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +98 -39
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +2 -2
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +27 -8
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts +7 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.js +54 -5
- package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
- package/daemon/dist/domain/reply-to-choice.d.ts +2 -0
- package/daemon/dist/domain/reply-to-choice.d.ts.map +1 -1
- package/daemon/dist/domain/reply-to-choice.js +2 -0
- package/daemon/dist/domain/reply-to-choice.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +8 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +15 -5
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +4 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +111 -18
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts +4 -0
- package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.js +35 -20
- package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
- package/daemon/dist/domain/restore-policy.d.ts +26 -0
- package/daemon/dist/domain/restore-policy.d.ts.map +1 -0
- package/daemon/dist/domain/restore-policy.js +22 -0
- package/daemon/dist/domain/restore-policy.js.map +1 -0
- package/daemon/dist/domain/restore-preconditions.d.ts +2 -0
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +6 -1
- package/daemon/dist/domain/restore-preconditions.js.map +1 -1
- package/daemon/dist/domain/restore-runtime-compatibility.d.ts +3 -0
- package/daemon/dist/domain/restore-runtime-compatibility.d.ts.map +1 -0
- package/daemon/dist/domain/restore-runtime-compatibility.js +7 -0
- package/daemon/dist/domain/restore-runtime-compatibility.js.map +1 -0
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +10 -5
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +109 -21
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/resume-token-capture.d.ts +1 -1
- package/daemon/dist/domain/resume-token-capture.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-capture.js +7 -1
- package/daemon/dist/domain/resume-token-capture.js.map +1 -1
- package/daemon/dist/domain/review/compose.d.ts.map +1 -1
- package/daemon/dist/domain/review/compose.js +5 -4
- package/daemon/dist/domain/review/compose.js.map +1 -1
- package/daemon/dist/domain/review/gather.d.ts +2 -1
- package/daemon/dist/domain/review/gather.d.ts.map +1 -1
- package/daemon/dist/domain/review/gather.js +25 -17
- package/daemon/dist/domain/review/gather.js.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.d.ts +31 -8
- package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.js +253 -98
- package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/rig-mode/rig-mode-store.d.ts +11 -1
- package/daemon/dist/domain/rig-mode/rig-mode-store.d.ts.map +1 -1
- package/daemon/dist/domain/rig-mode/rig-mode-store.js +69 -48
- package/daemon/dist/domain/rig-mode/rig-mode-store.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +18 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +52 -1
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +4 -1
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +40 -2
- 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 +7 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +4 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +3 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +28 -5
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +25 -11
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +24 -2
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +12 -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-verifier.d.ts +15 -1
- package/daemon/dist/domain/runtime-verifier.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-verifier.js +28 -4
- package/daemon/dist/domain/runtime-verifier.js.map +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.js +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.js.map +1 -1
- package/daemon/dist/domain/scope/scope-view-projection.d.ts +4 -2
- package/daemon/dist/domain/scope/scope-view-projection.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-view-projection.js +29 -14
- package/daemon/dist/domain/scope/scope-view-projection.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +9 -2
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +100 -15
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +3 -0
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +114 -7
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +36 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +255 -22
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-effort.d.ts +115 -0
- package/daemon/dist/domain/seat-effort.d.ts.map +1 -0
- package/daemon/dist/domain/seat-effort.js +233 -0
- package/daemon/dist/domain/seat-effort.js.map +1 -0
- package/daemon/dist/domain/seat-env.d.ts +37 -0
- package/daemon/dist/domain/seat-env.d.ts.map +1 -0
- package/daemon/dist/domain/seat-env.js +94 -0
- package/daemon/dist/domain/seat-env.js.map +1 -0
- package/daemon/dist/domain/seat-handover-service.d.ts +5 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +22 -4
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +19 -2
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +234 -5
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +651 -95
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +303 -0
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -0
- package/daemon/dist/domain/seat-restart-in-place.js +914 -0
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -0
- package/daemon/dist/domain/seat-structural-activity-service.d.ts +7 -3
- package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.js +50 -15
- package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
- package/daemon/dist/domain/session-fingerprinter.d.ts.map +1 -1
- package/daemon/dist/domain/session-fingerprinter.js +9 -5
- package/daemon/dist/domain/session-fingerprinter.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +16 -1
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +35 -3
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +141 -4
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +1496 -139
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts +2 -0
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js +16 -4
- package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +10 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +84 -4
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/snapshot-repository.d.ts +3 -0
- package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-repository.js +19 -2
- package/daemon/dist/domain/snapshot-repository.js.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js +24 -21
- package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
- package/daemon/dist/domain/spec-validation-advisory.js +1 -1
- package/daemon/dist/domain/spec-validation-advisory.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +33 -3
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +220 -61
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +13 -3
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +34 -25
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/startup-validation.d.ts.map +1 -1
- package/daemon/dist/domain/startup-validation.js +3 -0
- package/daemon/dist/domain/startup-validation.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +10 -8
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +11 -33
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/text-cut.d.ts +4 -0
- package/daemon/dist/domain/text-cut.d.ts.map +1 -0
- package/daemon/dist/domain/text-cut.js +7 -0
- package/daemon/dist/domain/text-cut.js.map +1 -0
- package/daemon/dist/domain/time-bound-advisory.d.ts +5 -0
- package/daemon/dist/domain/time-bound-advisory.d.ts.map +1 -0
- package/daemon/dist/domain/time-bound-advisory.js +25 -0
- package/daemon/dist/domain/time-bound-advisory.js.map +1 -0
- package/daemon/dist/domain/transcript-capture.d.ts +7 -0
- package/daemon/dist/domain/transcript-capture.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-capture.js +22 -1
- package/daemon/dist/domain/transcript-capture.js.map +1 -1
- package/daemon/dist/domain/transcript-rotation.d.ts +12 -4
- package/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-rotation.js +185 -23
- package/daemon/dist/domain/transcript-rotation.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts +1 -1
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +8 -4
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +82 -3
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/usage-samples-store.d.ts +8 -0
- package/daemon/dist/domain/usage-samples-store.d.ts.map +1 -1
- package/daemon/dist/domain/usage-samples-store.js +24 -5
- package/daemon/dist/domain/usage-samples-store.js.map +1 -1
- package/daemon/dist/domain/usage-series.d.ts +154 -2
- package/daemon/dist/domain/usage-series.d.ts.map +1 -1
- package/daemon/dist/domain/usage-series.js +208 -9
- package/daemon/dist/domain/usage-series.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +67 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/wake-resolver.js +2 -2
- package/daemon/dist/domain/wake-resolver.js.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +3 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +32 -4
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +1 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +31 -2
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/whoami-service.d.ts +4 -1
- package/daemon/dist/domain/whoami-service.d.ts.map +1 -1
- package/daemon/dist/domain/whoami-service.js +25 -19
- package/daemon/dist/domain/whoami-service.js.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.js +3 -1
- package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
- package/daemon/dist/domain/workflow-exception-readiness.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-exception-readiness.js +7 -3
- package/daemon/dist/domain/workflow-exception-readiness.js.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.d.ts +11 -0
- package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-instance-store.js +18 -4
- package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +5 -3
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-rig-placeholder.d.ts +24 -0
- package/daemon/dist/domain/workflow-rig-placeholder.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-rig-placeholder.js +43 -0
- package/daemon/dist/domain/workflow-rig-placeholder.js.map +1 -0
- package/daemon/dist/domain/workflow-runtime.d.ts +10 -1
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +26 -13
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workflow-scope.d.ts +50 -0
- package/daemon/dist/domain/workflow-scope.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-scope.js +129 -0
- package/daemon/dist/domain/workflow-scope.js.map +1 -0
- package/daemon/dist/domain/workflow-spec-cache.d.ts +10 -0
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +13 -0
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/domain/workflow-types.d.ts +4 -0
- 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/workflow-validator.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-validator.js +3 -1
- package/daemon/dist/domain/workflow-validator.js.map +1 -1
- package/daemon/dist/domain/workspace/project-read.d.ts +4 -0
- package/daemon/dist/domain/workspace/project-read.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/project-read.js +23 -8
- package/daemon/dist/domain/workspace/project-read.js.map +1 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +16 -0
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +1 -1
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/middleware/json-body-error.d.ts +4 -3
- package/daemon/dist/middleware/json-body-error.d.ts.map +1 -1
- package/daemon/dist/middleware/json-body-error.js +18 -4
- package/daemon/dist/middleware/json-body-error.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +78 -0
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/bundles.d.ts.map +1 -1
- package/daemon/dist/routes/bundles.js +39 -16
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/chat.d.ts.map +1 -1
- package/daemon/dist/routes/chat.js +23 -2
- package/daemon/dist/routes/chat.js.map +1 -1
- package/daemon/dist/routes/community-harnesses.d.ts +3 -0
- package/daemon/dist/routes/community-harnesses.d.ts.map +1 -0
- package/daemon/dist/routes/community-harnesses.js +18 -0
- package/daemon/dist/routes/community-harnesses.js.map +1 -0
- package/daemon/dist/routes/compaction.d.ts +3 -0
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +14 -2
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/events.js +26 -12
- package/daemon/dist/routes/events.js.map +1 -1
- package/daemon/dist/routes/gateway.d.ts +3 -0
- package/daemon/dist/routes/gateway.d.ts.map +1 -1
- package/daemon/dist/routes/gateway.js +15 -0
- package/daemon/dist/routes/gateway.js.map +1 -1
- package/daemon/dist/routes/hosts.d.ts.map +1 -1
- package/daemon/dist/routes/hosts.js +2 -1
- package/daemon/dist/routes/hosts.js.map +1 -1
- package/daemon/dist/routes/proof.d.ts.map +1 -1
- package/daemon/dist/routes/proof.js +99 -10
- package/daemon/dist/routes/proof.js.map +1 -1
- package/daemon/dist/routes/provider.d.ts +11 -1
- package/daemon/dist/routes/provider.d.ts.map +1 -1
- package/daemon/dist/routes/provider.js +204 -1
- package/daemon/dist/routes/provider.js.map +1 -1
- package/daemon/dist/routes/query-limit.d.ts +1 -0
- package/daemon/dist/routes/query-limit.d.ts.map +1 -1
- package/daemon/dist/routes/query-limit.js +1 -1
- package/daemon/dist/routes/query-limit.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +62 -9
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rig-mode.d.ts.map +1 -1
- package/daemon/dist/routes/rig-mode.js +66 -11
- package/daemon/dist/routes/rig-mode.js.map +1 -1
- package/daemon/dist/routes/rigs.js +5 -3
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
- package/daemon/dist/routes/scope-audit.js +10 -0
- package/daemon/dist/routes/scope-audit.js.map +1 -1
- package/daemon/dist/routes/scopes.d.ts.map +1 -1
- package/daemon/dist/routes/scopes.js +5 -3
- package/daemon/dist/routes/scopes.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +95 -12
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.js +1 -1
- package/daemon/dist/routes/startup.d.ts.map +1 -1
- package/daemon/dist/routes/startup.js +9 -2
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/telemetry.d.ts.map +1 -1
- package/daemon/dist/routes/telemetry.js +13 -3
- package/daemon/dist/routes/telemetry.js.map +1 -1
- package/daemon/dist/routes/transcripts.d.ts.map +1 -1
- package/daemon/dist/routes/transcripts.js +14 -5
- package/daemon/dist/routes/transcripts.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +13 -2
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/routes/up.d.ts.map +1 -1
- package/daemon/dist/routes/up.js +4 -0
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/workflow.d.ts.map +1 -1
- package/daemon/dist/routes/workflow.js +50 -1
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +4 -1
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/spec-validation-surface.d.ts +1 -1
- package/daemon/dist/spec-validation-surface.d.ts.map +1 -1
- package/daemon/dist/spec-validation-surface.js +1 -1
- package/daemon/dist/spec-validation-surface.js.map +1 -1
- package/daemon/dist/startup.d.ts +3 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +150 -54
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/workflow-scope-surface.d.ts +2 -0
- package/daemon/dist/workflow-scope-surface.d.ts.map +1 -0
- package/daemon/dist/workflow-scope-surface.js +2 -0
- package/daemon/dist/workflow-scope-surface.js.map +1 -0
- package/daemon/docs/reference/agent-spec.md +4 -2
- package/daemon/docs/reference/agent-startup-guide.md +114 -6
- package/daemon/docs/reference/claude-status-line.md +69 -0
- package/daemon/docs/reference/getting-started.md +39 -6
- package/daemon/docs/reference/keeping-a-watch.md +253 -0
- package/daemon/docs/reference/project-workspace.md +70 -1
- package/daemon/docs/reference/publishing-a-rig-bundle.md +6 -1
- package/daemon/docs/reference/refocus-channel.md +41 -5
- package/daemon/docs/reference/rig-bundle.md +26 -2
- package/daemon/docs/reference/rig-spec.md +66 -5
- package/daemon/docs/reference/schemas/bundle-behaviour.v1.schema.json +105 -2
- package/daemon/docs/reference/scoped-operating-posture.md +12 -2
- package/daemon/docs/reference/sdlc-conventions.md +50 -2
- package/daemon/docs/reference/seat-delivery.md +127 -0
- package/daemon/docs/reference/slack-app-setup.md +147 -17
- package/daemon/docs/reference/topology-naming.md +9 -0
- package/daemon/docs/reference/whats-new.md +169 -147
- package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +2 -2
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/SKILL.md +0 -1
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +7 -4
- package/daemon/specs/agents/shared/skills/core/topology-mutation-and-seat-management/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +1 -1
- package/daemon/specs/rigs/launch/demo/CULTURE.md +1 -1
- package/daemon/specs/rigs/launch/factory/CULTURE.md +1 -1
- package/daemon/specs/rigs/launch/factory/topology/rig/CRAFT.md +2 -2
- package/daemon/specs/rigs/launch/first-project/CULTURE.md +2 -1
- package/daemon/specs/rigs/launch/first-project-claude/CULTURE.md +2 -1
- package/daemon/specs/rigs/launch/first-project-mixed/CULTURE.md +2 -1
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +9 -2
- package/daemon/specs/rigs/launch/starter/CULTURE.md +2 -1
- package/daemon/specs/rigs/preview/product-team/CULTURE.md +1 -1
- package/dist/bin-wrapper.d.ts +2 -1
- package/dist/bin-wrapper.d.ts.map +1 -1
- package/dist/bin-wrapper.js +61 -4
- package/dist/bin-wrapper.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/bundle-behaviour.d.ts.map +1 -1
- package/dist/bundle-behaviour.js +22 -0
- package/dist/bundle-behaviour.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -3
- package/dist/client.js.map +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +1 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/ask.d.ts.map +1 -1
- package/dist/commands/ask.js +16 -5
- package/dist/commands/ask.js.map +1 -1
- package/dist/commands/bootstrap.d.ts.map +1 -1
- package/dist/commands/bootstrap.js +9 -5
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/bundle.d.ts.map +1 -1
- package/dist/commands/bundle.js +8 -0
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/capture.d.ts +4 -0
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +15 -2
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/community-harness.d.ts +4 -0
- package/dist/commands/community-harness.d.ts.map +1 -0
- package/dist/commands/community-harness.js +48 -0
- package/dist/commands/community-harness.js.map +1 -0
- package/dist/commands/compact.d.ts.map +1 -1
- package/dist/commands/compact.js +8 -4
- package/dist/commands/compact.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +8 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/crash-cart.d.ts.map +1 -1
- package/dist/commands/crash-cart.js +3 -5
- package/dist/commands/crash-cart.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +7 -5
- package/dist/commands/create.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 +2 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/launch.d.ts +1 -0
- package/dist/commands/launch.d.ts.map +1 -1
- package/dist/commands/launch.js +61 -10
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/policy.d.ts +2 -1
- package/dist/commands/policy.d.ts.map +1 -1
- package/dist/commands/policy.js +66 -7
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/proof.d.ts.map +1 -1
- package/dist/commands/proof.js +11 -5
- package/dist/commands/proof.js.map +1 -1
- package/dist/commands/provider.d.ts +2 -0
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +360 -1
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +15 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +53 -10
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +15 -5
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +172 -47
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/requirements.d.ts.map +1 -1
- package/dist/commands/requirements.js +8 -5
- package/dist/commands/requirements.js.map +1 -1
- package/dist/commands/restore.js +1 -1
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/rig-mode.d.ts.map +1 -1
- package/dist/commands/rig-mode.js +106 -18
- package/dist/commands/rig-mode.js.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +103 -44
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +290 -28
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts +2 -2
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +79 -12
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +9 -4
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/start.d.ts +11 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +81 -6
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +60 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +68 -0
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/usage.d.ts +12 -0
- package/dist/commands/usage.d.ts.map +1 -1
- package/dist/commands/usage.js +107 -0
- package/dist/commands/usage.js.map +1 -1
- package/dist/commands/watchdog.d.ts.map +1 -1
- package/dist/commands/watchdog.js +20 -7
- package/dist/commands/watchdog.js.map +1 -1
- package/dist/commands/whoami.d.ts +36 -0
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +125 -7
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +53 -5
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.d.ts +20 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +92 -0
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +2 -2
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +5 -4
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/host-registry.d.ts.map +1 -1
- package/dist/host-registry.js +6 -3
- package/dist/host-registry.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -7
- package/dist/index.js.map +1 -1
- package/dist/lazy-program.d.ts +9 -0
- package/dist/lazy-program.d.ts.map +1 -0
- package/dist/lazy-program.js +111 -0
- package/dist/lazy-program.js.map +1 -0
- package/dist/lib/bundle-check.js +2 -2
- package/dist/lib/bundle-check.js.map +1 -1
- package/dist/lib/bundle-source.d.ts +1 -0
- package/dist/lib/bundle-source.d.ts.map +1 -1
- package/dist/lib/bundle-source.js +1 -0
- package/dist/lib/bundle-source.js.map +1 -1
- package/dist/lib/codex-auth.d.ts.map +1 -1
- package/dist/lib/codex-auth.js +17 -1
- package/dist/lib/codex-auth.js.map +1 -1
- package/dist/lib/context-install.js +1 -1
- package/dist/lib/context-install.js.map +1 -1
- package/dist/lib/file-transfer.js +1 -1
- package/dist/lib/file-transfer.js.map +1 -1
- package/dist/lib/frontmatter.d.ts +11 -0
- package/dist/lib/frontmatter.d.ts.map +1 -0
- package/dist/lib/frontmatter.js +20 -0
- package/dist/lib/frontmatter.js.map +1 -0
- package/dist/lib/permission-policy/policy-spec.d.ts.map +1 -1
- package/dist/lib/permission-policy/policy-spec.js +5 -7
- package/dist/lib/permission-policy/policy-spec.js.map +1 -1
- package/dist/lib/scope/logical-checkbox.js +1 -1
- package/dist/lib/scope/logical-checkbox.js.map +1 -1
- package/dist/lib/scope/mission-composition.d.ts +5 -1
- package/dist/lib/scope/mission-composition.d.ts.map +1 -1
- package/dist/lib/scope/mission-composition.js +61 -1
- package/dist/lib/scope/mission-composition.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts +10 -1
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +54 -5
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/scope/slice-claims.d.ts +8 -0
- package/dist/lib/scope/slice-claims.d.ts.map +1 -0
- package/dist/lib/scope/slice-claims.js +88 -0
- package/dist/lib/scope/slice-claims.js.map +1 -0
- package/dist/lib/work-install.d.ts.map +1 -1
- package/dist/lib/work-install.js +3 -13
- package/dist/lib/work-install.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +113 -0
- package/dist/mcp-server.js.map +1 -1
- package/dist/program-root.d.ts +5 -0
- package/dist/program-root.d.ts.map +1 -0
- package/dist/program-root.js +11 -0
- package/dist/program-root.js.map +1 -0
- package/dist/queue-read-compact.d.ts +29 -0
- package/dist/queue-read-compact.d.ts.map +1 -0
- package/dist/queue-read-compact.js +74 -0
- package/dist/queue-read-compact.js.map +1 -0
- package/dist/queue-receipt.d.ts +41 -0
- package/dist/queue-receipt.d.ts.map +1 -0
- package/dist/queue-receipt.js +272 -0
- package/dist/queue-receipt.js.map +1 -0
- package/dist/remote-host-ops.d.ts +21 -0
- package/dist/remote-host-ops.d.ts.map +1 -1
- package/dist/remote-host-ops.js +25 -12
- package/dist/remote-host-ops.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/commands/registry.d.ts.map +1 -1
- package/tui/dist/commands/registry.js +3 -0
- package/tui/dist/commands/registry.js.map +1 -1
- package/tui/dist/config/config-model.d.ts.map +1 -1
- package/tui/dist/config/config-model.js +7 -0
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/cost/cost-model.d.ts +12 -0
- package/tui/dist/cost/cost-model.d.ts.map +1 -0
- package/tui/dist/cost/cost-model.js +141 -0
- package/tui/dist/cost/cost-model.js.map +1 -0
- package/tui/dist/cost/cost-read.d.ts +19 -0
- package/tui/dist/cost/cost-read.d.ts.map +1 -0
- package/tui/dist/cost/cost-read.js +4 -0
- package/tui/dist/cost/cost-read.js.map +1 -0
- package/tui/dist/daemon-client.d.ts +13 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +77 -1
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/detail.d.ts +2 -0
- package/tui/dist/detail.d.ts.map +1 -1
- package/tui/dist/detail.js +5 -0
- package/tui/dist/detail.js.map +1 -1
- package/tui/dist/execution/execution-model.d.ts.map +1 -1
- package/tui/dist/execution/execution-model.js +38 -18
- package/tui/dist/execution/execution-model.js.map +1 -1
- package/tui/dist/helper-cwd.d.ts +3 -0
- package/tui/dist/helper-cwd.d.ts.map +1 -0
- package/tui/dist/helper-cwd.js +16 -0
- package/tui/dist/helper-cwd.js.map +1 -0
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +43 -5
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/input.d.ts.map +1 -1
- package/tui/dist/input.js +2 -1
- package/tui/dist/input.js.map +1 -1
- package/tui/dist/local-reading.d.ts.map +1 -1
- package/tui/dist/local-reading.js +2 -1
- package/tui/dist/local-reading.js.map +1 -1
- package/tui/dist/main.js +6 -5
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/pulse/pulse-model.d.ts +1 -0
- package/tui/dist/pulse/pulse-model.d.ts.map +1 -1
- package/tui/dist/pulse/pulse-model.js +7 -3
- package/tui/dist/pulse/pulse-model.js.map +1 -1
- package/tui/dist/pulse/render-pulse.d.ts.map +1 -1
- package/tui/dist/pulse/render-pulse.js +10 -2
- package/tui/dist/pulse/render-pulse.js.map +1 -1
- package/tui/dist/reading.js +1 -1
- package/tui/dist/reading.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +36 -12
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/scopes/scopes-model.d.ts +6 -1
- package/tui/dist/scopes/scopes-model.d.ts.map +1 -1
- package/tui/dist/scopes/scopes-model.js +33 -13
- package/tui/dist/scopes/scopes-model.js.map +1 -1
- package/tui/dist/sections.d.ts.map +1 -1
- package/tui/dist/sections.js +4 -1
- package/tui/dist/sections.js.map +1 -1
- package/tui/dist/socket-server.d.ts.map +1 -1
- package/tui/dist/socket-server.js +2 -1
- package/tui/dist/socket-server.js.map +1 -1
- package/tui/dist/specs/launch.d.ts.map +1 -1
- package/tui/dist/specs/launch.js +2 -1
- package/tui/dist/specs/launch.js.map +1 -1
- package/tui/dist/startup.js +1 -1
- package/tui/dist/startup.js.map +1 -1
- package/tui/dist/state.d.ts.map +1 -1
- package/tui/dist/state.js +8 -4
- package/tui/dist/state.js.map +1 -1
- package/tui/dist/terminals/open-window.d.ts.map +1 -1
- package/tui/dist/terminals/open-window.js +2 -1
- package/tui/dist/terminals/open-window.js.map +1 -1
- package/tui/dist/types.d.ts +12 -0
- package/tui/dist/types.d.ts.map +1 -1
- package/tui/dist/usage/usage-hosts-model.d.ts +17 -0
- package/tui/dist/usage/usage-hosts-model.d.ts.map +1 -0
- package/tui/dist/usage/usage-hosts-model.js +73 -0
- package/tui/dist/usage/usage-hosts-model.js.map +1 -0
- package/tui/dist/usage/usage-model.d.ts +39 -0
- package/tui/dist/usage/usage-model.d.ts.map +1 -0
- package/tui/dist/usage/usage-model.js +161 -0
- package/tui/dist/usage/usage-model.js.map +1 -0
- package/ui/dist/assets/{index-D5n8EwkG.js → index-Cfbtfd9G.js} +159 -159
- package/ui/dist/index.html +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { shellQuote } from "../adapters/shell-quote.js";
|
|
1
2
|
import { deriveCanonicalFromEntry, getNodeInventory } from "./node-inventory.js";
|
|
2
3
|
import { deriveSessionName, parseSessionName } from "./session-name.js";
|
|
3
4
|
import { resolveStartupProof } from "./startup-resolver.js";
|
|
@@ -7,6 +8,14 @@ import { observeSolePane } from "./pane-binding-observation.js";
|
|
|
7
8
|
import { createHash } from "node:crypto";
|
|
8
9
|
import { NativePermissionStore } from "./native-permission-store.js";
|
|
9
10
|
import { validateNativePermissionSelection, unresolvedClaudePermissionModes } from "./native-permission-selection.js";
|
|
11
|
+
import { resolvePermissionPolicyAttachment, validatePermissionPolicyRef } from "./permission-policy/policy-ref.js";
|
|
12
|
+
import { effortPrecedence, emittedEffortFromArgv, readNativeEffort, resolveSeatEffort, unknownLevelWarning, } from "./seat-effort.js";
|
|
13
|
+
import { claudeCommandSessionToken, codexCommandResumeToken, observeClaudePaneRuntime, observeCodexPaneProcess, processArgv, } from "./native-process-lineage.js";
|
|
14
|
+
import { defaultInPlaceRestartIo } from "./seat-restart-in-place.js";
|
|
15
|
+
import nodePath from "node:path";
|
|
16
|
+
import { CodexInPlaceRestart, } from "./seat-restart-in-place.js";
|
|
17
|
+
import { seatAdapter } from "../adapters/community-harness-runtime-adapter.js";
|
|
18
|
+
import { sessionCommunityHarnessSelect } from "./session-registry.js";
|
|
10
19
|
/**
|
|
11
20
|
* S5 (OPR.0.5.4.7) — the seat-lifecycle verb surface: set-model, single-seat stop,
|
|
12
21
|
* dead-session clean. One coherent design (KI-5.3-9):
|
|
@@ -36,6 +45,10 @@ export class SeatLifecycleService {
|
|
|
36
45
|
runtimeAdapters;
|
|
37
46
|
occupantInvalidator;
|
|
38
47
|
activityOracle;
|
|
48
|
+
inPlaceRestartIo;
|
|
49
|
+
inPlaceRestartTiming;
|
|
50
|
+
inPlaceRestartDaemonStartedAt;
|
|
51
|
+
transcripts;
|
|
39
52
|
constructor(deps) {
|
|
40
53
|
if (deps.db !== deps.rigRepo.db)
|
|
41
54
|
throw new Error("SeatLifecycleService: rigRepo must share the same db handle");
|
|
@@ -54,6 +67,10 @@ export class SeatLifecycleService {
|
|
|
54
67
|
this.runtimeAdapters = deps.runtimeAdapters ?? {};
|
|
55
68
|
this.occupantInvalidator = deps.occupantInvalidator ?? null;
|
|
56
69
|
this.activityOracle = deps.activityOracle ?? null;
|
|
70
|
+
this.inPlaceRestartIo = deps.inPlaceRestartIo;
|
|
71
|
+
this.inPlaceRestartTiming = deps.inPlaceRestartTiming;
|
|
72
|
+
this.inPlaceRestartDaemonStartedAt = deps.inPlaceRestartDaemonStartedAt;
|
|
73
|
+
this.transcripts = deps.transcripts ?? null;
|
|
57
74
|
}
|
|
58
75
|
async setModel(input) {
|
|
59
76
|
const required = this.requireReason(input.reason);
|
|
@@ -91,6 +108,193 @@ export class SeatLifecycleService {
|
|
|
91
108
|
this.eventBus.notifySubscribers(persisted);
|
|
92
109
|
return { ok: true, seat, from, to: model, changed: true };
|
|
93
110
|
}
|
|
111
|
+
/** OPR.0.7.0.7 — save one seat's effort for its next managed continuation. Like set-model it
|
|
112
|
+
* validates, writes, and persists an audited event in the same transaction; it never restarts
|
|
113
|
+
* the seat or touches its peers, model or account. `effort: null` clears the explicit choice. */
|
|
114
|
+
async setEffort(input) {
|
|
115
|
+
const required = this.requireReason(input.reason);
|
|
116
|
+
if (required)
|
|
117
|
+
return required;
|
|
118
|
+
const requested = input.effort === null ? null : input.effort.trim();
|
|
119
|
+
if (requested !== null) {
|
|
120
|
+
if (!requested)
|
|
121
|
+
return { ok: false, code: "missing_effort", message: "An effort level is required (--effort <level>), or pass --clear." };
|
|
122
|
+
// Levels are the runtime's own (they differ by model and client), so only the shape is checked here.
|
|
123
|
+
if (!/^[A-Za-z][A-Za-z0-9_-]{0,31}$/.test(requested)) {
|
|
124
|
+
return { ok: false, code: "invalid_effort", message: `"${requested}" isn't an effort level: use the runtime's level name, such as low, medium or high.` };
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const resolved = this.resolveSeat(input.seatRef);
|
|
128
|
+
if ("code" in resolved)
|
|
129
|
+
return resolved;
|
|
130
|
+
const seat = this.describe(resolved);
|
|
131
|
+
const runtime = resolved.entry.runtime ?? "unknown";
|
|
132
|
+
if (runtime !== "claude-code" && runtime !== "codex") {
|
|
133
|
+
return { ok: false, code: "effort_unsupported_runtime", message: `Seat "${input.seatRef}" runs ${runtime}; reasoning effort applies to claude-code and codex seats only.` };
|
|
134
|
+
}
|
|
135
|
+
const from = this.readEffort(seat.nodeId);
|
|
136
|
+
if (!from) {
|
|
137
|
+
return { ok: false, code: "effort_unavailable", message: "This daemon's database has no per-seat effort choice (checked: nodes.effort_choice column); nothing was saved." };
|
|
138
|
+
}
|
|
139
|
+
let changed = false;
|
|
140
|
+
if (from.choice !== requested) {
|
|
141
|
+
let persisted = null;
|
|
142
|
+
this.db.transaction(() => {
|
|
143
|
+
if (!this.rigRepo.setNodeEffortChoice(seat.nodeId, requested))
|
|
144
|
+
return;
|
|
145
|
+
changed = true;
|
|
146
|
+
persisted = this.eventBus.persistWithinTransaction({
|
|
147
|
+
type: "node.effort_changed",
|
|
148
|
+
rigId: seat.rigId,
|
|
149
|
+
nodeId: seat.nodeId,
|
|
150
|
+
logicalId: seat.logicalId,
|
|
151
|
+
from: from.choice,
|
|
152
|
+
to: requested,
|
|
153
|
+
reason: input.reason.trim(),
|
|
154
|
+
operator: input.operator ?? null,
|
|
155
|
+
});
|
|
156
|
+
})();
|
|
157
|
+
if (persisted)
|
|
158
|
+
this.eventBus.notifySubscribers(persisted);
|
|
159
|
+
if (!changed) {
|
|
160
|
+
return { ok: false, code: "effort_unavailable", message: `The effort choice for seat "${input.seatRef}" was not saved (no node row was updated); nothing changed.` };
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const saved = this.readEffort(seat.nodeId) ?? from;
|
|
164
|
+
const running = await this.runningState(seat.nodeId);
|
|
165
|
+
const effect = requested === null
|
|
166
|
+
? `Cleared: the seat has no saved effort choice now, so it goes back to ${saved.source === "authored" ? `the spec's authored effort ${saved.authored}` : "no effort flag (the runtime's own default)"} at its next managed launch, resume, restore or spec refresh. An in-place restart keeps the running effort and refuses if it would change it. The running process is unchanged; nothing was restarted.`
|
|
167
|
+
: `Saved for the seat's next managed continuation. The running process is unchanged; nothing was restarted.`;
|
|
168
|
+
return {
|
|
169
|
+
ok: true, seat, runtime, requested, from, saved, changed,
|
|
170
|
+
running: running.state, ...(running.detail ? { runningDetail: running.detail } : {}),
|
|
171
|
+
emitted: "not_yet", observed: "not_observed", effect,
|
|
172
|
+
...(unknownLevelWarning(runtime, requested) ? { warning: unknownLevelWarning(runtime, requested) } : {}),
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
/** OPR.0.7.0.7 — requested, saved, emitted at launch and observed in the native session, each from
|
|
176
|
+
* its own source. Reads only. An unseen value is reported as unknown or NOT VERIFIED, never guessed. */
|
|
177
|
+
async effortReport(seatRef) {
|
|
178
|
+
const resolved = this.resolveSeat(seatRef);
|
|
179
|
+
if ("code" in resolved)
|
|
180
|
+
return resolved;
|
|
181
|
+
const seat = this.describe(resolved);
|
|
182
|
+
const runtime = resolved.entry.runtime ?? "unknown";
|
|
183
|
+
if (runtime !== "claude-code" && runtime !== "codex") {
|
|
184
|
+
return { ok: false, code: "effort_unsupported_runtime", message: `Seat "${seatRef}" runs ${runtime}; reasoning effort applies to claude-code and codex seats only.` };
|
|
185
|
+
}
|
|
186
|
+
const saved = this.readEffort(seat.nodeId);
|
|
187
|
+
if (!saved) {
|
|
188
|
+
return { ok: false, code: "effort_unavailable", message: "This daemon's database has no per-seat effort choice (checked: nodes.effort_choice column)." };
|
|
189
|
+
}
|
|
190
|
+
const requested = this.lastRequestedEffort(seat.nodeId);
|
|
191
|
+
const precedence = { decided: effortPrecedence.decided, detail: effortPrecedence.detail };
|
|
192
|
+
let emitted;
|
|
193
|
+
let observed;
|
|
194
|
+
const session = this.latestSession(seat.nodeId);
|
|
195
|
+
const binding = this.sessionRegistry.getBindingForNode(seat.nodeId);
|
|
196
|
+
const target = binding?.tmuxPane ?? binding?.tmuxSession ?? null;
|
|
197
|
+
if (!session || TERMINAL_SESSION_STATUSES.has(session.status) || !target) {
|
|
198
|
+
emitted = { state: "unknown", detail: "The seat has no running session, so no launch to read." };
|
|
199
|
+
observed = { state: "not_verified", detail: "The seat has no running session." };
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
const observe = runtime === "claude-code" ? observeClaudePaneRuntime : observeCodexPaneProcess;
|
|
203
|
+
const process = (await observe({ target, tmux: this.tmuxAdapter, ...(this.listProcesses ? { listProcesses: this.listProcesses } : {}) }))?.process;
|
|
204
|
+
if (!process) {
|
|
205
|
+
emitted = { state: "unknown", detail: `No single ${runtime === "claude-code" ? "Claude" : "Codex"} process could be read in the seat's pane.` };
|
|
206
|
+
observed = { state: "not_verified", detail: "The running process could not be read, so no turn can be tied to its launch." };
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
const flag = emittedEffortFromArgv(runtime, processArgv(process.command));
|
|
210
|
+
const value = flag.flag === "present" ? flag.value : null;
|
|
211
|
+
emitted = { state: "observed", value, pid: process.pid, startedAt: process.startedAt ?? null, matchesSaved: value === saved.effective };
|
|
212
|
+
// Native effort is attributed only from the transcript of the conversation this process is on.
|
|
213
|
+
const joined = await this.joinedTranscript(runtime, session, process);
|
|
214
|
+
const native = "detail" in joined ? { state: "not_verified", detail: joined.detail }
|
|
215
|
+
: readNativeEffort(runtime, joined.path, process.startedAt ?? null);
|
|
216
|
+
observed = native.state === "observed" ? { ...native, matchesEmitted: native.value === value } : native;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return { ok: true, seat, runtime, requested, saved, emitted, observed, precedence, summary: effortSummary(saved, emitted, observed) };
|
|
220
|
+
}
|
|
221
|
+
lastRequestedEffort(nodeId) {
|
|
222
|
+
const row = this.db.prepare("SELECT payload, created_at FROM events WHERE node_id = ? AND type = 'node.effort_changed' ORDER BY seq DESC LIMIT 1")
|
|
223
|
+
.get(nodeId);
|
|
224
|
+
if (!row)
|
|
225
|
+
return null;
|
|
226
|
+
try {
|
|
227
|
+
const payload = JSON.parse(row.payload);
|
|
228
|
+
return { value: payload.to ?? null, at: row.created_at, reason: payload.reason ?? "", operator: payload.operator ?? null };
|
|
229
|
+
}
|
|
230
|
+
catch {
|
|
231
|
+
return null;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
/** The transcript of the conversation the observed process is on, or why that join can't be made.
|
|
235
|
+
* The recorded conversation (Codex: the session's resume token; Claude: the status sidecar's session)
|
|
236
|
+
* must be the one the process itself names, by argv or, for a Codex that names none, by its own logs. */
|
|
237
|
+
async joinedTranscript(runtime, session, process) {
|
|
238
|
+
if (!this.transcripts)
|
|
239
|
+
return { detail: "The native transcript for this session isn't known to OpenRig." };
|
|
240
|
+
const mismatch = "The process in the pane isn't on the conversation recorded for this seat (or its conversation couldn't be read), so no native turn can be attributed to it.";
|
|
241
|
+
try {
|
|
242
|
+
if (runtime === "codex") {
|
|
243
|
+
const recorded = this.sessionResumeToken(session.id);
|
|
244
|
+
if (!recorded)
|
|
245
|
+
return { detail: "No Codex conversation is recorded for this session yet." };
|
|
246
|
+
let own = codexCommandResumeToken(process.command) ?? undefined;
|
|
247
|
+
if (own === undefined && process.startedAt) {
|
|
248
|
+
const io = { ...defaultInPlaceRestartIo(), ...this.inPlaceRestartIo };
|
|
249
|
+
const facts = await io.readProcess(process.pid);
|
|
250
|
+
const home = facts?.env.CODEX_HOME ?? (facts?.env.HOME ? nodePath.join(facts.env.HOME, ".codex") : undefined);
|
|
251
|
+
own = home ? await io.readThreadId(process.pid, process.startedAt, home) : undefined;
|
|
252
|
+
}
|
|
253
|
+
if (own !== recorded)
|
|
254
|
+
return { detail: mismatch };
|
|
255
|
+
return { path: this.transcripts.readCodexTranscriptPath(recorded) };
|
|
256
|
+
}
|
|
257
|
+
const sidecar = this.transcripts.readSidecar(session.session_name);
|
|
258
|
+
if (!sidecar.ok)
|
|
259
|
+
return { detail: "Claude's status sidecar for this session isn't available, so its transcript isn't known." };
|
|
260
|
+
const recorded = sidecar.data.session_id ?? null;
|
|
261
|
+
const own = claudeCommandSessionToken(process.command);
|
|
262
|
+
// A resumed Claude can rotate to a new session id; the registry's recorded rotation from the
|
|
263
|
+
// launched id to the sidecar's joins them too.
|
|
264
|
+
const rotated = this.db.prepare("SELECT 1 FROM sessions WHERE id = ? AND resume_token = ? AND resume_rotated_from = ?")
|
|
265
|
+
.get(session.id, recorded, own);
|
|
266
|
+
if (!recorded || !own || (own !== recorded && !rotated))
|
|
267
|
+
return { detail: mismatch };
|
|
268
|
+
return { path: sidecar.data.transcript_path ?? null };
|
|
269
|
+
}
|
|
270
|
+
catch {
|
|
271
|
+
return { detail: mismatch };
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
readEffort(nodeId) {
|
|
275
|
+
let row;
|
|
276
|
+
try {
|
|
277
|
+
row = this.db.prepare("SELECT effort, effort_choice FROM nodes WHERE id = ?").get(nodeId);
|
|
278
|
+
}
|
|
279
|
+
catch {
|
|
280
|
+
return null; // an older database without the columns
|
|
281
|
+
}
|
|
282
|
+
if (!row)
|
|
283
|
+
return null;
|
|
284
|
+
return resolveSeatEffort({ effort: row.effort, effortChoice: row.effort_choice });
|
|
285
|
+
}
|
|
286
|
+
/** Whether the seat's latest session is live now. Never a guess: an indeterminate probe is unknown. */
|
|
287
|
+
async runningState(nodeId) {
|
|
288
|
+
const session = this.latestSession(nodeId);
|
|
289
|
+
if (!session)
|
|
290
|
+
return { state: "no", detail: "no session recorded" };
|
|
291
|
+
if (TERMINAL_SESSION_STATUSES.has(session.status))
|
|
292
|
+
return { state: "no", detail: `latest session ${session.status}` };
|
|
293
|
+
const probe = await this.probeLiveness(session.session_name, "running is reported as unknown");
|
|
294
|
+
if ("code" in probe)
|
|
295
|
+
return { state: "unknown", detail: probe.message };
|
|
296
|
+
return probe.state === "present" ? { state: "yes" } : { state: "no", detail: "tmux session absent" };
|
|
297
|
+
}
|
|
94
298
|
async setPermissions(input) {
|
|
95
299
|
input = { ...input };
|
|
96
300
|
const required = this.requireReason(input.reason);
|
|
@@ -136,6 +340,71 @@ export class SeatLifecycleService {
|
|
|
136
340
|
return { ok: false, code: "permission_selection_refused", message: error.message };
|
|
137
341
|
}
|
|
138
342
|
}
|
|
343
|
+
/** `rig policy apply <name> --seat`: re-point an existing seat's own permission_policy. This writes
|
|
344
|
+
* the raw ref and the provenance the instantiator would persist for the same member ref; restore,
|
|
345
|
+
* resume and launches that read the seat's stored state use that provenance, while a launch from a
|
|
346
|
+
* spec that declares a policy re-applies the spec's. The ref is validated exactly as a spec
|
|
347
|
+
* member's is; the running process is untouched. */
|
|
348
|
+
async setPolicy(input) {
|
|
349
|
+
const required = this.requireReason(input.reason);
|
|
350
|
+
if (required)
|
|
351
|
+
return required;
|
|
352
|
+
const invalid = validatePermissionPolicyRef(input.ref, "permission_policy");
|
|
353
|
+
if (invalid)
|
|
354
|
+
return { ok: false, code: "invalid_policy", message: invalid };
|
|
355
|
+
const ref = input.ref;
|
|
356
|
+
// Built-ins and `none` resolve from the ref alone; only a custom file reads its declaring directory.
|
|
357
|
+
const attachment = resolvePermissionPolicyAttachment(ref, "", { readFile: () => { throw new Error("no declaring spec"); } });
|
|
358
|
+
if (attachment.origin === "custom") {
|
|
359
|
+
return {
|
|
360
|
+
ok: false, code: "invalid_policy",
|
|
361
|
+
message: `permission_policy: '${ref}' is a custom policy file, which resolves relative to the rig spec that declares it; a seat has no spec directory of its own.`,
|
|
362
|
+
guidance: "Use builtin:<name> or none here, or declare the custom ref in the rig spec.",
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
const resolved = this.resolveSeat(input.seatRef);
|
|
366
|
+
if ("code" in resolved)
|
|
367
|
+
return resolved;
|
|
368
|
+
const seat = this.describe(resolved);
|
|
369
|
+
if (resolved.entry.runtime === "terminal") {
|
|
370
|
+
return { ok: false, code: "invalid_policy", message: "permission_policy: not valid on terminal members (a terminal node is not an agent seat)" };
|
|
371
|
+
}
|
|
372
|
+
const row = this.db.prepare("SELECT permission_policy FROM nodes WHERE id = ?").get(seat.nodeId);
|
|
373
|
+
const from = row?.permission_policy ?? null;
|
|
374
|
+
const provenance = {
|
|
375
|
+
origin: attachment.origin,
|
|
376
|
+
resolvedTarget: attachment.resolvedTarget ?? null,
|
|
377
|
+
declaringDir: attachment.declaringDir ?? null,
|
|
378
|
+
launchPosture: attachment.launchPosture,
|
|
379
|
+
};
|
|
380
|
+
const before = this.rigRepo.getNodePolicyProvenance(seat.nodeId);
|
|
381
|
+
const changed = from !== ref || !before || before.origin !== provenance.origin || before.resolvedTarget !== provenance.resolvedTarget
|
|
382
|
+
|| before.declaringDir !== provenance.declaringDir || before.launchPosture !== provenance.launchPosture;
|
|
383
|
+
if (changed) {
|
|
384
|
+
let persisted = null;
|
|
385
|
+
this.db.transaction(() => {
|
|
386
|
+
this.rigRepo.setNodePermissionPolicy(seat.nodeId, ref);
|
|
387
|
+
this.rigRepo.setNodePolicyProvenance(seat.nodeId, provenance);
|
|
388
|
+
persisted = this.eventBus.persistWithinTransaction({
|
|
389
|
+
type: "node.policy_changed", rigId: seat.rigId, nodeId: seat.nodeId, logicalId: seat.logicalId,
|
|
390
|
+
from, to: ref, launchPosture: attachment.launchPosture, reason: input.reason.trim(), operator: input.actor.trim(),
|
|
391
|
+
});
|
|
392
|
+
})();
|
|
393
|
+
if (persisted)
|
|
394
|
+
this.eventBus.notifySubscribers(persisted);
|
|
395
|
+
}
|
|
396
|
+
let selection = false;
|
|
397
|
+
// An unreadable selection refuses the launch by itself (NativePermissionStore.read); nothing to add here.
|
|
398
|
+
try {
|
|
399
|
+
selection = new NativePermissionStore(this.db).read(seat.nodeId) !== null;
|
|
400
|
+
}
|
|
401
|
+
catch { /* see above */ }
|
|
402
|
+
const effect = "Restore, resume and launches that read this seat's stored state use this policy, unless an explicit native selection (rig seat set-permissions) takes precedence. "
|
|
403
|
+
+ "`rig up <rig name>` uses it; a launch from a spec that declares a policy replaces it with the spec's policy, which later restores then use. "
|
|
404
|
+
+ "The running process and the rig spec file are unchanged; nothing was restarted."
|
|
405
|
+
+ (selection ? " This seat has an explicit native permission selection, so that selection takes precedence at launch." : "");
|
|
406
|
+
return { ok: true, seat, from, to: ref, launchPosture: attachment.launchPosture, changed, effect };
|
|
407
|
+
}
|
|
139
408
|
async stopSeat(input) {
|
|
140
409
|
const required = this.requireReason(input.reason);
|
|
141
410
|
if (required)
|
|
@@ -174,7 +443,7 @@ export class SeatLifecycleService {
|
|
|
174
443
|
guidance: "A dead seat with stale records is returned to launchable with: rig seat clean",
|
|
175
444
|
};
|
|
176
445
|
}
|
|
177
|
-
return this.stopManagedTmuxSeat(resolved, session, input.reason, input.operator);
|
|
446
|
+
return this.stopManagedTmuxSeat(resolved, session, input.reason, input.operator, true);
|
|
178
447
|
}
|
|
179
448
|
async cleanSeat(input) {
|
|
180
449
|
const required = this.requireReason(input.reason);
|
|
@@ -217,11 +486,14 @@ export class SeatLifecycleService {
|
|
|
217
486
|
if ("code" in probed)
|
|
218
487
|
return probed;
|
|
219
488
|
if (probed.state === "present") {
|
|
489
|
+
const latest = this.latestSession(resolved.nodeId);
|
|
220
490
|
return {
|
|
221
491
|
ok: false,
|
|
222
492
|
code: "session_live",
|
|
223
493
|
message: `Session "${name}" is alive in tmux (checked: tmux has-session, against EVERY session row clean would mutate) — clean only operates on dead seats.`,
|
|
224
|
-
guidance:
|
|
494
|
+
guidance: latest?.session_name === name && latest.origin !== "claimed"
|
|
495
|
+
? "Stop a live seat first with: rig seat stop"
|
|
496
|
+
: `Check that session (rig capture -- ${shellQuote(name)}) and end it yourself if it is no longer needed, then retry; rig seat stop targets the seat's latest session, not a selected historical session.`,
|
|
225
497
|
};
|
|
226
498
|
}
|
|
227
499
|
}
|
|
@@ -257,19 +529,19 @@ export class SeatLifecycleService {
|
|
|
257
529
|
this.eventBus.notifySubscribers(persisted);
|
|
258
530
|
return { ok: true, seat, actions: { sessionsExited, bindingCleared: binding !== null } };
|
|
259
531
|
}
|
|
260
|
-
/** Finish context delivery to the same fresh occupant after its native gate.
|
|
532
|
+
/** Finish context delivery to the same fresh or forked occupant after its native gate.
|
|
261
533
|
* This never launches a process or replays an uncertain/finished delivery.
|
|
262
534
|
*/
|
|
263
|
-
async
|
|
535
|
+
async continueStartup(seatRef) {
|
|
264
536
|
const resolved = this.resolveSeat(seatRef);
|
|
265
537
|
if ("code" in resolved)
|
|
266
538
|
return resolved;
|
|
267
539
|
const guard = this.tmuxAdapter.deliveryGuard;
|
|
268
540
|
return guard
|
|
269
|
-
? guard.lifecycle([resolved.nodeId], () => this.
|
|
270
|
-
: this.
|
|
541
|
+
? guard.lifecycle([resolved.nodeId], () => this.continueStartupUnchecked(seatRef))
|
|
542
|
+
: this.continueStartupUnchecked(seatRef);
|
|
271
543
|
}
|
|
272
|
-
async
|
|
544
|
+
async continueStartupUnchecked(seatRef) {
|
|
273
545
|
const resolved = this.resolveSeat(seatRef);
|
|
274
546
|
if ("code" in resolved)
|
|
275
547
|
return resolved;
|
|
@@ -277,14 +549,15 @@ export class SeatLifecycleService {
|
|
|
277
549
|
const node = this.rigRepo.getRig(seat.rigId)?.nodes.find((n) => n.id === seat.nodeId);
|
|
278
550
|
const session = this.latestSession(seat.nodeId);
|
|
279
551
|
const binding = this.sessionRegistry.getBindingForNode(seat.nodeId);
|
|
552
|
+
const pending = session && this.startupOrchestrator?.pendingStartupContext(seat.nodeId, session.id);
|
|
280
553
|
if (!node || !session || !binding?.tmuxSession || !this.startupOrchestrator
|
|
281
|
-
|| !
|
|
282
|
-
return { ok: false, code: "continuation_unavailable", message: "No verified pending
|
|
554
|
+
|| !pending) {
|
|
555
|
+
return { ok: false, code: "continuation_unavailable", message: "No verified pending startup-context delivery exists for this occupant. Refresh to inspect its actual state." };
|
|
283
556
|
}
|
|
284
557
|
const pane = await observeSolePane(this.tmuxAdapter, binding.tmuxSession);
|
|
285
558
|
if (!pane.ok || pane.pane !== binding.tmuxPane)
|
|
286
559
|
return { ok: false, code: "binding_changed", message: "The managed terminal binding changed; context was not delivered." };
|
|
287
|
-
const adapter =
|
|
560
|
+
const adapter = seatAdapter(this.runtimeAdapters, node.runtime, session.community_harness);
|
|
288
561
|
if (!adapter)
|
|
289
562
|
return { ok: false, code: "runtime_adapter_missing", message: "The configured runtime adapter is unavailable." };
|
|
290
563
|
const ready = await adapter.checkReady({ ...binding, cwd: node.cwd ?? "." });
|
|
@@ -298,41 +571,30 @@ export class SeatLifecycleService {
|
|
|
298
571
|
// Recheck after the asynchronous native observation; startNode immediately
|
|
299
572
|
// records pending before its first await, consuming the retained permission.
|
|
300
573
|
if (this.latestSession(node.id)?.id !== session.id || this.sessionRegistry.getBindingForNode(node.id)?.tmuxPane !== pane.pane
|
|
301
|
-
|| !this.
|
|
574
|
+
|| !this.stillPending(node.id, session.id, pending))
|
|
302
575
|
return { ok: false, code: "continuation_unavailable", message: "Startup changed during the readiness check. Refresh." };
|
|
303
576
|
const result = await this.startupOrchestrator.startNode({
|
|
304
577
|
rigId: seat.rigId, nodeId: node.id, sessionId: session.id,
|
|
305
|
-
binding: { ...binding, cwd: node.cwd ?? ".", model: node.model ?? undefined, effort: node.
|
|
578
|
+
binding: { ...binding, cwd: node.cwd ?? ".", model: node.model ?? undefined, effort: resolveSeatEffort(node).effective ?? undefined, codexConfigProfile: node.codexConfigProfile ?? undefined },
|
|
306
579
|
adapter, plan: startup.context.plan, resolvedStartupFiles: startup.context.resolvedStartupFiles,
|
|
307
|
-
startupActions: startup.context.startupActions, isRestore:
|
|
308
|
-
sessionName: session.session_name, skipHarnessLaunch: true, continueFreshStartup:
|
|
580
|
+
startupActions: startup.context.startupActions, isRestore: pending.mode === "fork" && pending.isRestore,
|
|
581
|
+
sessionName: session.session_name, skipHarnessLaunch: true, continueFreshStartup: pending.mode === "fresh", includeDurableObligations: true, allowFreshFallback: false,
|
|
582
|
+
...(pending.mode === "fork" ? { forkSource: { kind: "native_id", value: pending.parentToken } } : {}),
|
|
309
583
|
});
|
|
310
|
-
return { ...result, message: result.ok ? "Configured context delivered to the existing
|
|
584
|
+
return { ...result, message: result.ok ? "Configured context delivered to the existing conversation." : result.errors.join("; ") };
|
|
311
585
|
}
|
|
312
|
-
/**
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
ok: false,
|
|
320
|
-
code: "fresh_required",
|
|
321
|
-
message: "Explicit fresh launch requires fresh=true (--fresh); no continuity mode is inferred.",
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
const resolved = this.resolveSeat(input.seatRef);
|
|
325
|
-
if ("code" in resolved)
|
|
326
|
-
return resolved;
|
|
327
|
-
const guard = this.tmuxAdapter.deliveryGuard;
|
|
328
|
-
if (guard && !guard.ownsLifecycle(resolved.nodeId)) {
|
|
329
|
-
return guard.lifecycle([resolved.nodeId], () => this.launchFresh(input));
|
|
330
|
-
}
|
|
586
|
+
/**
|
|
587
|
+
* Resolve a seat snapshot into current launch settings and persisted startup context.
|
|
588
|
+
* Return a refusal for stale seats, unavailable services, or runtime/context mismatch.
|
|
589
|
+
* Reads only: callers receive no reservation or launch guarantee. Execution repeats
|
|
590
|
+
* this resolution under its lifecycle lock rather than trusting an earlier plan.
|
|
591
|
+
*/
|
|
592
|
+
resolveFreshLaunch(resolved, seatRef) {
|
|
331
593
|
const seat = this.describe(resolved);
|
|
332
594
|
const rig = this.rigRepo.getRig(seat.rigId);
|
|
333
595
|
const node = rig?.nodes.find((candidate) => candidate.id === seat.nodeId);
|
|
334
596
|
if (!rig || !node) {
|
|
335
|
-
return { ok: false, code: "seat_not_found", message: `Seat "${
|
|
597
|
+
return { ok: false, code: "seat_not_found", message: `Seat "${seatRef}" no longer exists.`, guidance: SEAT_LOOKUP_GUIDANCE };
|
|
336
598
|
}
|
|
337
599
|
if (!this.nodeLauncher || !this.startupOrchestrator) {
|
|
338
600
|
return { ok: false, code: "launch_unavailable", message: "Fresh-launch services are unavailable in this daemon." };
|
|
@@ -347,7 +609,7 @@ export class SeatLifecycleService {
|
|
|
347
609
|
message: `Persisted startup context runtime '${startup.context.runtime}' does not match current node runtime '${node.runtime ?? "missing"}'.`,
|
|
348
610
|
};
|
|
349
611
|
}
|
|
350
|
-
const adapter = this.runtimeAdapters
|
|
612
|
+
const adapter = seatAdapter(this.runtimeAdapters, node.runtime, this.latestSession(node.id)?.community_harness);
|
|
351
613
|
if (!adapter) {
|
|
352
614
|
return {
|
|
353
615
|
ok: false,
|
|
@@ -357,15 +619,204 @@ export class SeatLifecycleService {
|
|
|
357
619
|
}
|
|
358
620
|
const canonicalSessionName = deriveCanonicalFromEntry(resolved.entry)
|
|
359
621
|
?? deriveSessionName(seat.rigName, seat.logicalId);
|
|
360
|
-
|
|
361
|
-
|
|
622
|
+
return { ok: true, resolved, seat, rig, node, adapter, startup: startup.context, canonicalSessionName, nodeLauncher: this.nodeLauncher, startupOrchestrator: this.startupOrchestrator };
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* Validate an observed canonical collision against current managed rows and binding.
|
|
626
|
+
* `stop` authorizes only this matching occupant; it cannot authorize adopted or
|
|
627
|
+
* mismatched sessions. Return its session row or a refusal, including unknown pane
|
|
628
|
+
* observations, without stopping, repairing, or starting a tmux server.
|
|
629
|
+
*/
|
|
630
|
+
/** Whether the context found before the native check is still owed. A fork continuation needs the exact
|
|
631
|
+
* same pending event: its child is verified against that attempt. A fresh continuation keeps main's
|
|
632
|
+
* check (fresh context still pending for this occupant), so another pending event doesn't refuse it. */
|
|
633
|
+
stillPending(nodeId, sessionId, pending) {
|
|
634
|
+
const now = this.startupOrchestrator?.pendingStartupContext(nodeId, sessionId);
|
|
635
|
+
return pending.mode === "fork" ? now?.eventSeq === pending.eventSeq : now?.mode === "fresh";
|
|
636
|
+
}
|
|
637
|
+
async validateFreshCollision(resolved, canonicalSessionName, stop) {
|
|
638
|
+
const currentSession = this.latestSession(resolved.nodeId);
|
|
639
|
+
const currentBinding = this.sessionRegistry.getBindingForNode(resolved.nodeId);
|
|
640
|
+
const currentManaged = currentSession !== null
|
|
641
|
+
&& !TERMINAL_SESSION_STATUSES.has(currentSession.status)
|
|
642
|
+
&& currentSession.origin !== "claimed"
|
|
643
|
+
&& currentSession.session_name === canonicalSessionName
|
|
644
|
+
&& currentBinding?.tmuxSession === canonicalSessionName;
|
|
645
|
+
if (!currentManaged) {
|
|
362
646
|
return {
|
|
363
647
|
ok: false,
|
|
364
|
-
code: "
|
|
365
|
-
message: `
|
|
648
|
+
code: "unmanaged_session_collision",
|
|
649
|
+
message: `Canonical tmux session "${canonicalSessionName}" exists but is not owned by this seat's current managed rows; refusing to overwrite it.`,
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
if (!stop) {
|
|
653
|
+
return {
|
|
654
|
+
ok: false,
|
|
655
|
+
code: "session_live",
|
|
656
|
+
message: `Seat "${canonicalSessionName}" is live; fresh launch refuses without --stop.`,
|
|
657
|
+
guidance: "Re-run with --stop to end exactly this managed occupant, or use rig handover to carry context.",
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
const observedPane = await observeSolePane(this.tmuxAdapter, canonicalSessionName);
|
|
661
|
+
if (!observedPane.ok && observedPane.code === "tmux_unavailable") {
|
|
662
|
+
return {
|
|
663
|
+
ok: false,
|
|
664
|
+
code: "tmux_probe_failed",
|
|
665
|
+
message: `${observedPane.detail}; fresh launch refuses rather than kill without live occupant identity.`,
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
if (!observedPane.ok || observedPane.pane !== currentBinding?.tmuxPane) {
|
|
669
|
+
return {
|
|
670
|
+
ok: false,
|
|
671
|
+
code: "unmanaged_session_collision",
|
|
672
|
+
message: `Canonical tmux session "${canonicalSessionName}" is live, but its pane does not match this seat's current managed binding; refusing to stop it.`,
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
return currentSession;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Check historical rows/bindings that clean would touch, excluding the canonical name.
|
|
679
|
+
* Read-only tmux probes reject adopted, live, or unreadable historical occupants
|
|
680
|
+
* before any stop. Null means no historical blocker was observed; the caller must
|
|
681
|
+
* still validate the canonical occupant and recheck absence before launching.
|
|
682
|
+
*/
|
|
683
|
+
async validateFreshHistory(nodeId, canonicalSessionName, seatRef) {
|
|
684
|
+
const rows = this.nonTerminalSessions(nodeId);
|
|
685
|
+
if (rows.some(row => row.origin === "claimed")) {
|
|
686
|
+
return {
|
|
687
|
+
ok: false, code: "claimed_session",
|
|
688
|
+
message: `Seat "${seatRef}" has an adopted/operator-owned occupant; fresh launch refuses even with --stop.`,
|
|
366
689
|
guidance: "Stop the adopted process yourself, then run rig seat clean before launching fresh.",
|
|
367
690
|
};
|
|
368
691
|
}
|
|
692
|
+
const binding = this.sessionRegistry.getBindingForNode(nodeId);
|
|
693
|
+
const names = new Set([...rows.map(row => row.session_name), ...(binding?.tmuxSession ? [binding.tmuxSession] : [])]);
|
|
694
|
+
for (const name of names) {
|
|
695
|
+
if (name === canonicalSessionName)
|
|
696
|
+
continue;
|
|
697
|
+
const probe = await this.probeLiveness(name, "fresh launch refuses while historical occupant state is unknown");
|
|
698
|
+
if ("code" in probe)
|
|
699
|
+
return probe;
|
|
700
|
+
if (probe.state === "present")
|
|
701
|
+
return {
|
|
702
|
+
ok: false, code: "session_live",
|
|
703
|
+
message: `Historical session "${name}" is still live; fresh launch refuses to change this seat.`,
|
|
704
|
+
guidance: "rig seat stop targets the seat's latest session, not a selected historical session; it may stop the current occupant instead.",
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
return null;
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* Snapshot one seat's proposed fresh launch; `fresh` is mandatory and `stop` is intent.
|
|
711
|
+
* No lifecycle lock, repair, material projection, native launch or persistent write
|
|
712
|
+
* is entered. Siblings are listed as unchanged; no seat is reserved by the result.
|
|
713
|
+
* Known blockers set launchable=false; otherwise incomplete observations yield null.
|
|
714
|
+
* Unreadable tmux remains incomplete, never readiness. No launch command is built.
|
|
715
|
+
* Errors are reduced to safe codes;
|
|
716
|
+
* startup text, credentials and process output are not included in the response.
|
|
717
|
+
*/
|
|
718
|
+
async planFresh(input) {
|
|
719
|
+
const refusal = (error) => ({
|
|
720
|
+
...error, planOnly: true, complete: error.code !== "tmux_probe_failed", launchable: false,
|
|
721
|
+
// Parser/probe errors can embed persisted startup content or process output.
|
|
722
|
+
message: `Fresh launch preview refused: ${error.code}.`,
|
|
723
|
+
});
|
|
724
|
+
if (!input.fresh)
|
|
725
|
+
return refusal({ ok: false, code: "fresh_required", message: "--plan requires --fresh." });
|
|
726
|
+
const resolved = this.resolveSeat(input.seatRef);
|
|
727
|
+
if ("code" in resolved)
|
|
728
|
+
return refusal(resolved);
|
|
729
|
+
const prepared = this.resolveFreshLaunch(resolved, input.seatRef);
|
|
730
|
+
if ("code" in prepared)
|
|
731
|
+
return refusal(prepared);
|
|
732
|
+
const { seat, rig, node, startup, canonicalSessionName } = prepared;
|
|
733
|
+
const blockers = [];
|
|
734
|
+
const warnings = ["Snapshot only; execution resolves and validates again. Native readiness is not checked."];
|
|
735
|
+
let complete = true;
|
|
736
|
+
let tmuxUnknown = false;
|
|
737
|
+
const guard = this.tmuxAdapter.deliveryGuard?.preference(node.id);
|
|
738
|
+
if (guard?.effective || guard?.desired)
|
|
739
|
+
blockers.push({ code: "typing_guard_enabled", message: "Typing protection blocks lifecycle operations for this seat." });
|
|
740
|
+
const record = (error) => {
|
|
741
|
+
if (error.code === "tmux_probe_failed") {
|
|
742
|
+
complete = false;
|
|
743
|
+
tmuxUnknown = true;
|
|
744
|
+
warnings.push("tmux state is unknown; no server was started and no occupant was changed.");
|
|
745
|
+
}
|
|
746
|
+
else if (error.code === "claimed_session" || error.code === "session_live") {
|
|
747
|
+
blockers.push({ code: error.code, message: error.message, guidance: error.guidance });
|
|
748
|
+
}
|
|
749
|
+
else
|
|
750
|
+
blockers.push({ code: error.code, message: `Fresh launch would be refused: ${error.code}.` });
|
|
751
|
+
};
|
|
752
|
+
const history = await this.validateFreshHistory(node.id, canonicalSessionName, input.seatRef);
|
|
753
|
+
if (history)
|
|
754
|
+
record(history);
|
|
755
|
+
const probe = await this.probeLiveness(canonicalSessionName, "preview does not repair tmux");
|
|
756
|
+
const currentOccupant = "code" in probe ? "unknown" : probe.state;
|
|
757
|
+
let stopRequired = currentOccupant === "absent" ? false : null;
|
|
758
|
+
let owned = false;
|
|
759
|
+
if ("code" in probe)
|
|
760
|
+
record(probe);
|
|
761
|
+
else if (probe.state === "present") {
|
|
762
|
+
// Check ownership even without --stop; presence alone is not permission to stop.
|
|
763
|
+
const collision = await this.validateFreshCollision(resolved, canonicalSessionName, true);
|
|
764
|
+
if ("code" in collision)
|
|
765
|
+
record(collision);
|
|
766
|
+
else {
|
|
767
|
+
owned = true;
|
|
768
|
+
stopRequired = true;
|
|
769
|
+
if (!input.stop)
|
|
770
|
+
blockers.push({ code: "session_live", message: "A live managed occupant requires --stop." });
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
const launchable = blockers.length > 0 ? false : complete ? true : null;
|
|
774
|
+
const siblings = rig.nodes.filter(n => n.id !== node.id).map(n => ({
|
|
775
|
+
logicalId: n.logicalId, sessionName: n.binding?.tmuxSession ?? null, effect: "unchanged",
|
|
776
|
+
}));
|
|
777
|
+
return {
|
|
778
|
+
ok: true, planOnly: true, complete, launchable, seat,
|
|
779
|
+
sessionName: canonicalSessionName, currentOccupant,
|
|
780
|
+
stopRequired, wouldStop: blockers.length > 0 ? false : tmuxUnknown ? null : owned && input.stop === true,
|
|
781
|
+
blockers, warnings, siblings,
|
|
782
|
+
startup: { projectionCount: startup.plan.entries.length,
|
|
783
|
+
fileCount: startup.resolvedStartupFiles.filter(f => f.appliesOn.includes("fresh_start")).length,
|
|
784
|
+
actionCount: startup.startupActions.filter(a => a.appliesOn.includes("fresh_start")).length },
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* Execute a fresh replacement of exactly one seat, requiring fresh intent and reason.
|
|
789
|
+
* Resolve configuration again under the lifecycle lock, reject unsafe historical or
|
|
790
|
+
* canonical occupants, and require positive absence before creating a new occupant.
|
|
791
|
+
* Unlike planFresh this mutates lifecycle/startup state; an earlier preview grants
|
|
792
|
+
* no authority to skip validation. Sibling seats are never included in the operation.
|
|
793
|
+
*/
|
|
794
|
+
async launchFresh(input) {
|
|
795
|
+
const required = this.requireReason(input.reason);
|
|
796
|
+
if (required)
|
|
797
|
+
return required;
|
|
798
|
+
if (input.fresh !== true) {
|
|
799
|
+
return {
|
|
800
|
+
ok: false,
|
|
801
|
+
code: "fresh_required",
|
|
802
|
+
message: "Explicit fresh launch requires fresh=true (--fresh); no continuity mode is inferred.",
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
const resolved = this.resolveSeat(input.seatRef);
|
|
806
|
+
if ("code" in resolved)
|
|
807
|
+
return resolved;
|
|
808
|
+
const guard = this.tmuxAdapter.deliveryGuard;
|
|
809
|
+
if (guard && !guard.ownsLifecycle(resolved.nodeId)) {
|
|
810
|
+
return guard.lifecycle([resolved.nodeId], () => this.launchFresh(input));
|
|
811
|
+
}
|
|
812
|
+
const prepared = this.resolveFreshLaunch(resolved, input.seatRef);
|
|
813
|
+
if ("code" in prepared)
|
|
814
|
+
return prepared;
|
|
815
|
+
const { seat, node, adapter, startup, canonicalSessionName, nodeLauncher, startupOrchestrator } = prepared;
|
|
816
|
+
const historyRefusal = await this.validateFreshHistory(resolved.nodeId, canonicalSessionName, input.seatRef);
|
|
817
|
+
if (historyRefusal)
|
|
818
|
+
return historyRefusal;
|
|
819
|
+
const retiringRows = this.nonTerminalSessions(node.id);
|
|
369
820
|
// Detached is terminal for process cleanup, but remains a reboot candidate.
|
|
370
821
|
// A deliberate fresh launch must retire that prior history as well.
|
|
371
822
|
const supersededSessionIds = this.db.prepare("SELECT id FROM sessions WHERE node_id = ? AND status NOT IN ('superseded', 'exited')").all(node.id).map((row) => row.id);
|
|
@@ -403,44 +854,10 @@ export class SeatLifecycleService {
|
|
|
403
854
|
if ("code" in canonicalProbe)
|
|
404
855
|
return canonicalProbe;
|
|
405
856
|
if (canonicalProbe.state === "present") {
|
|
406
|
-
const currentSession = this.
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
&& currentSession.origin !== "claimed"
|
|
411
|
-
&& currentSession.session_name === canonicalSessionName
|
|
412
|
-
&& currentBinding?.tmuxSession === canonicalSessionName;
|
|
413
|
-
if (!currentManaged) {
|
|
414
|
-
return {
|
|
415
|
-
ok: false,
|
|
416
|
-
code: "unmanaged_session_collision",
|
|
417
|
-
message: `Canonical tmux session "${canonicalSessionName}" exists but is not owned by this seat's current managed rows; refusing to overwrite it.`,
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
if (!input.stop) {
|
|
421
|
-
return {
|
|
422
|
-
ok: false,
|
|
423
|
-
code: "session_live",
|
|
424
|
-
message: `Seat "${input.seatRef}" is live; fresh launch refuses without --stop.`,
|
|
425
|
-
guidance: "Re-run with --stop to end exactly this managed occupant, or use rig handover to carry context.",
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
const observedPane = await observeSolePane(this.tmuxAdapter, canonicalSessionName);
|
|
429
|
-
if (!observedPane.ok && observedPane.code === "tmux_unavailable") {
|
|
430
|
-
return {
|
|
431
|
-
ok: false,
|
|
432
|
-
code: "tmux_probe_failed",
|
|
433
|
-
message: `${observedPane.detail}; fresh launch refuses rather than kill without live occupant identity.`,
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
if (!observedPane.ok || observedPane.pane !== currentBinding?.tmuxPane) {
|
|
437
|
-
return {
|
|
438
|
-
ok: false,
|
|
439
|
-
code: "unmanaged_session_collision",
|
|
440
|
-
message: `Canonical tmux session "${canonicalSessionName}" is live, but its pane does not match this seat's current managed binding; refusing to stop it.`,
|
|
441
|
-
};
|
|
442
|
-
}
|
|
443
|
-
const stopped = await this.stopManagedTmuxSeat(resolved, currentSession, input.reason, input.operator);
|
|
857
|
+
const currentSession = await this.validateFreshCollision(resolved, canonicalSessionName, input.stop === true);
|
|
858
|
+
if ("code" in currentSession)
|
|
859
|
+
return currentSession;
|
|
860
|
+
const stopped = await this.stopManagedTmuxSeat(resolved, currentSession, input.reason, input.operator, false);
|
|
444
861
|
if (!stopped.ok)
|
|
445
862
|
return stopped;
|
|
446
863
|
// Stopping the server's last session ends tmux's server, and every probe
|
|
@@ -481,7 +898,7 @@ export class SeatLifecycleService {
|
|
|
481
898
|
successorSessionName: canonicalSessionName,
|
|
482
899
|
...(retiringGeneration ? { retiringGeneration } : {}),
|
|
483
900
|
});
|
|
484
|
-
const launch = await
|
|
901
|
+
const launch = await nodeLauncher.launchNode(seat.rigId, seat.logicalId, {
|
|
485
902
|
sessionName: canonicalSessionName,
|
|
486
903
|
cwd: node.cwd ?? undefined,
|
|
487
904
|
occupantKind: "fresh",
|
|
@@ -500,9 +917,9 @@ export class SeatLifecycleService {
|
|
|
500
917
|
supersededSessionIds,
|
|
501
918
|
retiringGeneration,
|
|
502
919
|
newGeneration: null,
|
|
503
|
-
startupPolicyHash: startup.
|
|
920
|
+
startupPolicyHash: startup.hash,
|
|
504
921
|
model: node.model,
|
|
505
|
-
effort: node.
|
|
922
|
+
effort: resolveSeatEffort(node).effective,
|
|
506
923
|
reason: input.reason,
|
|
507
924
|
operator: input.operator,
|
|
508
925
|
errors: ["new occupant generation was not persisted"],
|
|
@@ -515,7 +932,7 @@ export class SeatLifecycleService {
|
|
|
515
932
|
const launchPosture = this.rigRepo.getNodePolicyProvenance(node.id)?.launchPosture
|
|
516
933
|
?? this.rigRepo.getRigPolicyProvenance(seat.rigId)?.launchPosture
|
|
517
934
|
?? "floor";
|
|
518
|
-
const startupResult = await
|
|
935
|
+
const startupResult = await startupOrchestrator.startNode({
|
|
519
936
|
rigId: seat.rigId,
|
|
520
937
|
nodeId: node.id,
|
|
521
938
|
sessionId: launch.session.id,
|
|
@@ -523,14 +940,14 @@ export class SeatLifecycleService {
|
|
|
523
940
|
...launch.binding,
|
|
524
941
|
cwd: node.cwd ?? ".",
|
|
525
942
|
model: node.model ?? undefined,
|
|
526
|
-
effort: node.
|
|
943
|
+
effort: resolveSeatEffort(node).effective ?? undefined,
|
|
527
944
|
codexConfigProfile: node.codexConfigProfile ?? undefined,
|
|
528
945
|
launchPosture,
|
|
529
946
|
},
|
|
530
947
|
adapter,
|
|
531
|
-
plan: startup.
|
|
532
|
-
resolvedStartupFiles: startup.
|
|
533
|
-
startupActions: startup.
|
|
948
|
+
plan: startup.plan,
|
|
949
|
+
resolvedStartupFiles: startup.resolvedStartupFiles,
|
|
950
|
+
startupActions: startup.startupActions,
|
|
534
951
|
isRestore: false,
|
|
535
952
|
includeDurableObligations: true,
|
|
536
953
|
sessionName: canonicalSessionName,
|
|
@@ -543,9 +960,9 @@ export class SeatLifecycleService {
|
|
|
543
960
|
supersededSessionIds,
|
|
544
961
|
retiringGeneration,
|
|
545
962
|
newGeneration: generation,
|
|
546
|
-
startupPolicyHash: startup.
|
|
963
|
+
startupPolicyHash: startup.hash,
|
|
547
964
|
model: node.model,
|
|
548
|
-
effort: node.
|
|
965
|
+
effort: resolveSeatEffort(node).effective,
|
|
549
966
|
reason: input.reason,
|
|
550
967
|
operator: input.operator,
|
|
551
968
|
errors: startupResult.errors,
|
|
@@ -607,8 +1024,8 @@ export class SeatLifecycleService {
|
|
|
607
1024
|
nativeSessionId,
|
|
608
1025
|
...(nativeSessionId ? {} : { nativeSessionIdReason: "scrape_miss" }),
|
|
609
1026
|
model: node.model,
|
|
610
|
-
effort: node.
|
|
611
|
-
startupPolicyHash: startup.
|
|
1027
|
+
effort: resolveSeatEffort(node).effective,
|
|
1028
|
+
startupPolicyHash: startup.hash,
|
|
612
1029
|
reason: input.reason.trim(),
|
|
613
1030
|
operator: input.operator ?? null,
|
|
614
1031
|
status: attentionRequired ? "attention_required" : "ready",
|
|
@@ -639,14 +1056,128 @@ export class SeatLifecycleService {
|
|
|
639
1056
|
sessionId: launch.session.id,
|
|
640
1057
|
generation,
|
|
641
1058
|
model: node.model,
|
|
642
|
-
effort: node.
|
|
643
|
-
startupPolicyHash: startup.
|
|
1059
|
+
effort: resolveSeatEffort(node).effective ?? undefined,
|
|
1060
|
+
startupPolicyHash: startup.hash,
|
|
644
1061
|
supersededSessionIds,
|
|
645
1062
|
warnings: startupResult.warnings,
|
|
646
1063
|
};
|
|
647
1064
|
}
|
|
1065
|
+
/**
|
|
1066
|
+
* OPR.0.7.0.5 — restart one Codex seat in place so it reads its home's current account: same conversation,
|
|
1067
|
+
* same pane, the settings it is running with now. `plan` runs every gate read-only. Activity (mid-turn,
|
|
1068
|
+
* needs input) and child processes are reported for the operator to judge, not refused. Identity, typing
|
|
1069
|
+
* guard, adopted sessions, unreadable tmux and settings drift are named refusals before any signal.
|
|
1070
|
+
*/
|
|
1071
|
+
async restartInPlace(input) {
|
|
1072
|
+
if (!input.plan) {
|
|
1073
|
+
const required = this.requireReason(input.reason ?? "");
|
|
1074
|
+
if (required)
|
|
1075
|
+
return required;
|
|
1076
|
+
}
|
|
1077
|
+
const resolved = this.resolveSeat(input.seatRef);
|
|
1078
|
+
if ("code" in resolved)
|
|
1079
|
+
return resolved;
|
|
1080
|
+
const prepared = this.inPlaceRestarter();
|
|
1081
|
+
if ("code" in prepared)
|
|
1082
|
+
return prepared;
|
|
1083
|
+
if (input.plan) {
|
|
1084
|
+
const target = await this.inPlaceTarget(resolved, input.seatRef);
|
|
1085
|
+
return "code" in target ? target : prepared.plan(target);
|
|
1086
|
+
}
|
|
1087
|
+
// Recorded before waiting for the lease: a restart that ran meanwhile refuses this one (no repeat
|
|
1088
|
+
// on a slow reply).
|
|
1089
|
+
const seenStartedSeq = prepared.latestStartedSeq(resolved.nodeId);
|
|
1090
|
+
const run = async () => {
|
|
1091
|
+
const target = await this.inPlaceTarget(resolved, input.seatRef);
|
|
1092
|
+
if ("code" in target)
|
|
1093
|
+
return target;
|
|
1094
|
+
return prepared.execute(target, { reason: input.reason ?? "", operator: input.operator ?? null, seenStartedSeq });
|
|
1095
|
+
};
|
|
1096
|
+
const guard = this.tmuxAdapter.deliveryGuard;
|
|
1097
|
+
return guard && !guard.ownsLifecycle(resolved.nodeId) ? guard.lifecycle([resolved.nodeId], run) : run();
|
|
1098
|
+
}
|
|
1099
|
+
/** `--verify`: report `moved` only with a completed tool turn since the restart and account-specific evidence. */
|
|
1100
|
+
async verifyRestartInPlace(input) {
|
|
1101
|
+
const resolved = this.resolveSeat(input.seatRef);
|
|
1102
|
+
if ("code" in resolved)
|
|
1103
|
+
return resolved;
|
|
1104
|
+
const prepared = this.inPlaceRestarter();
|
|
1105
|
+
if ("code" in prepared)
|
|
1106
|
+
return prepared;
|
|
1107
|
+
const target = await this.inPlaceTarget(resolved, input.seatRef);
|
|
1108
|
+
return "code" in target ? target : prepared.verify(target, { expectAccount: input.expectAccount ?? null });
|
|
1109
|
+
}
|
|
1110
|
+
inPlaceRestarter() {
|
|
1111
|
+
const adapter = this.runtimeAdapters["codex"];
|
|
1112
|
+
if (!adapter?.buildResumeCommand || !adapter.verifyResumeInPane || !adapter.sendResumeCommand) {
|
|
1113
|
+
return { ok: false, code: "runtime_adapter_missing", message: "The Codex runtime adapter with in-place resume is unavailable in this daemon." };
|
|
1114
|
+
}
|
|
1115
|
+
const activity = this.activityOracle?.getSeatState ? this.activityOracle : null;
|
|
1116
|
+
return new CodexInPlaceRestart({
|
|
1117
|
+
db: this.db, sessionRegistry: this.sessionRegistry, eventBus: this.eventBus, tmux: this.tmuxAdapter,
|
|
1118
|
+
codex: adapter, activity, listProcesses: this.listProcesses,
|
|
1119
|
+
io: this.inPlaceRestartIo, timing: this.inPlaceRestartTiming, daemonStartedAt: this.inPlaceRestartDaemonStartedAt,
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
/** The shared seat refusals, then the binding the relaunch is built from (the handover's posture rules). */
|
|
1123
|
+
async inPlaceTarget(resolved, seatRef) {
|
|
1124
|
+
const seat = this.describe(resolved);
|
|
1125
|
+
const node = this.rigRepo.getRig(seat.rigId)?.nodes.find((candidate) => candidate.id === seat.nodeId);
|
|
1126
|
+
if (!node)
|
|
1127
|
+
return { ok: false, code: "seat_not_found", message: `Seat "${seatRef}" no longer exists.`, guidance: SEAT_LOOKUP_GUIDANCE };
|
|
1128
|
+
if (node.runtime !== "codex") {
|
|
1129
|
+
return { ok: false, code: "not_codex", message: `Seat "${seatRef}" runs ${node.runtime ?? "an unknown runtime"}; in-place restart supports Codex seats only.` };
|
|
1130
|
+
}
|
|
1131
|
+
const preference = this.tmuxAdapter.deliveryGuard?.preference(node.id);
|
|
1132
|
+
if (preference?.effective || preference?.desired) {
|
|
1133
|
+
return { ok: false, code: "typing_guard_enabled", message: "Typing protection blocks lifecycle operations for this seat; nothing was restarted." };
|
|
1134
|
+
}
|
|
1135
|
+
const session = this.latestSession(node.id);
|
|
1136
|
+
if (!session || TERMINAL_SESSION_STATUSES.has(session.status)) {
|
|
1137
|
+
return { ok: false, code: "no_session", message: `Seat "${seatRef}" has no live managed session to restart (checked: latest sessions row).` };
|
|
1138
|
+
}
|
|
1139
|
+
if (session.origin === "claimed") {
|
|
1140
|
+
return { ok: false, code: "claimed_session", message: `Session "${session.session_name}" was adopted (origin=claimed), not launched by OpenRig; in-place restart refuses it.`,
|
|
1141
|
+
guidance: "Release an adopted session with: rig unclaim" };
|
|
1142
|
+
}
|
|
1143
|
+
const probed = await this.probeLiveness(session.session_name, "in-place restart refuses rather than act on an unknown session");
|
|
1144
|
+
if ("code" in probed)
|
|
1145
|
+
return probed;
|
|
1146
|
+
if (probed.state === "absent") {
|
|
1147
|
+
return { ok: false, code: "session_not_live", message: `Session "${session.session_name}" is absent in tmux; there is nothing to restart in place.` };
|
|
1148
|
+
}
|
|
1149
|
+
const binding = this.sessionRegistry.getBindingForNode(node.id);
|
|
1150
|
+
if (!binding?.tmuxSession || binding.tmuxSession !== session.session_name || !binding.tmuxPane) {
|
|
1151
|
+
return { ok: false, code: "session_not_live", message: `Seat "${seatRef}" has no bound tmux pane for session "${session.session_name}".` };
|
|
1152
|
+
}
|
|
1153
|
+
let permissionOverride;
|
|
1154
|
+
try {
|
|
1155
|
+
permissionOverride = new NativePermissionStore(this.db).launchOverride(node.id, "codex");
|
|
1156
|
+
}
|
|
1157
|
+
catch (error) {
|
|
1158
|
+
return { ok: false, code: "permission_selection_refused", message: `Permission selection: ${error.message}` };
|
|
1159
|
+
}
|
|
1160
|
+
const launchPosture = permissionOverride.launchPosture
|
|
1161
|
+
?? this.rigRepo.getNodePolicyProvenance(node.id)?.launchPosture
|
|
1162
|
+
?? this.rigRepo.getRigPolicyProvenance(seat.rigId)?.launchPosture
|
|
1163
|
+
?? "floor";
|
|
1164
|
+
// OPR.0.7.0.7: an in-place restart is a managed continuation, so it relaunches with the seat's saved effort.
|
|
1165
|
+
const savedEffort = resolveSeatEffort(node);
|
|
1166
|
+
return {
|
|
1167
|
+
seat, sessionId: session.id, sessionName: session.session_name,
|
|
1168
|
+
saved: { model: node.model ?? null, effort: savedEffort.effective, codexConfigProfile: node.codexConfigProfile ?? null, effortSource: savedEffort.source },
|
|
1169
|
+
binding: {
|
|
1170
|
+
...binding, cwd: node.cwd ?? ".",
|
|
1171
|
+
...(node.model ? { model: node.model } : {}),
|
|
1172
|
+
...(savedEffort.effective ? { effort: savedEffort.effective } : {}),
|
|
1173
|
+
...(node.codexConfigProfile ? { codexConfigProfile: node.codexConfigProfile } : {}),
|
|
1174
|
+
launchPosture, kernelAuthority: permissionOverride.kernelAuthority, teamPermissionDefault: permissionOverride.teamPermissionDefault,
|
|
1175
|
+
nonInterruptive: this.rigRepo.getRigNonInterruptive(seat.rigId),
|
|
1176
|
+
},
|
|
1177
|
+
};
|
|
1178
|
+
}
|
|
648
1179
|
// -- shared internals --
|
|
649
|
-
async stopManagedTmuxSeat(resolved, session, reason, operator) {
|
|
1180
|
+
async stopManagedTmuxSeat(resolved, session, reason, operator, recordStopIntent) {
|
|
650
1181
|
const seat = this.describe(resolved);
|
|
651
1182
|
const kill = await this.tmuxAdapter.killSession(session.session_name);
|
|
652
1183
|
if (kill && !kill.ok && kill.code !== "session_not_found") {
|
|
@@ -658,7 +1189,13 @@ export class SeatLifecycleService {
|
|
|
658
1189
|
}
|
|
659
1190
|
let persisted = null;
|
|
660
1191
|
const tx = this.db.transaction(() => {
|
|
661
|
-
|
|
1192
|
+
if (recordStopIntent && kill?.ok) {
|
|
1193
|
+
this.sessionRegistry.markIntentionallyStopped(session.id);
|
|
1194
|
+
}
|
|
1195
|
+
else {
|
|
1196
|
+
// An internal replacement stop or an unconfirmed kill must still affect health.
|
|
1197
|
+
this.sessionRegistry.updateStatus(session.id, "exited");
|
|
1198
|
+
}
|
|
662
1199
|
this.sessionRegistry.clearBinding(resolved.nodeId);
|
|
663
1200
|
persisted = this.eventBus.persistWithinTransaction({
|
|
664
1201
|
type: "session.stopped",
|
|
@@ -903,7 +1440,7 @@ export class SeatLifecycleService {
|
|
|
903
1440
|
};
|
|
904
1441
|
}
|
|
905
1442
|
latestSession(nodeId) {
|
|
906
|
-
const row = this.db.prepare(
|
|
1443
|
+
const row = this.db.prepare(`SELECT id, session_name, status, origin, ${sessionCommunityHarnessSelect(this.db, "sessions")} AS community_harness FROM sessions WHERE node_id = ? ORDER BY id DESC LIMIT 1`).get(nodeId);
|
|
907
1444
|
return row ?? null;
|
|
908
1445
|
}
|
|
909
1446
|
/** The ONE resolution path, mirroring SeatStatusService.findMatches semantics
|
|
@@ -978,4 +1515,23 @@ function isOptionalOneOf(value, allowed) {
|
|
|
978
1515
|
function isStringArrayOf(value, allowed) {
|
|
979
1516
|
return Array.isArray(value) && value.every((entry) => isOneOf(entry, allowed));
|
|
980
1517
|
}
|
|
1518
|
+
/** One line naming where the four values agree, and where they can't be seen. */
|
|
1519
|
+
function effortSummary(saved, emitted, observed) {
|
|
1520
|
+
const savedText = saved.effective ? `${saved.effective} (${saved.source === "seat_choice" ? "seat choice" : "authored"})` : "no flag (the runtime's own default)";
|
|
1521
|
+
if (emitted.state !== "observed")
|
|
1522
|
+
return `Saved: ${savedText}. Launch: unknown (${emitted.detail}) Native effort: NOT VERIFIED.`;
|
|
1523
|
+
const launch = emitted.value ?? "no flag";
|
|
1524
|
+
const launchNote = emitted.matchesSaved ? "" : " This differs from the saved value: it applies at the seat's next managed continuation.";
|
|
1525
|
+
if (observed.state !== "observed")
|
|
1526
|
+
return `Saved: ${savedText}. Launch sent: ${launch}.${launchNote} Native effort: NOT VERIFIED (${observed.detail})`;
|
|
1527
|
+
const sent = observed.matchesEmitted === false
|
|
1528
|
+
? `${observed.value}, not the ${launch} the launch sent (changed or overridden inside the session)`
|
|
1529
|
+
: observed.value;
|
|
1530
|
+
const verdict = observed.outcome === "accepted" ? "accepted by the service for that turn"
|
|
1531
|
+
: observed.outcome === "rejected" ? `REJECTED (${observed.detail})`
|
|
1532
|
+
: observed.outcome === "failed" || observed.outcome === "interrupted" ? (observed.detail ?? "not judged").replace(/\.$/, "")
|
|
1533
|
+
: observed.outcome === "pending" ? "its turn hasn't finished, so not yet known whether it was taken"
|
|
1534
|
+
: "applied level NOT VERIFIED (whether this is after any model fallback isn't shown)";
|
|
1535
|
+
return `Saved: ${savedText}. Launch sent: ${launch}.${launchNote} The session sent ${sent} with its latest turn (${observed.source}, ${observed.at}): ${verdict}.`;
|
|
1536
|
+
}
|
|
981
1537
|
//# sourceMappingURL=seat-lifecycle-service.js.map
|