@openrig/cli 0.7.7 → 0.7.9
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 +6 -6
- package/daemon/assets/openshell/Dockerfile +15 -0
- package/daemon/assets/openshell/README.md +139 -0
- package/daemon/assets/openshell/agents/coordinator/agent.yaml +20 -0
- package/daemon/assets/openshell/agents/coordinator/role.md +1 -0
- package/daemon/assets/openshell/agents/worker/agent.yaml +20 -0
- package/daemon/assets/openshell/agents/worker/role.md +3 -0
- package/daemon/assets/openshell/claude-code-provider.yaml +55 -0
- package/daemon/assets/openshell/driver-v1.schema.json +81 -0
- package/daemon/assets/openshell/guest.py +319 -0
- package/daemon/assets/openshell/policy.yaml +33 -0
- package/daemon/assets/openshell/preset.yaml +13 -0
- package/daemon/assets/openshell/rig.yaml +20 -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/skills/seat-continuity-and-handover/SKILL.md +13 -4
- 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 +110 -30
- package/daemon/context-packs/reference/getting-started.md +36 -9
- package/daemon/context-packs/reference/instance-layout.md +11 -0
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +130 -14
- package/daemon/context-packs/reference/whats-new.md +294 -132
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +4 -3
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/scripts/backup-sqlite.mjs +90 -14
- 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/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +13 -4
- 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 +6 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +51 -74
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +2 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +19 -7
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +33 -7
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +204 -45
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +13 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +31 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/omp-runtime-adapter.d.ts +5 -0
- package/daemon/dist/adapters/omp-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/omp-runtime-adapter.js +4 -0
- package/daemon/dist/adapters/omp-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/openshell-driver.d.ts +39 -0
- package/daemon/dist/adapters/openshell-driver.d.ts.map +1 -0
- package/daemon/dist/adapters/openshell-driver.js +145 -0
- package/daemon/dist/adapters/openshell-driver.js.map +1 -0
- package/daemon/dist/adapters/openshell-podman-observer.d.ts +30 -0
- package/daemon/dist/adapters/openshell-podman-observer.d.ts.map +1 -0
- package/daemon/dist/adapters/openshell-podman-observer.js +94 -0
- package/daemon/dist/adapters/openshell-podman-observer.js.map +1 -0
- package/daemon/dist/adapters/pi-openrouter-charge.d.ts +1 -0
- package/daemon/dist/adapters/pi-openrouter-charge.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-openrouter-charge.js +17 -3
- package/daemon/dist/adapters/pi-openrouter-charge.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +39 -5
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +97 -19
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +22 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +39 -8
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/preflight-exec.d.ts +2 -0
- package/daemon/dist/adapters/preflight-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/preflight-exec.js +3 -1
- package/daemon/dist/adapters/preflight-exec.js.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.d.ts +5 -0
- package/daemon/dist/adapters/stub-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/stub-runtime-adapter.js +7 -4
- package/daemon/dist/adapters/stub-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux-control.d.ts +12 -6
- package/daemon/dist/adapters/tmux-control.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-control.js +42 -21
- package/daemon/dist/adapters/tmux-control.js.map +1 -1
- package/daemon/dist/adapters/tmux-exec.d.ts +3 -0
- package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-exec.js +35 -1
- package/daemon/dist/adapters/tmux-exec.js.map +1 -1
- package/daemon/dist/adapters/tmux-server.d.ts +6 -3
- package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-server.js +13 -8
- package/daemon/dist/adapters/tmux-server.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +11 -2
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +66 -14
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +16 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/142_node_claude_mcp.d.ts +3 -0
- package/daemon/dist/db/migrations/142_node_claude_mcp.d.ts.map +1 -0
- package/daemon/dist/db/migrations/142_node_claude_mcp.js +5 -0
- package/daemon/dist/db/migrations/142_node_claude_mcp.js.map +1 -0
- package/daemon/dist/db/migrations/143_activity_grants.d.ts +8 -0
- package/daemon/dist/db/migrations/143_activity_grants.d.ts.map +1 -0
- package/daemon/dist/db/migrations/143_activity_grants.js +22 -0
- package/daemon/dist/db/migrations/143_activity_grants.js.map +1 -0
- package/daemon/dist/db/migrations/144_environment_bindings.d.ts +4 -0
- package/daemon/dist/db/migrations/144_environment_bindings.d.ts.map +1 -0
- package/daemon/dist/db/migrations/144_environment_bindings.js +31 -0
- package/daemon/dist/db/migrations/144_environment_bindings.js.map +1 -0
- package/daemon/dist/db/migrations/145_node_permissions_to.d.ts +5 -0
- package/daemon/dist/db/migrations/145_node_permissions_to.d.ts.map +1 -0
- package/daemon/dist/db/migrations/145_node_permissions_to.js +7 -0
- package/daemon/dist/db/migrations/145_node_permissions_to.js.map +1 -0
- package/daemon/dist/db/migrations/146_node_startup_guidance_file.d.ts +6 -0
- package/daemon/dist/db/migrations/146_node_startup_guidance_file.d.ts.map +1 -0
- package/daemon/dist/db/migrations/146_node_startup_guidance_file.js +8 -0
- package/daemon/dist/db/migrations/146_node_startup_guidance_file.js.map +1 -0
- package/daemon/dist/db/migrations/147_managed_block_writes.d.ts +9 -0
- package/daemon/dist/db/migrations/147_managed_block_writes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/147_managed_block_writes.js +19 -0
- package/daemon/dist/db/migrations/147_managed_block_writes.js.map +1 -0
- package/daemon/dist/db/migrations/148_outbox_dispatched_index.d.ts +8 -0
- package/daemon/dist/db/migrations/148_outbox_dispatched_index.d.ts.map +1 -0
- package/daemon/dist/db/migrations/148_outbox_dispatched_index.js +12 -0
- package/daemon/dist/db/migrations/148_outbox_dispatched_index.js.map +1 -0
- package/daemon/dist/db/migrations/149_stream_intake_cursor.d.ts +4 -0
- package/daemon/dist/db/migrations/149_stream_intake_cursor.d.ts.map +1 -0
- package/daemon/dist/db/migrations/149_stream_intake_cursor.js +14 -0
- package/daemon/dist/db/migrations/149_stream_intake_cursor.js.map +1 -0
- package/daemon/dist/domain/active-occupant.d.ts +2 -0
- package/daemon/dist/domain/active-occupant.d.ts.map +1 -1
- package/daemon/dist/domain/active-occupant.js +9 -1
- package/daemon/dist/domain/active-occupant.js.map +1 -1
- package/daemon/dist/domain/activity-grants.d.ts +63 -0
- package/daemon/dist/domain/activity-grants.d.ts.map +1 -0
- package/daemon/dist/domain/activity-grants.js +106 -0
- package/daemon/dist/domain/activity-grants.js.map +1 -0
- 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-images/agent-image-library-service.d.ts.map +1 -1
- package/daemon/dist/domain/agent-images/agent-image-library-service.js +5 -2
- package/daemon/dist/domain/agent-images/agent-image-library-service.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +3 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/bundle-archive.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-archive.js +40 -4
- package/daemon/dist/domain/bundle-archive.js.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-behaviour.js +7 -0
- package/daemon/dist/domain/bundle-behaviour.js.map +1 -1
- package/daemon/dist/domain/bundle-content-routing.d.ts +1 -0
- package/daemon/dist/domain/bundle-content-routing.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-content-routing.js +3 -1
- package/daemon/dist/domain/bundle-content-routing.js.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.d.ts +2 -0
- package/daemon/dist/domain/bundle-source-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-source-resolver.js +4 -4
- package/daemon/dist/domain/bundle-source-resolver.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +12 -5
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +47 -18
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/claude-mcp.d.ts +10 -0
- package/daemon/dist/domain/claude-mcp.d.ts.map +1 -0
- package/daemon/dist/domain/claude-mcp.js +19 -0
- package/daemon/dist/domain/claude-mcp.js.map +1 -0
- package/daemon/dist/domain/claude-owned-settings.d.ts +19 -0
- package/daemon/dist/domain/claude-owned-settings.d.ts.map +1 -0
- package/daemon/dist/domain/claude-owned-settings.js +160 -0
- package/daemon/dist/domain/claude-owned-settings.js.map +1 -0
- package/daemon/dist/domain/claude-plugin-channels.d.ts +2 -0
- package/daemon/dist/domain/claude-plugin-channels.d.ts.map +1 -0
- package/daemon/dist/domain/claude-plugin-channels.js +12 -0
- package/daemon/dist/domain/claude-plugin-channels.js.map +1 -0
- package/daemon/dist/domain/claude-theme-menu.d.ts +5 -0
- package/daemon/dist/domain/claude-theme-menu.d.ts.map +1 -0
- package/daemon/dist/domain/claude-theme-menu.js +43 -0
- package/daemon/dist/domain/claude-theme-menu.js.map +1 -0
- package/daemon/dist/domain/codex-owned-plugin-trust.d.ts.map +1 -1
- package/daemon/dist/domain/codex-owned-plugin-trust.js +2 -1
- package/daemon/dist/domain/codex-owned-plugin-trust.js.map +1 -1
- package/daemon/dist/domain/codex-pane-patterns.d.ts +1 -0
- package/daemon/dist/domain/codex-pane-patterns.d.ts.map +1 -1
- package/daemon/dist/domain/codex-pane-patterns.js +2 -0
- package/daemon/dist/domain/codex-pane-patterns.js.map +1 -1
- package/daemon/dist/domain/community-harness-presets.d.ts +2 -1
- package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
- package/daemon/dist/domain/community-harness-presets.js +3 -2
- package/daemon/dist/domain/community-harness-presets.js.map +1 -1
- package/daemon/dist/domain/composer-prompts.d.ts +2 -0
- package/daemon/dist/domain/composer-prompts.d.ts.map +1 -1
- package/daemon/dist/domain/composer-prompts.js +3 -2
- package/daemon/dist/domain/composer-prompts.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts +2 -2
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +8 -2
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/desired-claude-activity-hooks.d.ts +25 -0
- package/daemon/dist/domain/desired-claude-activity-hooks.d.ts.map +1 -0
- package/daemon/dist/domain/desired-claude-activity-hooks.js +86 -0
- package/daemon/dist/domain/desired-claude-activity-hooks.js.map +1 -0
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.js +14 -4
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
- package/daemon/dist/domain/environment-artifacts.d.ts +49 -0
- package/daemon/dist/domain/environment-artifacts.d.ts.map +1 -0
- package/daemon/dist/domain/environment-artifacts.js +158 -0
- package/daemon/dist/domain/environment-artifacts.js.map +1 -0
- package/daemon/dist/domain/environment-lifecycle.d.ts +126 -0
- package/daemon/dist/domain/environment-lifecycle.d.ts.map +1 -0
- package/daemon/dist/domain/environment-lifecycle.js +474 -0
- package/daemon/dist/domain/environment-lifecycle.js.map +1 -0
- package/daemon/dist/domain/environment-platform.d.ts +121 -0
- package/daemon/dist/domain/environment-platform.d.ts.map +1 -0
- package/daemon/dist/domain/environment-platform.js +280 -0
- package/daemon/dist/domain/environment-platform.js.map +1 -0
- package/daemon/dist/domain/environment-startup.d.ts +43 -0
- package/daemon/dist/domain/environment-startup.d.ts.map +1 -0
- package/daemon/dist/domain/environment-startup.js +307 -0
- package/daemon/dist/domain/environment-startup.js.map +1 -0
- package/daemon/dist/domain/expected-conversation.d.ts +20 -0
- package/daemon/dist/domain/expected-conversation.d.ts.map +1 -0
- package/daemon/dist/domain/expected-conversation.js +101 -0
- package/daemon/dist/domain/expected-conversation.js.map +1 -0
- package/daemon/dist/domain/gateway/human-readiness.d.ts +2 -1
- package/daemon/dist/domain/gateway/human-readiness.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-readiness.js +6 -0
- package/daemon/dist/domain/gateway/human-readiness.js.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts +2 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +9 -7
- package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts +8 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/operator-delivery-engine.js +61 -4
- package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
- package/daemon/dist/domain/gateway/participants.d.ts +26 -0
- package/daemon/dist/domain/gateway/participants.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/participants.js +15 -0
- package/daemon/dist/domain/gateway/participants.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +59 -11
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +19 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +219 -9
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +15 -0
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +24 -5
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/recovery-budget.d.ts +1 -0
- package/daemon/dist/domain/gateway/slack/recovery-budget.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/recovery-budget.js +1 -0
- package/daemon/dist/domain/gateway/slack/recovery-budget.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/settled-asks.d.ts +37 -0
- package/daemon/dist/domain/gateway/slack/settled-asks.d.ts.map +1 -0
- package/daemon/dist/domain/gateway/slack/settled-asks.js +276 -0
- package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts +32 -0
- package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-api.js +40 -2
- package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +9 -4
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +35 -6
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts +22 -0
- package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-writer.js +116 -0
- package/daemon/dist/domain/hosts/hosts-registry-writer.js.map +1 -1
- package/daemon/dist/domain/human-questions.d.ts +3 -1
- package/daemon/dist/domain/human-questions.d.ts.map +1 -1
- package/daemon/dist/domain/human-questions.js.map +1 -1
- package/daemon/dist/domain/kernel-boot-tracker.d.ts +3 -2
- package/daemon/dist/domain/kernel-boot-tracker.d.ts.map +1 -1
- package/daemon/dist/domain/kernel-boot-tracker.js +2 -1
- package/daemon/dist/domain/kernel-boot-tracker.js.map +1 -1
- package/daemon/dist/domain/kernel-boot.d.ts +11 -6
- package/daemon/dist/domain/kernel-boot.d.ts.map +1 -1
- package/daemon/dist/domain/kernel-boot.js +27 -5
- package/daemon/dist/domain/kernel-boot.js.map +1 -1
- package/daemon/dist/domain/kernel-hook-review.d.ts +18 -0
- package/daemon/dist/domain/kernel-hook-review.d.ts.map +1 -0
- package/daemon/dist/domain/kernel-hook-review.js +58 -0
- package/daemon/dist/domain/kernel-hook-review.js.map +1 -0
- package/daemon/dist/domain/managed-block-records.d.ts +54 -0
- package/daemon/dist/domain/managed-block-records.d.ts.map +1 -0
- package/daemon/dist/domain/managed-block-records.js +130 -0
- package/daemon/dist/domain/managed-block-records.js.map +1 -0
- package/daemon/dist/domain/managed-blocks.d.ts +14 -0
- package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
- package/daemon/dist/domain/managed-blocks.js +24 -4
- package/daemon/dist/domain/managed-blocks.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +29 -10
- 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 +116 -29
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/current-generation-record.js +10 -6
- package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
- package/daemon/dist/domain/native-process-lineage.d.ts +5 -1
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +91 -6
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +2 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +4 -2
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +1 -0
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +42 -10
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +3 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +6 -0
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/outbox-handler.d.ts +17 -0
- package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
- package/daemon/dist/domain/outbox-handler.js +60 -3
- package/daemon/dist/domain/outbox-handler.js.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +10 -0
- package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
- package/daemon/dist/domain/policies/parked-owner-consumer.js +60 -4
- package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +7 -1
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/provider/claude-seat-switch.d.ts +9 -3
- package/daemon/dist/domain/provider/claude-seat-switch.d.ts.map +1 -1
- package/daemon/dist/domain/provider/claude-seat-switch.js +100 -17
- package/daemon/dist/domain/provider/claude-seat-switch.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.js +1 -1
- package/daemon/dist/domain/provider/provider-service-impl.js.map +1 -1
- package/daemon/dist/domain/provider/provider-service.d.ts +32 -2
- package/daemon/dist/domain/provider/provider-service.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-types.d.ts +1 -1
- package/daemon/dist/domain/provider/provider-types.d.ts.map +1 -1
- package/daemon/dist/domain/queue-recovery.d.ts +1 -1
- package/daemon/dist/domain/queue-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/queue-recovery.js +6 -2
- package/daemon/dist/domain/queue-recovery.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +64 -8
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +309 -76
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +59 -4
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +2 -0
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +9 -0
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts +3 -0
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +124 -25
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +2 -7
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-guidance.d.ts +70 -7
- package/daemon/dist/domain/restore-guidance.d.ts.map +1 -1
- package/daemon/dist/domain/restore-guidance.js +181 -18
- package/daemon/dist/domain/restore-guidance.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +40 -3
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +276 -33
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts +2 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +20 -6
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.js +1 -1
- package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +14 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +57 -1
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +18 -0
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +73 -17
- 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 +6 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts +8 -0
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +66 -3
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +7 -4
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +38 -11
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +4 -0
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +35 -1
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +56 -6
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runner-permissions.d.ts +150 -0
- package/daemon/dist/domain/runner-permissions.d.ts.map +1 -0
- package/daemon/dist/domain/runner-permissions.js +383 -0
- package/daemon/dist/domain/runner-permissions.js.map +1 -0
- package/daemon/dist/domain/runtime-adapter.d.ts +28 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.js +3 -0
- package/daemon/dist/domain/runtime-switch-materials.js.map +1 -1
- package/daemon/dist/domain/runtime-verifier.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-verifier.js +9 -4
- package/daemon/dist/domain/runtime-verifier.js.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.d.ts +1 -1
- package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
- package/daemon/dist/domain/scope/types.d.ts +3 -0
- package/daemon/dist/domain/scope/types.d.ts.map +1 -1
- package/daemon/dist/domain/scope/types.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +7 -0
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-activity-service.js +47 -7
- package/daemon/dist/domain/seat-activity-service.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +8 -1
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +22 -4
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +80 -11
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-effort.d.ts +6 -0
- package/daemon/dist/domain/seat-effort.d.ts.map +1 -1
- package/daemon/dist/domain/seat-effort.js +0 -2
- package/daemon/dist/domain/seat-effort.js.map +1 -1
- package/daemon/dist/domain/seat-handover-planner.js +1 -1
- package/daemon/dist/domain/seat-handover-planner.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +25 -10
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +164 -31
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-launch-additions.d.ts +6 -0
- package/daemon/dist/domain/seat-launch-additions.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-additions.js +41 -11
- package/daemon/dist/domain/seat-launch-additions.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +24 -2
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +65 -2
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
- package/daemon/dist/domain/seat-restart-in-place.js +6 -1
- package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.js +21 -3
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.d.ts +8 -6
- package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -1
- package/daemon/dist/domain/seat-skill-storage.js +27 -7
- package/daemon/dist/domain/seat-skill-storage.js.map +1 -1
- package/daemon/dist/domain/seat-status-service.d.ts +5 -0
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-status-service.js +9 -0
- package/daemon/dist/domain/seat-status-service.js.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.d.ts +15 -5
- package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.js +21 -7
- package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
- package/daemon/dist/domain/self-attach-service.d.ts +8 -1
- package/daemon/dist/domain/self-attach-service.d.ts.map +1 -1
- package/daemon/dist/domain/self-attach-service.js +26 -0
- package/daemon/dist/domain/self-attach-service.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +17 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +247 -31
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-capture.js +15 -0
- package/daemon/dist/domain/snapshot-capture.js.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +2 -0
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js +5 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +1 -0
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +106 -8
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/stream-intake.d.ts +51 -0
- package/daemon/dist/domain/stream-intake.d.ts.map +1 -0
- package/daemon/dist/domain/stream-intake.js +438 -0
- package/daemon/dist/domain/stream-intake.js.map +1 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts +3 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +2 -0
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +4 -3
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-follow-view.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-follow-view.js +22 -4
- package/daemon/dist/domain/terminal/herdr-follow-view.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-viewer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-viewer.js +8 -4
- package/daemon/dist/domain/terminal/herdr-viewer.js.map +1 -1
- package/daemon/dist/domain/terminal/login-shell.d.ts +10 -0
- package/daemon/dist/domain/terminal/login-shell.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/login-shell.js +37 -0
- package/daemon/dist/domain/terminal/login-shell.js.map +1 -0
- package/daemon/dist/domain/terminal/rex-layout.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/rex-layout.js +2 -1
- package/daemon/dist/domain/terminal/rex-layout.js.map +1 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts +12 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/scope-task-terminal-view.js +120 -18
- package/daemon/dist/domain/terminal/scope-task-terminal-view.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-following.js +1 -1
- package/daemon/dist/domain/terminal/terminal-following.js.map +1 -1
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +2 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +3 -2
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +18 -27
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.js +15 -5
- package/daemon/dist/domain/terminal/tile-attach.js.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.d.ts +6 -3
- package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/view-composer.js +15 -5
- package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
- package/daemon/dist/domain/tmux-server-selection.d.ts +47 -0
- package/daemon/dist/domain/tmux-server-selection.d.ts.map +1 -0
- package/daemon/dist/domain/tmux-server-selection.js +220 -0
- package/daemon/dist/domain/tmux-server-selection.js.map +1 -0
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +19 -10
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +54 -0
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.js +3 -1
- package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +23 -0
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts +11 -0
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts.map +1 -0
- package/daemon/dist/domain/watchdog-delivery-receipts.js +134 -0
- package/daemon/dist/domain/watchdog-delivery-receipts.js.map +1 -0
- package/daemon/dist/domain/watchdog-delivery.d.ts +7 -1
- package/daemon/dist/domain/watchdog-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-delivery.js +24 -8
- package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +21 -2
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +52 -23
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/domain/workflow-projector.js +3 -3
- package/daemon/dist/domain/workflow-projector.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +1 -1
- package/daemon/dist/domain/workflow-runtime.js +3 -3
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/domain/working-liveness.d.ts +66 -0
- package/daemon/dist/domain/working-liveness.d.ts.map +1 -0
- package/daemon/dist/domain/working-liveness.js +94 -0
- package/daemon/dist/domain/working-liveness.js.map +1 -0
- package/daemon/dist/domain/workspace/frontmatter-validator.js +4 -2
- package/daemon/dist/domain/workspace/frontmatter-validator.js.map +1 -1
- package/daemon/dist/index.d.ts +4 -0
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +17 -0
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
- package/daemon/dist/lib/pane-envelope.js +9 -3
- package/daemon/dist/lib/pane-envelope.js.map +1 -1
- package/daemon/dist/middleware/auth-bearer-token.js +2 -2
- package/daemon/dist/middleware/auth-bearer-token.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts +6 -0
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +317 -22
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/attention.d.ts.map +1 -1
- package/daemon/dist/routes/attention.js +17 -5
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/bundles.js +3 -1
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/compaction.js +4 -2
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/environments.d.ts +3 -0
- package/daemon/dist/routes/environments.d.ts.map +1 -0
- package/daemon/dist/routes/environments.js +104 -0
- package/daemon/dist/routes/environments.js.map +1 -0
- package/daemon/dist/routes/gateway.d.ts +6 -0
- package/daemon/dist/routes/gateway.d.ts.map +1 -1
- package/daemon/dist/routes/gateway.js +39 -0
- package/daemon/dist/routes/gateway.js.map +1 -1
- package/daemon/dist/routes/hosts.d.ts.map +1 -1
- package/daemon/dist/routes/hosts.js +106 -8
- 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 +6 -1
- package/daemon/dist/routes/mission-control.js.map +1 -1
- package/daemon/dist/routes/provider.d.ts.map +1 -1
- package/daemon/dist/routes/provider.js +53 -7
- 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 +21 -2
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/restore-check.d.ts.map +1 -1
- package/daemon/dist/routes/restore-check.js +5 -19
- package/daemon/dist/routes/restore-check.js.map +1 -1
- package/daemon/dist/routes/rigs.js +3 -0
- 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 +8 -3
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
- package/daemon/dist/routes/scope-audit.js +30 -0
- package/daemon/dist/routes/scope-audit.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts.map +1 -1
- package/daemon/dist/routes/seat.js +32 -5
- 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 +66 -20
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/spec-library.d.ts.map +1 -1
- package/daemon/dist/routes/spec-library.js +60 -5
- package/daemon/dist/routes/spec-library.js.map +1 -1
- package/daemon/dist/routes/startup.js +2 -2
- package/daemon/dist/routes/startup.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +31 -5
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/server.d.ts +7 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +57 -1
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts +2 -0
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +90 -37
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-spec.md +1 -1
- package/daemon/docs/reference/agent-startup-guide.md +119 -3
- package/daemon/docs/reference/agent-state-taxonomy.md +23 -2
- package/daemon/docs/reference/author-contracts.md +9 -9
- package/daemon/docs/reference/checked-seat-stop.md +12 -1
- package/daemon/docs/reference/community-harness-examples/dsh/README.md +96 -0
- package/daemon/docs/reference/community-harness-examples/dsh/dsh.yaml +20 -0
- package/daemon/docs/reference/community-harness-examples/dsh/openrig-dsh-runner.mjs +626 -0
- package/daemon/docs/reference/community-harness-examples/openshell/README.md +5 -0
- package/daemon/docs/reference/community-harness-presets.md +25 -1
- package/daemon/docs/reference/daemon-http-clients.md +203 -0
- package/daemon/docs/reference/execution-platform-contract.md +1 -1
- package/daemon/docs/reference/gateway-participants.md +29 -17
- package/daemon/docs/reference/getting-started.md +36 -9
- package/daemon/docs/reference/harness-runner-contract.md +235 -26
- package/daemon/docs/reference/hosted-members.md +32 -0
- package/daemon/docs/reference/instance-layout.md +11 -0
- package/daemon/docs/reference/keeping-a-watch.md +22 -0
- package/daemon/docs/reference/pi-tool-selection-recovery.md +84 -0
- package/daemon/docs/reference/quickstart.md +9 -4
- package/daemon/docs/reference/rig-bundle.md +2 -2
- package/daemon/docs/reference/rig-spec.md +130 -14
- package/daemon/docs/reference/runner-conformance/README.md +77 -0
- package/daemon/docs/reference/runner-conformance/check-runner.mjs +818 -0
- package/daemon/docs/reference/runner-conformance/fake-acp-agent.mjs +150 -0
- package/daemon/docs/reference/sdlc-conventions.md +22 -3
- package/daemon/docs/reference/seat-delivery.md +31 -6
- package/daemon/docs/reference/slack-app-setup.md +55 -5
- package/daemon/docs/reference/terminal-sessions.md +100 -14
- package/daemon/docs/reference/tmux-servers.md +166 -0
- package/daemon/docs/reference/whats-new.md +294 -132
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +4 -3
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/scripts/backup-sqlite.mjs +90 -14
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +2 -1
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +1 -1
- package/dist/acp/connector.d.ts.map +1 -1
- package/dist/acp/connector.js +6 -1
- package/dist/acp/connector.js.map +1 -1
- package/dist/atomic-text-write.d.ts +2 -0
- package/dist/atomic-text-write.d.ts.map +1 -1
- package/dist/atomic-text-write.js +17 -0
- package/dist/atomic-text-write.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +28 -0
- package/dist/client.js.map +1 -1
- package/dist/commands/attach.d.ts +1 -0
- package/dist/commands/attach.d.ts.map +1 -1
- package/dist/commands/attach.js +8 -2
- package/dist/commands/attach.js.map +1 -1
- package/dist/commands/broadcast.js +2 -1
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/compact.d.ts.map +1 -1
- package/dist/commands/compact.js +7 -4
- package/dist/commands/compact.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +9 -3
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +1 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +7 -1
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/destroy.d.ts.map +1 -1
- package/dist/commands/destroy.js +2 -0
- package/dist/commands/destroy.js.map +1 -1
- package/dist/commands/doctor.d.ts +8 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +126 -10
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +10 -0
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +10 -4
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/environment.d.ts +8 -0
- package/dist/commands/environment.d.ts.map +1 -0
- package/dist/commands/environment.js +197 -0
- package/dist/commands/environment.js.map +1 -0
- package/dist/commands/export.d.ts +2 -0
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +31 -7
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/gateway.js +15 -11
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/host.d.ts +13 -6
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +112 -15
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/project-jev.js +1 -1
- package/dist/commands/project-jev.js.map +1 -1
- package/dist/commands/provider.d.ts.map +1 -1
- package/dist/commands/provider.js +12 -5
- package/dist/commands/provider.js.map +1 -1
- package/dist/commands/ps.d.ts +2 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +12 -3
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +1 -0
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +50 -6
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +36 -2
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +85 -8
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +46 -16
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +18 -0
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/slack.d.ts.map +1 -1
- package/dist/commands/slack.js +5 -0
- package/dist/commands/slack.js.map +1 -1
- package/dist/commands/specs.d.ts +1 -1
- package/dist/commands/specs.d.ts.map +1 -1
- package/dist/commands/specs.js +44 -10
- package/dist/commands/specs.js.map +1 -1
- package/dist/commands/stream.d.ts.map +1 -1
- package/dist/commands/stream.js +6 -1
- package/dist/commands/stream.js.map +1 -1
- package/dist/commands/terminal.d.ts +2 -0
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +31 -2
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/topology-default-agent.js +1 -1
- package/dist/commands/topology-default-agent.js.map +1 -1
- package/dist/commands/tui.d.ts +3 -2
- package/dist/commands/tui.d.ts.map +1 -1
- package/dist/commands/tui.js.map +1 -1
- package/dist/commands/walk.d.ts.map +1 -1
- package/dist/commands/walk.js +27 -10
- package/dist/commands/walk.js.map +1 -1
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +8 -1
- package/dist/commands/workspace.js.map +1 -1
- package/dist/config-store.d.ts +9 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +33 -2
- package/dist/config-store.js.map +1 -1
- package/dist/cross-host-target.d.ts.map +1 -1
- package/dist/cross-host-target.js +3 -1
- package/dist/cross-host-target.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +6 -0
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +66 -4
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/daemon-reachability.d.ts +2 -1
- package/dist/daemon-reachability.d.ts.map +1 -1
- package/dist/daemon-reachability.js +3 -2
- package/dist/daemon-reachability.js.map +1 -1
- package/dist/destroy-helpers.d.ts +3 -2
- package/dist/destroy-helpers.d.ts.map +1 -1
- package/dist/destroy-helpers.js +6 -3
- package/dist/destroy-helpers.js.map +1 -1
- package/dist/host-bindings.js +1 -1
- package/dist/host-bindings.js.map +1 -1
- package/dist/host-registry.d.ts +22 -0
- package/dist/host-registry.d.ts.map +1 -1
- package/dist/host-registry.js +121 -0
- package/dist/host-registry.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lazy-program.d.ts.map +1 -1
- package/dist/lazy-program.js +1 -0
- package/dist/lazy-program.js.map +1 -1
- package/dist/lib/scope/progress-edit.d.ts.map +1 -1
- package/dist/lib/scope/progress-edit.js +37 -7
- package/dist/lib/scope/progress-edit.js.map +1 -1
- package/dist/lib/scope/scope-audit.d.ts +1 -1
- package/dist/lib/scope/scope-audit.d.ts.map +1 -1
- package/dist/lib/scope/scope-audit.js.map +1 -1
- package/dist/lib/scope/scope-fs.d.ts +3 -0
- package/dist/lib/scope/scope-fs.d.ts.map +1 -1
- package/dist/lib/scope/scope-fs.js +39 -53
- package/dist/lib/scope/scope-fs.js.map +1 -1
- package/dist/lib/scope/types.d.ts +3 -0
- package/dist/lib/scope/types.d.ts.map +1 -1
- package/dist/lib/scope/types.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +89 -18
- package/dist/mcp-server.js.map +1 -1
- package/dist/openrig-compat.d.ts +1 -1
- package/dist/openrig-compat.d.ts.map +1 -1
- package/dist/openrig-compat.js +2 -2
- package/dist/openrig-compat.js.map +1 -1
- package/dist/seat-launch-additions-lines.d.ts +2 -0
- package/dist/seat-launch-additions-lines.d.ts.map +1 -1
- package/dist/seat-launch-additions-lines.js +1 -0
- package/dist/seat-launch-additions-lines.js.map +1 -1
- package/dist/shared-tui.d.ts +4 -2
- package/dist/shared-tui.d.ts.map +1 -1
- package/dist/shared-tui.js +4 -11
- package/dist/shared-tui.js.map +1 -1
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +34 -29
- package/dist/terminal-window.js.map +1 -1
- package/dist/tmux-attachment.d.ts +17 -0
- package/dist/tmux-attachment.d.ts.map +1 -0
- package/dist/tmux-attachment.js +89 -0
- package/dist/tmux-attachment.js.map +1 -0
- package/package.json +2 -2
- package/tui/dist/attention/attention-model.d.ts +3 -2
- package/tui/dist/attention/attention-model.d.ts.map +1 -1
- package/tui/dist/attention/attention-model.js +7 -4
- package/tui/dist/attention/attention-model.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +4 -4
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +6 -5
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +16 -5
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/pulse/pulse-model.d.ts +1 -1
- package/tui/dist/pulse/pulse-model.d.ts.map +1 -1
- package/tui/dist/pulse/pulse-model.js +6 -17
- package/tui/dist/pulse/pulse-model.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +8 -2
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
- package/tui/dist/terminals/terminal-model.js +2 -1
- package/tui/dist/terminals/terminal-model.js.map +1 -1
- package/tui/dist/theme.d.ts.map +1 -1
- package/tui/dist/theme.js +7 -2
- package/tui/dist/theme.js.map +1 -1
- package/tui/dist/time.d.ts +2 -0
- package/tui/dist/time.d.ts.map +1 -1
- package/tui/dist/time.js +5 -0
- package/tui/dist/time.js.map +1 -1
- package/tui/dist/types.d.ts +2 -3
- package/tui/dist/types.d.ts.map +1 -1
- package/ui/dist/assets/index-BFOs3ejL.css +32 -0
- package/ui/dist/assets/{index-CMBgYrS7.js → index-CdkFwtld.js} +92 -92
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-DNU3XZr_.css +0 -32
|
@@ -10,8 +10,10 @@ import { accessSync, constants, existsSync, mkdirSync, readFileSync, realpathSyn
|
|
|
10
10
|
import { isAbsolute, join } from "node:path";
|
|
11
11
|
import { ensureSeatSkillPlugin, hasSeatSkillRecords, rehydrateSeatSkills, seatSkillPaths, seatSkillPathsForNode, seatCatalogKeptNote, seatSkillReplay, writeSeatSkillCatalog, writeSeatSkillRouter, seatRouterKeptNote } from "./seat-skill-storage.js";
|
|
12
12
|
import { NativePermissionStore } from "./native-permission-store.js";
|
|
13
|
+
import { readSeatClaudeMcp } from "./claude-mcp.js";
|
|
13
14
|
import { resolvePermissionPolicyAttachment } from "./permission-policy/policy-ref.js";
|
|
14
15
|
import { claudeResumeRotation } from "./session-registry.js";
|
|
16
|
+
import { NOTHING_STOPPED_LAUNCH_CODES } from "./node-launcher.js";
|
|
15
17
|
import { seatRuntimeHome } from "./seat-runtime-home.js";
|
|
16
18
|
import { readFreshOccupantRelations } from "./fresh-occupant-relation.js";
|
|
17
19
|
import { assessNativeResumeProbe } from "./native-resume-probe.js";
|
|
@@ -19,7 +21,8 @@ import { resumeProbeEvidence } from "./native-resume-probe-evidence.js";
|
|
|
19
21
|
import { observeClaudeDelivery, observeClaudeResumeLaunch, processArgv, verifyClaudePaneProcess, verifyClaudePaneRuntime, verifyPaneIdleShell } from "./native-process-lineage.js";
|
|
20
22
|
import { readNativeExecutablePaths } from "./native-process-executable.js";
|
|
21
23
|
import { reanchorBuiltinStartupFile, reanchorShippedProjectionEntry } from "./builtin-startup-files.js";
|
|
22
|
-
import { applySeatSkillsLineRule, seatGuidance, restoreMissingGuidance, missingGuidanceBlocks } from "./restore-guidance.js";
|
|
24
|
+
import { applySeatSkillsLineRule, seatGuidance, restoreMissingGuidance, missingGuidanceBlocks, guidanceFileSharedByLink, lstatLinkInfo } from "./restore-guidance.js";
|
|
25
|
+
import { decideManagedBlock, managedBlockRecords } from "./managed-block-records.js";
|
|
23
26
|
import { readFootprintAnswer } from "./footprint-choice.js";
|
|
24
27
|
import { SettingsStore } from "./user-settings/settings-store.js";
|
|
25
28
|
import { AppliedLaunchObservationStore } from "./applied-launch-observation-store.js";
|
|
@@ -34,7 +37,7 @@ const LAUNCH_DEPENDENCY_KINDS = new Set(["delegates_to", "spawned_by"]);
|
|
|
34
37
|
// in the pure leaf module active-occupant.ts, shared with preview, snapshot
|
|
35
38
|
// usability, and lifecycle projection. Imported and re-exported here so the
|
|
36
39
|
// existing export surface and the execution call sites below are unchanged.
|
|
37
|
-
import { resolveActiveSnapshotSession, activeOccupantAmbiguityError, absentSeatResumeHistory, absentSeatResumeHistoryError, freshSeatLaunchCommand } from "./active-occupant.js";
|
|
40
|
+
import { resolveActiveSnapshotSession, activeOccupantAmbiguityError, absentSeatResumeHistory, absentSeatResumeHistoryError, freshSeatLaunchCommand, seatStopCommand } from "./active-occupant.js";
|
|
38
41
|
import { effectiveRestorePolicy, isOrdinaryTerminalSeat, communityLaunchOnlyRestoreReason } from "./restore-policy.js";
|
|
39
42
|
import { communityHarnessOf } from "./built-in-runtimes.js";
|
|
40
43
|
import { communityHarnessStopsRestore } from "./community-harness-presets.js";
|
|
@@ -56,6 +59,10 @@ export function rollupRestoreRigResult(nodes) {
|
|
|
56
59
|
// A seat running without part of its guidance keeps its own status; the rig isn't fully restored.
|
|
57
60
|
if (nodes.some((node) => (node.guidanceGaps?.length ?? 0) > 0))
|
|
58
61
|
return "partially_restored";
|
|
62
|
+
// Same for an unhealed restore gap (e.g. a current-selection re-apply
|
|
63
|
+
// that was skipped, failed, or threw): the seat runs, but the restore was not whole.
|
|
64
|
+
if (nodes.some((node) => (node.restoreGaps?.length ?? 0) > 0))
|
|
65
|
+
return "partially_restored";
|
|
59
66
|
// A fresh launch loses a seat's conversation, except for a terminal seat, which has none.
|
|
60
67
|
const lostConversation = (node) => (node.status === "fresh" || node.status === "fresh-primed") && !node.noConversation;
|
|
61
68
|
if (nodes.some((node) => lostConversation(node) || node.status === "awaiting-decision" || node.status === "failed" || node.status === "attention_required")) {
|
|
@@ -82,6 +89,18 @@ export function launchStatusIsRunning(status) {
|
|
|
82
89
|
function seatFacts(data, nodeId, savedRuntime, currentRuntime) {
|
|
83
90
|
return { savedRuntime, currentRuntime, recordedSessions: data.sessions.filter((session) => session.nodeId === nodeId) };
|
|
84
91
|
}
|
|
92
|
+
/** Whether an automatic periodic carry is still the seat's current resumable session when `rig launch` uses it: capture-time
|
|
93
|
+
* eligibility can have expired without another tick, and a conversation a fresh launch retired is never resumed. */
|
|
94
|
+
export function periodicCarryIsCurrent(db, rigSessions, rigId, nodeId, carried, liveRuntime, savedRuntime) {
|
|
95
|
+
const newest = rigSessions.filter(row => row.nodeId === nodeId)
|
|
96
|
+
.reduce((latest, row) => !latest || row.id > latest.id ? row : latest, null);
|
|
97
|
+
const fresh = readFreshOccupantRelations(db, rigId);
|
|
98
|
+
return !(!absentSeatResumeHistory([carried], nodeId) || !newest || newest.id !== carried.id
|
|
99
|
+
|| newest.restorePolicy !== "resume_if_possible" || newest.status === "superseded"
|
|
100
|
+
|| liveRuntime !== savedRuntime
|
|
101
|
+
|| (!!newest.resumeToken?.trim() && (newest.resumeToken !== carried.resumeToken || newest.resumeType !== carried.resumeType))
|
|
102
|
+
|| (Object.hasOwn(fresh, nodeId) && fresh[nodeId] !== carried.id));
|
|
103
|
+
}
|
|
85
104
|
/** What `rig launch` does for this node from this snapshot without --fresh, read as the restore path reads it: the
|
|
86
105
|
* occupant, then the pre-launch stop-and-ask check, then the resume decision (restoreNodeWithCompensation and the
|
|
87
106
|
* resume step after it). An exited agent's message offers stop-then-launch as a resume only when this says so. */
|
|
@@ -135,6 +154,7 @@ export class RestoreOrchestrator {
|
|
|
135
154
|
freshLaunch;
|
|
136
155
|
freshLaunchAvailable;
|
|
137
156
|
routerLineSettings;
|
|
157
|
+
getDesiredClaudeActivityHooks;
|
|
138
158
|
appliedLaunchStore;
|
|
139
159
|
constructor(deps) {
|
|
140
160
|
if (deps.db !== deps.rigRepo.db) {
|
|
@@ -175,6 +195,7 @@ export class RestoreOrchestrator {
|
|
|
175
195
|
this.listProcesses = deps.listProcesses;
|
|
176
196
|
this.freshLaunch = deps.freshLaunch;
|
|
177
197
|
this.freshLaunchAvailable = deps.freshLaunchAvailable;
|
|
198
|
+
this.getDesiredClaudeActivityHooks = deps.getDesiredClaudeActivityHooks;
|
|
178
199
|
this.routerLineSettings = deps.routerLineSettings;
|
|
179
200
|
this.appliedLaunchStore = new AppliedLaunchObservationStore(deps.db);
|
|
180
201
|
}
|
|
@@ -183,6 +204,8 @@ export class RestoreOrchestrator {
|
|
|
183
204
|
canAttemptRecordedResume(runtime, resumeType, resumeToken) {
|
|
184
205
|
if (typeof resumeToken !== "string" || !resumeToken.trim())
|
|
185
206
|
return false;
|
|
207
|
+
if (runtime === "openshell-claude")
|
|
208
|
+
return resumeType === "community:openshell-claude";
|
|
186
209
|
if (runtime === "codex")
|
|
187
210
|
return resumeType === "codex_id" && this.codexResume.canResume(resumeType, resumeToken);
|
|
188
211
|
if (runtime === "claude-code")
|
|
@@ -426,7 +449,10 @@ export class RestoreOrchestrator {
|
|
|
426
449
|
};
|
|
427
450
|
}
|
|
428
451
|
/** `keepPane`: the seat is running and is relaunched in its own pane (its process ended in place, the pane and scrollback
|
|
429
|
-
* kept) instead of a new session; nothing checks whether it is live first, since that is the point.
|
|
452
|
+
* kept) instead of a new session; nothing checks whether it is live first, since that is the point. `keepEffort`, with
|
|
453
|
+
* `keepPane`: launch with that effort (the running process's own, kept by a provider switch) in place of the seat's
|
|
454
|
+
* saved one, unless the seat has an explicit choice when the launch reads it; it isn't saved as the seat's choice.
|
|
455
|
+
* `onLaunchEffort`, with `keepPane`, hears the effort the launch selected and why, whether or not one was kept. */
|
|
430
456
|
async launchSingleNode(rigId, logicalId, opts) {
|
|
431
457
|
return this.launchNodeTargets(rigId, [logicalId], { ...opts, namedAgent: true, nonTargetMode: "unchanged" });
|
|
432
458
|
}
|
|
@@ -478,7 +504,8 @@ export class RestoreOrchestrator {
|
|
|
478
504
|
return { ok: false, code: "selection_changed", message: "The selected history or seat changed. Refresh the review." };
|
|
479
505
|
}
|
|
480
506
|
if (opts.keepPane) {
|
|
481
|
-
launched.push(await this.restoreNodeWithCompensation({ node }, rigId, snapshot.id, snapshot.data, { adapters: opts.adapters, fsOps: opts.fsOps, keepPane: true, resumePeriodicCarry
|
|
507
|
+
launched.push(await this.restoreNodeWithCompensation({ node }, rigId, snapshot.id, snapshot.data, { adapters: opts.adapters, fsOps: opts.fsOps, keepPane: true, resumePeriodicCarry,
|
|
508
|
+
...(opts.keepEffort ? { keepEffort: opts.keepEffort } : {}), ...(opts.onLaunchEffort ? { onLaunchEffort: opts.onLaunchEffort } : {}) }, subsetWarnings));
|
|
482
509
|
continue;
|
|
483
510
|
}
|
|
484
511
|
// An external CLI's claim has no tmux session to probe; restoreNodeWithCompensation leaves it attached.
|
|
@@ -847,6 +874,9 @@ export class RestoreOrchestrator {
|
|
|
847
874
|
async restoreNodeWithCompensation(entry, rigId, snapshotId, data, opts, warnings, preserveStoppedCurrent = false) {
|
|
848
875
|
// Compare against the live logical target without changing saved post-launch inputs.
|
|
849
876
|
const node = entry.node;
|
|
877
|
+
// Activity-hook restore gaps (#1530) are collected out-of-band: postLaunchRestore
|
|
878
|
+
// has many return points, so they ride alongside `warnings` and are attached below.
|
|
879
|
+
const activityHookGaps = [];
|
|
850
880
|
const liveNode = this.rigRepo.getRig(rigId)?.nodes.find(current => current.logicalId === node.logicalId
|
|
851
881
|
&& (!opts?.selectedHistory || current.id === node.id));
|
|
852
882
|
const nodeId = node.id;
|
|
@@ -891,14 +921,7 @@ export class RestoreOrchestrator {
|
|
|
891
921
|
// The launch lifecycle lease is held here, before any stale-state cleanup
|
|
892
922
|
// or destination registration. Capture-time eligibility can have expired
|
|
893
923
|
// without another tick; never resume a conversation a fresh launch retired.
|
|
894
|
-
|
|
895
|
-
.reduce((latest, row) => !latest || row.id > latest.id ? row : latest, null);
|
|
896
|
-
const fresh = readFreshOccupantRelations(this.db, rigId);
|
|
897
|
-
if (!absentSeatResumeHistory([carried], nodeId) || !newest || newest.id !== carried.id
|
|
898
|
-
|| newest.restorePolicy !== "resume_if_possible" || newest.status === "superseded"
|
|
899
|
-
|| liveNode?.runtime !== node.runtime
|
|
900
|
-
|| (!!newest.resumeToken?.trim() && (newest.resumeToken !== carried.resumeToken || newest.resumeType !== carried.resumeType))
|
|
901
|
-
|| (Object.hasOwn(fresh, nodeId) && fresh[nodeId] !== carried.id)) {
|
|
924
|
+
if (!periodicCarryIsCurrent(this.db, this.sessionRegistry.getSessionsForRig(rigId), rigId, nodeId, carried, liveNode?.runtime, node.runtime)) {
|
|
902
925
|
return { nodeId, logicalId: node.logicalId, status: "awaiting-decision",
|
|
903
926
|
error: "The periodic resume source is no longer this seat's current resumable session. No session was started. Review its history or deliberately start this seat fresh." };
|
|
904
927
|
}
|
|
@@ -1131,6 +1154,7 @@ export class RestoreOrchestrator {
|
|
|
1131
1154
|
logicalId: node.logicalId,
|
|
1132
1155
|
status: selectedHistory && launchResult.code === "selection_changed_after_creation" ? "attention_required" : "failed",
|
|
1133
1156
|
error: launchResult.message,
|
|
1157
|
+
...(keptPane && NOTHING_STOPPED_LAUNCH_CODES.has(launchResult.code) ? { nothingStopped: true } : {}),
|
|
1134
1158
|
};
|
|
1135
1159
|
}
|
|
1136
1160
|
// Launch succeeded — do NOT compensate on post-launch failures
|
|
@@ -1139,8 +1163,9 @@ export class RestoreOrchestrator {
|
|
|
1139
1163
|
if (launchResult.warnings?.length) {
|
|
1140
1164
|
warnings?.push(...launchResult.warnings);
|
|
1141
1165
|
}
|
|
1142
|
-
const restored = await this.postLaunchRestore(entry, rigId, data, launchResult.sessionName, launchResult, { ...opts, ...(claudeExecutable ? { claudeExecutable } : {}) }, warnings, priorState, seatRehydration, resumeSession);
|
|
1166
|
+
const restored = await this.postLaunchRestore(entry, rigId, data, launchResult.sessionName, launchResult, { ...opts, ...(claudeExecutable ? { claudeExecutable } : {}) }, warnings, priorState, seatRehydration, resumeSession, activityHookGaps);
|
|
1143
1167
|
const checked = { ...this.checkRestoredGuidance(restored, entry.node, rigId, data, warnings),
|
|
1168
|
+
...(activityHookGaps.length > 0 ? { restoreGaps: activityHookGaps } : {}),
|
|
1144
1169
|
...(keptPane ? { launchStarted: true } : {}) };
|
|
1145
1170
|
return selectedHistory ? { ...checked, sourceSessionId: selectedHistory.historySessionId, resultSessionId: launchResult.session.id } : checked;
|
|
1146
1171
|
}
|
|
@@ -1162,6 +1187,85 @@ export class RestoreOrchestrator {
|
|
|
1162
1187
|
return undefined;
|
|
1163
1188
|
}
|
|
1164
1189
|
}
|
|
1190
|
+
/** #1530 — the saved startup context has no `claude_activity_hooks` entry.
|
|
1191
|
+
* Re-apply the CURRENT selection as a marker when the current spec selects
|
|
1192
|
+
* it. A healed re-apply and an unknown selection are warnings only; a
|
|
1193
|
+
* restore gap is recorded only when a known-selected re-apply was skipped,
|
|
1194
|
+
* failed, or threw. The marker is presence-only: the adapter reconciles
|
|
1195
|
+
* hooks off the entry's existence and reads none of its paths, so no
|
|
1196
|
+
* install path is fabricated and the saved context is never rewritten.
|
|
1197
|
+
* Unknown selections are warned about, never guessed at. Never blocks
|
|
1198
|
+
* the resume. Only absolute `path:` agent refs resolve here; `local:` and
|
|
1199
|
+
* `builtin:` refs resolve to unknown (warn, no gap) because no
|
|
1200
|
+
* authoritative launch root is retained at restore time. A known selection
|
|
1201
|
+
* with no Claude runtime adapter is a gap: the hooks were skipped, not
|
|
1202
|
+
* re-applied, and the skip must be reported rather than silent. */
|
|
1203
|
+
async restoreCurrentActivityHooks(node, activityAdapter, launchResult, warnings, activityHookGaps,
|
|
1204
|
+
// The directory the seat was launched in (snapshot cwd, else live node
|
|
1205
|
+
// cwd, else "." — resolved by the caller, which owns the live lookup).
|
|
1206
|
+
launchCwd) {
|
|
1207
|
+
let desired;
|
|
1208
|
+
try {
|
|
1209
|
+
desired = this.getDesiredClaudeActivityHooks
|
|
1210
|
+
? this.getDesiredClaudeActivityHooks(node.id)
|
|
1211
|
+
: { status: "unknown", evidence: "Current desired selection metadata is unavailable" };
|
|
1212
|
+
}
|
|
1213
|
+
catch (err) {
|
|
1214
|
+
desired = { status: "unknown", evidence: `Current desired selection metadata could not be read: ${err.message}` };
|
|
1215
|
+
}
|
|
1216
|
+
if (desired.status === "unknown") {
|
|
1217
|
+
const detail = `the current Claude activity-hook selection could not be determined (${desired.evidence}); no hooks were re-applied.`;
|
|
1218
|
+
warnings?.push(`Restore activity hooks: ${node.logicalId}: ${detail}`);
|
|
1219
|
+
// Unknown is a warning only: nothing is known to be missing, so it
|
|
1220
|
+
// must not downgrade the rig to partially_restored.
|
|
1221
|
+
return;
|
|
1222
|
+
}
|
|
1223
|
+
if (!desired.selected)
|
|
1224
|
+
return;
|
|
1225
|
+
if (!activityAdapter) {
|
|
1226
|
+
// The selection was resolved before requiring the adapter: a known
|
|
1227
|
+
// selection with no adapter to project it is a skipped re-apply.
|
|
1228
|
+
const gap = `claude_activity_hooks: the current selection could not be re-applied: no Claude runtime adapter was available.`;
|
|
1229
|
+
warnings?.push(`Restore activity hooks: ${node.logicalId}: the current selection could not be re-applied: no Claude runtime adapter was available.`);
|
|
1230
|
+
activityHookGaps?.push(gap);
|
|
1231
|
+
return;
|
|
1232
|
+
}
|
|
1233
|
+
// Marker-only entry, reconstructed from the current selection: the
|
|
1234
|
+
// adapter ignores every path field for this resource type.
|
|
1235
|
+
const marker = {
|
|
1236
|
+
category: "runtime_resource", resourceType: "claude_activity_hooks", effectiveId: "claude_activity_hooks",
|
|
1237
|
+
sourceSpec: "current-selection", sourcePath: "", resourcePath: "", absolutePath: "",
|
|
1238
|
+
classification: "safe_projection",
|
|
1239
|
+
};
|
|
1240
|
+
try {
|
|
1241
|
+
const result = await activityAdapter.project({
|
|
1242
|
+
runtime: "claude-code", cwd: launchCwd, entries: [marker],
|
|
1243
|
+
startup: { files: [], actions: [] }, conflicts: [], noOps: [], diagnostics: [],
|
|
1244
|
+
}, { ...launchResult.binding, cwd: launchCwd });
|
|
1245
|
+
warnings?.push(...(result.warnings ?? []));
|
|
1246
|
+
if (result.projected.includes(marker.effectiveId)) {
|
|
1247
|
+
const detail = "saved startup context had no Claude activity-hook selection; the current seat specification selects it, so the current marker was re-applied without replaying startup content.";
|
|
1248
|
+
warnings?.push(`Restore activity hooks: ${detail}`);
|
|
1249
|
+
// A healed re-apply is a warning only: the agent now has its hooks,
|
|
1250
|
+
// so it must not downgrade the rig to partially_restored. A restore
|
|
1251
|
+
// gap is recorded only when the re-apply was skipped, failed, or threw.
|
|
1252
|
+
return;
|
|
1253
|
+
}
|
|
1254
|
+
const detail = [
|
|
1255
|
+
...result.skipped.map((skipped) => `skipped ${skipped}`),
|
|
1256
|
+
...result.failed.map((failure) => failure.error),
|
|
1257
|
+
].join("; ") || "the projection was not reported";
|
|
1258
|
+
const gap = `claude_activity_hooks: the current selection could not be re-applied: ${detail}.`;
|
|
1259
|
+
warnings?.push(`Restore activity hooks: the current selection could not be re-applied: ${detail}.`);
|
|
1260
|
+
activityHookGaps?.push(gap);
|
|
1261
|
+
}
|
|
1262
|
+
catch (error) {
|
|
1263
|
+
// Activity delivery remains best-effort, as on an ordinary fresh launch.
|
|
1264
|
+
const gap = `claude_activity_hooks: the current selection could not be re-applied: ${error.message}.`;
|
|
1265
|
+
warnings?.push(`Restore activity hooks: the current selection could not be re-applied: ${error.message}.`);
|
|
1266
|
+
activityHookGaps?.push(gap);
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1165
1269
|
/** A seat that came back running should also have its role, culture and SOP guidance. If its
|
|
1166
1270
|
* guidance file still lacks a managed block it should hold, the seat keeps its true status (a
|
|
1167
1271
|
* live resumed session is still running) and the gap is disclosed on the node and in the
|
|
@@ -1175,13 +1279,29 @@ export class RestoreOrchestrator {
|
|
|
1175
1279
|
return false;
|
|
1176
1280
|
}
|
|
1177
1281
|
}
|
|
1282
|
+
/** The recorded guidance file follows the snapshot a seat was exactly resumed from (#2432); nothing else in its saved
|
|
1283
|
+
* startup selection changes. A database from before the column has nothing to record. */
|
|
1284
|
+
recordRestoredGuidanceFile(nodeId, file) {
|
|
1285
|
+
try {
|
|
1286
|
+
this.db.prepare("UPDATE node_startup_context SET guidance_file = ? WHERE node_id = ?").run(file, nodeId);
|
|
1287
|
+
}
|
|
1288
|
+
catch { /* no column */ }
|
|
1289
|
+
}
|
|
1178
1290
|
checkRestoredGuidance(result, node, rigId, data, warnings) {
|
|
1179
1291
|
// Every status with a live session; attention_required keeps its status and gains the disclosure.
|
|
1180
1292
|
if (!["resumed", "fresh-primed", "fresh", "rebuilt", "attention_required"].includes(result.status))
|
|
1181
1293
|
return result;
|
|
1182
1294
|
let guidance;
|
|
1183
1295
|
try {
|
|
1184
|
-
|
|
1296
|
+
// The seat was launched in the snapshot node's cwd when set, else the
|
|
1297
|
+
// live node's cwd — the same resolved launch directory the hook
|
|
1298
|
+
// projection and startup replay use. Passing node.cwd alone returns
|
|
1299
|
+
// no guidance at all when the snapshot node has no cwd. No "." fallback:
|
|
1300
|
+
// when neither cwd exists the old skip is kept, so no guidance file is
|
|
1301
|
+
// written into the daemon's own working directory.
|
|
1302
|
+
const guidanceCwd = node.cwd
|
|
1303
|
+
?? this.rigRepo.getRig(rigId)?.nodes.find(current => current.logicalId === node.logicalId)?.cwd;
|
|
1304
|
+
guidance = seatGuidance(data.nodeStartupContext?.[node.id] ?? null, guidanceCwd, this.rigRepo.getRigClaudeManagedBlockFile(rigId), existsSync, (path) => readFileSync(path, "utf-8"));
|
|
1185
1305
|
}
|
|
1186
1306
|
catch (err) {
|
|
1187
1307
|
warnings?.push(`Restore: ${node.logicalId}: could not check its guidance: ${err.message}`);
|
|
@@ -1191,6 +1311,10 @@ export class RestoreOrchestrator {
|
|
|
1191
1311
|
guidance = applySeatSkillsLineRule(guidance, this.routerLineAnsweredYes()).guidance;
|
|
1192
1312
|
if (!guidance || guidance.items.length === 0)
|
|
1193
1313
|
return result;
|
|
1314
|
+
// #2456: blocks the seat runs as they are although they differ from their source (edited by hand, or with no record of
|
|
1315
|
+
// OpenRig writing them), named on its result. They aren't gaps: the seat has guidance there.
|
|
1316
|
+
const notes = this.keptGuidanceNotes(guidance);
|
|
1317
|
+
const noted = notes.length > 0 ? { ...result, guidanceNotes: notes } : result;
|
|
1194
1318
|
let missing;
|
|
1195
1319
|
try {
|
|
1196
1320
|
missing = missingGuidanceBlocks(guidance, { exists: existsSync, readFile: (path) => readFileSync(path, "utf-8") });
|
|
@@ -1199,10 +1323,39 @@ export class RestoreOrchestrator {
|
|
|
1199
1323
|
missing = [`(could not read ${guidance.targetPath}: ${err.message})`];
|
|
1200
1324
|
}
|
|
1201
1325
|
if (missing.length === 0)
|
|
1202
|
-
return
|
|
1326
|
+
return noted;
|
|
1203
1327
|
const gap = `${node.logicalId} is running without part of its guidance: ${guidance.targetPath} lacks the OpenRig blocks ${missing.join(", ")}.`;
|
|
1204
1328
|
warnings?.push(`Restore: ${gap}`);
|
|
1205
|
-
return { ...
|
|
1329
|
+
return { ...noted, guidanceGaps: missing };
|
|
1330
|
+
}
|
|
1331
|
+
/** #2456: a note for each block in the seat's guidance file that differs from its source and isn't OpenRig's last write. */
|
|
1332
|
+
keptGuidanceNotes(guidance) {
|
|
1333
|
+
let content;
|
|
1334
|
+
try {
|
|
1335
|
+
content = existsSync(guidance.targetPath) ? readFileSync(guidance.targetPath, "utf-8") : "";
|
|
1336
|
+
}
|
|
1337
|
+
catch {
|
|
1338
|
+
return [];
|
|
1339
|
+
}
|
|
1340
|
+
if (!content)
|
|
1341
|
+
return [];
|
|
1342
|
+
const records = managedBlockRecords(this.db);
|
|
1343
|
+
const notes = [];
|
|
1344
|
+
for (const item of guidance.items) {
|
|
1345
|
+
if (item.unresolved)
|
|
1346
|
+
continue;
|
|
1347
|
+
let source;
|
|
1348
|
+
try {
|
|
1349
|
+
source = readFileSync(item.sourcePath, "utf-8");
|
|
1350
|
+
}
|
|
1351
|
+
catch {
|
|
1352
|
+
continue;
|
|
1353
|
+
}
|
|
1354
|
+
const { note } = decideManagedBlock(content, item.blockId, source, records, guidance.targetPath, { unrecorded: "keep", sourcePath: item.sourcePath });
|
|
1355
|
+
if (note)
|
|
1356
|
+
notes.push(note);
|
|
1357
|
+
}
|
|
1358
|
+
return notes;
|
|
1206
1359
|
}
|
|
1207
1360
|
/** OPR.0.3.4.2 (B) — roll a just-launched session back to ZERO sessions for
|
|
1208
1361
|
* the awaiting-decision outcome: remove a new blank terminal (preserving a
|
|
@@ -1251,15 +1404,35 @@ export class RestoreOrchestrator {
|
|
|
1251
1404
|
}
|
|
1252
1405
|
catch { /* best-effort */ }
|
|
1253
1406
|
}
|
|
1407
|
+
// The stop awaited. Clear only the binding this lease still holds: a seat another operation rebound meanwhile keeps
|
|
1408
|
+
// its binding. Then rebind the lease to the cleared seat, with no await between, so the fresh launch that follows
|
|
1409
|
+
// under this lease owns it.
|
|
1410
|
+
const guard = this.tmuxAdapter.deliveryGuard;
|
|
1411
|
+
let leased;
|
|
1412
|
+
try {
|
|
1413
|
+
leased = !!guard?.ownsLifecycle(nodeId);
|
|
1414
|
+
}
|
|
1415
|
+
catch (error) {
|
|
1416
|
+
return { ok: false, error: `could not retire provisional session: ${error.message}` };
|
|
1417
|
+
}
|
|
1254
1418
|
this.sessionRegistry.clearBinding(nodeId);
|
|
1419
|
+
if (leased)
|
|
1420
|
+
guard.rebindLifecycle(nodeId);
|
|
1255
1421
|
return { ok: true };
|
|
1256
1422
|
}
|
|
1257
1423
|
/** The one-seat command a restore reason names for a seat left awaiting a decision. */
|
|
1258
1424
|
freshSeatCommand(rigId, data, logicalId) {
|
|
1259
1425
|
return freshSeatLaunchCommand(logicalId, this.rigRepo.getRig(rigId)?.rig.name ?? data.rig.name);
|
|
1260
1426
|
}
|
|
1427
|
+
/** The stop a restore reason names first when the rollback kept the seat's pane, so its session is still there. */
|
|
1428
|
+
stopSeatCommand(rigId, data, logicalId) {
|
|
1429
|
+
return seatStopCommand(logicalId, this.rigRepo.getRig(rigId)?.rig.name ?? data.rig.name);
|
|
1430
|
+
}
|
|
1261
1431
|
/** Replay the preflight-selected source after launch, keeping native identity and startup checks. */
|
|
1262
|
-
async postLaunchRestore(entry, rigId, data, sessionName, launchResult, opts, warnings, priorState, seatRehydration, resumeSource
|
|
1432
|
+
async postLaunchRestore(entry, rigId, data, sessionName, launchResult, opts, warnings, priorState, seatRehydration, resumeSource,
|
|
1433
|
+
/** Collected out-of-band (this method has many return points): activity-hook
|
|
1434
|
+
* restore gaps the caller attaches to the node result as `restoreGaps`. */
|
|
1435
|
+
activityHookGaps) {
|
|
1263
1436
|
const node = entry.node;
|
|
1264
1437
|
// OPR.0.7.0.7: what this restore launches with when the seat has a saved effort choice is decided by the one
|
|
1265
1438
|
// precedence seam (latest wins), which also says so when the snapshot held another value.
|
|
@@ -1271,10 +1444,15 @@ export class RestoreOrchestrator {
|
|
|
1271
1444
|
const liveRow = this.db.prepare(selected
|
|
1272
1445
|
? "SELECT id FROM nodes WHERE id = ? AND rig_id = ? AND logical_id = ?"
|
|
1273
1446
|
: "SELECT id FROM nodes WHERE rig_id = ? AND logical_id = ?").get(...(selected ? [node.id, rigId, node.logicalId] : [rigId, node.logicalId]));
|
|
1274
|
-
const
|
|
1447
|
+
const live = readSeatEffort(this.db, liveRow?.id ?? node.id);
|
|
1448
|
+
// A provider switch's relaunch keeps the effort its seat was running with, unless the seat has an explicit choice
|
|
1449
|
+
// by now: read here, at launch, the latest choice wins. A kept effort isn't saved as the seat's choice.
|
|
1450
|
+
const kept = opts?.keepEffort && !live?.choice ? opts.keepEffort : undefined;
|
|
1451
|
+
const decided = kept ? { effort: kept } : effortPrecedence.restoreLaunchEffort({ snapshot: node, live });
|
|
1275
1452
|
if (decided.warning)
|
|
1276
1453
|
warnings?.push(`Restore: ${node.logicalId}: ${decided.warning}`);
|
|
1277
1454
|
restoreEffort = decided;
|
|
1455
|
+
opts?.onLaunchEffort?.({ effort: decided.effort, source: kept !== undefined ? "kept" : live?.choice ? "seat_choice" : "saved" });
|
|
1278
1456
|
}
|
|
1279
1457
|
return restoreEffort.effort;
|
|
1280
1458
|
};
|
|
@@ -1319,6 +1497,16 @@ export class RestoreOrchestrator {
|
|
|
1319
1497
|
// deliberately skips the resume attempt; its launch reports `fresh-primed`.
|
|
1320
1498
|
const liveRuntime = this.rigRepo.getRig(rigId)?.nodes.find(current => current.logicalId === node.logicalId
|
|
1321
1499
|
&& (!selected || current.id === node.id))?.runtime ?? node.runtime;
|
|
1500
|
+
// The seat was launched in the snapshot node's cwd when set; NodeLauncher
|
|
1501
|
+
// otherwise falls back to the live node's cwd, and to the daemon's working
|
|
1502
|
+
// directory when neither is set (tmux new-session without -c inherits it;
|
|
1503
|
+
// "." is the codebase-wide convention for that case). Projecting hooks
|
|
1504
|
+
// with the snapshot cwd alone would write another project's settings when
|
|
1505
|
+
// the live node moved the seat.
|
|
1506
|
+
const launchCwd = node.cwd
|
|
1507
|
+
?? this.rigRepo.getRig(rigId)?.nodes.find(current => current.logicalId === node.logicalId
|
|
1508
|
+
&& (!selected || current.id === node.id))?.cwd
|
|
1509
|
+
?? ".";
|
|
1322
1510
|
const restorePolicy = effectiveRestorePolicy(seatFacts(data, node.id, node.runtime, liveRuntime), session?.restorePolicy);
|
|
1323
1511
|
const noConversation = isOrdinaryTerminalSeat(seatFacts(data, node.id, node.runtime, liveRuntime));
|
|
1324
1512
|
// A terminal's restore is its shell and its saved startup: one whose startup failed wasn't restored whole.
|
|
@@ -1338,18 +1526,33 @@ export class RestoreOrchestrator {
|
|
|
1338
1526
|
// Restore only the saved activity selection before either native resume path.
|
|
1339
1527
|
// This also heals settings stripped by older restores. The entry is a marker:
|
|
1340
1528
|
// the adapter uses its current relay/manifest, not the old install's path.
|
|
1341
|
-
//
|
|
1529
|
+
// #1530: when the saved context has NO hooks entry, the seat may still
|
|
1530
|
+
// select them now — a context saved before the selection existed says
|
|
1531
|
+
// nothing about the current spec. In that case only, consult the current
|
|
1532
|
+
// selection (the restore-check reader, injected; unknown when absent) and
|
|
1533
|
+
// re-apply the CURRENT marker, marker-only: no profile-wide resolution,
|
|
1534
|
+
// no guidance, skills or startup replay, and the saved context is never
|
|
1535
|
+
// rewritten. A seat whose current spec does not select hooks stays silent.
|
|
1536
|
+
// The no-context fallback is scoped: it applies only to a legacy
|
|
1537
|
+
// (non-pod) agent whose live runtime still matches the snapshot's. A
|
|
1538
|
+
// runtime changed after the snapshot would otherwise read the snapshot's
|
|
1539
|
+
// runtime and write Claude hooks into another agent's working folder
|
|
1540
|
+
// (with a saved context, the compatibility gate already stops that
|
|
1541
|
+
// mismatch), and a pod-aware agent must get no write from this recovery
|
|
1542
|
+
// at all — it still ends at the "Harness not started" gate, unchanged.
|
|
1342
1543
|
const activityAdapter = opts?.adapters?.["claude-code"];
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1544
|
+
const recoveryRuntime = startupCtx?.runtime
|
|
1545
|
+
?? (!isPodAware && liveRuntime === node.runtime ? node.runtime : null);
|
|
1546
|
+
if (resumeRequested && resumeToken && launchResult && recoveryRuntime === "claude-code") {
|
|
1547
|
+
const entries = (startupCtx?.projectionEntries ?? []).filter(e => e.category === "runtime_resource" && e.resourceType === "claude_activity_hooks");
|
|
1548
|
+
if (entries.length > 0 && activityAdapter)
|
|
1346
1549
|
try {
|
|
1347
1550
|
const result = await activityAdapter.project({
|
|
1348
|
-
runtime: "claude-code", cwd:
|
|
1551
|
+
runtime: "claude-code", cwd: launchCwd,
|
|
1349
1552
|
entries: entries.map(e => ({ ...e, category: "runtime_resource", classification: "safe_projection",
|
|
1350
1553
|
mergeStrategy: e.mergeStrategy })),
|
|
1351
1554
|
startup: { files: [], actions: [] }, conflicts: [], noOps: [], diagnostics: [],
|
|
1352
|
-
}, { ...launchResult.binding, cwd:
|
|
1555
|
+
}, { ...launchResult.binding, cwd: launchCwd });
|
|
1353
1556
|
warnings?.push(...(result.warnings ?? []));
|
|
1354
1557
|
for (const skipped of result.skipped)
|
|
1355
1558
|
warnings?.push(`Restore activity hooks: skipped ${skipped}; saved hooks could not be reapplied.`);
|
|
@@ -1360,6 +1563,9 @@ export class RestoreOrchestrator {
|
|
|
1360
1563
|
// Activity delivery remains best-effort, as on an ordinary fresh launch.
|
|
1361
1564
|
warnings?.push(`Restore activity hooks: ${error.message}`);
|
|
1362
1565
|
}
|
|
1566
|
+
else if (entries.length === 0) {
|
|
1567
|
+
await this.restoreCurrentActivityHooks(node, activityAdapter, launchResult, warnings, activityHookGaps, launchCwd);
|
|
1568
|
+
}
|
|
1363
1569
|
}
|
|
1364
1570
|
// A narrow exception to the replay containment below: before either native resume path
|
|
1365
1571
|
// starts the harness, put back only the MISSING managed guidance blocks from the saved
|
|
@@ -1369,7 +1575,13 @@ export class RestoreOrchestrator {
|
|
|
1369
1575
|
if (resumeRequested && resumeToken && launchResult) {
|
|
1370
1576
|
let guidance = null;
|
|
1371
1577
|
try {
|
|
1372
|
-
|
|
1578
|
+
// Same resolved directory as launchCwd, without its "." fallback:
|
|
1579
|
+
// when neither the snapshot nor the live node has a cwd, keep the
|
|
1580
|
+
// old skip instead of writing guidance into the daemon's folder.
|
|
1581
|
+
const guidanceCwd = node.cwd
|
|
1582
|
+
?? this.rigRepo.getRig(rigId)?.nodes.find(current => current.logicalId === node.logicalId
|
|
1583
|
+
&& (!selected || current.id === node.id))?.cwd;
|
|
1584
|
+
guidance = seatGuidance(startupCtx, guidanceCwd, this.rigRepo.getRigClaudeManagedBlockFile(rigId), existsSync, (path) => readFileSync(path, "utf-8"));
|
|
1373
1585
|
}
|
|
1374
1586
|
catch (err) {
|
|
1375
1587
|
// Guidance never blocks the exact resume; the post-launch check discloses the gap.
|
|
@@ -1381,16 +1593,34 @@ export class RestoreOrchestrator {
|
|
|
1381
1593
|
if (rule.excluded === "linked")
|
|
1382
1594
|
warnings?.push(`Restore guidance: ${node.logicalId}: the seat-skills line wasn't put back, because ${guidance.targetPath} is a link.`);
|
|
1383
1595
|
}
|
|
1596
|
+
// #2432: the record names the file this resumed seat uses, the snapshot's choice, which can be older than the
|
|
1597
|
+
// database's: an older snapshot restored exactly after a newer launch resumes on its repository file.
|
|
1598
|
+
if (startupCtx)
|
|
1599
|
+
this.recordRestoredGuidanceFile(node.id, startupCtx.guidanceFile ?? null);
|
|
1600
|
+
// #2432: a recorded file that became a link after its launch gets nothing put back through it; the check after the
|
|
1601
|
+
// launch reports the blocks it lacks.
|
|
1602
|
+
const linked = startupCtx?.guidanceFile && guidance ? guidanceFileSharedByLink(guidance.targetPath, lstatLinkInfo) : null;
|
|
1603
|
+
if (linked && guidance) {
|
|
1604
|
+
warnings?.push(`Restore guidance: ${node.logicalId}: ${linked} is now a link, so nothing was put back in ${guidance.targetPath}, which other sessions could read.`);
|
|
1605
|
+
guidance = null;
|
|
1606
|
+
}
|
|
1384
1607
|
if (guidance && guidance.items.length > 0) {
|
|
1608
|
+
// #2456: a block OpenRig wrote whose source changed since is refreshed too; an edited one, or one with no record, is
|
|
1609
|
+
// left as it is and named (the check after the launch carries the names onto the seat's result).
|
|
1385
1610
|
const repair = restoreMissingGuidance(guidance, {
|
|
1386
1611
|
exists: existsSync,
|
|
1387
1612
|
readFile: (path) => readFileSync(path, "utf-8"),
|
|
1388
1613
|
writeFile: (path, content) => writeFileSync(path, content, "utf-8"),
|
|
1389
1614
|
mkdirp: (path) => mkdirSync(path, { recursive: true }),
|
|
1390
|
-
});
|
|
1615
|
+
}, managedBlockRecords(this.db));
|
|
1391
1616
|
if (repair.restored.length > 0) {
|
|
1392
1617
|
warnings?.push(`Restore guidance: ${node.logicalId}: put back missing blocks ${repair.restored.join(", ")} in ${guidance.targetPath} from their current source files.`);
|
|
1393
1618
|
}
|
|
1619
|
+
if (repair.refreshed.length > 0) {
|
|
1620
|
+
warnings?.push(`Restore guidance: ${node.logicalId}: refreshed blocks ${repair.refreshed.join(", ")} in ${guidance.targetPath} from their current source files.`);
|
|
1621
|
+
}
|
|
1622
|
+
for (const kept of repair.kept)
|
|
1623
|
+
warnings?.push(`Restore guidance: ${node.logicalId}: ${kept}`);
|
|
1394
1624
|
for (const gap of repair.gaps)
|
|
1395
1625
|
warnings?.push(`Restore guidance: ${node.logicalId}: ${gap}`);
|
|
1396
1626
|
}
|
|
@@ -1417,7 +1647,7 @@ export class RestoreOrchestrator {
|
|
|
1417
1647
|
}
|
|
1418
1648
|
if (selected && !selected.beforeNative(launchedSessionId, launchResult?.binding.id))
|
|
1419
1649
|
return { nodeId: node.id, logicalId: node.logicalId, status: "attention_required", error: "The selected seat, settings or history changed after shell creation; native resume was not dispatched." };
|
|
1420
|
-
const resumeOutcome = await this.attemptResume(node.id, sessionName, resumeType, resumeToken,
|
|
1650
|
+
const resumeOutcome = await this.attemptResume(node.id, sessionName, resumeType, resumeToken, launchCwd, this.liveCodexProfile(rigId, node, selected?.nodeId), modelForRestore(), this.resolveRestorePosture(node.id, rigId), effortForRestore(), warnings, node.advisor, selected ? () => selected.beforeNative(launchedSessionId, launchResult?.binding.id) : undefined, opts?.claudeExecutable);
|
|
1421
1651
|
if (resumeOutcome.kind === "resumed") {
|
|
1422
1652
|
baseStatus = "resumed";
|
|
1423
1653
|
if (launchedSessionId && this.claudeResume.canResume(resumeType, resumeToken)) {
|
|
@@ -1518,6 +1748,8 @@ export class RestoreOrchestrator {
|
|
|
1518
1748
|
const replayContained = resumeRequested && !!resumeToken;
|
|
1519
1749
|
const startupRuntime = startupCtx?.runtime ?? node.runtime ?? null;
|
|
1520
1750
|
const startupAdapter = seatAdapter(opts?.adapters, startupRuntime, session?.communityHarness);
|
|
1751
|
+
// New compute has no retained context filesystem. Restore the saved file selection, never conversation actions.
|
|
1752
|
+
const restoreEnvironmentContext = replayContained && !!startupAdapter?.environment && !!data.environmentBindingsByNode?.[node.id];
|
|
1521
1753
|
// A new pod-aware agent needs a startup context to run StartupOrchestrator.
|
|
1522
1754
|
// Do not report a healthy fresh-primed result when that context or adapter
|
|
1523
1755
|
// is missing; the pane would contain only a shell with no runtime process.
|
|
@@ -1584,9 +1816,9 @@ export class RestoreOrchestrator {
|
|
|
1584
1816
|
if (adapter) {
|
|
1585
1817
|
// Prefilter: check which files/entries still exist
|
|
1586
1818
|
const existsFn = opts.fsOps?.exists ?? (() => true);
|
|
1587
|
-
const sourceEntries = replayContained ? [] : startupCtx.projectionEntries.map((e) => reanchorShippedProjectionEntry(e, undefined, existsFn));
|
|
1819
|
+
const sourceEntries = replayContained && !restoreEnvironmentContext ? [] : startupCtx.projectionEntries.map((e) => reanchorShippedProjectionEntry(e, undefined, existsFn));
|
|
1588
1820
|
// #261: recognized built-in startup files follow the running install.
|
|
1589
|
-
const sourceFiles = replayContained ? [] : startupCtx.resolvedStartupFiles.map((f) => reanchorBuiltinStartupFile(f, undefined, undefined, existsFn));
|
|
1821
|
+
const sourceFiles = replayContained && !restoreEnvironmentContext ? [] : startupCtx.resolvedStartupFiles.map((f) => reanchorBuiltinStartupFile(f, undefined, undefined, existsFn));
|
|
1590
1822
|
const sourceActions = replayContained ? [] : startupCtx.startupActions;
|
|
1591
1823
|
const filteredEntries = sourceEntries.filter((e) => {
|
|
1592
1824
|
if (!existsFn(e.absolutePath)) {
|
|
@@ -1627,7 +1859,7 @@ export class RestoreOrchestrator {
|
|
|
1627
1859
|
// Build fresh projection plan (all safe_projection; replaySkip says which seat skills are left alone)
|
|
1628
1860
|
const plan = {
|
|
1629
1861
|
runtime: startupCtx.runtime,
|
|
1630
|
-
cwd:
|
|
1862
|
+
cwd: launchCwd,
|
|
1631
1863
|
entries: filteredEntries.map((e) => ({
|
|
1632
1864
|
...e,
|
|
1633
1865
|
classification: "safe_projection",
|
|
@@ -1641,8 +1873,11 @@ export class RestoreOrchestrator {
|
|
|
1641
1873
|
};
|
|
1642
1874
|
const binding = {
|
|
1643
1875
|
...launchResult.binding,
|
|
1876
|
+
// #875: the guidance file this seat's launch recorded; an older snapshot recorded none, so its file stays the rule's.
|
|
1877
|
+
guidanceFile: startupCtx.guidanceFile ?? null,
|
|
1878
|
+
...(data.environmentBindingsByNode?.[node.id] ? { environmentRestore: data.environmentBindingsByNode[node.id] } : {}),
|
|
1644
1879
|
...(opts?.claudeExecutable ? { claudeExecutable: opts.claudeExecutable } : {}),
|
|
1645
|
-
cwd:
|
|
1880
|
+
cwd: launchCwd,
|
|
1646
1881
|
codexConfigProfile: this.liveCodexProfile(rigId, node, selected?.nodeId) ?? undefined,
|
|
1647
1882
|
// OPR.0.4.8.3 Seam B: the pod-aware restore path binds the restored posture too
|
|
1648
1883
|
// (both restore paths consume persisted provenance — preflight surface 3).
|
|
@@ -1737,11 +1972,16 @@ export class RestoreOrchestrator {
|
|
|
1737
1972
|
if (startupResult.missingConversation) {
|
|
1738
1973
|
if (!await rollbackOwnBlank())
|
|
1739
1974
|
return changedDuringRollback();
|
|
1975
|
+
// The records can't tell a seat that was never used from one whose conversation is elsewhere (a moved
|
|
1976
|
+
// account or folder), so the seat waits for the person who knows, with the steps that start it fresh. A kept
|
|
1977
|
+
// pane leaves the seat's own tmux session at a shell, which the fresh launch won't replace until it's stopped.
|
|
1978
|
+
const fresh = this.freshSeatCommand(rigId, data, node.logicalId);
|
|
1979
|
+
const steps = opts?.keepPane ? `in two steps: ${this.stopSeatCommand(rigId, data, node.logicalId)}, then ${fresh}` : `in one step: ${fresh}`;
|
|
1740
1980
|
return {
|
|
1741
1981
|
nodeId: node.id,
|
|
1742
1982
|
logicalId: node.logicalId,
|
|
1743
1983
|
status: "awaiting-decision",
|
|
1744
|
-
error: `Original session unresumable: ${startupResult.errors.join("; ")}. The blank session was rolled back; no session is running.
|
|
1984
|
+
error: `Original session unresumable: ${startupResult.errors.join("; ")}. The blank session was rolled back; no session is running. OpenRig's records can't tell whether this conversation was ever used. If you know this seat was never used, nothing is lost by starting only this seat fresh, ${steps}. Otherwise restore the original session manually.`,
|
|
1745
1985
|
};
|
|
1746
1986
|
}
|
|
1747
1987
|
return {
|
|
@@ -1990,6 +2230,7 @@ export class RestoreOrchestrator {
|
|
|
1990
2230
|
let kernelAuthority = false;
|
|
1991
2231
|
let teamPermissionDefault = false;
|
|
1992
2232
|
let claudePermissions;
|
|
2233
|
+
let claudeMcp;
|
|
1993
2234
|
let codexPermissions;
|
|
1994
2235
|
let permissionMode;
|
|
1995
2236
|
try {
|
|
@@ -1999,6 +2240,7 @@ export class RestoreOrchestrator {
|
|
|
1999
2240
|
kernelAuthority = override.kernelAuthority === true;
|
|
2000
2241
|
teamPermissionDefault = override.teamPermissionDefault === true;
|
|
2001
2242
|
claudePermissions = override.claudePermissions;
|
|
2243
|
+
claudeMcp = runtime === "claude-code" ? readSeatClaudeMcp(this.db, nodeId) : undefined;
|
|
2002
2244
|
codexPermissions = override.codexPermissions;
|
|
2003
2245
|
resolvedPosture = override.launchPosture ?? resolvedPosture;
|
|
2004
2246
|
permissionMode = override.permissionMode ?? (resolvedPosture === "auto" && runtime === "claude-code" ? "auto" : undefined);
|
|
@@ -2024,9 +2266,10 @@ export class RestoreOrchestrator {
|
|
|
2024
2266
|
: launch.additions ? [...claudeTail, ...Array(5 - claudeTail.length).fill(undefined), launch.additions] : claudeTail;
|
|
2025
2267
|
const guardedTail = beforeNative || claudeExecutable ? [...tail, ...Array(Math.max(0, 7 - tail.length)).fill(undefined), beforeNative,
|
|
2026
2268
|
...(claudeExecutable ? [claudeExecutable] : [])] : tail;
|
|
2269
|
+
const mcpTail = claudeMcp === undefined ? guardedTail : [...guardedTail, ...Array(Math.max(0, 9 - guardedTail.length)).fill(undefined), claudeMcp];
|
|
2027
2270
|
if (beforeNative && !beforeNative())
|
|
2028
2271
|
return { kind: "attention_required", message: "The selected seat, settings or history changed during native preparation; resume was not dispatched." };
|
|
2029
|
-
const result = await this.claudeResume.resume(sessionName, resumeType, resumeToken, cwd, resolvedPosture, model, permissionMode, nodeId, ...
|
|
2272
|
+
const result = await this.claudeResume.resume(sessionName, resumeType, resumeToken, cwd, resolvedPosture, model, permissionMode, nodeId, ...mcpTail);
|
|
2030
2273
|
if (result.ok) {
|
|
2031
2274
|
// OPR.0.7.0.9: the resumed conversation's own start, as on the pod-aware path.
|
|
2032
2275
|
const promptNote = launch.additions?.appendSystemPromptFile && nodeId && resumeToken ? systemPromptPendingNoteForNode(this.db, nodeId, resumeToken) : undefined;
|