@openrig/cli 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -8
- package/daemon/assets/claude-statusline-context.cjs +13 -3
- package/daemon/assets/guidance/openrig-seat-skills.md +1 -0
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +11 -11
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +9 -8
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus-health.cjs +2 -2
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +9 -6
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +1 -1
- package/daemon/assets/plugins/openrig-core/skills/delegating-work/SKILL.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +13 -8
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +19 -4
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +254 -52
- package/daemon/assets/skills/rigs/SKILL.md +42 -10
- package/daemon/context-packs/help/help.md +6 -0
- package/daemon/context-packs/help/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +271 -38
- package/daemon/context-packs/reference/acp-agents.md +77 -0
- package/daemon/context-packs/reference/getting-started.md +145 -14
- package/daemon/context-packs/reference/manifest.yaml +6 -3
- package/daemon/context-packs/reference/rig-spec.md +175 -5
- package/daemon/context-packs/reference/whats-new.md +275 -113
- 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 +1 -1
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/SKILL.md +19 -4
- 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/SKILL.md +18 -3
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +2 -2
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/SKILL.md +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/SKILL.md +13 -8
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/SKILL.md +254 -52
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/LICENSE.txt +201 -0
- package/daemon/context-packs/skills/process/agent-browser/OPENRIG.md +13 -29
- package/daemon/context-packs/skills/process/agent-browser/SKILL.md +7 -7
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +3 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/LICENSE.txt +201 -0
- package/daemon/context-packs/skills/process/dogfood/SKILL.md +6 -2
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +3 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/LICENSE.txt +21 -0
- package/daemon/context-packs/skills/process/systematic-debugging/SKILL.md +6 -2
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +3 -1
- package/daemon/context-packs/skills/process/test-driven-development/LICENSE.txt +21 -0
- package/daemon/context-packs/skills/process/test-driven-development/SKILL.md +5 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +3 -1
- package/daemon/context-packs/skills/process/verification-before-completion/LICENSE.txt +21 -0
- package/daemon/context-packs/skills/process/verification-before-completion/SKILL.md +5 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +3 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts +4 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +138 -41
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +9 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +37 -11
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +10 -4
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +59 -14
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +54 -16
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +664 -117
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +25 -2
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +122 -9
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/compose-services-adapter.d.ts +16 -0
- package/daemon/dist/adapters/compose-services-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/compose-services-adapter.js +46 -2
- package/daemon/dist/adapters/compose-services-adapter.js.map +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts +1 -1
- package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
- package/daemon/dist/adapters/kernel-authority.js +13 -2
- package/daemon/dist/adapters/kernel-authority.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +11 -0
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +81 -31
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +9 -6
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.js +9 -5
- package/daemon/dist/adapters/stub-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux-server.d.ts +3 -0
- package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-server.js +11 -2
- package/daemon/dist/adapters/tmux-server.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +53 -4
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +225 -40
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/adapters/yolo-mode.d.ts +7 -0
- package/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
- package/daemon/dist/adapters/yolo-mode.js +8 -0
- package/daemon/dist/adapters/yolo-mode.js.map +1 -1
- package/daemon/dist/attention-surface.d.ts +14 -0
- package/daemon/dist/attention-surface.d.ts.map +1 -1
- package/daemon/dist/attention-surface.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/codex-auth-surface.d.ts +2 -0
- package/daemon/dist/codex-auth-surface.d.ts.map +1 -0
- package/daemon/dist/codex-auth-surface.js +2 -0
- package/daemon/dist/codex-auth-surface.js.map +1 -0
- package/daemon/dist/daemon-db-path.d.ts +6 -0
- package/daemon/dist/daemon-db-path.d.ts.map +1 -1
- package/daemon/dist/daemon-db-path.js +98 -1
- package/daemon/dist/daemon-db-path.js.map +1 -1
- package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
- package/daemon/dist/daemon-shutdown.js +4 -2
- package/daemon/dist/daemon-shutdown.js.map +1 -1
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +28 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/124_context_usage_watchdog_units.d.ts +4 -0
- package/daemon/dist/db/migrations/124_context_usage_watchdog_units.d.ts.map +1 -0
- package/daemon/dist/db/migrations/124_context_usage_watchdog_units.js +9 -0
- package/daemon/dist/db/migrations/124_context_usage_watchdog_units.js.map +1 -0
- package/daemon/dist/db/migrations/125_node_advisor.d.ts +3 -0
- package/daemon/dist/db/migrations/125_node_advisor.d.ts.map +1 -0
- package/daemon/dist/db/migrations/125_node_advisor.js +8 -0
- package/daemon/dist/db/migrations/125_node_advisor.js.map +1 -0
- package/daemon/dist/db/migrations/127_operation_correlation.d.ts +3 -0
- package/daemon/dist/db/migrations/127_operation_correlation.d.ts.map +1 -0
- package/daemon/dist/db/migrations/127_operation_correlation.js +10 -0
- package/daemon/dist/db/migrations/127_operation_correlation.js.map +1 -0
- package/daemon/dist/db/migrations/128_terminal_policy.d.ts +3 -0
- package/daemon/dist/db/migrations/128_terminal_policy.d.ts.map +1 -0
- package/daemon/dist/db/migrations/128_terminal_policy.js +37 -0
- package/daemon/dist/db/migrations/128_terminal_policy.js.map +1 -0
- package/daemon/dist/db/migrations/129_stream_dispositions.d.ts +10 -0
- package/daemon/dist/db/migrations/129_stream_dispositions.d.ts.map +1 -0
- package/daemon/dist/db/migrations/129_stream_dispositions.js +35 -0
- package/daemon/dist/db/migrations/129_stream_dispositions.js.map +1 -0
- package/daemon/dist/db/migrations/130_stream_subscriptions.d.ts +11 -0
- package/daemon/dist/db/migrations/130_stream_subscriptions.d.ts.map +1 -0
- package/daemon/dist/db/migrations/130_stream_subscriptions.js +33 -0
- package/daemon/dist/db/migrations/130_stream_subscriptions.js.map +1 -0
- package/daemon/dist/db/migrations/131_stream_retention_floor.d.ts +8 -0
- package/daemon/dist/db/migrations/131_stream_retention_floor.d.ts.map +1 -0
- package/daemon/dist/db/migrations/131_stream_retention_floor.js +20 -0
- package/daemon/dist/db/migrations/131_stream_retention_floor.js.map +1 -0
- package/daemon/dist/db/migrations/132_seat_runtime_switches.d.ts +10 -0
- package/daemon/dist/db/migrations/132_seat_runtime_switches.d.ts.map +1 -0
- package/daemon/dist/db/migrations/132_seat_runtime_switches.js +46 -0
- package/daemon/dist/db/migrations/132_seat_runtime_switches.js.map +1 -0
- package/daemon/dist/db/migrations/133_stream_reader_actions.d.ts +8 -0
- package/daemon/dist/db/migrations/133_stream_reader_actions.d.ts.map +1 -0
- package/daemon/dist/db/migrations/133_stream_reader_actions.js +25 -0
- package/daemon/dist/db/migrations/133_stream_reader_actions.js.map +1 -0
- package/daemon/dist/db/migrations/134_claude_token_readings.d.ts +3 -0
- package/daemon/dist/db/migrations/134_claude_token_readings.d.ts.map +1 -0
- package/daemon/dist/db/migrations/134_claude_token_readings.js +21 -0
- package/daemon/dist/db/migrations/134_claude_token_readings.js.map +1 -0
- package/daemon/dist/db/migrations/135_seat_identity_process_evidence.d.ts +3 -0
- package/daemon/dist/db/migrations/135_seat_identity_process_evidence.d.ts.map +1 -0
- package/daemon/dist/db/migrations/135_seat_identity_process_evidence.js +16 -0
- package/daemon/dist/db/migrations/135_seat_identity_process_evidence.js.map +1 -0
- package/daemon/dist/db/migrations/136_node_launch_recipe.d.ts +9 -0
- package/daemon/dist/db/migrations/136_node_launch_recipe.d.ts.map +1 -0
- package/daemon/dist/db/migrations/136_node_launch_recipe.js +11 -0
- package/daemon/dist/db/migrations/136_node_launch_recipe.js.map +1 -0
- package/daemon/dist/db/migrations/138_node_claude_token_ref.d.ts +3 -0
- package/daemon/dist/db/migrations/138_node_claude_token_ref.d.ts.map +1 -0
- package/daemon/dist/db/migrations/138_node_claude_token_ref.js +8 -0
- package/daemon/dist/db/migrations/138_node_claude_token_ref.js.map +1 -0
- package/daemon/dist/db/migrations/139_node_claude_permissions.d.ts +3 -0
- package/daemon/dist/db/migrations/139_node_claude_permissions.d.ts.map +1 -0
- package/daemon/dist/db/migrations/139_node_claude_permissions.js +5 -0
- package/daemon/dist/db/migrations/139_node_claude_permissions.js.map +1 -0
- package/daemon/dist/domain/active-occupant.d.ts +3 -0
- package/daemon/dist/domain/active-occupant.d.ts.map +1 -1
- package/daemon/dist/domain/active-occupant.js +6 -2
- package/daemon/dist/domain/active-occupant.js.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.d.ts +3 -0
- package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
- package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
- package/daemon/dist/domain/agent-activity-store.d.ts +6 -2
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +13 -4
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +14 -2
- package/daemon/dist/domain/agent-manifest.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 +35 -6
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/builtin-startup-files.d.ts.map +1 -1
- package/daemon/dist/domain/builtin-startup-files.js +2 -0
- package/daemon/dist/domain/builtin-startup-files.js.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.js +28 -1
- package/daemon/dist/domain/bundle-behaviour.js.map +1 -1
- package/daemon/dist/domain/claim-service.d.ts +19 -1
- package/daemon/dist/domain/claim-service.d.ts.map +1 -1
- package/daemon/dist/domain/claim-service.js +68 -20
- package/daemon/dist/domain/claim-service.js.map +1 -1
- package/daemon/dist/domain/classification-attempts.d.ts +4 -1
- package/daemon/dist/domain/classification-attempts.d.ts.map +1 -1
- package/daemon/dist/domain/classification-attempts.js +10 -1
- package/daemon/dist/domain/classification-attempts.js.map +1 -1
- package/daemon/dist/domain/classification-sources.d.ts +38 -0
- package/daemon/dist/domain/classification-sources.d.ts.map +1 -1
- package/daemon/dist/domain/classification-sources.js +24 -1
- package/daemon/dist/domain/classification-sources.js.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.d.ts +2 -2
- package/daemon/dist/domain/claude-activity-hooks.d.ts.map +1 -1
- package/daemon/dist/domain/claude-activity-hooks.js +8 -7
- package/daemon/dist/domain/claude-activity-hooks.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +133 -8
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +513 -64
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-core-plugin-env.d.ts +4 -1
- package/daemon/dist/domain/claude-core-plugin-env.d.ts.map +1 -1
- package/daemon/dist/domain/claude-core-plugin-env.js +23 -12
- package/daemon/dist/domain/claude-core-plugin-env.js.map +1 -1
- package/daemon/dist/domain/claude-credential-precedence.d.ts +33 -0
- package/daemon/dist/domain/claude-credential-precedence.d.ts.map +1 -0
- package/daemon/dist/domain/claude-credential-precedence.js +62 -0
- package/daemon/dist/domain/claude-credential-precedence.js.map +1 -0
- package/daemon/dist/domain/claude-managed-launch.d.ts +44 -5
- package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
- package/daemon/dist/domain/claude-managed-launch.js +159 -39
- package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
- package/daemon/dist/domain/claude-permission-rules.d.ts +10 -0
- package/daemon/dist/domain/claude-permission-rules.d.ts.map +1 -0
- package/daemon/dist/domain/claude-permission-rules.js +41 -0
- package/daemon/dist/domain/claude-permission-rules.js.map +1 -0
- package/daemon/dist/domain/claude-seat-token.d.ts +30 -0
- package/daemon/dist/domain/claude-seat-token.d.ts.map +1 -0
- package/daemon/dist/domain/claude-seat-token.js +78 -0
- package/daemon/dist/domain/claude-seat-token.js.map +1 -0
- package/daemon/dist/domain/codex-auth.d.ts +148 -0
- package/daemon/dist/domain/codex-auth.d.ts.map +1 -0
- package/daemon/dist/domain/codex-auth.js +506 -0
- package/daemon/dist/domain/codex-auth.js.map +1 -0
- package/daemon/dist/domain/codex-daemon-support.d.ts +2 -1
- package/daemon/dist/domain/codex-daemon-support.d.ts.map +1 -1
- package/daemon/dist/domain/codex-daemon-support.js +3 -2
- package/daemon/dist/domain/codex-daemon-support.js.map +1 -1
- package/daemon/dist/domain/codex-git-add-dirs.d.ts +1 -1
- package/daemon/dist/domain/codex-git-add-dirs.d.ts.map +1 -1
- package/daemon/dist/domain/codex-network-default.d.ts +2 -1
- package/daemon/dist/domain/codex-network-default.d.ts.map +1 -1
- package/daemon/dist/domain/codex-network-default.js +3 -2
- package/daemon/dist/domain/codex-network-default.js.map +1 -1
- package/daemon/dist/domain/codex-owned-plugin-trust.d.ts +26 -0
- package/daemon/dist/domain/codex-owned-plugin-trust.d.ts.map +1 -0
- package/daemon/dist/domain/codex-owned-plugin-trust.js +187 -0
- package/daemon/dist/domain/codex-owned-plugin-trust.js.map +1 -0
- package/daemon/dist/domain/codex-rebuild-permissions.d.ts +54 -0
- package/daemon/dist/domain/codex-rebuild-permissions.d.ts.map +1 -0
- package/daemon/dist/domain/codex-rebuild-permissions.js +134 -0
- package/daemon/dist/domain/codex-rebuild-permissions.js.map +1 -0
- package/daemon/dist/domain/codex-team-workspace.d.ts +5 -0
- package/daemon/dist/domain/codex-team-workspace.d.ts.map +1 -1
- package/daemon/dist/domain/codex-team-workspace.js +37 -0
- package/daemon/dist/domain/codex-team-workspace.js.map +1 -1
- package/daemon/dist/domain/community-harness-first-input.d.ts +7 -0
- package/daemon/dist/domain/community-harness-first-input.d.ts.map +1 -0
- package/daemon/dist/domain/community-harness-first-input.js +16 -0
- package/daemon/dist/domain/community-harness-first-input.js.map +1 -0
- package/daemon/dist/domain/community-harness-launch-result.d.ts +33 -0
- package/daemon/dist/domain/community-harness-launch-result.d.ts.map +1 -0
- package/daemon/dist/domain/community-harness-launch-result.js +93 -0
- package/daemon/dist/domain/community-harness-launch-result.js.map +1 -0
- package/daemon/dist/domain/community-harness-presets.d.ts +29 -2
- package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
- package/daemon/dist/domain/community-harness-presets.js +51 -5
- package/daemon/dist/domain/community-harness-presets.js.map +1 -1
- package/daemon/dist/domain/compaction-restore-notice.d.ts +6 -0
- package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -0
- package/daemon/dist/domain/compaction-restore-notice.js +27 -0
- package/daemon/dist/domain/compaction-restore-notice.js.map +1 -0
- package/daemon/dist/domain/composer-prompts.d.ts +5 -2
- package/daemon/dist/domain/composer-prompts.d.ts.map +1 -1
- package/daemon/dist/domain/composer-prompts.js +2 -2
- package/daemon/dist/domain/composer-prompts.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +2 -1
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/context-packs/seat-recap-store.d.ts +14 -0
- package/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/seat-recap-store.js +57 -1
- package/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
- package/daemon/dist/domain/context-usage-store.js +6 -1
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/continuity-policy-materializer.d.ts +1 -0
- package/daemon/dist/domain/continuity-policy-materializer.d.ts.map +1 -1
- package/daemon/dist/domain/continuity-policy-materializer.js +2 -0
- package/daemon/dist/domain/continuity-policy-materializer.js.map +1 -1
- package/daemon/dist/domain/current-work.d.ts +15 -4
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +26 -13
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.js +1 -1
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +12 -8
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/footprint-choice.d.ts +41 -0
- package/daemon/dist/domain/footprint-choice.d.ts.map +1 -0
- package/daemon/dist/domain/footprint-choice.js +42 -0
- package/daemon/dist/domain/footprint-choice.js.map +1 -0
- package/daemon/dist/domain/gateway/delivery-rules-engine.d.ts +3 -0
- package/daemon/dist/domain/gateway/delivery-rules-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/delivery-rules-engine.js +1 -1
- package/daemon/dist/domain/gateway/delivery-rules-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts +32 -0
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +71 -4
- package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js +3 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +58 -9
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +6 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +15 -6
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +7 -0
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +14 -2
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +1 -3
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +22 -22
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +8 -7
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/generated-file-hygiene.js +1 -1
- package/daemon/dist/domain/generated-file-hygiene.js.map +1 -1
- package/daemon/dist/domain/graph-projection.d.ts +3 -0
- package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
- package/daemon/dist/domain/graph-projection.js +2 -0
- package/daemon/dist/domain/graph-projection.js.map +1 -1
- package/daemon/dist/domain/health-diagnosis.d.ts.map +1 -1
- package/daemon/dist/domain/health-diagnosis.js +14 -6
- package/daemon/dist/domain/health-diagnosis.js.map +1 -1
- package/daemon/dist/domain/hot-potato-enforcer.d.ts +1 -1
- package/daemon/dist/domain/human-questions.d.ts +2 -0
- package/daemon/dist/domain/human-questions.d.ts.map +1 -1
- package/daemon/dist/domain/human-questions.js +5 -0
- package/daemon/dist/domain/human-questions.js.map +1 -1
- package/daemon/dist/domain/kernel-boot.d.ts +5 -1
- package/daemon/dist/domain/kernel-boot.d.ts.map +1 -1
- package/daemon/dist/domain/kernel-boot.js +34 -4
- package/daemon/dist/domain/kernel-boot.js.map +1 -1
- package/daemon/dist/domain/managed-blocks.d.ts +32 -1
- package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
- package/daemon/dist/domain/managed-blocks.js +109 -11
- package/daemon/dist/domain/managed-blocks.js.map +1 -1
- package/daemon/dist/domain/managed-restore-read-access.d.ts +20 -0
- package/daemon/dist/domain/managed-restore-read-access.d.ts.map +1 -0
- package/daemon/dist/domain/managed-restore-read-access.js +77 -0
- package/daemon/dist/domain/managed-restore-read-access.js.map +1 -0
- package/daemon/dist/domain/markdown-address.d.ts.map +1 -1
- package/daemon/dist/domain/markdown-address.js +21 -2
- package/daemon/dist/domain/markdown-address.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts +1 -1
- package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-action-log.js +3 -0
- package/daemon/dist/domain/mission-control/mission-control-action-log.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +24 -3
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +121 -8
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.d.ts +2 -0
- package/daemon/dist/domain/model-divergence/current-model-reader.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-model-reader.js +7 -0
- package/daemon/dist/domain/model-divergence/current-model-reader.js.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +10 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js +42 -6
- package/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
- package/daemon/dist/domain/native-permission-store.d.ts +7 -2
- package/daemon/dist/domain/native-permission-store.d.ts.map +1 -1
- package/daemon/dist/domain/native-permission-store.js +13 -8
- package/daemon/dist/domain/native-permission-store.js.map +1 -1
- package/daemon/dist/domain/native-process-lineage.d.ts +3 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +60 -2
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe-evidence.d.ts +19 -0
- package/daemon/dist/domain/native-resume-probe-evidence.d.ts.map +1 -0
- package/daemon/dist/domain/native-resume-probe-evidence.js +37 -0
- package/daemon/dist/domain/native-resume-probe-evidence.js.map +1 -0
- package/daemon/dist/domain/native-resume-probe.d.ts +9 -0
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +174 -44
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +53 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +137 -45
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +11 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +49 -8
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.d.ts +16 -4
- package/daemon/dist/domain/occupant-invalidator.d.ts.map +1 -1
- package/daemon/dist/domain/occupant-invalidator.js +25 -5
- package/daemon/dist/domain/occupant-invalidator.js.map +1 -1
- package/daemon/dist/domain/operation-correlation.d.ts +78 -0
- package/daemon/dist/domain/operation-correlation.d.ts.map +1 -0
- package/daemon/dist/domain/operation-correlation.js +54 -0
- package/daemon/dist/domain/operation-correlation.js.map +1 -0
- package/daemon/dist/domain/parent-session-env.d.ts +1 -1
- package/daemon/dist/domain/parent-session-env.d.ts.map +1 -1
- package/daemon/dist/domain/parent-session-env.js +3 -1
- package/daemon/dist/domain/parent-session-env.js.map +1 -1
- package/daemon/dist/domain/parked-query.d.ts +3 -0
- package/daemon/dist/domain/parked-query.d.ts.map +1 -1
- package/daemon/dist/domain/parked-query.js +1 -0
- package/daemon/dist/domain/parked-query.js.map +1 -1
- package/daemon/dist/domain/permission-account.d.ts +31 -0
- package/daemon/dist/domain/permission-account.d.ts.map +1 -0
- package/daemon/dist/domain/permission-account.js +116 -0
- package/daemon/dist/domain/permission-account.js.map +1 -0
- package/daemon/dist/domain/permission-drift.d.ts.map +1 -1
- package/daemon/dist/domain/permission-drift.js +11 -7
- package/daemon/dist/domain/permission-drift.js.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.d.ts +1 -0
- package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.js +25 -0
- package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
- package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts +7 -0
- package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts.map +1 -1
- package/daemon/dist/domain/policies/artifact-pool-helpers.js +8 -4
- package/daemon/dist/domain/policies/artifact-pool-helpers.js.map +1 -1
- package/daemon/dist/domain/policies/context-usage-threshold.d.ts.map +1 -1
- package/daemon/dist/domain/policies/context-usage-threshold.js +109 -21
- package/daemon/dist/domain/policies/context-usage-threshold.js.map +1 -1
- package/daemon/dist/domain/policies/edge-artifact-required.d.ts +6 -1
- package/daemon/dist/domain/policies/edge-artifact-required.d.ts.map +1 -1
- package/daemon/dist/domain/policies/edge-artifact-required.js +18 -13
- package/daemon/dist/domain/policies/edge-artifact-required.js.map +1 -1
- package/daemon/dist/domain/policies/mode-scheduled-end.d.ts +2 -0
- package/daemon/dist/domain/policies/mode-scheduled-end.d.ts.map +1 -1
- package/daemon/dist/domain/policies/mode-scheduled-end.js +5 -1
- package/daemon/dist/domain/policies/mode-scheduled-end.js.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +8 -0
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +15 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/policies/periodic-reminder.d.ts +10 -0
- package/daemon/dist/domain/policies/periodic-reminder.d.ts.map +1 -1
- package/daemon/dist/domain/policies/periodic-reminder.js +11 -6
- package/daemon/dist/domain/policies/periodic-reminder.js.map +1 -1
- package/daemon/dist/domain/policies/types.d.ts +25 -0
- package/daemon/dist/domain/policies/types.d.ts.map +1 -1
- package/daemon/dist/domain/policies/workflow-keepalive.d.ts +6 -1
- package/daemon/dist/domain/policies/workflow-keepalive.d.ts.map +1 -1
- package/daemon/dist/domain/policies/workflow-keepalive.js +11 -5
- package/daemon/dist/domain/policies/workflow-keepalive.js.map +1 -1
- package/daemon/dist/domain/profile-resolution-worker.d.ts +7 -0
- package/daemon/dist/domain/profile-resolution-worker.d.ts.map +1 -0
- package/daemon/dist/domain/profile-resolution-worker.js +83 -0
- package/daemon/dist/domain/profile-resolution-worker.js.map +1 -0
- package/daemon/dist/domain/profile-resolver.d.ts +6 -0
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +14 -2
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/project-classifier.d.ts +7 -0
- package/daemon/dist/domain/project-classifier.d.ts.map +1 -1
- package/daemon/dist/domain/project-classifier.js +26 -0
- package/daemon/dist/domain/project-classifier.js.map +1 -1
- package/daemon/dist/domain/proof/judgments.d.ts +7 -4
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +12 -8
- package/daemon/dist/domain/proof/judgments.js.map +1 -1
- package/daemon/dist/domain/proof/source-watch.d.ts +6 -1
- package/daemon/dist/domain/proof/source-watch.d.ts.map +1 -1
- package/daemon/dist/domain/proof/source-watch.js +241 -35
- package/daemon/dist/domain/proof/source-watch.js.map +1 -1
- package/daemon/dist/domain/provider/claude-auth-status-reader.d.ts +12 -0
- package/daemon/dist/domain/provider/claude-auth-status-reader.d.ts.map +1 -1
- package/daemon/dist/domain/provider/claude-auth-status-reader.js +4 -4
- package/daemon/dist/domain/provider/claude-auth-status-reader.js.map +1 -1
- package/daemon/dist/domain/provider/claude-seat-switch.d.ts +32 -0
- package/daemon/dist/domain/provider/claude-seat-switch.d.ts.map +1 -0
- package/daemon/dist/domain/provider/claude-seat-switch.js +136 -0
- package/daemon/dist/domain/provider/claude-seat-switch.js.map +1 -0
- package/daemon/dist/domain/provider/claude-token-usage.d.ts +34 -0
- package/daemon/dist/domain/provider/claude-token-usage.d.ts.map +1 -0
- package/daemon/dist/domain/provider/claude-token-usage.js +168 -0
- package/daemon/dist/domain/provider/claude-token-usage.js.map +1 -0
- package/daemon/dist/domain/provider/provider-account-readings.d.ts +7 -6
- package/daemon/dist/domain/provider/provider-account-readings.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-account-readings.js +31 -10
- package/daemon/dist/domain/provider/provider-account-readings.js.map +1 -1
- package/daemon/dist/domain/provider/provider-collect.d.ts +3 -0
- package/daemon/dist/domain/provider/provider-collect.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-collect.js +3 -2
- package/daemon/dist/domain/provider/provider-collect.js.map +1 -1
- package/daemon/dist/domain/provider/provider-seat-accounts.d.ts +1 -1
- package/daemon/dist/domain/provider/provider-seat-accounts.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-seat-accounts.js +29 -2
- package/daemon/dist/domain/provider/provider-seat-accounts.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.d.ts +38 -4
- package/daemon/dist/domain/provider/provider-service-impl.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.js +147 -5
- package/daemon/dist/domain/provider/provider-service-impl.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service.d.ts +109 -4
- package/daemon/dist/domain/provider/provider-service.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-signals.d.ts +3 -0
- package/daemon/dist/domain/provider/provider-signals.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-signals.js +7 -2
- package/daemon/dist/domain/provider/provider-signals.js.map +1 -1
- package/daemon/dist/domain/provider/provider-types.d.ts +61 -5
- package/daemon/dist/domain/provider/provider-types.d.ts.map +1 -1
- package/daemon/dist/domain/provider/reactive-tap.d.ts +4 -0
- package/daemon/dist/domain/provider/reactive-tap.d.ts.map +1 -1
- package/daemon/dist/domain/provider/reactive-tap.js +3 -0
- package/daemon/dist/domain/provider/reactive-tap.js.map +1 -1
- package/daemon/dist/domain/provider/subscription-move-report.d.ts +86 -0
- package/daemon/dist/domain/provider/subscription-move-report.d.ts.map +1 -0
- package/daemon/dist/domain/provider/subscription-move-report.js +227 -0
- package/daemon/dist/domain/provider/subscription-move-report.js.map +1 -0
- package/daemon/dist/domain/provider/usage-across-hosts.d.ts.map +1 -1
- package/daemon/dist/domain/provider/usage-across-hosts.js +8 -2
- package/daemon/dist/domain/provider/usage-across-hosts.js.map +1 -1
- package/daemon/dist/domain/provider/usage-windows.d.ts +2 -0
- package/daemon/dist/domain/provider/usage-windows.d.ts.map +1 -1
- package/daemon/dist/domain/provider/usage-windows.js +4 -0
- package/daemon/dist/domain/provider/usage-windows.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +6 -35
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +14 -55
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-owner.d.ts +15 -3
- package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
- package/daemon/dist/domain/queue-owner.js +38 -5
- package/daemon/dist/domain/queue-owner.js.map +1 -1
- package/daemon/dist/domain/queue-pickup.d.ts +5 -2
- package/daemon/dist/domain/queue-pickup.d.ts.map +1 -1
- package/daemon/dist/domain/queue-pickup.js +19 -2
- package/daemon/dist/domain/queue-pickup.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +72 -24
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +346 -102
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-retention.d.ts +18 -0
- package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
- package/daemon/dist/domain/queue-retention.js +79 -0
- package/daemon/dist/domain/queue-retention.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +16 -3
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +87 -11
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-wait-backoff.d.ts +3 -0
- package/daemon/dist/domain/queue-wait-backoff.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wait-backoff.js +9 -0
- package/daemon/dist/domain/queue-wait-backoff.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts +2 -0
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +108 -34
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts +3 -0
- package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.js +5 -1
- package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
- package/daemon/dist/domain/reconciler.d.ts +23 -0
- package/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/reconciler.js +44 -1
- package/daemon/dist/domain/reconciler.js.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.js +2 -3
- package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
- package/daemon/dist/domain/restore-guidance.d.ts +7 -0
- package/daemon/dist/domain/restore-guidance.d.ts.map +1 -1
- package/daemon/dist/domain/restore-guidance.js +20 -8
- package/daemon/dist/domain/restore-guidance.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +39 -2
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +266 -35
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.d.ts +7 -2
- package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.js +28 -7
- package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
- package/daemon/dist/domain/restore-policy.d.ts +4 -0
- package/daemon/dist/domain/restore-policy.d.ts.map +1 -1
- package/daemon/dist/domain/restore-policy.js +11 -0
- package/daemon/dist/domain/restore-policy.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +11 -2
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +32 -14
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/resume-token-capture.d.ts +5 -1
- package/daemon/dist/domain/resume-token-capture.d.ts.map +1 -1
- package/daemon/dist/domain/resume-token-capture.js +3 -1
- package/daemon/dist/domain/resume-token-capture.js.map +1 -1
- package/daemon/dist/domain/rig-edge-ops.d.ts +58 -0
- package/daemon/dist/domain/rig-edge-ops.d.ts.map +1 -0
- package/daemon/dist/domain/rig-edge-ops.js +113 -0
- package/daemon/dist/domain/rig-edge-ops.js.map +1 -0
- package/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.js +1 -0
- package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
- package/daemon/dist/domain/rig-name-override.d.ts +14 -0
- package/daemon/dist/domain/rig-name-override.d.ts.map +1 -0
- package/daemon/dist/domain/rig-name-override.js +38 -0
- package/daemon/dist/domain/rig-name-override.js.map +1 -0
- package/daemon/dist/domain/rig-repository.d.ts +28 -3
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +261 -2
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-status-compose.d.ts +1 -1
- package/daemon/dist/domain/rig-status-compose.d.ts.map +1 -1
- package/daemon/dist/domain/rig-status-compose.js +3 -1
- package/daemon/dist/domain/rig-status-compose.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +20 -1
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +81 -9
- 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 +14 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts +3 -0
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +29 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +71 -3
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +424 -48
- 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 +15 -2
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts +3 -0
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +90 -3
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/running-name-guard.d.ts.map +1 -1
- package/daemon/dist/domain/running-name-guard.js +2 -1
- package/daemon/dist/domain/running-name-guard.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +37 -2
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js +5 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.d.ts +77 -0
- package/daemon/dist/domain/runtime-switch-materials.d.ts.map +1 -0
- package/daemon/dist/domain/runtime-switch-materials.js +253 -0
- package/daemon/dist/domain/runtime-switch-materials.js.map +1 -0
- package/daemon/dist/domain/scope/scope-approve.d.ts +1 -1
- package/daemon/dist/domain/scope/scope-view-projection.d.ts +6 -0
- package/daemon/dist/domain/scope/scope-view-projection.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-view-projection.js +26 -10
- package/daemon/dist/domain/scope/scope-view-projection.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +8 -2
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +30 -5
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +27 -2
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +91 -8
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +20 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +66 -11
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +8 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +75 -5
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-store.d.ts +11 -1
- package/daemon/dist/domain/seat-identity-store.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-store.js +29 -4
- package/daemon/dist/domain/seat-identity-store.js.map +1 -1
- package/daemon/dist/domain/seat-launch-additions.d.ts +115 -0
- package/daemon/dist/domain/seat-launch-additions.d.ts.map +1 -0
- package/daemon/dist/domain/seat-launch-additions.js +439 -0
- package/daemon/dist/domain/seat-launch-additions.js.map +1 -0
- package/daemon/dist/domain/seat-launch-environment.d.ts +6 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +9 -5
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +98 -7
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +261 -25
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts +9 -2
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +27 -7
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-dir.d.ts +17 -0
- package/daemon/dist/domain/seat-runtime-dir.d.ts.map +1 -0
- package/daemon/dist/domain/seat-runtime-dir.js +27 -0
- package/daemon/dist/domain/seat-runtime-dir.js.map +1 -0
- package/daemon/dist/domain/seat-runtime-home.d.ts +42 -0
- package/daemon/dist/domain/seat-runtime-home.d.ts.map +1 -0
- package/daemon/dist/domain/seat-runtime-home.js +89 -0
- package/daemon/dist/domain/seat-runtime-home.js.map +1 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts +220 -0
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -0
- package/daemon/dist/domain/seat-runtime-switch-service.js +593 -0
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -0
- package/daemon/dist/domain/seat-skill-apply.d.ts +139 -0
- package/daemon/dist/domain/seat-skill-apply.d.ts.map +1 -0
- package/daemon/dist/domain/seat-skill-apply.js +221 -0
- package/daemon/dist/domain/seat-skill-apply.js.map +1 -0
- package/daemon/dist/domain/seat-skill-storage.d.ts +295 -0
- package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -0
- package/daemon/dist/domain/seat-skill-storage.js +850 -0
- package/daemon/dist/domain/seat-skill-storage.js.map +1 -0
- package/daemon/dist/domain/seat-skills-pointer.d.ts +5 -0
- package/daemon/dist/domain/seat-skills-pointer.d.ts.map +1 -0
- package/daemon/dist/domain/seat-skills-pointer.js +15 -0
- package/daemon/dist/domain/seat-skills-pointer.js.map +1 -0
- package/daemon/dist/domain/seat-status-service.d.ts +40 -0
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +59 -3
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.d.ts +3 -0
- package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.js +6 -0
- package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
- package/daemon/dist/domain/service-orchestrator.d.ts +7 -0
- package/daemon/dist/domain/service-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/service-orchestrator.js +4 -0
- package/daemon/dist/domain/service-orchestrator.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts +4 -0
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +13 -0
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +71 -22
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +376 -93
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/skill-catalog.d.ts +16 -0
- package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/skill-catalog.js +15 -6
- package/daemon/dist/domain/skill-catalog.js.map +1 -1
- package/daemon/dist/domain/skill-discovery.d.ts +17 -2
- package/daemon/dist/domain/skill-discovery.d.ts.map +1 -1
- package/daemon/dist/domain/skill-discovery.js +44 -5
- package/daemon/dist/domain/skill-discovery.js.map +1 -1
- package/daemon/dist/domain/snapshot-capture.d.ts +4 -1
- package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-capture.js +4 -1
- package/daemon/dist/domain/snapshot-capture.js.map +1 -1
- package/daemon/dist/domain/snapshot-repository.d.ts +4 -3
- package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-repository.js +6 -5
- package/daemon/dist/domain/snapshot-repository.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +29 -2
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +279 -25
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +1 -0
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +1 -0
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/stream-dispositions.d.ts +51 -0
- package/daemon/dist/domain/stream-dispositions.d.ts.map +1 -0
- package/daemon/dist/domain/stream-dispositions.js +112 -0
- package/daemon/dist/domain/stream-dispositions.js.map +1 -0
- package/daemon/dist/domain/stream-reader-actions.d.ts +49 -0
- package/daemon/dist/domain/stream-reader-actions.d.ts.map +1 -0
- package/daemon/dist/domain/stream-reader-actions.js +104 -0
- package/daemon/dist/domain/stream-reader-actions.js.map +1 -0
- package/daemon/dist/domain/stream-store.d.ts +22 -0
- package/daemon/dist/domain/stream-store.d.ts.map +1 -1
- package/daemon/dist/domain/stream-store.js +49 -6
- package/daemon/dist/domain/stream-store.js.map +1 -1
- package/daemon/dist/domain/stream-subscriptions.d.ts +94 -0
- package/daemon/dist/domain/stream-subscriptions.d.ts.map +1 -0
- package/daemon/dist/domain/stream-subscriptions.js +160 -0
- package/daemon/dist/domain/stream-subscriptions.js.map +1 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts +41 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +63 -5
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +8 -28
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +117 -64
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-sessions.d.ts +9 -0
- package/daemon/dist/domain/terminal/herdr-sessions.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/herdr-sessions.js +23 -0
- package/daemon/dist/domain/terminal/herdr-sessions.js.map +1 -0
- package/daemon/dist/domain/terminal/rex-adapter.d.ts +42 -0
- package/daemon/dist/domain/terminal/rex-adapter.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/rex-adapter.js +228 -0
- package/daemon/dist/domain/terminal/rex-adapter.js.map +1 -0
- package/daemon/dist/domain/terminal/rex-layout.d.ts +26 -0
- package/daemon/dist/domain/terminal/rex-layout.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/rex-layout.js +21 -0
- package/daemon/dist/domain/terminal/rex-layout.js.map +1 -0
- package/daemon/dist/domain/terminal/rex-transport.d.ts +43 -0
- package/daemon/dist/domain/terminal/rex-transport.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/rex-transport.js +176 -0
- package/daemon/dist/domain/terminal/rex-transport.js.map +1 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +15 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +14 -5
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +51 -27
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.d.ts +2 -0
- package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/tile-attach.js +42 -0
- package/daemon/dist/domain/terminal/tile-attach.js.map +1 -0
- package/daemon/dist/domain/terminal/tile-layout.d.ts +32 -0
- package/daemon/dist/domain/terminal/tile-layout.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/tile-layout.js +36 -0
- package/daemon/dist/domain/terminal/tile-layout.js.map +1 -0
- package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.js +11 -6
- package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
- package/daemon/dist/domain/terminal-policy.d.ts +80 -0
- package/daemon/dist/domain/terminal-policy.d.ts.map +1 -0
- package/daemon/dist/domain/terminal-policy.js +117 -0
- package/daemon/dist/domain/terminal-policy.js.map +1 -0
- package/daemon/dist/domain/terminal-seat.d.ts +9 -0
- package/daemon/dist/domain/terminal-seat.d.ts.map +1 -0
- package/daemon/dist/domain/terminal-seat.js +37 -0
- package/daemon/dist/domain/terminal-seat.js.map +1 -0
- package/daemon/dist/domain/topology-converge.d.ts +25 -2
- package/daemon/dist/domain/topology-converge.d.ts.map +1 -1
- package/daemon/dist/domain/topology-converge.js +14 -1
- package/daemon/dist/domain/topology-converge.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +119 -2
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/urgent-line.d.ts +4 -0
- package/daemon/dist/domain/urgent-line.d.ts.map +1 -0
- package/daemon/dist/domain/urgent-line.js +7 -0
- package/daemon/dist/domain/urgent-line.js.map +1 -0
- package/daemon/dist/domain/usage-series.d.ts.map +1 -1
- package/daemon/dist/domain/usage-series.js +6 -2
- package/daemon/dist/domain/usage-series.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.js +2 -2
- package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +3 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +73 -1
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/view-projector.d.ts.map +1 -1
- package/daemon/dist/domain/view-projector.js +2 -1
- package/daemon/dist/domain/view-projector.js.map +1 -1
- package/daemon/dist/domain/wake-recovery.d.ts +16 -0
- package/daemon/dist/domain/wake-recovery.d.ts.map +1 -0
- package/daemon/dist/domain/wake-recovery.js +31 -0
- package/daemon/dist/domain/wake-recovery.js.map +1 -0
- package/daemon/dist/domain/watchdog-delivery.js +1 -1
- package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
- package/daemon/dist/domain/watchdog-job-update.d.ts +21 -0
- package/daemon/dist/domain/watchdog-job-update.d.ts.map +1 -0
- package/daemon/dist/domain/watchdog-job-update.js +143 -0
- package/daemon/dist/domain/watchdog-job-update.js.map +1 -0
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +63 -7
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +190 -21
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +23 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +46 -13
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.js +7 -3
- package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.d.ts +5 -2
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +16 -7
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +8 -2
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +30 -7
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/workspace/project-read.d.ts +2 -0
- package/daemon/dist/domain/workspace/project-read.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/project-read.js +10 -1
- package/daemon/dist/domain/workspace/project-read.js.map +1 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +7 -1
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts +5 -0
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +8 -1
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/router-line-surface.d.ts +2 -0
- package/daemon/dist/router-line-surface.d.ts.map +1 -0
- package/daemon/dist/router-line-surface.js +3 -0
- package/daemon/dist/router-line-surface.js.map +1 -0
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +15 -0
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/agent-images.d.ts.map +1 -1
- package/daemon/dist/routes/agent-images.js +19 -2
- package/daemon/dist/routes/agent-images.js.map +1 -1
- package/daemon/dist/routes/attention.d.ts.map +1 -1
- package/daemon/dist/routes/attention.js +30 -3
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/bootstrap-failure-response.js +2 -2
- package/daemon/dist/routes/bootstrap-failure-response.js.map +1 -1
- package/daemon/dist/routes/bundles.js +1 -1
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +31 -10
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/daemon/dist/routes/context-packs.js +22 -0
- package/daemon/dist/routes/context-packs.js.map +1 -1
- package/daemon/dist/routes/hosts.d.ts.map +1 -1
- package/daemon/dist/routes/hosts.js +2 -0
- package/daemon/dist/routes/hosts.js.map +1 -1
- package/daemon/dist/routes/mission-control.d.ts.map +1 -1
- package/daemon/dist/routes/mission-control.js +7 -3
- package/daemon/dist/routes/mission-control.js.map +1 -1
- package/daemon/dist/routes/projects.d.ts.map +1 -1
- package/daemon/dist/routes/projects.js +59 -12
- package/daemon/dist/routes/projects.js.map +1 -1
- package/daemon/dist/routes/proof.js +2 -2
- package/daemon/dist/routes/proof.js.map +1 -1
- package/daemon/dist/routes/provider.d.ts.map +1 -1
- package/daemon/dist/routes/provider.js +170 -3
- package/daemon/dist/routes/provider.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +154 -13
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/require-sender-identity.d.ts +10 -8
- package/daemon/dist/routes/require-sender-identity.d.ts.map +1 -1
- package/daemon/dist/routes/require-sender-identity.js +13 -11
- package/daemon/dist/routes/require-sender-identity.js.map +1 -1
- package/daemon/dist/routes/rigs.d.ts.map +1 -1
- package/daemon/dist/routes/rigs.js +77 -10
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/rigspec.d.ts.map +1 -1
- package/daemon/dist/routes/rigspec.js +38 -12
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/runtime-switch-custody.d.ts +21 -0
- package/daemon/dist/routes/runtime-switch-custody.d.ts.map +1 -0
- package/daemon/dist/routes/runtime-switch-custody.js +55 -0
- package/daemon/dist/routes/runtime-switch-custody.js.map +1 -0
- package/daemon/dist/routes/scope-approve.js +2 -2
- package/daemon/dist/routes/scope-approve.js.map +1 -1
- package/daemon/dist/routes/scopes.d.ts.map +1 -1
- package/daemon/dist/routes/scopes.js +30 -7
- 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 +109 -10
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +14 -0
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/skills.d.ts.map +1 -1
- package/daemon/dist/routes/skills.js +54 -1
- package/daemon/dist/routes/skills.js.map +1 -1
- package/daemon/dist/routes/startup.js +15 -5
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/stream.d.ts.map +1 -1
- package/daemon/dist/routes/stream.js +86 -14
- package/daemon/dist/routes/stream.js.map +1 -1
- package/daemon/dist/routes/terminal.d.ts.map +1 -1
- package/daemon/dist/routes/terminal.js +20 -11
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +55 -5
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/routes/up.js +5 -0
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/watchdog.d.ts +1 -0
- package/daemon/dist/routes/watchdog.d.ts.map +1 -1
- package/daemon/dist/routes/watchdog.js +52 -3
- package/daemon/dist/routes/watchdog.js.map +1 -1
- package/daemon/dist/routes/workflow.d.ts.map +1 -1
- package/daemon/dist/routes/workflow.js +24 -13
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/seat-recap-store-surface.d.ts +1 -1
- package/daemon/dist/seat-recap-store-surface.d.ts.map +1 -1
- package/daemon/dist/seat-recap-store-surface.js +1 -1
- package/daemon/dist/seat-recap-store-surface.js.map +1 -1
- package/daemon/dist/server.d.ts +4 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +5 -1
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/skill-loadout-surface.d.ts +2 -0
- package/daemon/dist/skill-loadout-surface.d.ts.map +1 -1
- package/daemon/dist/skill-loadout-surface.js +2 -0
- package/daemon/dist/skill-loadout-surface.js.map +1 -1
- package/daemon/dist/startup.d.ts +5 -0
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +160 -49
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
- package/daemon/dist/terminal/TerminalSessionBroker.js +14 -2
- package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
- package/daemon/docs/reference/a2a-agents.md +343 -0
- package/daemon/docs/reference/acp-agents.md +77 -0
- package/daemon/docs/reference/agent-spec.md +7 -5
- package/daemon/docs/reference/agent-startup-guide.md +46 -0
- package/daemon/docs/reference/agent-state-taxonomy.md +27 -2
- package/daemon/docs/reference/checked-seat-stop.md +11 -0
- package/daemon/docs/reference/community-harness-examples/cursor/cursor.yaml +13 -0
- package/daemon/docs/reference/community-harness-examples/cursor/openrig-cursor-launch +68 -0
- package/daemon/docs/reference/community-harness-examples/hermes/config.yaml.example +18 -0
- package/daemon/docs/reference/community-harness-examples/hermes/hermes.yaml +12 -0
- package/daemon/docs/reference/community-harness-examples/hermes/openrig-hermes-launch +34 -0
- package/daemon/docs/reference/community-harness-examples/openclaw/openclaw-gateway.yaml +15 -0
- package/daemon/docs/reference/community-harness-examples/openclaw/openclaw.yaml +16 -0
- package/daemon/docs/reference/community-harness-examples/openclaw/openrig-openclaw-launch +70 -0
- package/daemon/docs/reference/community-harness-presets.md +194 -0
- package/daemon/docs/reference/getting-started.md +145 -14
- package/daemon/docs/reference/health-diagnosis.md +13 -0
- package/daemon/docs/reference/help.md +6 -0
- package/daemon/docs/reference/keeping-a-watch.md +21 -0
- package/daemon/docs/reference/operation-correlation.md +9 -0
- package/daemon/docs/reference/project-workspace.md +24 -0
- package/daemon/docs/reference/publishing-a-rig-bundle.md +11 -0
- package/daemon/docs/reference/quickstart.md +1 -1
- package/daemon/docs/reference/refocus-channel.md +6 -4
- package/daemon/docs/reference/rig-spec.md +175 -5
- package/daemon/docs/reference/sdlc-conventions.md +3 -1
- package/daemon/docs/reference/seat-delivery.md +89 -7
- package/daemon/docs/reference/slack-app-setup.md +4 -2
- package/daemon/docs/reference/stream-classifier-worker.md +28 -0
- package/daemon/docs/reference/telemetry.md +3 -0
- package/daemon/docs/reference/terminal-sessions.md +141 -0
- package/daemon/docs/reference/topology-naming.md +1 -1
- package/daemon/docs/reference/whats-new.md +275 -113
- package/daemon/specs/agents/shared/runtime/claude-settings.fragment.json +0 -3
- package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +19 -4
- package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +18 -3
- package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +2 -2
- package/daemon/specs/agents/shared/skills/process/agent-browser/LICENSE.txt +201 -0
- package/daemon/specs/agents/shared/skills/process/agent-browser/OPENRIG.md +13 -29
- package/daemon/specs/agents/shared/skills/process/agent-browser/SKILL.md +7 -7
- package/daemon/specs/agents/shared/skills/process/dogfood/LICENSE.txt +201 -0
- package/daemon/specs/agents/shared/skills/process/dogfood/SKILL.md +6 -2
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/LICENSE.txt +21 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/SKILL.md +6 -2
- package/daemon/specs/agents/shared/skills/process/test-driven-development/LICENSE.txt +21 -0
- package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +5 -1
- package/daemon/specs/agents/shared/skills/process/verification-before-completion/LICENSE.txt +21 -0
- package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +5 -1
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +53 -10
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +3 -0
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +12 -0
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/startup/context.md +3 -1
- package/daemon/specs/rigs/launch/secrets-manager/secrets-manager.compose.yaml +1 -1
- package/dist/acp/connector.d.ts +72 -0
- package/dist/acp/connector.d.ts.map +1 -0
- package/dist/acp/connector.js +218 -0
- package/dist/acp/connector.js.map +1 -0
- package/dist/acp/json-rpc-stdio.d.ts +53 -0
- package/dist/acp/json-rpc-stdio.d.ts.map +1 -0
- package/dist/acp/json-rpc-stdio.js +141 -0
- package/dist/acp/json-rpc-stdio.js.map +1 -0
- package/dist/acp/run-processes.d.ts +10 -0
- package/dist/acp/run-processes.d.ts.map +1 -0
- package/dist/acp/run-processes.js +33 -0
- package/dist/acp/run-processes.js.map +1 -0
- package/dist/build-info.js +3 -3
- package/dist/client.d.ts +15 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +30 -8
- package/dist/client.js.map +1 -1
- package/dist/commands/acp.d.ts +11 -0
- package/dist/commands/acp.d.ts.map +1 -0
- package/dist/commands/acp.js +198 -0
- package/dist/commands/acp.js.map +1 -0
- package/dist/commands/attach.js +1 -1
- package/dist/commands/attach.js.map +1 -1
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +41 -11
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +8 -0
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/chatroom.d.ts.map +1 -1
- package/dist/commands/chatroom.js +6 -0
- package/dist/commands/chatroom.js.map +1 -1
- package/dist/commands/compact-plan.d.ts +2 -0
- package/dist/commands/compact-plan.d.ts.map +1 -1
- package/dist/commands/compact-plan.js +38 -3
- package/dist/commands/compact-plan.js.map +1 -1
- package/dist/commands/compact.js +1 -1
- package/dist/commands/compact.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +7 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +29 -23
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/create.js +2 -2
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +2 -0
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/down.d.ts +5 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +93 -5
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/edge.d.ts +4 -0
- package/dist/commands/edge.d.ts.map +1 -0
- package/dist/commands/edge.js +135 -0
- package/dist/commands/edge.js.map +1 -0
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +3 -0
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/export.d.ts +1 -0
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +98 -0
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/fork.d.ts.map +1 -1
- package/dist/commands/fork.js +19 -2
- package/dist/commands/fork.js.map +1 -1
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +2 -1
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/grow.js +2 -2
- package/dist/commands/grow.js.map +1 -1
- package/dist/commands/health.js +1 -1
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/launch.js +2 -2
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +113 -1
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/project-worker.d.ts +25 -1
- package/dist/commands/project-worker.d.ts.map +1 -1
- package/dist/commands/project-worker.js +9 -7
- package/dist/commands/project-worker.js.map +1 -1
- package/dist/commands/project.d.ts +2 -0
- package/dist/commands/project.d.ts.map +1 -1
- package/dist/commands/project.js +70 -2
- package/dist/commands/project.js.map +1 -1
- package/dist/commands/proof.d.ts.map +1 -1
- package/dist/commands/proof.js +33 -2
- package/dist/commands/proof.js.map +1 -1
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +273 -24
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +12 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +50 -47
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +4 -2
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +178 -45
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/reconcile-session.d.ts.map +1 -1
- package/dist/commands/reconcile-session.js +6 -0
- package/dist/commands/reconcile-session.js.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +5 -2
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts +2 -0
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +336 -11
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +62 -55
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts +24 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +160 -7
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +137 -3
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +18 -25
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +4 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/stream-outcome.d.ts +742 -0
- package/dist/commands/stream-outcome.d.ts.map +1 -0
- package/dist/commands/stream-outcome.js +118 -0
- package/dist/commands/stream-outcome.js.map +1 -0
- package/dist/commands/stream.d.ts.map +1 -1
- package/dist/commands/stream.js +86 -2
- package/dist/commands/stream.js.map +1 -1
- package/dist/commands/terminal.d.ts +5 -0
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +42 -11
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/topology-default-agent.d.ts +2 -2
- package/dist/commands/topology-default-agent.d.ts.map +1 -1
- package/dist/commands/topology-default-agent.js +5 -3
- package/dist/commands/topology-default-agent.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +82 -31
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/watchdog.d.ts.map +1 -1
- package/dist/commands/watchdog.js +80 -5
- package/dist/commands/watchdog.js.map +1 -1
- package/dist/commands/workflow-errors.js +1 -1
- package/dist/commands/workflow-errors.js.map +1 -1
- package/dist/commands/workflow-render.js +4 -4
- package/dist/commands/workflow-render.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +34 -15
- package/dist/commands/workflow.js.map +1 -1
- package/dist/config-store.d.ts +15 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +86 -4
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +4 -0
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +73 -21
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/decisions/decisions.d.ts +203 -0
- package/dist/decisions/decisions.d.ts.map +1 -0
- package/dist/decisions/decisions.js +374 -0
- package/dist/decisions/decisions.js.map +1 -0
- package/dist/decisions/stream-consumer.d.ts +255 -0
- package/dist/decisions/stream-consumer.d.ts.map +1 -0
- package/dist/decisions/stream-consumer.js +282 -0
- package/dist/decisions/stream-consumer.js.map +1 -0
- package/dist/decisions/templates.d.ts +8 -0
- package/dist/decisions/templates.d.ts.map +1 -0
- package/dist/decisions/templates.js +34 -0
- package/dist/decisions/templates.js.map +1 -0
- package/dist/fresh-seat-command.d.ts +18 -0
- package/dist/fresh-seat-command.d.ts.map +1 -0
- package/dist/fresh-seat-command.js +36 -0
- package/dist/fresh-seat-command.js.map +1 -0
- package/dist/front-door.d.ts +4 -0
- package/dist/front-door.d.ts.map +1 -1
- package/dist/front-door.js +8 -4
- package/dist/front-door.js.map +1 -1
- package/dist/host-bindings.d.ts.map +1 -1
- package/dist/host-bindings.js +16 -9
- package/dist/host-bindings.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/lazy-program.d.ts.map +1 -1
- package/dist/lazy-program.js +2 -0
- package/dist/lazy-program.js.map +1 -1
- package/dist/lib/codex-auth.d.ts +1 -147
- package/dist/lib/codex-auth.d.ts.map +1 -1
- package/dist/lib/codex-auth.js +2 -505
- package/dist/lib/codex-auth.js.map +1 -1
- package/dist/lib/run-on-host.d.ts +29 -0
- package/dist/lib/run-on-host.d.ts.map +1 -0
- package/dist/lib/run-on-host.js +69 -0
- package/dist/lib/run-on-host.js.map +1 -0
- package/dist/lib/seat-activity.d.ts +17 -0
- package/dist/lib/seat-activity.d.ts.map +1 -0
- package/dist/lib/seat-activity.js +29 -0
- package/dist/lib/seat-activity.js.map +1 -0
- package/dist/local-daemon-owner.d.ts +4 -0
- package/dist/local-daemon-owner.d.ts.map +1 -1
- package/dist/local-daemon-owner.js +1 -1
- package/dist/local-daemon-owner.js.map +1 -1
- package/dist/mcp-http.d.ts +42 -0
- package/dist/mcp-http.d.ts.map +1 -0
- package/dist/mcp-http.js +232 -0
- package/dist/mcp-http.js.map +1 -0
- package/dist/mcp-server.d.ts +30 -2
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +1163 -436
- package/dist/mcp-server.js.map +1 -1
- package/dist/seat-launch-additions-lines.d.ts +11 -0
- package/dist/seat-launch-additions-lines.d.ts.map +1 -0
- package/dist/seat-launch-additions-lines.js +14 -0
- package/dist/seat-launch-additions-lines.js.map +1 -0
- package/dist/terminal-window-rex.d.ts +6 -0
- package/dist/terminal-window-rex.d.ts.map +1 -0
- package/dist/terminal-window-rex.js +129 -0
- package/dist/terminal-window-rex.js.map +1 -0
- package/dist/terminal-window.d.ts +3 -1
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +68 -28
- package/dist/terminal-window.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/attention/attention-model.d.ts +3 -1
- package/tui/dist/attention/attention-model.d.ts.map +1 -1
- package/tui/dist/attention/attention-model.js +68 -1
- package/tui/dist/attention/attention-model.js.map +1 -1
- package/tui/dist/commands/registry.d.ts.map +1 -1
- package/tui/dist/commands/registry.js +3 -1
- 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 +2 -0
- package/tui/dist/config/config-model.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +22 -3
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +9 -4
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +13 -7
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/live.d.ts.map +1 -1
- package/tui/dist/live.js +6 -4
- package/tui/dist/live.js.map +1 -1
- package/tui/dist/main.js +15 -1
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +10 -3
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/terminals/open-window.d.ts +9 -5
- package/tui/dist/terminals/open-window.d.ts.map +1 -1
- package/tui/dist/terminals/open-window.js +29 -12
- package/tui/dist/terminals/open-window.js.map +1 -1
- package/tui/dist/terminals/terminal-model.d.ts +2 -1
- package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
- package/tui/dist/terminals/terminal-model.js +5 -4
- package/tui/dist/terminals/terminal-model.js.map +1 -1
- package/tui/dist/topology/fixture.js +1 -1
- package/tui/dist/topology/fixture.js.map +1 -1
- package/tui/dist/topology/glyphs.js +1 -1
- package/tui/dist/topology/glyphs.js.map +1 -1
- package/tui/dist/topology/graph-types.d.ts +1 -0
- package/tui/dist/topology/graph-types.d.ts.map +1 -1
- package/tui/dist/types.d.ts +25 -0
- package/tui/dist/types.d.ts.map +1 -1
- package/tui/dist/usage/usage-model.d.ts.map +1 -1
- package/tui/dist/usage/usage-model.js +5 -3
- package/tui/dist/usage/usage-model.js.map +1 -1
- package/ui/dist/assets/{index-CVgod3Pm.js → index-DLP1ipGq.js} +92 -92
- package/ui/dist/index.html +1 -1
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
import nodePath from "node:path";
|
|
2
|
+
import { ulid } from "ulid";
|
|
3
|
+
import { SeatStatusService } from "./seat-status-service.js";
|
|
4
|
+
import { SeatLifecycleService } from "./seat-lifecycle-service.js";
|
|
5
|
+
import { SuccessorSessionLauncher } from "./successor-session-launcher.js";
|
|
6
|
+
import { buildRestorePacket } from "./seat-handover-service.js";
|
|
7
|
+
import { NativePermissionStore } from "./native-permission-store.js";
|
|
8
|
+
import { validateNativePermissionSelection } from "./native-permission-selection.js";
|
|
9
|
+
import { AppliedLaunchObservationStore } from "./applied-launch-observation-store.js";
|
|
10
|
+
import { validateResumeToken } from "./resume-token-validation.js";
|
|
11
|
+
import { SnapshotCapture } from "./snapshot-capture.js";
|
|
12
|
+
import { SnapshotRepository } from "./snapshot-repository.js";
|
|
13
|
+
import { CheckpointStore } from "./checkpoint-store.js";
|
|
14
|
+
import { DeliveryGuardError } from "./seat-delivery-guard.js";
|
|
15
|
+
import { seatCodexCorePluginDir, seatCorePluginDir, withPluginDirs } from "./claude-core-plugin-env.js";
|
|
16
|
+
import { planRuntimeSwitchMaterials } from "./runtime-switch-materials.js";
|
|
17
|
+
import { terminatePaneInPlace } from "./pane-cutover.js";
|
|
18
|
+
/**
|
|
19
|
+
* Slice 16: switch one live seat between Codex and Claude Code, successor first (founder
|
|
20
|
+
* decision-20261014-0454-1214-successor-first; built from #1214 by Aschenbath, whose design is the starting point).
|
|
21
|
+
*
|
|
22
|
+
* The seat keeps its address, edges, queue rows and claims. Its successor starts on the target runtime in a staging
|
|
23
|
+
* session beside the current occupant, reads a handover, and confirms it through OpenRig with its own reserved
|
|
24
|
+
* generation. That confirmation is the evidence it can carry on. Only then are the panes exchanged and the seat's
|
|
25
|
+
* configuration committed (one transaction, which also moves the claims); then the predecessor is retired. Before the
|
|
26
|
+
* commit the predecessor holds the seat; after it the successor does; a durable record (`seat_runtime_switches`) lets
|
|
27
|
+
* recovery finish either side without guessing.
|
|
28
|
+
*/
|
|
29
|
+
export const RUNTIME_SWITCH_CONFIRM_TIMEOUT_MS_DEFAULT = 180_000;
|
|
30
|
+
const COSTS = [
|
|
31
|
+
"A new conversation: native history isn't converted; only the handover carries over.",
|
|
32
|
+
"Same address, different terminal: the seat's session and address stay, its pane and scrollback change.",
|
|
33
|
+
"The team file isn't rewritten: the database and rig export show the new runtime, the imported YAML keeps the old one, so a later converge reports a deferred change_runtime.",
|
|
34
|
+
"Source settings are cleared, not mapped: model, effort, Codex profile and an explicit native permission choice. A model or effort the seat's agent spec declares for the source runtime doesn't apply either.",
|
|
35
|
+
"A second process runs on the target's account until cutover.",
|
|
36
|
+
"Messages sent to the seat while it switches are held, not typed; rig send says the seat is switching and until when, and they need sending again afterwards.",
|
|
37
|
+
"A failed switch can leave the target runtime's prepared files (its seat storage and projections).",
|
|
38
|
+
"Codex and Claude Code only, single-pane seats only.",
|
|
39
|
+
];
|
|
40
|
+
export class SeatRuntimeSwitchService {
|
|
41
|
+
deps;
|
|
42
|
+
now;
|
|
43
|
+
sleep;
|
|
44
|
+
constructor(deps) {
|
|
45
|
+
this.deps = deps;
|
|
46
|
+
for (const owner of [deps.rigRepo, deps.sessionRegistry, deps.discoveryRepo, deps.eventBus]) {
|
|
47
|
+
if (owner.db !== deps.db)
|
|
48
|
+
throw new Error("Runtime switch dependencies must share one database.");
|
|
49
|
+
}
|
|
50
|
+
this.now = deps.now ?? (() => new Date());
|
|
51
|
+
this.sleep = deps.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
52
|
+
}
|
|
53
|
+
/** The open (or attention-holding) switch for a seat, as `rig seat status` shows it. */
|
|
54
|
+
openSwitch(nodeId) {
|
|
55
|
+
try {
|
|
56
|
+
return this.deps.db.prepare(`SELECT * FROM seat_runtime_switches WHERE node_id = ?
|
|
57
|
+
AND (phase IN ('preparing', 'confirmed', 'committed') OR attention IS NOT NULL) ORDER BY created_at DESC LIMIT 1`)
|
|
58
|
+
.get(nodeId) ?? null;
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async setRuntime(input) {
|
|
65
|
+
const refuse = (code, message, guidance) => ({ ok: false, code, message, ...(guidance ? { guidance } : {}) });
|
|
66
|
+
if (input.runtime !== "codex" && input.runtime !== "claude-code") {
|
|
67
|
+
return refuse("invalid_runtime_settings", "Choose --runtime codex or --runtime claude-code.");
|
|
68
|
+
}
|
|
69
|
+
const target = input.runtime;
|
|
70
|
+
const reason = input.reason?.trim();
|
|
71
|
+
if (!reason)
|
|
72
|
+
return refuse("invalid_runtime_settings", "Give a --reason for the switch; it is recorded with it.");
|
|
73
|
+
const explicit = {};
|
|
74
|
+
for (const key of ["model", "effort", "codexConfigProfile", "permissionMode"]) {
|
|
75
|
+
const value = input[key];
|
|
76
|
+
if (value === undefined)
|
|
77
|
+
continue;
|
|
78
|
+
if (!value.trim() || /[\r\n\0]/.test(value))
|
|
79
|
+
return refuse("invalid_runtime_settings", `${key} must be a non-empty single-line value.`);
|
|
80
|
+
explicit[key] = value.trim();
|
|
81
|
+
}
|
|
82
|
+
if (target !== "codex" && explicit.codexConfigProfile) {
|
|
83
|
+
return refuse("invalid_runtime_settings", "--codex-config-profile applies only when switching to Codex.");
|
|
84
|
+
}
|
|
85
|
+
const { db, rigRepo, sessionRegistry, tmuxAdapter: tmux } = this.deps;
|
|
86
|
+
const status = new SeatStatusService({ rigRepo }).getStatus(input.seatRef);
|
|
87
|
+
if (!status.ok)
|
|
88
|
+
return status;
|
|
89
|
+
const node = rigRepo.getRig(status.status.rig_id)?.nodes.find((candidate) => candidate.logicalId === status.status.logical_id);
|
|
90
|
+
if (!node)
|
|
91
|
+
return refuse("seat_not_found", `No seat ${input.seatRef}.`);
|
|
92
|
+
const guard = tmux.deliveryGuard;
|
|
93
|
+
if (!input.dryRun && guard && !guard.ownsLifecycle(node.id)) {
|
|
94
|
+
try {
|
|
95
|
+
return await guard.lifecycle([node.id], () => this.setRuntime(input));
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
if (error instanceof DeliveryGuardError)
|
|
99
|
+
return refuse(error.code, `${error.message} The seat wasn't changed.`);
|
|
100
|
+
throw error;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const seatRef = `${node.logicalId}@${status.status.rig_name}`;
|
|
104
|
+
const open = this.openSwitch(node.id);
|
|
105
|
+
if (open) {
|
|
106
|
+
return { ...refuse("runtime_switch_pending", `${seatRef} already has a runtime switch ${open.committed_at ? "that committed and still needs finishing"
|
|
107
|
+
: open.phase === "abandoned" ? "whose staged successor hasn't been retired" : "in progress"} (${open.from_runtime} → ${open.to_runtime}, switch ${open.id}).`, `Inspect it with rig seat status ${seatRef}; finish an interrupted one with rig seat set-runtime ${seatRef} --recover.`), switchId: open.id };
|
|
108
|
+
}
|
|
109
|
+
if (node.runtime !== "codex" && node.runtime !== "claude-code") {
|
|
110
|
+
return refuse("runtime_switch_unsupported", `${seatRef} runs ${node.runtime ?? "an unknown runtime"}; only Codex and Claude Code seats can switch.`);
|
|
111
|
+
}
|
|
112
|
+
const binding = sessionRegistry.getBindingForNode(node.id);
|
|
113
|
+
const sessionName = binding?.tmuxSession ?? null;
|
|
114
|
+
const base = { seat: { ref: seatRef, nodeId: node.id, rigId: node.rigId, session: sessionName ?? "" }, from: node.runtime, to: target };
|
|
115
|
+
if (node.runtime === target) {
|
|
116
|
+
if (explicit.model || explicit.effort || explicit.codexConfigProfile || explicit.permissionMode) {
|
|
117
|
+
return refuse("runtime_unchanged", `${seatRef} already runs ${target}.`, "Change settings within one runtime with rig seat set-model, rig seat set-effort or rig seat set-permissions.");
|
|
118
|
+
}
|
|
119
|
+
return { ok: true, dryRun: !!input.dryRun, changed: false, ...base };
|
|
120
|
+
}
|
|
121
|
+
const predecessorGeneration = sessionRegistry.currentOccupantTenure(node.id)?.generationUuid;
|
|
122
|
+
const running = sessionRegistry.getSessionsForRig(node.rigId).filter((session) => session.nodeId === node.id && session.status === "running");
|
|
123
|
+
const unsupported = !sessionName || !binding?.tmuxPane ? "it has no bound tmux pane"
|
|
124
|
+
: binding.attachmentType && binding.attachmentType !== "tmux" ? `it's attached through ${binding.attachmentType}, not tmux`
|
|
125
|
+
: !predecessorGeneration ? "its current occupant generation isn't recorded"
|
|
126
|
+
: running.length !== 1 || running[0].sessionName !== sessionName ? "it doesn't have exactly one running session at its address"
|
|
127
|
+
: !node.cwd || !nodePath.isAbsolute(node.cwd) ? "its working directory isn't an absolute path"
|
|
128
|
+
: null;
|
|
129
|
+
if (unsupported)
|
|
130
|
+
return refuse("runtime_switch_unsupported", `${seatRef} can't switch runtime: ${unsupported}.`);
|
|
131
|
+
try {
|
|
132
|
+
const [panes, windows] = await Promise.all([tmux.listPanes(sessionName), tmux.listWindows(sessionName)]);
|
|
133
|
+
if (windows.length !== 1 || panes.length !== 1 || panes[0].id !== binding.tmuxPane) {
|
|
134
|
+
return refuse("runtime_switch_unsupported", `${seatRef} can't switch runtime: only a single-window, single-pane seat can, and its session has ${windows.length} window(s) and ${panes.length} pane(s).`);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
return refuse("runtime_switch_unsupported", `${seatRef} can't switch runtime: its session couldn't be read (${error.message}).`);
|
|
139
|
+
}
|
|
140
|
+
if (!this.deps.runtimeAdapters?.[target]) {
|
|
141
|
+
return refuse("runtime_target_unavailable", `${target} isn't available on this daemon, so no successor can start here.`);
|
|
142
|
+
}
|
|
143
|
+
// Settings: the target's explicit permission choice, else member and rig policy. Never the source's selection.
|
|
144
|
+
const permissions = new NativePermissionStore(db);
|
|
145
|
+
let selection = null;
|
|
146
|
+
let sourceSelection = null;
|
|
147
|
+
try {
|
|
148
|
+
sourceSelection = permissions.read(node.id);
|
|
149
|
+
const mode = explicit.permissionMode ?? "inherit";
|
|
150
|
+
if (mode !== "inherit") {
|
|
151
|
+
selection = target === "claude-code" && mode !== "floor" && mode !== "full_bypass"
|
|
152
|
+
? (/^[A-Za-z][A-Za-z0-9_]*$/.test(mode) ? { runtime: "claude-code", mode } : (() => { throw new Error(`"${mode}" isn't a permission mode.`); })())
|
|
153
|
+
: validateNativePermissionSelection(target, mode);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
return refuse("invalid_runtime_settings", error.message);
|
|
158
|
+
}
|
|
159
|
+
let materials;
|
|
160
|
+
try {
|
|
161
|
+
const saved = new SeatLifecycleService({ db, rigRepo, sessionRegistry, eventBus: this.deps.eventBus, tmuxAdapter: tmux }).readStartupContext(node.id, node.cwd);
|
|
162
|
+
if (!saved.ok && node.agentRef)
|
|
163
|
+
return refuse("runtime_target_unavailable", saved.refusal.message);
|
|
164
|
+
materials = planRuntimeSwitchMaterials({ db, node, rigName: status.status.rig_name, canonicalSession: sessionName, runtime: target,
|
|
165
|
+
explicit, saved: saved.ok ? saved.context : null, claudeManagedBlockFile: rigRepo.getRigClaudeManagedBlockFile(node.rigId) ?? undefined,
|
|
166
|
+
resolution: this.deps.materialResolution, openrigHome: this.deps.openrigHome });
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
return refuse("runtime_target_unavailable", error.message);
|
|
170
|
+
}
|
|
171
|
+
const dropped = [...materials.dropped, ...(sourceSelection ? [{ setting: "native permission choice", value: `${sourceSelection.runtime}:${sourceSelection.mode}` }] : [])];
|
|
172
|
+
const plan = {
|
|
173
|
+
...base,
|
|
174
|
+
settings: materials.settings,
|
|
175
|
+
permission: selection ? { mode: selection.mode, source: "explicit" } : { mode: "inherit", source: "member_or_rig_policy" },
|
|
176
|
+
dropped,
|
|
177
|
+
costs: COSTS,
|
|
178
|
+
notRun: materials.notRun.map((command) => `startup slash command not run by a switch: ${command}`),
|
|
179
|
+
warnings: materials.warnings,
|
|
180
|
+
};
|
|
181
|
+
if (input.dryRun)
|
|
182
|
+
return { ok: true, dryRun: true, changed: true, ...plan };
|
|
183
|
+
return this.execute({ input: { ...input, reason }, node, seatRef, sessionName: sessionName, predecessorPane: binding.tmuxPane,
|
|
184
|
+
predecessorGeneration: predecessorGeneration, target, materials, selection, plan, restorePolicy: running[0].restorePolicy ?? node.restorePolicy ?? null });
|
|
185
|
+
}
|
|
186
|
+
/** The staged successor's confirmation: only that switch's reserved generation, at the seat it names. */
|
|
187
|
+
confirm(input) {
|
|
188
|
+
const refused = (message) => ({ ok: false, code: "runtime_switch_confirmation_refused", message, switchId: input.switchId });
|
|
189
|
+
const note = input.note?.trim();
|
|
190
|
+
if (!note || note.length > 2000 || /\0/.test(note))
|
|
191
|
+
return refused("Confirm with a --note of up to 2000 characters saying what you'll do first.");
|
|
192
|
+
const row = this.deps.db.prepare("SELECT * FROM seat_runtime_switches WHERE id = ?").get(input.switchId);
|
|
193
|
+
if (!row)
|
|
194
|
+
return refused(`No runtime switch ${input.switchId}.`);
|
|
195
|
+
if (row.committed_at || row.phase !== "preparing")
|
|
196
|
+
return refused(`Switch ${row.id} isn't waiting for a confirmation (it is ${row.phase}).`);
|
|
197
|
+
if (!input.actorSession || input.actorSession !== row.canonical_session || input.generation !== row.successor_generation) {
|
|
198
|
+
return refused(`Only the staged successor of ${row.canonical_session} for switch ${row.id} can confirm it. Nothing was changed.`);
|
|
199
|
+
}
|
|
200
|
+
const changed = this.deps.db.prepare(`UPDATE seat_runtime_switches SET phase = 'confirmed', confirmation_note = ?, confirmed_at = ?,
|
|
201
|
+
updated_at = ? WHERE id = ? AND phase = 'preparing' AND committed_at IS NULL`).run(note, this.now().toISOString(), this.now().toISOString(), row.id);
|
|
202
|
+
if (changed.changes !== 1)
|
|
203
|
+
return refused(`Switch ${row.id} changed while confirming; nothing was recorded.`);
|
|
204
|
+
return { ok: true, switchId: row.id, message: `Confirmed. OpenRig is moving ${row.canonical_session} to you now. Wait for the activation message before acting as the seat.` };
|
|
205
|
+
}
|
|
206
|
+
async execute(ctx) {
|
|
207
|
+
const { db, rigRepo, sessionRegistry, tmuxAdapter: tmux } = this.deps;
|
|
208
|
+
const { node, sessionName, target, materials } = ctx;
|
|
209
|
+
const failed = (message, guidance) => ({ ok: false, code: "runtime_switch_failed", committed: false, message,
|
|
210
|
+
guidance: guidance ?? `${ctx.seatRef} is unchanged on ${node.runtime}. Correct the cause and try again.` });
|
|
211
|
+
// Refuse unreadable target settings before an active switch can hold sends to the current occupant.
|
|
212
|
+
let override;
|
|
213
|
+
try {
|
|
214
|
+
override = new NativePermissionStore(db).launchOverride(node.id, target, {
|
|
215
|
+
selection: ctx.selection, codexProfile: materials.settings.codexConfigProfile.value,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
return failed(error.message);
|
|
220
|
+
}
|
|
221
|
+
const successorGeneration = sessionRegistry.reserveOccupantGeneration();
|
|
222
|
+
if (!successorGeneration)
|
|
223
|
+
return failed("No occupant generation could be reserved for the successor (the tenure ledger is unavailable).");
|
|
224
|
+
// Facts the handover carries, read while the predecessor still holds the seat.
|
|
225
|
+
const screen = await tmux.capturePaneScreen(ctx.predecessorPane).catch(() => null);
|
|
226
|
+
const recap = this.deps.predecessorRecapResolver?.({ nodeId: node.id, runtime: node.runtime, sessionName });
|
|
227
|
+
const authored = this.deps.authoredRecapResolver?.(ctx.seatRef);
|
|
228
|
+
const id = ulid();
|
|
229
|
+
const row = { id, staging_session: `openrig-switch-${id.toLowerCase()}` };
|
|
230
|
+
const stamp = () => this.now().toISOString();
|
|
231
|
+
const confirmTimeoutMs = ctx.input.confirmTimeoutMs ?? RUNTIME_SWITCH_CONFIRM_TIMEOUT_MS_DEFAULT;
|
|
232
|
+
// An upper estimate a waiting send can quote: the successor's start and readiness, then its confirmation window.
|
|
233
|
+
const deadlineAt = new Date(this.now().getTime() + (this.deps.readinessTimeoutMs ?? 60_000) + confirmTimeoutMs + 30_000).toISOString();
|
|
234
|
+
db.prepare(`INSERT INTO seat_runtime_switches (id, node_id, canonical_session, staging_session, predecessor_pane, predecessor_generation,
|
|
235
|
+
successor_generation, from_runtime, to_runtime, reason, requested_by, plan_json, deadline_at, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`)
|
|
236
|
+
.run(id, node.id, sessionName, row.staging_session, ctx.predecessorPane, ctx.predecessorGeneration, successorGeneration, node.runtime, target, ctx.input.reason, ctx.input.requestedBy ?? null, JSON.stringify(ctx.plan), deadlineAt, stamp(), stamp());
|
|
237
|
+
let successorPane = null;
|
|
238
|
+
const abandon = async (why) => {
|
|
239
|
+
const retired = await this.retireStaging(row.staging_session, node.id, "Uncommitted successor");
|
|
240
|
+
db.prepare(`UPDATE seat_runtime_switches SET phase = 'abandoned', outcome = ?, attention = ?, updated_at = ? WHERE id = ? AND committed_at IS NULL`)
|
|
241
|
+
.run(why, retired.ok ? null : `The staged successor couldn't be retired: ${retired.message}`, stamp(), id);
|
|
242
|
+
tmux.finishLaunchBinding(row.staging_session);
|
|
243
|
+
return { ...failed(`${why}${retired.ok ? "" : ` The staged successor couldn't be retired (${retired.message}); recover with rig seat set-runtime ${ctx.seatRef} --recover.`}`), switchId: id };
|
|
244
|
+
};
|
|
245
|
+
// 1. The successor, on the target runtime, beside the predecessor.
|
|
246
|
+
const policyPosture = rigRepo.getNodePolicyProvenance(node.id)?.launchPosture ?? rigRepo.getRigPolicyProvenance(node.rigId)?.launchPosture ?? "floor";
|
|
247
|
+
const posture = override.launchPosture ?? policyPosture;
|
|
248
|
+
// Codex has no auto mode; it launches at the floor, as its permission resolution says.
|
|
249
|
+
const launchPosture = posture === "auto" && target === "codex" ? "floor" : posture;
|
|
250
|
+
const permissionMode = override.permissionMode ?? (posture === "auto" && target === "claude-code" ? "auto" : undefined);
|
|
251
|
+
const targetNode = { id: node.id, runtime: target };
|
|
252
|
+
const corePluginDir = seatCorePluginDir(targetNode, db, materials.pluginPaths, this.deps.pluginsDir);
|
|
253
|
+
const codexCorePluginDir = seatCodexCorePluginDir(targetNode, db, materials.pluginPaths, this.deps.pluginsDir);
|
|
254
|
+
const launcher = new SuccessorSessionLauncher(tmux, this.deps.discoveryRepo, {
|
|
255
|
+
sessionEnv: this.deps.sessionEnv, runtimeSessionEnv: this.deps.runtimeSessionEnv, runtimeAdapters: this.deps.runtimeAdapters,
|
|
256
|
+
tmuxOptionDefaults: this.deps.tmuxOptionDefaults, readinessTimeoutMs: this.deps.readinessTimeoutMs, sleep: this.deps.sleep,
|
|
257
|
+
});
|
|
258
|
+
const launch = await launcher.stageSuccessor({
|
|
259
|
+
stagingSession: row.staging_session, canonicalSession: sessionName, occupantGeneration: successorGeneration,
|
|
260
|
+
node: { id: node.id, runtime: target, cwd: node.cwd, model: materials.settings.model.value, effort: materials.settings.effort.value,
|
|
261
|
+
advisor: materials.settings.advisor.value, codexConfigProfile: materials.settings.codexConfigProfile.value,
|
|
262
|
+
claudePermissions: override.claudePermissions, kernelAuthority: override.kernelAuthority, teamPermissionDefault: override.teamPermissionDefault,
|
|
263
|
+
nonInterruptive: rigRepo.getRigNonInterruptive(node.rigId), launchPosture, ...(permissionMode ? { permissionMode } : {}),
|
|
264
|
+
seatEnv: withPluginDirs(rigRepo.getEffectiveSeatEnv(node.id), [corePluginDir, target === "claude-code" ? materials.seatSkills.pluginDir : undefined]),
|
|
265
|
+
...((corePluginDir || codexCorePluginDir) && node.cwd ? { seatProjectDir: node.cwd } : {}) },
|
|
266
|
+
onPaneCreated: (pane) => {
|
|
267
|
+
successorPane = pane;
|
|
268
|
+
db.prepare("UPDATE seat_runtime_switches SET successor_pane = ?, updated_at = ? WHERE id = ?").run(pane, stamp(), id);
|
|
269
|
+
},
|
|
270
|
+
staged: { prepare: (binding, adapter) => materials.prepare(binding, adapter),
|
|
271
|
+
binding: { ...materials.bindingAdditions(), runtimeSwitchFrom: { runtime: node.runtime, session: sessionName, pane: ctx.predecessorPane, generation: ctx.predecessorGeneration } } },
|
|
272
|
+
});
|
|
273
|
+
if (!launch.ok) {
|
|
274
|
+
const attention = launch.code === "successor_attention_required" ? " It is waiting at a login, trust or approval prompt." : "";
|
|
275
|
+
return abandon(`The ${target} successor didn't start: ${launch.message}.${attention}`);
|
|
276
|
+
}
|
|
277
|
+
const warnings = [...ctx.plan.warnings, ...(launch.notes ?? [])];
|
|
278
|
+
// 2. The handover, as the successor's first turn; the confirmation it asks for is the evidence it can carry on.
|
|
279
|
+
const queue = db.prepare(`SELECT qitem_id, state, priority, source_session FROM queue_items WHERE destination_session = ?
|
|
280
|
+
AND state IN ('pending', 'in-progress', 'blocked') ORDER BY ts_created, qitem_id`).all(sessionName);
|
|
281
|
+
const packet = [
|
|
282
|
+
`You are ${ctx.seatRef}'s successor on ${target}, staged for runtime switch ${id}. The ${node.runtime} occupant still holds the seat: until OpenRig tells you the switch committed, don't act as the seat (queue changes and sends are refused).`,
|
|
283
|
+
materials.firstTurn,
|
|
284
|
+
buildRestorePacket({ seatRef: ctx.seatRef, reason: ctx.input.reason, departingSession: sessionName, handoverAt: stamp(), capturedContext: screen ?? "",
|
|
285
|
+
...(recap && "recap" in recap ? recap : { recapUnavailableReason: recap?.unavailableReason ?? "no provider recap available" }),
|
|
286
|
+
...(authored ? ("address" in authored ? { authoredRecap: authored } : { authoredRecapAbsentReason: authored.absentReason }) : {}) }),
|
|
287
|
+
`The seat's open queue work (${queue.length} rows; its claims become yours at commit):`,
|
|
288
|
+
...queue.slice(0, 100).map((item) => `- ${item.qitem_id}: ${item.state}, ${item.priority}, from ${item.source_session}`),
|
|
289
|
+
[
|
|
290
|
+
"When you've read this handover and can carry on the seat's work, confirm it, saying what you'll do first:",
|
|
291
|
+
` rig seat set-runtime ${ctx.seatRef} --confirm ${id} --note "<what you'll do first>"`,
|
|
292
|
+
"Then wait for OpenRig's activation message. If you can't carry on (an unusable model, a login or permission problem), don't confirm; the switch then stops and the current occupant keeps the seat.",
|
|
293
|
+
].join("\n"),
|
|
294
|
+
].filter(Boolean).join("\n\n");
|
|
295
|
+
const typed = await tmux.sendText(row.staging_session, packet);
|
|
296
|
+
if (!typed.ok)
|
|
297
|
+
return abandon(`The handover couldn't be typed to the successor: ${typed.message}.`);
|
|
298
|
+
await this.sleep(200);
|
|
299
|
+
const entered = await tmux.sendKeys(row.staging_session, ["Enter"]);
|
|
300
|
+
if (!entered.ok)
|
|
301
|
+
return abandon(`The handover couldn't be submitted to the successor: ${entered.message}.`);
|
|
302
|
+
// 3. Wait for the confirmation (P2's evidence), bounded.
|
|
303
|
+
const timeoutMs = confirmTimeoutMs;
|
|
304
|
+
const pollMs = this.deps.confirmPollMs ?? 1000;
|
|
305
|
+
const deadline = this.now().getTime() + timeoutMs;
|
|
306
|
+
let confirmation = null;
|
|
307
|
+
while (!confirmation) {
|
|
308
|
+
const current = db.prepare("SELECT phase, confirmation_note, confirmed_at FROM seat_runtime_switches WHERE id = ?").get(id);
|
|
309
|
+
if (current.phase === "confirmed" && current.confirmation_note && current.confirmed_at) {
|
|
310
|
+
confirmation = { note: current.confirmation_note, at: current.confirmed_at };
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
313
|
+
if (this.now().getTime() >= deadline) {
|
|
314
|
+
const tail = successorPane ? (await tmux.capturePaneScreen(successorPane).catch(() => null))?.trim().split("\n").slice(-6).join("\n") : null;
|
|
315
|
+
return abandon(`The ${target} successor didn't confirm the handover within ${Math.round(timeoutMs / 1000)} s, so it isn't shown able to carry on.${tail ? ` Its screen ended with:\n${tail}` : ""}`);
|
|
316
|
+
}
|
|
317
|
+
const probe = await tmux.probeSession(row.staging_session).catch(() => ({ state: "unknown" }));
|
|
318
|
+
if (probe.state === "absent")
|
|
319
|
+
return abandon(`The ${target} successor's session ended before it confirmed the handover.`);
|
|
320
|
+
await this.sleep(pollMs);
|
|
321
|
+
}
|
|
322
|
+
// 4. The exchange, then the commit. A pane exchange the commit doesn't follow is undone (by the same exchange).
|
|
323
|
+
const swapped = await tmux.swapRuntimeSwitchPanes({ nodeId: node.id, stagingSession: row.staging_session, canonicalSession: sessionName,
|
|
324
|
+
canonicalPane: ctx.predecessorPane, stagedPane: successorPane });
|
|
325
|
+
if (!swapped.ok)
|
|
326
|
+
return abandon(`The panes couldn't be exchanged: ${swapped.message}.`);
|
|
327
|
+
let committed;
|
|
328
|
+
try {
|
|
329
|
+
committed = this.commit({ ...ctx, id, successorGeneration, successorPane: successorPane, appliedLaunch: launch.appliedLaunch,
|
|
330
|
+
launchResume: launch.resumeToken ? { type: launch.resumeType, token: launch.resumeToken } : null });
|
|
331
|
+
}
|
|
332
|
+
catch (error) {
|
|
333
|
+
const back = await tmux.swapRuntimeSwitchPanes({ nodeId: node.id, stagingSession: row.staging_session, canonicalSession: sessionName,
|
|
334
|
+
canonicalPane: successorPane, stagedPane: ctx.predecessorPane });
|
|
335
|
+
if (!back.ok) {
|
|
336
|
+
db.prepare("UPDATE seat_runtime_switches SET attention = ?, updated_at = ? WHERE id = ?")
|
|
337
|
+
.run(`The commit failed (${error.message}) and the panes couldn't be exchanged back: ${back.message}`, stamp(), id);
|
|
338
|
+
return { ...failed(`The commit failed (${error.message}), and the panes couldn't be put back (${back.message}).`, `The ${node.runtime} occupant still holds ${ctx.seatRef} by record. Recover with rig seat set-runtime ${ctx.seatRef} --recover.`), switchId: id };
|
|
339
|
+
}
|
|
340
|
+
return abandon(`The commit failed: ${error.message}.`);
|
|
341
|
+
}
|
|
342
|
+
tmux.deliveryGuard?.rebindLifecycle(node.id);
|
|
343
|
+
for (const step of committed.afterCommit) {
|
|
344
|
+
try {
|
|
345
|
+
step();
|
|
346
|
+
}
|
|
347
|
+
catch { /* the committed record is authoritative */ }
|
|
348
|
+
}
|
|
349
|
+
try {
|
|
350
|
+
this.deps.activityOracle?.declareOccupantSwap(node.id, successorGeneration);
|
|
351
|
+
}
|
|
352
|
+
catch { /* the committed record is authoritative */ }
|
|
353
|
+
for (const event of [...committed.notifications, committed.event])
|
|
354
|
+
this.deps.eventBus.notifySubscribers(event);
|
|
355
|
+
// 5. Retire the predecessor and tell the successor it holds the seat. A failure here leaves the switch committed.
|
|
356
|
+
const finished = await this.finishCommitted({ id, node_id: node.id, canonical_session: sessionName, staging_session: row.staging_session,
|
|
357
|
+
to_runtime: target, from_runtime: node.runtime, successor_generation: successorGeneration });
|
|
358
|
+
return { ok: true, dryRun: false, changed: true, ...ctx.plan, switchId: id, generation: successorGeneration, previousGeneration: ctx.predecessorGeneration,
|
|
359
|
+
claimsMoved: committed.claimsMoved, openRows: queue.length, confirmation, recoveryPending: !finished.ok,
|
|
360
|
+
warnings: finished.ok ? warnings : [...warnings, `The switch committed, but ${finished.message} Finish it with rig seat set-runtime ${ctx.seatRef} --recover.`] };
|
|
361
|
+
}
|
|
362
|
+
commit(ctx) {
|
|
363
|
+
const { db, rigRepo, sessionRegistry, eventBus } = this.deps;
|
|
364
|
+
const { node, materials, target } = ctx;
|
|
365
|
+
const notifications = [];
|
|
366
|
+
const afterCommit = [];
|
|
367
|
+
let claimsMoved = 0;
|
|
368
|
+
const event = db.transaction(() => {
|
|
369
|
+
// The seat must be exactly as the switch found it.
|
|
370
|
+
const binding = sessionRegistry.getBindingForNode(node.id);
|
|
371
|
+
if (binding?.tmuxSession !== ctx.sessionName || binding.tmuxPane !== ctx.predecessorPane
|
|
372
|
+
|| sessionRegistry.currentOccupantTenure(node.id)?.generationUuid !== ctx.predecessorGeneration
|
|
373
|
+
|| db.prepare("SELECT runtime FROM nodes WHERE id = ?").get(node.id)?.runtime !== node.runtime) {
|
|
374
|
+
throw new Error("the seat's binding, occupant or runtime changed during the switch");
|
|
375
|
+
}
|
|
376
|
+
const at = this.now().toISOString();
|
|
377
|
+
const spec = materials.resolvedSpec;
|
|
378
|
+
db.prepare(`UPDATE nodes SET runtime = ?, model = ?, effort = ?, effort_choice = NULL, advisor = ?, codex_config_profile = ?,
|
|
379
|
+
${spec ? "resolved_spec_name = ?, resolved_spec_version = ?, resolved_spec_hash = ?, restore_policy = ?," : ""}
|
|
380
|
+
occupant_lifecycle = 'active', continuity_outcome = 'fresh', handover_result = 'complete', previous_occupant = ?, handover_at = ? WHERE id = ?`)
|
|
381
|
+
.run(target, materials.settings.model.value, materials.settings.effort.value, materials.settings.advisor.value, materials.settings.codexConfigProfile.value, ...(spec ? [spec.name, spec.version, spec.hash, spec.restorePolicy] : []), ctx.sessionName, at, node.id);
|
|
382
|
+
new NativePermissionStore(db).write(node.id, ctx.selection, ctx.input.requestedBy?.trim() || ctx.sessionName, ctx.input.reason);
|
|
383
|
+
db.prepare(`INSERT OR REPLACE INTO node_startup_context (node_id, projection_entries_json, resolved_files_json, startup_actions_json, runtime) VALUES (?, ?, ?, ?, ?)`)
|
|
384
|
+
.run(node.id, JSON.stringify(materials.plan.entries.map((e) => ({ category: e.category, effectiveId: e.effectiveId, sourceSpec: e.sourceSpec, sourcePath: e.sourcePath,
|
|
385
|
+
resourcePath: e.resourcePath, absolutePath: e.absolutePath, resourceType: e.resourceType, mergeStrategy: e.mergeStrategy, target: e.target }))), JSON.stringify(materials.files), JSON.stringify(materials.actions), target);
|
|
386
|
+
db.prepare("UPDATE sessions SET status = 'superseded' WHERE node_id = ? AND status NOT IN ('superseded', 'detached', 'exited')").run(node.id);
|
|
387
|
+
db.prepare("UPDATE bindings SET tmux_pane = ?, tmux_window = NULL, updated_at = datetime('now') WHERE node_id = ?").run(ctx.successorPane, node.id);
|
|
388
|
+
const successor = sessionRegistry.registerClaimedSession(node.id, ctx.sessionName, "handover", ctx.successorGeneration);
|
|
389
|
+
if (sessionRegistry.currentOccupantTenure(node.id)?.generationUuid !== ctx.successorGeneration)
|
|
390
|
+
throw new Error("the successor's generation couldn't be recorded");
|
|
391
|
+
db.prepare("UPDATE sessions SET origin = 'launched', restore_policy = ? WHERE id = ?").run(ctx.restorePolicy, successor.id);
|
|
392
|
+
const hooked = db.prepare("SELECT successor_resume_token FROM seat_runtime_switches WHERE id = ?").get(ctx.id);
|
|
393
|
+
const nativeId = hooked.successor_resume_token ?? ctx.launchResume?.token;
|
|
394
|
+
if (nativeId) {
|
|
395
|
+
const token = validateResumeToken(target, nativeId);
|
|
396
|
+
if (token.ok)
|
|
397
|
+
sessionRegistry.updateResumeToken(successor.id, token.resumeType, token.token, hooked.successor_resume_token ? "hook" : "scrape");
|
|
398
|
+
}
|
|
399
|
+
const observations = new AppliedLaunchObservationStore(db);
|
|
400
|
+
observations.invalidateGeneration(ctx.predecessorGeneration);
|
|
401
|
+
if (ctx.appliedLaunch)
|
|
402
|
+
observations.recordGeneration(ctx.successorGeneration, ctx.appliedLaunch);
|
|
403
|
+
// The claims stay with the seat: moved to the successor before ordinary invalidation could release them.
|
|
404
|
+
claimsMoved = this.deps.queueRepo?.transferClaimsByGeneration(ctx.predecessorGeneration, ctx.successorGeneration, `moved: the seat's runtime switch ${ctx.id} (${node.runtime} → ${target}) committed; the claim is the successor's`) ?? 0;
|
|
405
|
+
this.deps.occupantInvalidator?.invalidateRetiringOccupant({ retiringSessionName: ctx.sessionName, successorSessionName: ctx.sessionName,
|
|
406
|
+
retiringGeneration: ctx.predecessorGeneration });
|
|
407
|
+
db.prepare("UPDATE discovered_sessions SET status = 'vanished', claimed_node_id = NULL WHERE claimed_node_id = ?").run(node.id);
|
|
408
|
+
const discovered = this.deps.discoveryRepo.upsertDiscoveredSession({ tmuxSession: ctx.sessionName, tmuxPane: ctx.successorPane, cwd: node.cwd,
|
|
409
|
+
runtimeHint: target, confidence: "high" });
|
|
410
|
+
this.deps.discoveryRepo.markClaimed(discovered.id, node.id);
|
|
411
|
+
db.prepare(`UPDATE seat_runtime_switches SET phase = 'committed', committed_at = ?, updated_at = ? WHERE id = ? AND phase = 'confirmed'`).run(at, at, ctx.id);
|
|
412
|
+
if (db.prepare("SELECT committed_at FROM seat_runtime_switches WHERE id = ?").get(ctx.id).committed_at !== at) {
|
|
413
|
+
throw new Error("the switch record changed during the commit");
|
|
414
|
+
}
|
|
415
|
+
// The newest default restore describes the committed target, even if the daemon stops right after this.
|
|
416
|
+
new SnapshotCapture({ db, rigRepo, sessionRegistry, eventBus, snapshotRepo: new SnapshotRepository(db), checkpointStore: new CheckpointStore(db) })
|
|
417
|
+
.captureSnapshot(node.rigId, "runtime-switch", { deferNotify: (persisted) => notifications.push(persisted) });
|
|
418
|
+
return eventBus.persistWithinTransaction({ type: "seat.runtime_changed", rigId: node.rigId, nodeId: node.id, switchId: ctx.id, from: node.runtime, to: target,
|
|
419
|
+
reason: ctx.input.reason, requestedBy: ctx.input.requestedBy ?? null, generation: ctx.successorGeneration, previousGeneration: ctx.predecessorGeneration,
|
|
420
|
+
settings: { ...materials.settings }, dropped: ctx.plan.dropped, permissionSelection: ctx.selection ? ctx.selection.mode : "inherit", claimsMoved });
|
|
421
|
+
})();
|
|
422
|
+
return { event, notifications, claimsMoved, afterCommit };
|
|
423
|
+
}
|
|
424
|
+
/** After the commit: retire the predecessor (in the staging session), carry the successor's runtime on the seat's
|
|
425
|
+
* session, and tell the successor it holds the seat. Idempotent enough for recovery to call again. */
|
|
426
|
+
async finishCommitted(row) {
|
|
427
|
+
const { db, tmuxAdapter: tmux } = this.deps;
|
|
428
|
+
const problems = [];
|
|
429
|
+
const retired = await this.retireStaging(row.staging_session, row.node_id, "Predecessor");
|
|
430
|
+
if (!retired.ok)
|
|
431
|
+
problems.push(`the ${row.from_runtime} predecessor couldn't be retired (${retired.message})`);
|
|
432
|
+
const env = await tmux.setRuntimeSwitchEnvironment(row.canonical_session, row.to_runtime, row.successor_generation);
|
|
433
|
+
if (!env.ok)
|
|
434
|
+
problems.push(`the seat's session environment couldn't be updated (${env.message})`);
|
|
435
|
+
tmux.finishLaunchBinding(row.staging_session);
|
|
436
|
+
if (retired.ok) {
|
|
437
|
+
const text = `OpenRig: runtime switch ${row.id} committed. You now hold ${row.canonical_session} on ${row.to_runtime}; the ${row.from_runtime} occupant has retired. Carry on from the handover: the seat's queue rows and claims are yours.`;
|
|
438
|
+
const typed = await tmux.sendText(row.canonical_session, text);
|
|
439
|
+
const entered = typed.ok ? (await this.sleep(200), await tmux.sendKeys(row.canonical_session, ["Enter"])) : typed;
|
|
440
|
+
if (!entered.ok)
|
|
441
|
+
problems.push(`the activation message couldn't be delivered (${entered.message})`);
|
|
442
|
+
}
|
|
443
|
+
const at = this.now().toISOString();
|
|
444
|
+
if (problems.length === 0) {
|
|
445
|
+
db.prepare("UPDATE seat_runtime_switches SET phase = 'finished', outcome = ?, attention = NULL, updated_at = ? WHERE id = ? AND committed_at IS NOT NULL")
|
|
446
|
+
.run(`committed: the seat runs ${row.to_runtime}; the ${row.from_runtime} predecessor retired`, at, row.id);
|
|
447
|
+
return { ok: true };
|
|
448
|
+
}
|
|
449
|
+
const message = `${problems.join("; ")}.`;
|
|
450
|
+
db.prepare("UPDATE seat_runtime_switches SET attention = ?, updated_at = ? WHERE id = ?").run(message, at, row.id);
|
|
451
|
+
return { ok: false, message };
|
|
452
|
+
}
|
|
453
|
+
/** Terminate and remove a staging session this switch created (holding either the uncommitted successor or, after the
|
|
454
|
+
* exchange, the predecessor). Requires the seat's lifecycle lease and the staging session's custody. */
|
|
455
|
+
async retireStaging(stagingSession, _nodeId, label) {
|
|
456
|
+
const tmux = this.deps.tmuxAdapter;
|
|
457
|
+
const probe = await tmux.probeSession(stagingSession).catch(() => ({ state: "unknown" }));
|
|
458
|
+
if (probe.state === "absent")
|
|
459
|
+
return { ok: true };
|
|
460
|
+
if (probe.state !== "present")
|
|
461
|
+
return { ok: false, message: "the staging session's presence couldn't be established" };
|
|
462
|
+
const terminated = await terminatePaneInPlace(tmux, stagingSession, { pollMs: 100, timeoutMs: 3000, sleep: this.sleep }, label);
|
|
463
|
+
if (!terminated.ok)
|
|
464
|
+
return { ok: false, message: terminated.message };
|
|
465
|
+
const removed = await tmux.killSession(stagingSession);
|
|
466
|
+
if (!removed.ok && removed.code !== "session_not_found")
|
|
467
|
+
return { ok: false, message: removed.message };
|
|
468
|
+
return { ok: true };
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Finish an interrupted switch from its durable record, under the seat's lifecycle lease. Before its commit the
|
|
472
|
+
* predecessor holds the seat: an exchanged pane is put back and the staged successor retired. After it the successor
|
|
473
|
+
* holds the seat: the predecessor is retired and the successor told; custody never goes back. Where the panes don't
|
|
474
|
+
* match the record, nothing is touched and the record says why (status shows it).
|
|
475
|
+
*/
|
|
476
|
+
async recover(nodeId) {
|
|
477
|
+
const guard = this.deps.tmuxAdapter.deliveryGuard;
|
|
478
|
+
if (guard && !guard.ownsLifecycle(nodeId)) {
|
|
479
|
+
try {
|
|
480
|
+
return await guard.lifecycle([nodeId], () => this.recover(nodeId));
|
|
481
|
+
}
|
|
482
|
+
catch (error) {
|
|
483
|
+
return { ok: false, code: error.code ?? "runtime_switch_pending", message: error.message };
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
const row = this.openSwitch(nodeId);
|
|
487
|
+
if (!row)
|
|
488
|
+
return { ok: true, outcome: "No runtime switch needs recovery.", switchId: null };
|
|
489
|
+
const { db, tmuxAdapter: tmux } = this.deps;
|
|
490
|
+
const at = () => this.now().toISOString();
|
|
491
|
+
const stuck = (message) => {
|
|
492
|
+
db.prepare("UPDATE seat_runtime_switches SET attention = ?, updated_at = ? WHERE id = ?").run(message, at(), row.id);
|
|
493
|
+
return { ok: false, code: "runtime_switch_pending", message, switchId: row.id };
|
|
494
|
+
};
|
|
495
|
+
let canonicalPane = null;
|
|
496
|
+
try {
|
|
497
|
+
const panes = await tmux.listPanes(row.canonical_session);
|
|
498
|
+
canonicalPane = panes.length === 1 ? panes[0].id : null;
|
|
499
|
+
}
|
|
500
|
+
catch { /* absent or unreadable: decided below */ }
|
|
501
|
+
const staging = await tmux.probeSession(row.staging_session).catch(() => ({ state: "unknown" }));
|
|
502
|
+
if (staging.state === "unknown")
|
|
503
|
+
return stuck("The staging session's presence couldn't be established; nothing was touched.");
|
|
504
|
+
let stagingPane = null;
|
|
505
|
+
if (staging.state === "present") {
|
|
506
|
+
const panes = await tmux.listPanes(row.staging_session).catch(() => []);
|
|
507
|
+
stagingPane = panes.length === 1 ? panes[0].id : null;
|
|
508
|
+
const adopted = stagingPane ? await tmux.adoptRuntimeSwitchStaging({ nodeId, stagingSession: row.staging_session, pane: stagingPane, generations: [row.successor_generation] })
|
|
509
|
+
: { ok: false, message: "it doesn't have exactly one pane" };
|
|
510
|
+
if (!adopted.ok)
|
|
511
|
+
return stuck(`The staging session ${row.staging_session} can't be taken back: ${adopted.message}`);
|
|
512
|
+
}
|
|
513
|
+
if (!row.committed_at) {
|
|
514
|
+
// Before commit: the predecessor holds the seat.
|
|
515
|
+
const exchanged = canonicalPane !== null && canonicalPane === row.successor_pane && stagingPane === row.predecessor_pane;
|
|
516
|
+
if (exchanged) {
|
|
517
|
+
const back = await tmux.swapRuntimeSwitchPanes({ nodeId, stagingSession: row.staging_session, canonicalSession: row.canonical_session,
|
|
518
|
+
canonicalPane: row.successor_pane, stagedPane: row.predecessor_pane });
|
|
519
|
+
if (!back.ok)
|
|
520
|
+
return stuck(`The panes couldn't be exchanged back: ${back.message}`);
|
|
521
|
+
}
|
|
522
|
+
else if (canonicalPane !== row.predecessor_pane) {
|
|
523
|
+
return stuck(`The seat's pane (${canonicalPane ?? "none"}) is neither the predecessor's nor the successor's; nothing was touched.`);
|
|
524
|
+
}
|
|
525
|
+
const retired = await this.retireStaging(row.staging_session, nodeId, "Uncommitted successor");
|
|
526
|
+
if (!retired.ok)
|
|
527
|
+
return stuck(`The staged successor couldn't be retired: ${retired.message}`);
|
|
528
|
+
tmux.finishLaunchBinding(row.staging_session);
|
|
529
|
+
// An abandoned switch keeps why it stopped; recovery only settles the successor it couldn't retire then.
|
|
530
|
+
const outcome = row.phase === "abandoned" ? `${row.outcome ?? "abandoned before commit"} The staged ${row.to_runtime} successor was retired at recovery.`
|
|
531
|
+
: `interrupted before commit: the ${row.from_runtime} occupant holds the seat; the staged ${row.to_runtime} successor was retired`;
|
|
532
|
+
db.prepare("UPDATE seat_runtime_switches SET phase = 'abandoned', outcome = ?, attention = NULL, updated_at = ? WHERE id = ?").run(outcome, at(), row.id);
|
|
533
|
+
return { ok: true, outcome, switchId: row.id };
|
|
534
|
+
}
|
|
535
|
+
// After commit: the successor holds the seat; finish forward.
|
|
536
|
+
if (canonicalPane !== row.successor_pane) {
|
|
537
|
+
return stuck(`The switch committed, but the seat's pane (${canonicalPane ?? "none"}) isn't the successor's; nothing was touched.`);
|
|
538
|
+
}
|
|
539
|
+
const finished = await this.finishCommitted(row);
|
|
540
|
+
if (!finished.ok)
|
|
541
|
+
return { ok: false, code: "runtime_switch_pending", message: finished.message, switchId: row.id };
|
|
542
|
+
return { ok: true, outcome: `committed: finished; the seat runs ${row.to_runtime}`, switchId: row.id };
|
|
543
|
+
}
|
|
544
|
+
/** Daemon start: finish every interrupted switch, including an abandoned one whose successor wasn't retired. Returns
|
|
545
|
+
* warnings for the ones that still need attention. */
|
|
546
|
+
async recoverAll() {
|
|
547
|
+
let rows = [];
|
|
548
|
+
try {
|
|
549
|
+
rows = this.deps.db.prepare(`SELECT DISTINCT node_id, canonical_session FROM seat_runtime_switches
|
|
550
|
+
WHERE phase IN ('preparing', 'confirmed', 'committed') OR attention IS NOT NULL`).all();
|
|
551
|
+
}
|
|
552
|
+
catch {
|
|
553
|
+
return [];
|
|
554
|
+
}
|
|
555
|
+
const warnings = [];
|
|
556
|
+
for (const row of rows) {
|
|
557
|
+
try {
|
|
558
|
+
const result = await this.recover(row.node_id);
|
|
559
|
+
if (!result.ok)
|
|
560
|
+
warnings.push(`${row.canonical_session}: ${result.message}`);
|
|
561
|
+
}
|
|
562
|
+
catch (error) {
|
|
563
|
+
warnings.push(`${row.canonical_session}: ${error.message}`);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
return warnings;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
/** A switch of this seat that committed at or after `since` (a send that waited behind it says the seat moved). */
|
|
570
|
+
export function runtimeSwitchCommittedSince(db, session, since) {
|
|
571
|
+
try {
|
|
572
|
+
const row = db.prepare(`SELECT id, from_runtime, to_runtime, committed_at FROM seat_runtime_switches
|
|
573
|
+
WHERE canonical_session = ? AND committed_at >= ? ORDER BY committed_at DESC LIMIT 1`).get(session, since);
|
|
574
|
+
return row ? { id: row.id, from: row.from_runtime, to: row.to_runtime, committedAt: row.committed_at } : null;
|
|
575
|
+
}
|
|
576
|
+
catch {
|
|
577
|
+
return null;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
export function runtimeSwitchSummary(db, where) {
|
|
581
|
+
try {
|
|
582
|
+
const row = db.prepare(`SELECT id, phase, from_runtime, to_runtime, committed_at, created_at, deadline_at, attention, outcome FROM seat_runtime_switches
|
|
583
|
+
WHERE ${"nodeId" in where ? "node_id" : "canonical_session"} = ?
|
|
584
|
+
AND (phase IN ('preparing', 'confirmed', 'committed') OR attention IS NOT NULL)
|
|
585
|
+
ORDER BY created_at DESC LIMIT 1`).get("nodeId" in where ? where.nodeId : where.session);
|
|
586
|
+
return row ? { id: row.id, phase: row.phase, from: row.from_runtime, to: row.to_runtime, committed: !!row.committed_at, startedAt: row.created_at,
|
|
587
|
+
deadlineAt: row.deadline_at, attention: row.attention, outcome: row.outcome } : null;
|
|
588
|
+
}
|
|
589
|
+
catch {
|
|
590
|
+
return null;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
//# sourceMappingURL=seat-runtime-switch-service.js.map
|