@openrig/cli 0.7.23 → 0.7.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/daemon/assets/claude-hook-bridge.cjs +575 -6
- package/daemon/assets/claude-hook-bridge.d.cts +5 -0
- package/daemon/assets/claude-permission-policies.cjs +4 -3
- package/daemon/assets/guidance/openrig-context-entry.md +1 -0
- package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +4 -3
- package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +3 -2
- package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/README.md +64 -9
- package/daemon/assets/plugins/openrig/hooks/claude.json +39 -0
- package/daemon/assets/plugins/openrig/hooks/codex.json +27 -0
- package/daemon/assets/plugins/openrig/hooks/scripts/claude-hook-bridge.cjs +715 -0
- package/daemon/assets/plugins/openrig/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/scripts/run-rig.cjs +30 -0
- package/daemon/assets/plugins/openrig/skills/working-with-an-openrig-team/SKILL.md +71 -9
- package/daemon/assets/plugins/openrig-codex/.agents/plugins/marketplace.json +15 -0
- package/daemon/assets/plugins/openrig-codex/.codex-plugin/plugin.json +42 -0
- package/daemon/assets/plugins/openrig-codex/LICENSE +200 -0
- package/daemon/assets/plugins/openrig-codex/assets/logo.svg +1 -0
- package/daemon/assets/plugins/openrig-codex/hooks/codex.json +27 -0
- package/daemon/assets/plugins/openrig-codex/hooks/scripts/claude-hook-bridge.cjs +715 -0
- package/daemon/assets/plugins/openrig-codex/skills/working-with-an-openrig-team/SKILL.md +175 -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/README.md +10 -2
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +9 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +37 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/compaction-restore-bridge.cjs +3 -1
- package/daemon/assets/plugins/openrig-core/hooks/scripts/permission-answer.cjs +270 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +24 -6
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +7 -8
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +45 -5
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +4 -2
- package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +163 -23
- package/daemon/assets/skills/rigs/SKILL.md +122 -21
- 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 +113 -12
- package/daemon/context-packs/reference/acp-agents.md +9 -2
- package/daemon/context-packs/reference/getting-started.md +31 -7
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +8 -0
- package/daemon/context-packs/reference/tmux-servers.md +16 -0
- package/daemon/context-packs/reference/whats-new.md +106 -12
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +7 -8
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +45 -5
- 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/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/SKILL.md +71 -9
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/SKILL.md +4 -2
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +163 -23
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts +10 -1
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +231 -33
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume-launch.d.ts +3 -0
- package/daemon/dist/adapters/claude-resume-launch.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume-launch.js +5 -0
- package/daemon/dist/adapters/claude-resume-launch.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +59 -21
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +22 -0
- package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/community-harness-runtime-adapter.js +53 -16
- package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-community-runtime-adapter.d.ts +9 -0
- package/daemon/dist/adapters/pi-community-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-community-runtime-adapter.js +6 -0
- package/daemon/dist/adapters/pi-community-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts +3 -0
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +9 -3
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +52 -9
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +102 -19
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/conversation-key-surface.d.ts +2 -0
- package/daemon/dist/conversation-key-surface.d.ts.map +1 -0
- package/daemon/dist/conversation-key-surface.js +5 -0
- package/daemon/dist/conversation-key-surface.js.map +1 -0
- package/daemon/dist/daemon-shutdown.d.ts +3 -0
- package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
- package/daemon/dist/daemon-shutdown.js +5 -0
- package/daemon/dist/daemon-shutdown.js.map +1 -1
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +8 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/179_community_harness_runtime_switches.d.ts +14 -0
- package/daemon/dist/db/migrations/179_community_harness_runtime_switches.d.ts.map +1 -0
- package/daemon/dist/db/migrations/179_community_harness_runtime_switches.js +54 -0
- package/daemon/dist/db/migrations/179_community_harness_runtime_switches.js.map +1 -0
- package/daemon/dist/db/migrations/195_workflow_start_operations.d.ts +4 -0
- package/daemon/dist/db/migrations/195_workflow_start_operations.d.ts.map +1 -0
- package/daemon/dist/db/migrations/195_workflow_start_operations.js +13 -0
- package/daemon/dist/db/migrations/195_workflow_start_operations.js.map +1 -0
- package/daemon/dist/db/migrations/196_queue_item_evidence_ref_roots.d.ts +5 -0
- package/daemon/dist/db/migrations/196_queue_item_evidence_ref_roots.d.ts.map +1 -0
- package/daemon/dist/db/migrations/196_queue_item_evidence_ref_roots.js +7 -0
- package/daemon/dist/db/migrations/196_queue_item_evidence_ref_roots.js.map +1 -0
- package/daemon/dist/db/migrations/199_queue_items_native_permission_index.d.ts +9 -0
- package/daemon/dist/db/migrations/199_queue_items_native_permission_index.d.ts.map +1 -0
- package/daemon/dist/db/migrations/199_queue_items_native_permission_index.js +14 -0
- package/daemon/dist/db/migrations/199_queue_items_native_permission_index.js.map +1 -0
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +8 -0
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/background-process-evidence.d.ts +23 -0
- package/daemon/dist/domain/background-process-evidence.d.ts.map +1 -0
- package/daemon/dist/domain/background-process-evidence.js +81 -0
- package/daemon/dist/domain/background-process-evidence.js.map +1 -0
- package/daemon/dist/domain/chat-repository.d.ts +1 -1
- package/daemon/dist/domain/chat-repository.d.ts.map +1 -1
- package/daemon/dist/domain/chat-repository.js +2 -2
- package/daemon/dist/domain/chat-repository.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +16 -6
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +13 -8
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/codex-member-permissions.d.ts +35 -0
- package/daemon/dist/domain/codex-member-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/codex-member-permissions.js +106 -1
- package/daemon/dist/domain/codex-member-permissions.js.map +1 -1
- package/daemon/dist/domain/community-harness-presets.d.ts +9 -0
- package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
- package/daemon/dist/domain/community-harness-presets.js +25 -1
- package/daemon/dist/domain/community-harness-presets.js.map +1 -1
- package/daemon/dist/domain/current-work.d.ts +31 -4
- package/daemon/dist/domain/current-work.d.ts.map +1 -1
- package/daemon/dist/domain/current-work.js +48 -3
- package/daemon/dist/domain/current-work.js.map +1 -1
- package/daemon/dist/domain/feed/attention-aggregator.d.ts +5 -5
- package/daemon/dist/domain/feed/attention-aggregator.d.ts.map +1 -1
- package/daemon/dist/domain/feed/attention-aggregator.js +10 -4
- package/daemon/dist/domain/feed/attention-aggregator.js.map +1 -1
- package/daemon/dist/domain/files/path-safety.d.ts +7 -0
- package/daemon/dist/domain/files/path-safety.d.ts.map +1 -1
- package/daemon/dist/domain/files/path-safety.js +23 -0
- package/daemon/dist/domain/files/path-safety.js.map +1 -1
- package/daemon/dist/domain/frontmatter.d.ts.map +1 -1
- package/daemon/dist/domain/frontmatter.js +4 -2
- package/daemon/dist/domain/frontmatter.js.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.d.ts +3 -0
- package/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/destination-resolver.js +9 -0
- package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
- package/daemon/dist/domain/gateway/human-quiet-windows.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-quiet-windows.js +2 -1
- package/daemon/dist/domain/gateway/human-quiet-windows.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts +6 -1
- package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/inbound.js +4 -1
- package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.d.ts +3 -0
- package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/message.js +3 -2
- package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts +4 -0
- package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/outbound-driver.js +1 -0
- package/daemon/dist/domain/gateway/slack/outbound-driver.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts +2 -0
- package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/queue-access.js +1 -0
- package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +10 -2
- package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-delivery.js +60 -6
- package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +3 -13
- package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js +70 -22
- package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
- package/daemon/dist/domain/health-detectors.d.ts +4 -0
- package/daemon/dist/domain/health-detectors.d.ts.map +1 -1
- package/daemon/dist/domain/health-detectors.js +4 -1
- package/daemon/dist/domain/health-detectors.js.map +1 -1
- package/daemon/dist/domain/health-diagnosis.d.ts.map +1 -1
- package/daemon/dist/domain/health-diagnosis.js +14 -9
- package/daemon/dist/domain/health-diagnosis.js.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.d.ts +2 -0
- package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
- package/daemon/dist/domain/health-passive-ceremony.js +71 -13
- package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
- package/daemon/dist/domain/history-query.d.ts +1 -1
- package/daemon/dist/domain/history-query.d.ts.map +1 -1
- package/daemon/dist/domain/history-query.js +1 -2
- package/daemon/dist/domain/history-query.js.map +1 -1
- package/daemon/dist/domain/hosts/read-through.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/read-through.js +6 -0
- package/daemon/dist/domain/hosts/read-through.js.map +1 -1
- package/daemon/dist/domain/managed-restore-read-access.d.ts +18 -0
- package/daemon/dist/domain/managed-restore-read-access.d.ts.map +1 -1
- package/daemon/dist/domain/managed-restore-read-access.js +41 -1
- package/daemon/dist/domain/managed-restore-read-access.js.map +1 -1
- package/daemon/dist/domain/mission-control/audit-browse.d.ts +1 -1
- package/daemon/dist/domain/mission-control/audit-browse.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/audit-browse.js +3 -6
- package/daemon/dist/domain/mission-control/audit-browse.js.map +1 -1
- 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 +21 -4
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +22 -0
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +30 -0
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/network/network-requests.d.ts +3 -2
- package/daemon/dist/domain/network/network-requests.d.ts.map +1 -1
- package/daemon/dist/domain/network/network-requests.js +34 -8
- package/daemon/dist/domain/network/network-requests.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +2 -2
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +9 -7
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/pane-cutover.d.ts +36 -9
- package/daemon/dist/domain/pane-cutover.d.ts.map +1 -1
- package/daemon/dist/domain/pane-cutover.js +82 -13
- package/daemon/dist/domain/pane-cutover.js.map +1 -1
- package/daemon/dist/domain/projection-planner.d.ts +17 -3
- package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
- package/daemon/dist/domain/projection-planner.js +9 -1
- package/daemon/dist/domain/projection-planner.js.map +1 -1
- package/daemon/dist/domain/queue-destination-check.d.ts +8 -0
- package/daemon/dist/domain/queue-destination-check.d.ts.map +1 -1
- package/daemon/dist/domain/queue-destination-check.js +17 -4
- package/daemon/dist/domain/queue-destination-check.js.map +1 -1
- package/daemon/dist/domain/queue-erasure.js +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +20 -1
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +93 -14
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +23 -3
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +618 -13
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-transfer-export.d.ts +1 -1
- package/daemon/dist/domain/queue-transfer-export.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transfer-export.js +3 -1
- package/daemon/dist/domain/queue-transfer-export.js.map +1 -1
- package/daemon/dist/domain/queue-transition-log.d.ts +6 -0
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
- package/daemon/dist/domain/queue-transition-log.js +1 -1
- package/daemon/dist/domain/queue-transition-log.js.map +1 -1
- package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
- package/daemon/dist/domain/queue-waiting.js +7 -0
- package/daemon/dist/domain/queue-waiting.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +20 -4
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.d.ts +8 -0
- package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.js +61 -9
- package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +5 -2
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +3 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +42 -0
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/return-route.d.ts +13 -2
- package/daemon/dist/domain/return-route.d.ts.map +1 -1
- package/daemon/dist/domain/return-route.js +30 -1
- package/daemon/dist/domain/return-route.js.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.d.ts +1 -0
- package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.js +23 -2
- package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/rig-mode/operating-posture.d.ts.map +1 -1
- package/daemon/dist/domain/rig-mode/operating-posture.js +23 -4
- package/daemon/dist/domain/rig-mode/operating-posture.js.map +1 -1
- package/daemon/dist/domain/rig-teardown.d.ts +30 -2
- package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
- package/daemon/dist/domain/rig-teardown.js +76 -8
- package/daemon/dist/domain/rig-teardown.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +11 -9
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +100 -43
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +26 -3
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/roster-ready-notice.d.ts +11 -0
- package/daemon/dist/domain/roster-ready-notice.d.ts.map +1 -0
- package/daemon/dist/domain/roster-ready-notice.js +35 -0
- package/daemon/dist/domain/roster-ready-notice.js.map +1 -0
- package/daemon/dist/domain/runner-permissions.d.ts +140 -5
- package/daemon/dist/domain/runner-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/runner-permissions.js +593 -16
- package/daemon/dist/domain/runner-permissions.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +3 -1
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-exit.d.ts +79 -0
- package/daemon/dist/domain/runtime-exit.d.ts.map +1 -0
- package/daemon/dist/domain/runtime-exit.js +301 -0
- package/daemon/dist/domain/runtime-exit.js.map +1 -0
- package/daemon/dist/domain/runtime-switch-materials.d.ts +4 -1
- package/daemon/dist/domain/runtime-switch-materials.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-switch-materials.js +66 -13
- package/daemon/dist/domain/runtime-switch-materials.js.map +1 -1
- package/daemon/dist/domain/scope/attestation-lineage.generated.js +2 -2
- package/daemon/dist/domain/scope/attestation-lineage.generated.js.map +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -1
- package/daemon/dist/domain/scope/logical-checkbox.js +18 -0
- package/daemon/dist/domain/scope/logical-checkbox.js.map +1 -1
- package/daemon/dist/domain/scope/scaffold-placeholder.js +2 -2
- package/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +5 -2
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +5 -2
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +30 -6
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts +18 -0
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +155 -6
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.d.ts +6 -0
- package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
- package/daemon/dist/domain/seat-launch-environment.js +28 -4
- package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +37 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +44 -8
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-pool-executor.d.ts +61 -3
- package/daemon/dist/domain/seat-pool-executor.d.ts.map +1 -1
- package/daemon/dist/domain/seat-pool-executor.js +735 -59
- package/daemon/dist/domain/seat-pool-executor.js.map +1 -1
- package/daemon/dist/domain/seat-pool-slots.d.ts +24 -0
- package/daemon/dist/domain/seat-pool-slots.d.ts.map +1 -1
- package/daemon/dist/domain/seat-pool-slots.js +50 -0
- package/daemon/dist/domain/seat-pool-slots.js.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts +2 -1
- package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-runtime-switch-service.js +68 -20
- package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +9 -2
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
- package/daemon/dist/domain/skill-catalog.js +24 -10
- package/daemon/dist/domain/skill-catalog.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +5 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +43 -7
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.d.ts +1 -0
- package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
- package/daemon/dist/domain/startup-submission-evidence.js +5 -0
- package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
- package/daemon/dist/domain/stream-reader-actions.d.ts +23 -0
- package/daemon/dist/domain/stream-reader-actions.d.ts.map +1 -1
- package/daemon/dist/domain/stream-reader-actions.js +43 -0
- package/daemon/dist/domain/stream-reader-actions.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +24 -3
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +54 -23
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/terminal/earlier-tile-attach-0723.d.ts +2 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach-0723.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach-0723.js +48 -0
- package/daemon/dist/domain/terminal/earlier-tile-attach-0723.js.map +1 -0
- package/daemon/dist/domain/terminal/rex-agent-status.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/rex-agent-status.js +5 -2
- package/daemon/dist/domain/terminal/rex-agent-status.js.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.d.ts +11 -5
- package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/tile-attach.js +32 -12
- package/daemon/dist/domain/terminal/tile-attach.js.map +1 -1
- package/daemon/dist/domain/transcript-redaction.d.ts +10 -8
- package/daemon/dist/domain/transcript-redaction.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-redaction.js +51 -22
- package/daemon/dist/domain/transcript-redaction.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +7 -1
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js +3 -0
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/whoami-service.d.ts +11 -0
- package/daemon/dist/domain/whoami-service.d.ts.map +1 -1
- package/daemon/dist/domain/whoami-service.js +13 -0
- package/daemon/dist/domain/whoami-service.js.map +1 -1
- package/daemon/dist/domain/workflow-reconciliation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-reconciliation.js +9 -0
- package/daemon/dist/domain/workflow-reconciliation.js.map +1 -1
- package/daemon/dist/domain/workflow-runtime.d.ts +2 -0
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-runtime.js +45 -2
- package/daemon/dist/domain/workflow-runtime.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +59 -2
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/compaction.d.ts.map +1 -1
- package/daemon/dist/routes/compaction.js +26 -9
- package/daemon/dist/routes/compaction.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +64 -25
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/require-sender-identity.d.ts +15 -0
- package/daemon/dist/routes/require-sender-identity.d.ts.map +1 -1
- package/daemon/dist/routes/require-sender-identity.js +51 -5
- package/daemon/dist/routes/require-sender-identity.js.map +1 -1
- package/daemon/dist/routes/seat.js +6 -0
- package/daemon/dist/routes/seat.js.map +1 -1
- package/daemon/dist/routes/stream.d.ts.map +1 -1
- package/daemon/dist/routes/stream.js +28 -1
- package/daemon/dist/routes/stream.js.map +1 -1
- package/daemon/dist/routes/workflow.d.ts.map +1 -1
- package/daemon/dist/routes/workflow.js +48 -41
- package/daemon/dist/routes/workflow.js.map +1 -1
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +17 -1
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +34 -6
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/transcript-redaction-surface.d.ts +2 -0
- package/daemon/dist/transcript-redaction-surface.d.ts.map +1 -0
- package/daemon/dist/transcript-redaction-surface.js +2 -0
- package/daemon/dist/transcript-redaction-surface.js.map +1 -0
- package/daemon/docs/reference/acp-agents.md +9 -2
- package/daemon/docs/reference/agent-spec.md +22 -1
- package/daemon/docs/reference/agent-startup-guide.md +10 -0
- package/daemon/docs/reference/community-harness-examples/cursor/cursor.yaml +3 -1
- package/daemon/docs/reference/community-harness-presets.md +27 -2
- package/daemon/docs/reference/daemon-http-clients.md +57 -0
- package/daemon/docs/reference/developing.md +3 -2
- package/daemon/docs/reference/getting-started.md +31 -7
- package/daemon/docs/reference/harness-runner-contract.md +72 -0
- package/daemon/docs/reference/hosted-members.md +21 -2
- package/daemon/docs/reference/network-connector.md +32 -3
- package/daemon/docs/reference/quickstart.md +4 -4
- package/daemon/docs/reference/refocus-channel.md +48 -0
- package/daemon/docs/reference/rig-bundle.md +11 -1
- package/daemon/docs/reference/rig-spec.md +8 -0
- package/daemon/docs/reference/seat-node-targeting.md +10 -0
- package/daemon/docs/reference/seat-pools.md +76 -10
- package/daemon/docs/reference/slack-app-setup.md +15 -0
- package/daemon/docs/reference/terminal-sessions.md +71 -3
- package/daemon/docs/reference/tmux-servers.md +16 -0
- package/daemon/docs/reference/whats-new.md +106 -12
- package/daemon/specs/agents/shared/skills/core/working-with-an-openrig-team/SKILL.md +71 -9
- package/daemon/specs/rigs/launch/factory/guidance/lead-first-move.md +4 -1
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +2 -1
- package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +4 -1
- package/dist/bin-wrapper.d.ts.map +1 -1
- package/dist/bin-wrapper.js +24 -5
- package/dist/bin-wrapper.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/client.d.ts +4 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +7 -1
- package/dist/client.js.map +1 -1
- package/dist/commands/add.js +1 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/agent.js +1 -1
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/bundle.d.ts.map +1 -1
- package/dist/commands/bundle.js +18 -4
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +6 -2
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +12 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/expand.js +1 -1
- package/dist/commands/expand.js.map +1 -1
- package/dist/commands/fork.js +1 -1
- package/dist/commands/fork.js.map +1 -1
- package/dist/commands/grow.d.ts.map +1 -1
- package/dist/commands/grow.js +9 -4
- package/dist/commands/grow.js.map +1 -1
- package/dist/commands/import.js +1 -1
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +57 -22
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/network.d.ts +2 -3
- package/dist/commands/network.d.ts.map +1 -1
- package/dist/commands/network.js +54 -9
- package/dist/commands/network.js.map +1 -1
- package/dist/commands/ps.d.ts +1 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +22 -19
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +2 -0
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +29 -6
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/reconcile-session.js +1 -1
- package/dist/commands/reconcile-session.js.map +1 -1
- package/dist/commands/restore.js +1 -1
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/rig.js +2 -2
- package/dist/commands/rig.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +55 -16
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/skill.js +1 -1
- package/dist/commands/skill.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +3 -2
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +20 -4
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +2 -1
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +6 -0
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflow-follow.d.ts.map +1 -1
- package/dist/commands/workflow-follow.js +37 -34
- package/dist/commands/workflow-follow.js.map +1 -1
- package/dist/commands/workflow-render.d.ts +1 -1
- package/dist/commands/workflow-render.d.ts.map +1 -1
- package/dist/commands/workflow-render.js +2 -7
- package/dist/commands/workflow-render.js.map +1 -1
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +22 -2
- package/dist/commands/workflow.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +24 -0
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +45 -8
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/lib/bundle-source.d.ts +4 -0
- package/dist/lib/bundle-source.d.ts.map +1 -1
- package/dist/lib/bundle-source.js +14 -2
- package/dist/lib/bundle-source.js.map +1 -1
- package/dist/lib/context-git.js +2 -2
- package/dist/lib/context-git.js.map +1 -1
- package/dist/lib/frontmatter.d.ts.map +1 -1
- package/dist/lib/frontmatter.js +4 -2
- package/dist/lib/frontmatter.js.map +1 -1
- package/dist/lib/scope/attestation-lineage.js +2 -2
- package/dist/lib/scope/attestation-lineage.js.map +1 -1
- package/dist/lib/scope/logical-checkbox.d.ts.map +1 -1
- package/dist/lib/scope/logical-checkbox.js +18 -0
- package/dist/lib/scope/logical-checkbox.js.map +1 -1
- package/dist/lib/scope/progress-edit.js +1 -1
- package/dist/lib/scope/progress-edit.js.map +1 -1
- package/dist/lib/scope/scaffold-placeholder.js +2 -2
- package/dist/lib/scope/scaffold-placeholder.js.map +1 -1
- package/dist/lib/terminal-cell.d.ts +5 -0
- package/dist/lib/terminal-cell.d.ts.map +1 -0
- package/dist/lib/terminal-cell.js +22 -0
- package/dist/lib/terminal-cell.js.map +1 -0
- package/dist/mcp-http.d.ts +1 -1
- package/dist/mcp-http.d.ts.map +1 -1
- package/dist/mcp-http.js +6 -3
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-server.d.ts +5 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +111 -13
- package/dist/mcp-server.js.map +1 -1
- package/dist/release-surface/extract-surface.d.ts.map +1 -1
- package/dist/release-surface/extract-surface.js +38 -20
- package/dist/release-surface/extract-surface.js.map +1 -1
- package/dist/release-surface/generate.d.ts.map +1 -1
- package/dist/release-surface/generate.js +3 -0
- package/dist/release-surface/generate.js.map +1 -1
- package/dist/release-surface/surface-diff.d.ts +1 -0
- package/dist/release-surface/surface-diff.d.ts.map +1 -1
- package/dist/release-surface/surface-diff.js +19 -18
- package/dist/release-surface/surface-diff.js.map +1 -1
- package/dist/restore-packet/redaction.d.ts +4 -26
- package/dist/restore-packet/redaction.d.ts.map +1 -1
- package/dist/restore-packet/redaction.js +19 -63
- package/dist/restore-packet/redaction.js.map +1 -1
- package/dist/terminal-orca.d.ts +7 -0
- package/dist/terminal-orca.d.ts.map +1 -0
- package/dist/terminal-orca.js +239 -0
- package/dist/terminal-orca.js.map +1 -0
- package/package.json +1 -1
- package/tui/dist/connected-assistants.d.ts +1 -1
- package/tui/dist/connected-assistants.d.ts.map +1 -1
- package/tui/dist/connected-assistants.js +3 -1
- package/tui/dist/connected-assistants.js.map +1 -1
- package/tui/dist/daemon-client.d.ts +4 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +12 -8
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/health/health-model.d.ts.map +1 -1
- package/tui/dist/health/health-model.js +2 -0
- package/tui/dist/health/health-model.js.map +1 -1
- package/tui/dist/hydrate.d.ts +3 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +40 -25
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/live.d.ts +5 -1
- package/tui/dist/live.d.ts.map +1 -1
- package/tui/dist/live.js +20 -2
- package/tui/dist/live.js.map +1 -1
- package/tui/dist/main.js +5 -2
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/pulse/pulse-model.d.ts.map +1 -1
- package/tui/dist/pulse/pulse-model.js +3 -2
- package/tui/dist/pulse/pulse-model.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +6 -5
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/types.d.ts +10 -4
- package/tui/dist/types.d.ts.map +1 -1
- package/ui/dist/assets/index-Chh-NS8Z.css +32 -0
- package/ui/dist/assets/index-DG_7XFcL.js +628 -0
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-B-sMy02c.js +0 -623
- package/ui/dist/assets/index-DiN7RwWg.css +0 -32
|
@@ -1,27 +1,54 @@
|
|
|
1
|
-
import type { TmuxAdapter } from "../adapters/tmux.js";
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { PaneTerminal, TmuxAdapter } from "../adapters/tmux.js";
|
|
2
|
+
import type { NativeProcessLister } from "./native-process-lineage.js";
|
|
3
|
+
import { type RuntimeExitTmux } from "./runtime-exit.js";
|
|
4
|
+
/** The tmux operations an in-place cutover needs: hold the pane, signal its root process, watch it die. With the runtime
|
|
5
|
+
* exit's operations too (the real adapter has them), a Claude Code or Codex occupant exits through its own shutdown first. */
|
|
6
|
+
export type PaneCutoverTmux = Pick<TmuxAdapter, "setRemainOnExit" | "signalPaneProcess" | "isPaneDead"> & Partial<RuntimeExitTmux>;
|
|
4
7
|
export interface PaneCutoverTiming {
|
|
5
8
|
pollMs: number;
|
|
6
9
|
/** Bounded wait for each phase (TERM, then KILL). */
|
|
7
10
|
timeoutMs: number;
|
|
8
11
|
sleep: (ms: number) => Promise<void>;
|
|
9
12
|
}
|
|
13
|
+
/** `path` is how the occupant ended: `graceful` when it exited through its own shutdown (or no agent was left running),
|
|
14
|
+
* `forced` when a signal it doesn't handle, or KILL after the window, ended it, or when the pane was stopped without its
|
|
15
|
+
* own exit being verified. `detail` says which, in a sentence. A failure's `code` is `guard_target_changed` when the pane
|
|
16
|
+
* was seen in another tmux session or on another server (#3901), and absent otherwise. */
|
|
10
17
|
export type PaneTerminationResult = {
|
|
11
18
|
ok: true;
|
|
12
19
|
path: "graceful" | "forced";
|
|
20
|
+
detail: string;
|
|
13
21
|
} | {
|
|
14
22
|
ok: false;
|
|
15
23
|
message: string;
|
|
24
|
+
code?: "guard_target_changed";
|
|
16
25
|
};
|
|
26
|
+
/** The occupant whose own exit comes before the pane's retirement: its runtime, and (tests) the process table it is read from.
|
|
27
|
+
* `terminal` is the pane's terminal as the caller read it when it resolved the pane (null: unreadable); without it, it's
|
|
28
|
+
* read when the cutover starts. */
|
|
29
|
+
export interface PaneOccupant {
|
|
30
|
+
runtime: string | null;
|
|
31
|
+
listProcesses?: NativeProcessLister;
|
|
32
|
+
terminal?: PaneTerminal | null;
|
|
33
|
+
}
|
|
17
34
|
/**
|
|
18
|
-
* Terminate the pane's
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
35
|
+
* Terminate the pane's occupant IN PLACE so a respawn (without -k) can reuse the pane and keep its scrollback.
|
|
36
|
+
* `remain-on-exit` goes on FIRST so the pane survives dead instead of being destroyed. It leaves `remain-on-exit` on: the
|
|
37
|
+
* caller decides when the pane no longer needs holding. Timing alone proves nothing about what the runtime saved before it
|
|
38
|
+
* exited.
|
|
39
|
+
*
|
|
40
|
+
* #3901: with an `occupant` whose runtime has its own exit (runtime-exit.ts), that agent exits first and its exit is read
|
|
41
|
+
* from the process table; then the pane is retired: a shell left at its prompt gets HUP (KILL after the window), which says
|
|
42
|
+
* nothing about how the agent ended. Otherwise (another runtime, no agent identified, or an exit that couldn't be
|
|
43
|
+
* verified) the pane's root gets TERM, then KILL after the window, as before, reported forced. The cutover fails only for
|
|
44
|
+
* an agent seen still running after its KILL, or when the pane's own end can't be established (its dead state unreadable).
|
|
45
|
+
* With an occupant, the pane's terminal (its tmux session and server) is read first, and the destructive effects after it
|
|
46
|
+
* (the agent's signals, the typed input, and the pane-level retirement signals) are held to it: a pane seen in another
|
|
47
|
+
* session or on another server is left alone (`guard_target_changed`). Setting remain-on-exit and the later respawn aren't.
|
|
48
|
+
* A later read that comes back unreadable isn't a change: the agent's own exit step isn't sent then, and the pane-level
|
|
49
|
+
* signals go on with their own checks (the delivery guard, the pane's pid).
|
|
23
50
|
*/
|
|
24
|
-
export declare function terminatePaneInPlace(tmux: PaneCutoverTmux, paneId: string, timing: PaneCutoverTiming, label?: string, inputTarget?: string): Promise<PaneTerminationResult>;
|
|
51
|
+
export declare function terminatePaneInPlace(tmux: PaneCutoverTmux, paneId: string, timing: PaneCutoverTiming, label?: string, inputTarget?: string, occupant?: PaneOccupant): Promise<PaneTerminationResult>;
|
|
25
52
|
/** Poll `isPaneDead` up to the bounded timeout (count-bounded so injected no-op sleeps stay fast). */
|
|
26
53
|
export declare function waitPaneDead(tmux: Pick<TmuxAdapter, "isPaneDead">, paneId: string, timing: PaneCutoverTiming): Promise<boolean>;
|
|
27
54
|
//# sourceMappingURL=pane-cutover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pane-cutover.d.ts","sourceRoot":"","sources":["../../src/domain/pane-cutover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"pane-cutover.d.ts","sourceRoot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B,CAAC,CA+ChC;AAyBD,sGAAsG;AACtG,wBAAsB,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAOrI"}
|
|
@@ -1,28 +1,97 @@
|
|
|
1
|
+
import { exitPaneRuntime, pinTerminal } from "./runtime-exit.js";
|
|
1
2
|
/**
|
|
2
|
-
* Terminate the pane's
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Terminate the pane's occupant IN PLACE so a respawn (without -k) can reuse the pane and keep its scrollback.
|
|
4
|
+
* `remain-on-exit` goes on FIRST so the pane survives dead instead of being destroyed. It leaves `remain-on-exit` on: the
|
|
5
|
+
* caller decides when the pane no longer needs holding. Timing alone proves nothing about what the runtime saved before it
|
|
6
|
+
* exited.
|
|
7
|
+
*
|
|
8
|
+
* #3901: with an `occupant` whose runtime has its own exit (runtime-exit.ts), that agent exits first and its exit is read
|
|
9
|
+
* from the process table; then the pane is retired: a shell left at its prompt gets HUP (KILL after the window), which says
|
|
10
|
+
* nothing about how the agent ended. Otherwise (another runtime, no agent identified, or an exit that couldn't be
|
|
11
|
+
* verified) the pane's root gets TERM, then KILL after the window, as before, reported forced. The cutover fails only for
|
|
12
|
+
* an agent seen still running after its KILL, or when the pane's own end can't be established (its dead state unreadable).
|
|
13
|
+
* With an occupant, the pane's terminal (its tmux session and server) is read first, and the destructive effects after it
|
|
14
|
+
* (the agent's signals, the typed input, and the pane-level retirement signals) are held to it: a pane seen in another
|
|
15
|
+
* session or on another server is left alone (`guard_target_changed`). Setting remain-on-exit and the later respawn aren't.
|
|
16
|
+
* A later read that comes back unreadable isn't a change: the agent's own exit step isn't sent then, and the pane-level
|
|
17
|
+
* signals go on with their own checks (the delivery guard, the pane's pid).
|
|
7
18
|
*/
|
|
8
|
-
export async function terminatePaneInPlace(tmux, paneId, timing, label = "Retiree", inputTarget = paneId) {
|
|
19
|
+
export async function terminatePaneInPlace(tmux, paneId, timing, label = "Retiree", inputTarget = paneId, occupant) {
|
|
9
20
|
const failures = [];
|
|
21
|
+
// The pane's terminal (null: unreadable), which the signals and typed input below are held to.
|
|
22
|
+
const terminal = occupant?.terminal !== undefined ? occupant.terminal : occupant && tmux.paneTerminal ? await tmux.paneTerminal(paneId) : undefined;
|
|
23
|
+
const pin = terminal ? pinTerminal(tmux, terminal) : terminal;
|
|
24
|
+
const signalPane = paneSignal(tmux, inputTarget, pin);
|
|
10
25
|
const remain = await tmux.setRemainOnExit(paneId, true);
|
|
11
26
|
if (!remain.ok)
|
|
12
27
|
failures.push(`remain-on-exit: ${remain.message}`);
|
|
13
|
-
const
|
|
28
|
+
const detail = () => failures.length > 0 ? ` Tmux failures: ${failures.join("; ")}.` : "";
|
|
29
|
+
const changed = () => ({ ok: false, code: "guard_target_changed", message: `${label} in pane "${paneId}" was left `
|
|
30
|
+
+ `alone: the pane is no longer in the tmux session and server it was first read in (the server may have been replaced), so nothing more was sent to it.${detail()}` });
|
|
31
|
+
const exited = occupant && tmux.getPanePid && tmux.signalPaneRuntime
|
|
32
|
+
? await exitPaneRuntime(tmux, { pane: paneId, inputTarget, runtime: occupant.runtime, ...(pin !== undefined ? { pin } : {}) }, timing, occupant.listProcesses)
|
|
33
|
+
: null;
|
|
34
|
+
if (exited?.state === "terminal_changed" || pin?.changed)
|
|
35
|
+
return changed();
|
|
36
|
+
if (exited?.state === "still_running") {
|
|
37
|
+
return { ok: false, message: `${label} in pane "${paneId}" did not exit: ${exited.detail}${detail()}` };
|
|
38
|
+
}
|
|
39
|
+
if (exited?.state === "exited" || exited?.state === "no_runtime") {
|
|
40
|
+
// The agent is gone; its shell (when it was typed into one) still holds the pane, which the respawn needs dead.
|
|
41
|
+
if (!await retirePane(tmux, paneId, inputTarget, timing, failures, pin)) {
|
|
42
|
+
if (pin?.changed)
|
|
43
|
+
return changed();
|
|
44
|
+
return { ok: false, message: `${label} in pane "${paneId}" ended (${exited.detail}), but the pane's shell did not exit after HUP + KILL.${detail()}` };
|
|
45
|
+
}
|
|
46
|
+
return { ok: true, path: exited.state === "exited" ? exited.path : "graceful", detail: exited.detail };
|
|
47
|
+
}
|
|
48
|
+
// Not identified, or its exit not verified (unknown, never "still running"): the pane-level stop, as before.
|
|
49
|
+
const term = await signalPane("TERM");
|
|
14
50
|
if (!term.ok)
|
|
15
51
|
failures.push(`TERM: ${term.message}`);
|
|
16
|
-
if (
|
|
17
|
-
return
|
|
52
|
+
if (pin?.changed)
|
|
53
|
+
return changed();
|
|
54
|
+
if (await waitPaneDead(tmux, paneId, timing)) {
|
|
55
|
+
// The runtime's own exit wasn't verified. A successful pane-level stop still proceeds, but doesn't prove its shutdown.
|
|
56
|
+
return { ok: true, path: exited ? "forced" : "graceful", detail: exited ? `${exited.detail} The pane's process exited on TERM.` : "The pane's process exited on TERM." };
|
|
57
|
+
}
|
|
18
58
|
// Graceful window elapsed — force-kill (the pinned degraded path).
|
|
19
|
-
const kill = await
|
|
59
|
+
const kill = await signalPane("KILL");
|
|
20
60
|
if (!kill.ok)
|
|
21
61
|
failures.push(`KILL: ${kill.message}`);
|
|
62
|
+
if (pin?.changed)
|
|
63
|
+
return changed();
|
|
64
|
+
if (await waitPaneDead(tmux, paneId, timing)) {
|
|
65
|
+
const window = `${(timing.timeoutMs / 1000).toFixed(1)} s`;
|
|
66
|
+
return { ok: true, path: "forced", detail: exited ? `${exited.detail} The pane's process didn't exit within ${window} of TERM and was killed.`
|
|
67
|
+
: `The pane's process didn't exit within ${window} of TERM and was killed.` };
|
|
68
|
+
}
|
|
69
|
+
return { ok: false, message: `${label} in pane "${paneId}" did not exit after graceful TERM + forced KILL.${detail()}` };
|
|
70
|
+
}
|
|
71
|
+
/** End the pane's remaining process (the shell an agent was typed into, now at its prompt) so the pane is dead: HUP, as a
|
|
72
|
+
* closing terminal sends, which a shell exits on (TERM is ignored by an interactive shell), then KILL after the window. */
|
|
73
|
+
async function retirePane(tmux, paneId, inputTarget, timing, failures, pin) {
|
|
74
|
+
const signalPane = paneSignal(tmux, inputTarget, pin);
|
|
75
|
+
if (await tmux.isPaneDead(paneId))
|
|
76
|
+
return true;
|
|
77
|
+
const hup = await signalPane("HUP");
|
|
78
|
+
if (!hup.ok)
|
|
79
|
+
failures.push(`HUP: ${hup.message}`);
|
|
80
|
+
if (pin?.changed)
|
|
81
|
+
return false;
|
|
22
82
|
if (await waitPaneDead(tmux, paneId, timing))
|
|
23
|
-
return
|
|
24
|
-
const
|
|
25
|
-
|
|
83
|
+
return true;
|
|
84
|
+
const kill = await signalPane("KILL");
|
|
85
|
+
if (!kill.ok)
|
|
86
|
+
failures.push(`KILL: ${kill.message}`);
|
|
87
|
+
return waitPaneDead(tmux, paneId, timing);
|
|
88
|
+
}
|
|
89
|
+
/** Signal the pane's root process, held back only when the pane is positively seen in another session or on another
|
|
90
|
+
* server than `pin`'s (#3901). An unreadable terminal isn't that: the signal goes with signalPaneProcess's own checks. */
|
|
91
|
+
function paneSignal(tmux, inputTarget, pin) {
|
|
92
|
+
return (signal) => pin
|
|
93
|
+
? tmux.signalPaneProcess(inputTarget, signal, async (pane) => await pin.read(pane) === "changed")
|
|
94
|
+
: tmux.signalPaneProcess(inputTarget, signal);
|
|
26
95
|
}
|
|
27
96
|
/** Poll `isPaneDead` up to the bounded timeout (count-bounded so injected no-op sleeps stay fast). */
|
|
28
97
|
export async function waitPaneDead(tmux, paneId, timing) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pane-cutover.js","sourceRoot":"","sources":["../../src/domain/pane-cutover.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pane-cutover.js","sourceRoot":"","sources":["../../src/domain/pane-cutover.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,WAAW,EAA0C,MAAM,mBAAmB,CAAC;AA6BzG;;;;;;;;;;;;;;;;GAgBG;AACH,M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EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;QACjG,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,sGAAsG;AACtG,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAqC,EAAE,MAAc,EAAE,MAAyB;IACjH,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,IAAI,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;YAAE,OAAO,IAAI,CAAC;QAC/C,MAAM,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ClaudeJsonFragmentType, type SkillOnRestore, type StartupBlock } from "./types.js";
|
|
2
2
|
import type { ResolvedNodeConfig } from "./profile-resolver.js";
|
|
3
3
|
import type { ResourceCollision } from "./agent-resolver.js";
|
|
4
4
|
import type { ResolvedStartupFile } from "./runtime-adapter.js";
|
|
@@ -26,14 +26,28 @@ export interface ProjectionEntry {
|
|
|
26
26
|
* and projects only when its runtime-specific manifest is present
|
|
27
27
|
*/
|
|
28
28
|
pluginType?: "claude" | "codex" | "auto";
|
|
29
|
-
/**
|
|
30
|
-
* conversation takes this skill's source as it is then, instead of the saved copy. */
|
|
29
|
+
/** Set for skills and supported Claude fragments that explicitly follow today's source. */
|
|
31
30
|
onRestore?: SkillOnRestore;
|
|
32
31
|
}
|
|
32
|
+
export type ClaudeFragmentEntry = ProjectionEntry & {
|
|
33
|
+
category: "runtime_resource";
|
|
34
|
+
resourceType: ClaudeJsonFragmentType;
|
|
35
|
+
};
|
|
36
|
+
export declare function isClaudeFragmentEntry(entry: ProjectionEntry): entry is ClaudeFragmentEntry;
|
|
37
|
+
export type ResolveClaudeFragments = (rigId: string, nodeId: string) => Promise<{
|
|
38
|
+
ok: true;
|
|
39
|
+
entries: ClaudeFragmentEntry[];
|
|
40
|
+
} | {
|
|
41
|
+
ok: false;
|
|
42
|
+
reason: string;
|
|
43
|
+
missingRecipe?: true;
|
|
44
|
+
}>;
|
|
33
45
|
export interface ProjectionPlan {
|
|
34
46
|
runtime: string;
|
|
35
47
|
cwd: string;
|
|
36
48
|
entries: ProjectionEntry[];
|
|
49
|
+
/** An older seat without a launch recipe can still apply its readable saved Claude fragments. */
|
|
50
|
+
skipUnavailableClaudeFragmentSources?: boolean;
|
|
37
51
|
startup: StartupBlock;
|
|
38
52
|
conflicts: ProjectionEntry[];
|
|
39
53
|
noOps: ProjectionEntry[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection-planner.d.ts","sourceRoot":"","sources":["../../src/domain/projection-planner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"projection-planner.d.ts","sourceRoot":"","sources":["../../src/domain/projection-planner.ts"],"names":[],"mappings":"AAGA,OAAO,EAA4B,KAAK,sBAAsB,EAAwB,KAAK,cAAc,EAAsB,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAErK,OAAO,KAAK,EAAE,kBAAkB,EAAwC,MAAM,uBAAuB,CAAC;AACtG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAqC,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;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AiB,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,WAAW,GAAE,MAAqB,GAAG,MAAM,CAMrH;AAID;;;6EAG6E;AAC7E,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,MAAM,EACnB,gBAAgB,GAAE,sBAA0D,GAC3E,MAAM,GAAG,IAAI,CAWf;AAED;;;;+CAI+C;AAC/C,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,GAAG,MAAM,EAAE,CAe5F;AAED;;;;;;4EAM4E;AAC5E,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,mBAAmB,EAAE,EAC5B,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,EACvC,IAAI,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GACzB;IAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;IAAC,SAAS,EAAE,mBAAmB,EAAE,CAAA;CAAE,CAkBxE"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import nodePath from "node:path";
|
|
2
2
|
import * as os from "node:os";
|
|
3
3
|
import { OPENRIG_HOME } from "../openrig-compat.js";
|
|
4
|
+
import { isClaudeJsonFragmentType } from "./types.js";
|
|
4
5
|
import { classifyResourceProjection } from "./conflict-detector.js";
|
|
5
6
|
import { DEFAULT_CLAUDE_MANAGED_BLOCK_FILE } from "./managed-blocks.js";
|
|
7
|
+
export function isClaudeFragmentEntry(entry) {
|
|
8
|
+
return entry.category === "runtime_resource" && isClaudeJsonFragmentType(entry.resourceType);
|
|
9
|
+
}
|
|
6
10
|
// -- Category mapping --
|
|
7
11
|
const CATEGORY_MAP = {
|
|
8
12
|
skills: "skill",
|
|
@@ -80,7 +84,11 @@ export function planProjection(input) {
|
|
|
80
84
|
entry.onRestore = "follow_source";
|
|
81
85
|
}
|
|
82
86
|
if (catKey === "runtimeResources") {
|
|
83
|
-
|
|
87
|
+
const resource = qr.resource;
|
|
88
|
+
entry.resourceType = resource.type;
|
|
89
|
+
if (resource.runtime === "claude-code" && isClaudeJsonFragmentType(resource.type) && resource.onRestore === "follow_source") {
|
|
90
|
+
entry.onRestore = "follow_source";
|
|
91
|
+
}
|
|
84
92
|
}
|
|
85
93
|
if (catKey === "plugins") {
|
|
86
94
|
const pluginRes = qr.resource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection-planner.js","sourceRoot":"","sources":["../../src/domain/projection-planner.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"projection-planner.js","sourceRoot":"","sources":["../../src/domain/projection-planner.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAiH,MAAM,YAAY,CAAC;AACrK,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAIpE,OAAO,EAAE,iCAAiC,EAA+B,MAAM,qBAAqB,CAAC;AAqCrG,MAAM,UAAU,qBAAqB,CAAC,KAAsB;IAC1D,OAAO,KAAK,CAAC,QAAQ,KAAK,kBAAkB,IAAI,wBAAwB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAC/F,CAAC;AAyCD,yBAAyB;AAEzB,MAAM,YAAY,GAAgD;IAChE,MAAM,EAAE,OAAO;IACf,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,UAAU;IACrB,OAAO,EAAE,QAAQ;IACjB,gBAAgB,EAA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,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type Database from "better-sqlite3";
|
|
1
2
|
import type { LoadResult } from "./gateway/human-registry.js";
|
|
2
3
|
export declare function makeTopologyDestinationCheck(deps: {
|
|
3
4
|
findRigsByName: (name: string) => unknown[];
|
|
@@ -7,7 +8,14 @@ export declare function makeTopologyDestinationCheck(deps: {
|
|
|
7
8
|
entityId: string;
|
|
8
9
|
address: string;
|
|
9
10
|
}>;
|
|
11
|
+
/** Admits a bare name that is an active seat's current session (#3799). Without it, bare names stay refused. */
|
|
12
|
+
db?: Database.Database;
|
|
10
13
|
}): (sessionRef: string) => boolean;
|
|
14
|
+
/** A bare name (e.g. an adopted tmux selector such as `local-captain`, which rig detail reports as the
|
|
15
|
+
* representative) that is still its owner's current session: the shared resolver's node, in an active rig,
|
|
16
|
+
* whose latest session or current binding has this exact spelling. Once the resolver has picked the seat, the
|
|
17
|
+
* work is accepted: a stopped predecessor that keeps its binding beside its successor does not refuse it. */
|
|
18
|
+
export declare function isCurrentLocalSeatSession(db: Database.Database, sessionRef: string): boolean;
|
|
11
19
|
/** Keep canonical work even before its topology exists; retain the other admission rules. */
|
|
12
20
|
export declare function makeQueueRecordingCheck(topologyCheck: (sessionRef: string) => boolean): (sessionRef: string) => boolean;
|
|
13
21
|
//# sourceMappingURL=queue-destination-check.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue-destination-check.d.ts","sourceRoot":"","sources":["../../src/domain/queue-destination-check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"queue-destination-check.d.ts","sourceRoot":"","sources":["../../src/domain/queue-destination-check.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAM9D,wBAAgB,4BAA4B,CAAC,IAAI,EAAE;IACjD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EAAE,CAAC;IAC5C,iBAAiB,EAAE,MAAM,UAAU,CAAC;IACpC,qHAAqH;IACrH,cAAc,CAAC,EAAE,MAAM,aAAa,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5E,gHAAgH;IAChH,EAAE,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;CACxB,GAAG,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAqBlC;AAED;;;8GAG8G;AAC9G,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAQ5F;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,GAAG,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAEvH"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
// The existing topology-backed destination preflight, used when choosing a receiver.
|
|
2
|
-
// Recording canonical work is separate: absence must not prevent keeping the row.
|
|
3
1
|
import { isHumanSeatSessionRef, parseSessionName } from "./session-name.js";
|
|
4
2
|
import { resolveExternal } from "./gateway/external-admission.js";
|
|
5
3
|
import { sharedChannelAddresses } from "./gateway/participants.js";
|
|
4
|
+
import { resolveSessionNodeId } from "./queue-owner.js";
|
|
6
5
|
// Human and external admission still use their registered-address rules.
|
|
7
|
-
//
|
|
6
|
+
// Other bare ids are admitted only as an active seat's current session name (#3799), when `db` is given.
|
|
8
7
|
export function makeTopologyDestinationCheck(deps) {
|
|
9
8
|
return (sessionRef) => {
|
|
10
9
|
const parsed = parseSessionName(sessionRef);
|
|
@@ -25,10 +24,24 @@ export function makeTopologyDestinationCheck(deps) {
|
|
|
25
24
|
if (isHumanSeatSessionRef(sessionRef))
|
|
26
25
|
return true;
|
|
27
26
|
if (parsed.kind !== "canonical")
|
|
28
|
-
return
|
|
27
|
+
return deps.db !== undefined && isCurrentLocalSeatSession(deps.db, sessionRef);
|
|
29
28
|
return deps.findRigsByName(parsed.rig).length > 0;
|
|
30
29
|
};
|
|
31
30
|
}
|
|
31
|
+
/** A bare name (e.g. an adopted tmux selector such as `local-captain`, which rig detail reports as the
|
|
32
|
+
* representative) that is still its owner's current session: the shared resolver's node, in an active rig,
|
|
33
|
+
* whose latest session or current binding has this exact spelling. Once the resolver has picked the seat, the
|
|
34
|
+
* work is accepted: a stopped predecessor that keeps its binding beside its successor does not refuse it. */
|
|
35
|
+
export function isCurrentLocalSeatSession(db, sessionRef) {
|
|
36
|
+
const nodeId = resolveSessionNodeId(db, sessionRef);
|
|
37
|
+
if (!nodeId)
|
|
38
|
+
return false;
|
|
39
|
+
return db.prepare(`SELECT 1 FROM nodes n JOIN rigs r ON r.id = n.rig_id
|
|
40
|
+
WHERE n.id = ? AND r.archived_at IS NULL AND (
|
|
41
|
+
EXISTS (SELECT 1 FROM bindings b WHERE b.node_id = n.id AND b.tmux_session = ?)
|
|
42
|
+
OR (SELECT session_name FROM sessions WHERE node_id = n.id ORDER BY id DESC LIMIT 1) = ?)`)
|
|
43
|
+
.get(nodeId, sessionRef, sessionRef) !== undefined;
|
|
44
|
+
}
|
|
32
45
|
/** Keep canonical work even before its topology exists; retain the other admission rules. */
|
|
33
46
|
export function makeQueueRecordingCheck(topologyCheck) {
|
|
34
47
|
return sessionRef => parseSessionName(sessionRef).kind === "canonical" || topologyCheck(sessionRef);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue-destination-check.js","sourceRoot":"","sources":["../../src/domain/queue-destination-check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"queue-destination-check.js","sourceRoot":"","sources":["../../src/domain/queue-destination-check.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,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MAAM,GAAG,CAAC,CAAC;IACpD,CAAC,CAAC;AACJ,CAAC;AAED;;;8GAG8G;AAC9G,MAAM,UAAU,yBAAyB,CAAC,EAAqB,EAAE,UAAkB;IACjF,MAAM,MAAM,GAAG,oBAAoB,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IACpD,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1B,OAAO,EAAE,CAAC,OAAO,CAAC;;;gGAG4E,CAAC;SAC5F,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK,SAAS,CAAC;AACvD,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,uBAAuB,CAAC,aAA8C;IACpF,OAAO,UAAU,CAAC,EAAE,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,IAAI,KAAK,WAAW,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;AACtG,CAAC"}
|
|
@@ -187,7 +187,7 @@ function scrubRows(st, ids, nowIso) {
|
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
st.get(`UPDATE queue_items SET body = '', summary = NULL, resolution = NULL, tags = NULL, blocked_on = NULL,
|
|
190
|
-
chain_of_record = NULL, evidence_ref = NULL, human_detail = NULL, human_questions = NULL, human_answers = NULL, relayed_answers = NULL,
|
|
190
|
+
chain_of_record = NULL, evidence_ref = NULL, evidence_ref_roots = NULL, human_detail = NULL, human_questions = NULL, human_answers = NULL, relayed_answers = NULL,
|
|
191
191
|
delegated_decision = NULL, last_nudge_input_box = NULL, content_erased_at = @now WHERE qitem_id IN ${IDS}`).run({ ...params, now: nowIso });
|
|
192
192
|
for (const table of ["queue_transitions", "queue_transitions_archive"]) {
|
|
193
193
|
st.get(`UPDATE ${table} SET transition_note = NULL, identity_principal = NULL WHERE qitem_id IN ${IDS}`).run(params);
|
|
@@ -190,6 +190,9 @@ export interface QueueItem {
|
|
|
190
190
|
* (convention C3). NULL for all non-human-routed items (BR-1); required
|
|
191
191
|
* at the domain write path only when the §5 predicate is true. */
|
|
192
192
|
evidenceRef: string | null;
|
|
193
|
+
/** The shared roots evidenceRef's writer may read, recorded with it (migration 196): a list is a scoped grant's roots
|
|
194
|
+
* and limits what the Slack connector attaches; absent is a writer with no root grant, attached as before. */
|
|
195
|
+
evidenceRefRoots?: string[];
|
|
193
196
|
/** Set only on a row whose content queue erasure removed (queue-erasure.ts): its body and other content are empty
|
|
194
197
|
* because they were erased, not because the row was written that way. */
|
|
195
198
|
contentErasedAt?: string;
|
|
@@ -252,6 +255,7 @@ interface QueueItemRow {
|
|
|
252
255
|
relayed_answers?: string | null;
|
|
253
256
|
summary: string | null;
|
|
254
257
|
evidence_ref: string | null;
|
|
258
|
+
evidence_ref_roots?: string | null;
|
|
255
259
|
content_erased_at?: string | null;
|
|
256
260
|
closure_reason: string | null;
|
|
257
261
|
closure_target: string | null;
|
|
@@ -351,6 +355,9 @@ export interface QueueCreateInput {
|
|
|
351
355
|
/** OPR.0.4.4.19 FR-5 — optional durable-artifact pointer. Persisted when
|
|
352
356
|
* present; required at the domain layer only for human-routed items. */
|
|
353
357
|
evidenceRef?: string | null;
|
|
358
|
+
/** The shared roots the writer of evidenceRef may read, stored with it: a scoped MCP grant's roots (an empty list for
|
|
359
|
+
* none). Absent or null is a writer with no root grant (a local seat or an owner). Ignored without evidenceRef. */
|
|
360
|
+
evidenceRefRoots?: readonly string[] | null;
|
|
354
361
|
/**
|
|
355
362
|
* R1 fix (PL-004 Phase A revision): Phase A is durable + waking by default.
|
|
356
363
|
* When true (or omitted), the repository nudges the destination after the
|
|
@@ -442,6 +449,9 @@ export interface QueueUpdateInput {
|
|
|
442
449
|
*/
|
|
443
450
|
summary?: string | null;
|
|
444
451
|
evidenceRef?: string | null;
|
|
452
|
+
/** The shared roots the writer of evidenceRef may read, stored with it: a scoped MCP grant's roots (an empty list for
|
|
453
|
+
* none). Absent or null is a writer with no root grant (a local seat or an owner). Ignored without evidenceRef. */
|
|
454
|
+
evidenceRefRoots?: readonly string[] | null;
|
|
445
455
|
/** P21 §4 era-stamp: the route passes `transport:v1` (actorSession derived from the transport
|
|
446
456
|
* header chokepoint). Threaded onto the transition; absence = claimed-era. */
|
|
447
457
|
identityProvenance?: string | null;
|
|
@@ -471,6 +481,9 @@ export interface QueueHandoffInput {
|
|
|
471
481
|
/** OPR.0.4.4.19 FR-5 — optional durable-artifact pointer for the NEW qitem.
|
|
472
482
|
* NOT inherited from the source (same authorship semantics as summary). */
|
|
473
483
|
evidenceRef?: string | null;
|
|
484
|
+
/** The shared roots the writer of evidenceRef may read, stored with it: a scoped MCP grant's roots (an empty list for
|
|
485
|
+
* none). Absent or null is a writer with no root grant (a local seat or an owner). Ignored without evidenceRef. */
|
|
486
|
+
evidenceRefRoots?: readonly string[] | null;
|
|
474
487
|
/** P21 §4 era-stamp: the route passes `transport:v1` (fromSession derived from the transport
|
|
475
488
|
* header chokepoint). Threaded onto both the source-close and new-item transitions. */
|
|
476
489
|
identityProvenance?: string | null;
|
|
@@ -730,6 +743,7 @@ export declare class QueueRepository {
|
|
|
730
743
|
private readonly hasHumanQuestionsColumn;
|
|
731
744
|
private readonly hasDelegatedDecisionColumn;
|
|
732
745
|
private readonly hasEvidenceRefColumn;
|
|
746
|
+
private readonly hasEvidenceRefRootsColumn;
|
|
733
747
|
private readonly hasMintingGenColumn;
|
|
734
748
|
private readonly hasClaimedGenColumn;
|
|
735
749
|
private readonly hasQueueTransitionsTable;
|
|
@@ -1451,6 +1465,8 @@ export declare class QueueRepository {
|
|
|
1451
1465
|
questionId: string;
|
|
1452
1466
|
optionId: string;
|
|
1453
1467
|
transitionNote: string;
|
|
1468
|
+
/** A native ask's decision in one line (what the harness's agent is told); kept as the row's resolution's last line. */
|
|
1469
|
+
resolution?: string;
|
|
1454
1470
|
}): boolean;
|
|
1455
1471
|
/** No agent here can read a runner permission answer before the tool runs (none is set, or the only one is the seat
|
|
1456
1472
|
* asking): the person's answer, a click or words, is kept on the ask, the request stays pending, and the person is
|
|
@@ -1871,7 +1887,10 @@ export declare class QueueRepository {
|
|
|
1871
1887
|
permissionQuestionsFor(item: QueueItem): HumanQuestion[] | null;
|
|
1872
1888
|
private persistSummary;
|
|
1873
1889
|
/** OPR.0.4.4.19 FR-5 — persist the optional evidence_ref additively, same
|
|
1874
|
-
* contract as persistSummary (pre-048 fixtures degrade; NULL default).
|
|
1890
|
+
* contract as persistSummary (pre-048 fixtures degrade; NULL default).
|
|
1891
|
+
* The writer's shared roots are written with the reference, every time it is written, so the authority a later
|
|
1892
|
+
* attachment reads is always this reference's writer's: a state change, note or alert that leaves the reference
|
|
1893
|
+
* alone leaves its authority alone, and a writer with no root grant records null. */
|
|
1875
1894
|
private persistEvidenceRef;
|
|
1876
1895
|
/** A relay task's claim is pickup at its return route. It's recorded on the escalation the task carries, keyed by that
|
|
1877
1896
|
* delivery episode, so the episode resolves. Pickup only: not the person's answer or approval, and nothing about the
|