@openrig/cli 0.7.22 → 0.7.23

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.
Files changed (821) hide show
  1. package/README.md +7 -7
  2. package/daemon/assets/onboarding/01-world-and-purpose.md +2 -1
  3. package/daemon/assets/onboarding/02-self-and-competent-action.md +6 -0
  4. package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +1 -1
  5. package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +1 -1
  6. package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
  7. package/daemon/assets/plugins/openrig/plugin.json +1 -1
  8. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  9. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  10. package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +13 -0
  11. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +4 -0
  12. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +31 -5
  13. package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +1 -1
  14. package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +32 -6
  15. package/daemon/assets/skills/rigs/SKILL.md +14 -5
  16. package/daemon/context-packs/help/manifest.yaml +1 -1
  17. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  18. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +15 -6
  19. package/daemon/context-packs/reference/acp-agents.md +2 -1
  20. package/daemon/context-packs/reference/getting-started.md +119 -12
  21. package/daemon/context-packs/reference/manifest.yaml +1 -1
  22. package/daemon/context-packs/reference/rig-spec.md +193 -3
  23. package/daemon/context-packs/reference/tmux-servers.md +27 -2
  24. package/daemon/context-packs/reference/whats-new.md +92 -12
  25. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  26. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  27. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  28. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  29. package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +4 -0
  30. package/daemon/context-packs/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +31 -5
  31. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  32. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  33. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  34. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  35. package/daemon/context-packs/skills/core/messaging-the-human/SKILL.md +1 -1
  36. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +3 -3
  37. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  38. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  40. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  41. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  43. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  44. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  46. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  48. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  49. package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  51. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  52. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  54. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  59. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  60. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  66. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  68. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  74. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  76. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  77. package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +32 -6
  78. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  79. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  80. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  81. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  82. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  83. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  84. package/daemon/dist/adapters/claude-code-adapter.d.ts +14 -1
  85. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  86. package/daemon/dist/adapters/claude-code-adapter.js +86 -17
  87. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  88. package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
  89. package/daemon/dist/adapters/claude-resume.js +8 -4
  90. package/daemon/dist/adapters/claude-resume.js.map +1 -1
  91. package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
  92. package/daemon/dist/adapters/community-harness-runtime-adapter.js +19 -4
  93. package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
  94. package/daemon/dist/adapters/seat-slice.d.ts +19 -0
  95. package/daemon/dist/adapters/seat-slice.d.ts.map +1 -0
  96. package/daemon/dist/adapters/seat-slice.js +29 -0
  97. package/daemon/dist/adapters/seat-slice.js.map +1 -0
  98. package/daemon/dist/adapters/shell-quote.d.ts +1 -0
  99. package/daemon/dist/adapters/shell-quote.d.ts.map +1 -1
  100. package/daemon/dist/adapters/shell-quote.js +6 -0
  101. package/daemon/dist/adapters/shell-quote.js.map +1 -1
  102. package/daemon/dist/adapters/tmux.d.ts +32 -8
  103. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  104. package/daemon/dist/adapters/tmux.js +253 -59
  105. package/daemon/dist/adapters/tmux.js.map +1 -1
  106. package/daemon/dist/build-info.js +3 -3
  107. package/daemon/dist/daemon-shutdown.d.ts +5 -0
  108. package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
  109. package/daemon/dist/daemon-shutdown.js +10 -2
  110. package/daemon/dist/daemon-shutdown.js.map +1 -1
  111. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  112. package/daemon/dist/db/all-migrations.js +24 -0
  113. package/daemon/dist/db/all-migrations.js.map +1 -1
  114. package/daemon/dist/db/migrate.d.ts +15 -1
  115. package/daemon/dist/db/migrate.d.ts.map +1 -1
  116. package/daemon/dist/db/migrate.js +41 -6
  117. package/daemon/dist/db/migrate.js.map +1 -1
  118. package/daemon/dist/db/migrations/179_remote_control_observations.d.ts +10 -0
  119. package/daemon/dist/db/migrations/179_remote_control_observations.d.ts.map +1 -0
  120. package/daemon/dist/db/migrations/179_remote_control_observations.js +20 -0
  121. package/daemon/dist/db/migrations/179_remote_control_observations.js.map +1 -0
  122. package/daemon/dist/db/migrations/180_session_stop_attempt.d.ts +5 -0
  123. package/daemon/dist/db/migrations/180_session_stop_attempt.d.ts.map +1 -0
  124. package/daemon/dist/db/migrations/180_session_stop_attempt.js +7 -0
  125. package/daemon/dist/db/migrations/180_session_stop_attempt.js.map +1 -0
  126. package/daemon/dist/db/migrations/181_node_keep_alive.d.ts +8 -0
  127. package/daemon/dist/db/migrations/181_node_keep_alive.d.ts.map +1 -0
  128. package/daemon/dist/db/migrations/181_node_keep_alive.js +26 -0
  129. package/daemon/dist/db/migrations/181_node_keep_alive.js.map +1 -0
  130. package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.d.ts +7 -0
  131. package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.d.ts.map +1 -0
  132. package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.js +11 -0
  133. package/daemon/dist/db/migrations/182_queue_items_blocked_on_index.js.map +1 -0
  134. package/daemon/dist/db/migrations/183_queue_items_scan_indexes.d.ts +8 -0
  135. package/daemon/dist/db/migrations/183_queue_items_scan_indexes.d.ts.map +1 -0
  136. package/daemon/dist/db/migrations/183_queue_items_scan_indexes.js +13 -0
  137. package/daemon/dist/db/migrations/183_queue_items_scan_indexes.js.map +1 -0
  138. package/daemon/dist/db/migrations/184_network_requests.d.ts +11 -0
  139. package/daemon/dist/db/migrations/184_network_requests.d.ts.map +1 -0
  140. package/daemon/dist/db/migrations/184_network_requests.js +32 -0
  141. package/daemon/dist/db/migrations/184_network_requests.js.map +1 -0
  142. package/daemon/dist/db/migrations/185_seat_cold_starts.d.ts +9 -0
  143. package/daemon/dist/db/migrations/185_seat_cold_starts.d.ts.map +1 -0
  144. package/daemon/dist/db/migrations/185_seat_cold_starts.js +19 -0
  145. package/daemon/dist/db/migrations/185_seat_cold_starts.js.map +1 -0
  146. package/daemon/dist/db/migrations/186_queue_relayed_answers.d.ts +3 -0
  147. package/daemon/dist/db/migrations/186_queue_relayed_answers.d.ts.map +1 -0
  148. package/daemon/dist/db/migrations/186_queue_relayed_answers.js +5 -0
  149. package/daemon/dist/db/migrations/186_queue_relayed_answers.js.map +1 -0
  150. package/daemon/dist/db/migrations/189_rig_seat_slice.d.ts +5 -0
  151. package/daemon/dist/db/migrations/189_rig_seat_slice.d.ts.map +1 -0
  152. package/daemon/dist/db/migrations/189_rig_seat_slice.js +7 -0
  153. package/daemon/dist/db/migrations/189_rig_seat_slice.js.map +1 -0
  154. package/daemon/dist/db/migrations/190_queue_transfer_staging.d.ts +3 -0
  155. package/daemon/dist/db/migrations/190_queue_transfer_staging.d.ts.map +1 -0
  156. package/daemon/dist/db/migrations/190_queue_transfer_staging.js +20 -0
  157. package/daemon/dist/db/migrations/190_queue_transfer_staging.js.map +1 -0
  158. package/daemon/dist/db/migrations/191_network_binding_providers.d.ts +3 -0
  159. package/daemon/dist/db/migrations/191_network_binding_providers.d.ts.map +1 -0
  160. package/daemon/dist/db/migrations/191_network_binding_providers.js +27 -0
  161. package/daemon/dist/db/migrations/191_network_binding_providers.js.map +1 -0
  162. package/daemon/dist/db/migrations/194_workflow_run_title.d.ts +4 -0
  163. package/daemon/dist/db/migrations/194_workflow_run_title.d.ts.map +1 -0
  164. package/daemon/dist/db/migrations/194_workflow_run_title.js +6 -0
  165. package/daemon/dist/db/migrations/194_workflow_run_title.js.map +1 -0
  166. package/daemon/dist/domain/activity-taxonomy.d.ts +3 -0
  167. package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
  168. package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
  169. package/daemon/dist/domain/agent-activity-store.d.ts +17 -0
  170. package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
  171. package/daemon/dist/domain/agent-activity-store.js +101 -45
  172. package/daemon/dist/domain/agent-activity-store.js.map +1 -1
  173. package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
  174. package/daemon/dist/domain/agent-manifest.js +6 -0
  175. package/daemon/dist/domain/agent-manifest.js.map +1 -1
  176. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +30 -2
  177. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  178. package/daemon/dist/domain/claude-compaction-enforcer.js +53 -12
  179. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  180. package/daemon/dist/domain/compaction-restore-notice.d.ts +12 -1
  181. package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
  182. package/daemon/dist/domain/compaction-restore-notice.js +130 -2
  183. package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
  184. package/daemon/dist/domain/continuity-policy-materializer.d.ts.map +1 -1
  185. package/daemon/dist/domain/continuity-policy-materializer.js +11 -3
  186. package/daemon/dist/domain/continuity-policy-materializer.js.map +1 -1
  187. package/daemon/dist/domain/core-app-job.d.ts +4 -4
  188. package/daemon/dist/domain/core-app-job.d.ts.map +1 -1
  189. package/daemon/dist/domain/core-app-job.js +4 -59
  190. package/daemon/dist/domain/core-app-job.js.map +1 -1
  191. package/daemon/dist/domain/current-work.d.ts +12 -0
  192. package/daemon/dist/domain/current-work.d.ts.map +1 -1
  193. package/daemon/dist/domain/current-work.js +4 -0
  194. package/daemon/dist/domain/current-work.js.map +1 -1
  195. package/daemon/dist/domain/escalation-owner.d.ts +3 -0
  196. package/daemon/dist/domain/escalation-owner.d.ts.map +1 -1
  197. package/daemon/dist/domain/escalation-owner.js +9 -3
  198. package/daemon/dist/domain/escalation-owner.js.map +1 -1
  199. package/daemon/dist/domain/execution-candidate-reader.d.ts +3 -0
  200. package/daemon/dist/domain/execution-candidate-reader.d.ts.map +1 -1
  201. package/daemon/dist/domain/execution-candidate-reader.js +8 -2
  202. package/daemon/dist/domain/execution-candidate-reader.js.map +1 -1
  203. package/daemon/dist/domain/existing-rig-restore.d.ts +2 -0
  204. package/daemon/dist/domain/existing-rig-restore.d.ts.map +1 -1
  205. package/daemon/dist/domain/existing-rig-restore.js +11 -1
  206. package/daemon/dist/domain/existing-rig-restore.js.map +1 -1
  207. package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
  208. package/daemon/dist/domain/gateway/slack/inbound.js +49 -8
  209. package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
  210. package/daemon/dist/domain/gateway/slack/message.d.ts +1 -4
  211. package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
  212. package/daemon/dist/domain/gateway/slack/message.js +17 -5
  213. package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
  214. package/daemon/dist/domain/gateway/slack/queue-access.d.ts +7 -1
  215. package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
  216. package/daemon/dist/domain/gateway/slack/queue-access.js +1 -0
  217. package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
  218. package/daemon/dist/domain/gateway/slack/settled-asks.d.ts.map +1 -1
  219. package/daemon/dist/domain/gateway/slack/settled-asks.js +15 -2
  220. package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -1
  221. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +0 -17
  222. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
  223. package/daemon/dist/domain/gateway/slack/slack-delivery.js +10 -40
  224. package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
  225. package/daemon/dist/domain/harness-not-started-notice.d.ts +5 -2
  226. package/daemon/dist/domain/harness-not-started-notice.d.ts.map +1 -1
  227. package/daemon/dist/domain/harness-not-started-notice.js +46 -15
  228. package/daemon/dist/domain/harness-not-started-notice.js.map +1 -1
  229. package/daemon/dist/domain/hosts/read-through.d.ts +1 -1
  230. package/daemon/dist/domain/hosts/read-through.d.ts.map +1 -1
  231. package/daemon/dist/domain/hosts/read-through.js +3 -2
  232. package/daemon/dist/domain/hosts/read-through.js.map +1 -1
  233. package/daemon/dist/domain/hot-potato-enforcer.d.ts +3 -3
  234. package/daemon/dist/domain/hot-potato-enforcer.d.ts.map +1 -1
  235. package/daemon/dist/domain/hot-potato-enforcer.js +2 -2
  236. package/daemon/dist/domain/hot-potato-enforcer.js.map +1 -1
  237. package/daemon/dist/domain/human-questions.d.ts +1 -1
  238. package/daemon/dist/domain/human-questions.d.ts.map +1 -1
  239. package/daemon/dist/domain/human-questions.js +2 -0
  240. package/daemon/dist/domain/human-questions.js.map +1 -1
  241. package/daemon/dist/domain/input-read-diagnostic.js +1 -1
  242. package/daemon/dist/domain/input-read-diagnostic.js.map +1 -1
  243. package/daemon/dist/domain/keep-alive-supervisor.d.ts +178 -0
  244. package/daemon/dist/domain/keep-alive-supervisor.d.ts.map +1 -0
  245. package/daemon/dist/domain/keep-alive-supervisor.js +523 -0
  246. package/daemon/dist/domain/keep-alive-supervisor.js.map +1 -0
  247. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts +6 -0
  248. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts.map +1 -1
  249. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js +38 -9
  250. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js.map +1 -1
  251. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  252. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +29 -1
  253. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  254. package/daemon/dist/domain/mutation-trace.d.ts +28 -0
  255. package/daemon/dist/domain/mutation-trace.d.ts.map +1 -0
  256. package/daemon/dist/domain/mutation-trace.js +38 -0
  257. package/daemon/dist/domain/mutation-trace.js.map +1 -0
  258. package/daemon/dist/domain/native-resume-probe.d.ts +13 -3
  259. package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
  260. package/daemon/dist/domain/native-resume-probe.js +54 -17
  261. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  262. package/daemon/dist/domain/network/hub-client.d.ts +30 -1
  263. package/daemon/dist/domain/network/hub-client.d.ts.map +1 -1
  264. package/daemon/dist/domain/network/hub-client.js +62 -9
  265. package/daemon/dist/domain/network/hub-client.js.map +1 -1
  266. package/daemon/dist/domain/network/network-bindings.d.ts +52 -2
  267. package/daemon/dist/domain/network/network-bindings.d.ts.map +1 -1
  268. package/daemon/dist/domain/network/network-bindings.js +217 -23
  269. package/daemon/dist/domain/network/network-bindings.js.map +1 -1
  270. package/daemon/dist/domain/network/network-connector.d.ts +9 -1
  271. package/daemon/dist/domain/network/network-connector.d.ts.map +1 -1
  272. package/daemon/dist/domain/network/network-connector.js +95 -7
  273. package/daemon/dist/domain/network/network-connector.js.map +1 -1
  274. package/daemon/dist/domain/network/network-installations.d.ts.map +1 -1
  275. package/daemon/dist/domain/network/network-installations.js +22 -7
  276. package/daemon/dist/domain/network/network-installations.js.map +1 -1
  277. package/daemon/dist/domain/network/network-provider-removal.d.ts +9 -0
  278. package/daemon/dist/domain/network/network-provider-removal.d.ts.map +1 -0
  279. package/daemon/dist/domain/network/network-provider-removal.js +75 -0
  280. package/daemon/dist/domain/network/network-provider-removal.js.map +1 -0
  281. package/daemon/dist/domain/network/network-requests.d.ts +59 -0
  282. package/daemon/dist/domain/network/network-requests.d.ts.map +1 -0
  283. package/daemon/dist/domain/network/network-requests.js +476 -0
  284. package/daemon/dist/domain/network/network-requests.js.map +1 -0
  285. package/daemon/dist/domain/node-inventory.d.ts +26 -0
  286. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  287. package/daemon/dist/domain/node-inventory.js +87 -7
  288. package/daemon/dist/domain/node-inventory.js.map +1 -1
  289. package/daemon/dist/domain/occupant-invalidator.d.ts +1 -1
  290. package/daemon/dist/domain/occupant-invalidator.d.ts.map +1 -1
  291. package/daemon/dist/domain/occupant-invalidator.js +1 -1
  292. package/daemon/dist/domain/occupant-invalidator.js.map +1 -1
  293. package/daemon/dist/domain/outbox-handler.d.ts +11 -0
  294. package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
  295. package/daemon/dist/domain/outbox-handler.js +20 -0
  296. package/daemon/dist/domain/outbox-handler.js.map +1 -1
  297. package/daemon/dist/domain/parked-query.d.ts +6 -0
  298. package/daemon/dist/domain/parked-query.d.ts.map +1 -1
  299. package/daemon/dist/domain/parked-query.js +14 -4
  300. package/daemon/dist/domain/parked-query.js.map +1 -1
  301. package/daemon/dist/domain/policies/seat-pool.d.ts +13 -0
  302. package/daemon/dist/domain/policies/seat-pool.d.ts.map +1 -1
  303. package/daemon/dist/domain/policies/seat-pool.js +18 -3
  304. package/daemon/dist/domain/policies/seat-pool.js.map +1 -1
  305. package/daemon/dist/domain/profile-resolver.d.ts +7 -1
  306. package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  307. package/daemon/dist/domain/profile-resolver.js +7 -0
  308. package/daemon/dist/domain/profile-resolver.js.map +1 -1
  309. package/daemon/dist/domain/progress/progress-indexer.d.ts.map +1 -1
  310. package/daemon/dist/domain/progress/progress-indexer.js +11 -0
  311. package/daemon/dist/domain/progress/progress-indexer.js.map +1 -1
  312. package/daemon/dist/domain/project-lifecycle-compiler.d.ts.map +1 -1
  313. package/daemon/dist/domain/project-lifecycle-compiler.js +4 -1
  314. package/daemon/dist/domain/project-lifecycle-compiler.js.map +1 -1
  315. package/daemon/dist/domain/proof/judgments.d.ts +3 -0
  316. package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
  317. package/daemon/dist/domain/proof/judgments.js +13 -3
  318. package/daemon/dist/domain/proof/judgments.js.map +1 -1
  319. package/daemon/dist/domain/proof/source-watch.js +4 -4
  320. package/daemon/dist/domain/proof/source-watch.js.map +1 -1
  321. package/daemon/dist/domain/provider/claude-interruption.d.ts +6 -0
  322. package/daemon/dist/domain/provider/claude-interruption.d.ts.map +1 -1
  323. package/daemon/dist/domain/provider/claude-interruption.js +18 -0
  324. package/daemon/dist/domain/provider/claude-interruption.js.map +1 -1
  325. package/daemon/dist/domain/ps-projection.d.ts +8 -1
  326. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  327. package/daemon/dist/domain/ps-projection.js +11 -3
  328. package/daemon/dist/domain/ps-projection.js.map +1 -1
  329. package/daemon/dist/domain/queue-erasure.d.ts +3 -0
  330. package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
  331. package/daemon/dist/domain/queue-erasure.js +2 -2
  332. package/daemon/dist/domain/queue-erasure.js.map +1 -1
  333. package/daemon/dist/domain/queue-owner.d.ts +5 -0
  334. package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
  335. package/daemon/dist/domain/queue-owner.js +16 -8
  336. package/daemon/dist/domain/queue-owner.js.map +1 -1
  337. package/daemon/dist/domain/queue-recorded-graph.d.ts +32 -0
  338. package/daemon/dist/domain/queue-recorded-graph.d.ts.map +1 -0
  339. package/daemon/dist/domain/queue-recorded-graph.js +84 -0
  340. package/daemon/dist/domain/queue-recorded-graph.js.map +1 -0
  341. package/daemon/dist/domain/queue-repository.d.ts +74 -4
  342. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  343. package/daemon/dist/domain/queue-repository.js +398 -25
  344. package/daemon/dist/domain/queue-repository.js.map +1 -1
  345. package/daemon/dist/domain/queue-retention.d.ts +1 -1
  346. package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
  347. package/daemon/dist/domain/queue-retention.js +4 -0
  348. package/daemon/dist/domain/queue-retention.js.map +1 -1
  349. package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
  350. package/daemon/dist/domain/queue-stuck-sweep.js +43 -9
  351. package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
  352. package/daemon/dist/domain/queue-transfer-export.d.ts +75 -0
  353. package/daemon/dist/domain/queue-transfer-export.d.ts.map +1 -0
  354. package/daemon/dist/domain/queue-transfer-export.js +156 -0
  355. package/daemon/dist/domain/queue-transfer-export.js.map +1 -0
  356. package/daemon/dist/domain/queue-transfer-format.d.ts +15 -0
  357. package/daemon/dist/domain/queue-transfer-format.d.ts.map +1 -0
  358. package/daemon/dist/domain/queue-transfer-format.js +32 -0
  359. package/daemon/dist/domain/queue-transfer-format.js.map +1 -0
  360. package/daemon/dist/domain/queue-transfer-parse.d.ts +40 -0
  361. package/daemon/dist/domain/queue-transfer-parse.d.ts.map +1 -0
  362. package/daemon/dist/domain/queue-transfer-parse.js +131 -0
  363. package/daemon/dist/domain/queue-transfer-parse.js.map +1 -0
  364. package/daemon/dist/domain/queue-transfer-review.d.ts +22 -0
  365. package/daemon/dist/domain/queue-transfer-review.d.ts.map +1 -0
  366. package/daemon/dist/domain/queue-transfer-review.js +81 -0
  367. package/daemon/dist/domain/queue-transfer-review.js.map +1 -0
  368. package/daemon/dist/domain/queue-transfer-staging.d.ts +79 -0
  369. package/daemon/dist/domain/queue-transfer-staging.d.ts.map +1 -0
  370. package/daemon/dist/domain/queue-transfer-staging.js +67 -0
  371. package/daemon/dist/domain/queue-transfer-staging.js.map +1 -0
  372. package/daemon/dist/domain/queue-wake-ladder.d.ts +4 -0
  373. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  374. package/daemon/dist/domain/queue-wake-ladder.js +161 -20
  375. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  376. package/daemon/dist/domain/reconciler.d.ts +27 -2
  377. package/daemon/dist/domain/reconciler.d.ts.map +1 -1
  378. package/daemon/dist/domain/reconciler.js +184 -16
  379. package/daemon/dist/domain/reconciler.js.map +1 -1
  380. package/daemon/dist/domain/refusal-trace.d.ts +15 -0
  381. package/daemon/dist/domain/refusal-trace.d.ts.map +1 -0
  382. package/daemon/dist/domain/refusal-trace.js +23 -0
  383. package/daemon/dist/domain/refusal-trace.js.map +1 -0
  384. package/daemon/dist/domain/relayed-answers.d.ts +80 -0
  385. package/daemon/dist/domain/relayed-answers.d.ts.map +1 -0
  386. package/daemon/dist/domain/relayed-answers.js +8 -0
  387. package/daemon/dist/domain/relayed-answers.js.map +1 -0
  388. package/daemon/dist/domain/remote-control-observations.d.ts +50 -0
  389. package/daemon/dist/domain/remote-control-observations.d.ts.map +1 -0
  390. package/daemon/dist/domain/remote-control-observations.js +72 -0
  391. package/daemon/dist/domain/remote-control-observations.js.map +1 -0
  392. package/daemon/dist/domain/restore-attempt-receipt.d.ts.map +1 -1
  393. package/daemon/dist/domain/restore-attempt-receipt.js +8 -2
  394. package/daemon/dist/domain/restore-attempt-receipt.js.map +1 -1
  395. package/daemon/dist/domain/restore-orchestrator.d.ts +67 -6
  396. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  397. package/daemon/dist/domain/restore-orchestrator.js +345 -51
  398. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  399. package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
  400. package/daemon/dist/domain/rig-lifecycle-service.js +4 -1
  401. package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
  402. package/daemon/dist/domain/rig-repository.d.ts +21 -3
  403. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  404. package/daemon/dist/domain/rig-repository.js +67 -2
  405. package/daemon/dist/domain/rig-repository.js.map +1 -1
  406. package/daemon/dist/domain/rig-teardown.d.ts +22 -7
  407. package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
  408. package/daemon/dist/domain/rig-teardown.js +108 -24
  409. package/daemon/dist/domain/rig-teardown.js.map +1 -1
  410. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  411. package/daemon/dist/domain/rigspec-codec.js +12 -0
  412. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  413. package/daemon/dist/domain/rigspec-exporter.d.ts +14 -0
  414. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  415. package/daemon/dist/domain/rigspec-exporter.js +56 -14
  416. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  417. package/daemon/dist/domain/rigspec-instantiator.d.ts +32 -3
  418. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  419. package/daemon/dist/domain/rigspec-instantiator.js +121 -23
  420. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  421. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  422. package/daemon/dist/domain/rigspec-schema.js +30 -4
  423. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  424. package/daemon/dist/domain/rosters.d.ts +1 -0
  425. package/daemon/dist/domain/rosters.d.ts.map +1 -1
  426. package/daemon/dist/domain/rosters.js +5 -4
  427. package/daemon/dist/domain/rosters.js.map +1 -1
  428. package/daemon/dist/domain/seat-activity-service.d.ts +4 -0
  429. package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
  430. package/daemon/dist/domain/seat-activity-service.js +24 -5
  431. package/daemon/dist/domain/seat-activity-service.js.map +1 -1
  432. package/daemon/dist/domain/seat-attention-reconciler.d.ts +7 -0
  433. package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
  434. package/daemon/dist/domain/seat-attention-reconciler.js +149 -65
  435. package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
  436. package/daemon/dist/domain/seat-cold-start.d.ts +150 -0
  437. package/daemon/dist/domain/seat-cold-start.d.ts.map +1 -0
  438. package/daemon/dist/domain/seat-cold-start.js +371 -0
  439. package/daemon/dist/domain/seat-cold-start.js.map +1 -0
  440. package/daemon/dist/domain/seat-delivery-guard.d.ts +11 -2
  441. package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
  442. package/daemon/dist/domain/seat-delivery-guard.js +34 -6
  443. package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
  444. package/daemon/dist/domain/seat-identity-reconciler.d.ts +13 -0
  445. package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
  446. package/daemon/dist/domain/seat-identity-reconciler.js +63 -23
  447. package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
  448. package/daemon/dist/domain/seat-identity-store.d.ts +5 -3
  449. package/daemon/dist/domain/seat-identity-store.d.ts.map +1 -1
  450. package/daemon/dist/domain/seat-identity-store.js +7 -3
  451. package/daemon/dist/domain/seat-identity-store.js.map +1 -1
  452. package/daemon/dist/domain/seat-launch-environment.d.ts +2 -0
  453. package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
  454. package/daemon/dist/domain/seat-launch-environment.js +9 -1
  455. package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
  456. package/daemon/dist/domain/seat-lifecycle-service.d.ts +17 -0
  457. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  458. package/daemon/dist/domain/seat-lifecycle-service.js +176 -22
  459. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  460. package/daemon/dist/domain/seat-pool-executor.d.ts +116 -0
  461. package/daemon/dist/domain/seat-pool-executor.d.ts.map +1 -0
  462. package/daemon/dist/domain/seat-pool-executor.js +565 -0
  463. package/daemon/dist/domain/seat-pool-executor.js.map +1 -0
  464. package/daemon/dist/domain/seat-pool-registration.d.ts +93 -0
  465. package/daemon/dist/domain/seat-pool-registration.d.ts.map +1 -0
  466. package/daemon/dist/domain/seat-pool-registration.js +149 -0
  467. package/daemon/dist/domain/seat-pool-registration.js.map +1 -0
  468. package/daemon/dist/domain/seat-pool-slots.d.ts +42 -0
  469. package/daemon/dist/domain/seat-pool-slots.d.ts.map +1 -1
  470. package/daemon/dist/domain/seat-pool-slots.js +51 -0
  471. package/daemon/dist/domain/seat-pool-slots.js.map +1 -1
  472. package/daemon/dist/domain/seat-restart-in-place.d.ts +15 -0
  473. package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
  474. package/daemon/dist/domain/seat-restart-in-place.js +54 -2
  475. package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
  476. package/daemon/dist/domain/seat-runtime-home-record.d.ts +8 -0
  477. package/daemon/dist/domain/seat-runtime-home-record.d.ts.map +1 -1
  478. package/daemon/dist/domain/seat-runtime-home-record.js +1 -1
  479. package/daemon/dist/domain/seat-runtime-home-record.js.map +1 -1
  480. package/daemon/dist/domain/session-registry.d.ts +22 -3
  481. package/daemon/dist/domain/session-registry.d.ts.map +1 -1
  482. package/daemon/dist/domain/session-registry.js +38 -6
  483. package/daemon/dist/domain/session-registry.js.map +1 -1
  484. package/daemon/dist/domain/session-transport.d.ts +18 -2
  485. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  486. package/daemon/dist/domain/session-transport.js +65 -38
  487. package/daemon/dist/domain/session-transport.js.map +1 -1
  488. package/daemon/dist/domain/slices/slice-indexer.d.ts +55 -0
  489. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  490. package/daemon/dist/domain/slices/slice-indexer.js +259 -50
  491. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  492. package/daemon/dist/domain/startup-orchestrator.d.ts +1 -1
  493. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  494. package/daemon/dist/domain/startup-orchestrator.js +75 -23
  495. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  496. package/daemon/dist/domain/startup-proof.d.ts +6 -0
  497. package/daemon/dist/domain/startup-proof.d.ts.map +1 -1
  498. package/daemon/dist/domain/startup-proof.js +11 -0
  499. package/daemon/dist/domain/startup-proof.js.map +1 -1
  500. package/daemon/dist/domain/startup-submission-evidence.d.ts +2 -0
  501. package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
  502. package/daemon/dist/domain/startup-submission-evidence.js +31 -3
  503. package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
  504. package/daemon/dist/domain/terminal/herdr-adapter.d.ts +2 -0
  505. package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
  506. package/daemon/dist/domain/terminal/herdr-adapter.js +2 -0
  507. package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
  508. package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts +2 -1
  509. package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts.map +1 -1
  510. package/daemon/dist/domain/terminal/scope-task-terminal-view.js +80 -38
  511. package/daemon/dist/domain/terminal/scope-task-terminal-view.js.map +1 -1
  512. package/daemon/dist/domain/terminal/terminal-provider.d.ts +2 -0
  513. package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
  514. package/daemon/dist/domain/terminal/terminal-service.d.ts +3 -0
  515. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  516. package/daemon/dist/domain/terminal/terminal-service.js +30 -26
  517. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  518. package/daemon/dist/domain/terminal/tile-attach.d.ts +22 -0
  519. package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -1
  520. package/daemon/dist/domain/terminal/tile-attach.js +71 -0
  521. package/daemon/dist/domain/terminal/tile-attach.js.map +1 -1
  522. package/daemon/dist/domain/terminal/view-composer.d.ts +2 -0
  523. package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
  524. package/daemon/dist/domain/terminal/view-composer.js +4 -2
  525. package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
  526. package/daemon/dist/domain/topology-trace.d.ts +40 -0
  527. package/daemon/dist/domain/topology-trace.d.ts.map +1 -0
  528. package/daemon/dist/domain/topology-trace.js +106 -0
  529. package/daemon/dist/domain/topology-trace.js.map +1 -0
  530. package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  531. package/daemon/dist/domain/transcript-store.js +12 -1
  532. package/daemon/dist/domain/transcript-store.js.map +1 -1
  533. package/daemon/dist/domain/types.d.ts +104 -8
  534. package/daemon/dist/domain/types.d.ts.map +1 -1
  535. package/daemon/dist/domain/types.js +3 -2
  536. package/daemon/dist/domain/types.js.map +1 -1
  537. package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
  538. package/daemon/dist/domain/user-settings/settings-browser.js +2 -0
  539. package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
  540. package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
  541. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  542. package/daemon/dist/domain/user-settings/settings-store.js +13 -0
  543. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  544. package/daemon/dist/domain/watchdog-jobs-repository.d.ts +5 -3
  545. package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
  546. package/daemon/dist/domain/watchdog-jobs-repository.js +6 -1
  547. package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
  548. package/daemon/dist/domain/watchdog-policy-engine.d.ts +8 -1
  549. package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
  550. package/daemon/dist/domain/watchdog-policy-engine.js +6 -2
  551. package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
  552. package/daemon/dist/domain/workflow-instance-store.d.ts +2 -0
  553. package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
  554. package/daemon/dist/domain/workflow-instance-store.js +11 -2
  555. package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
  556. package/daemon/dist/domain/workflow-projector.d.ts +3 -1
  557. package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
  558. package/daemon/dist/domain/workflow-projector.js +58 -10
  559. package/daemon/dist/domain/workflow-projector.js.map +1 -1
  560. package/daemon/dist/domain/workflow-run-title.d.ts +4 -0
  561. package/daemon/dist/domain/workflow-run-title.d.ts.map +1 -0
  562. package/daemon/dist/domain/workflow-run-title.js +5 -0
  563. package/daemon/dist/domain/workflow-run-title.js.map +1 -0
  564. package/daemon/dist/domain/workflow-runtime.d.ts +1 -0
  565. package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
  566. package/daemon/dist/domain/workflow-runtime.js +3 -1
  567. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  568. package/daemon/dist/domain/workflow-spec-cache.d.ts +2 -2
  569. package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
  570. package/daemon/dist/domain/workflow-spec-cache.js +20 -1
  571. package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
  572. package/daemon/dist/domain/workflow-types.d.ts +15 -0
  573. package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
  574. package/daemon/dist/domain/workflow-types.js +4 -0
  575. package/daemon/dist/domain/workflow-types.js.map +1 -1
  576. package/daemon/dist/domain/workspace/project-read.d.ts +10 -0
  577. package/daemon/dist/domain/workspace/project-read.d.ts.map +1 -1
  578. package/daemon/dist/domain/workspace/project-read.js +34 -2
  579. package/daemon/dist/domain/workspace/project-read.js.map +1 -1
  580. package/daemon/dist/index.d.ts.map +1 -1
  581. package/daemon/dist/index.js +7 -1
  582. package/daemon/dist/index.js.map +1 -1
  583. package/daemon/dist/queue-transfer-export-surface.d.ts +33 -0
  584. package/daemon/dist/queue-transfer-export-surface.d.ts.map +1 -0
  585. package/daemon/dist/queue-transfer-export-surface.js +13 -0
  586. package/daemon/dist/queue-transfer-export-surface.js.map +1 -0
  587. package/daemon/dist/queue-transfer-staging-surface.d.ts +86 -0
  588. package/daemon/dist/queue-transfer-staging-surface.d.ts.map +1 -0
  589. package/daemon/dist/queue-transfer-staging-surface.js +91 -0
  590. package/daemon/dist/queue-transfer-staging-surface.js.map +1 -0
  591. package/daemon/dist/routes/activity.d.ts.map +1 -1
  592. package/daemon/dist/routes/activity.js +46 -0
  593. package/daemon/dist/routes/activity.js.map +1 -1
  594. package/daemon/dist/routes/compaction.d.ts.map +1 -1
  595. package/daemon/dist/routes/compaction.js +7 -2
  596. package/daemon/dist/routes/compaction.js.map +1 -1
  597. package/daemon/dist/routes/context-packs.d.ts.map +1 -1
  598. package/daemon/dist/routes/context-packs.js +23 -1
  599. package/daemon/dist/routes/context-packs.js.map +1 -1
  600. package/daemon/dist/routes/events.js +7 -4
  601. package/daemon/dist/routes/events.js.map +1 -1
  602. package/daemon/dist/routes/network.d.ts +2 -0
  603. package/daemon/dist/routes/network.d.ts.map +1 -1
  604. package/daemon/dist/routes/network.js +62 -1
  605. package/daemon/dist/routes/network.js.map +1 -1
  606. package/daemon/dist/routes/ps.js +12 -1
  607. package/daemon/dist/routes/ps.js.map +1 -1
  608. package/daemon/dist/routes/queue.d.ts.map +1 -1
  609. package/daemon/dist/routes/queue.js +155 -52
  610. package/daemon/dist/routes/queue.js.map +1 -1
  611. package/daemon/dist/routes/require-sender-identity.d.ts.map +1 -1
  612. package/daemon/dist/routes/require-sender-identity.js +6 -3
  613. package/daemon/dist/routes/require-sender-identity.js.map +1 -1
  614. package/daemon/dist/routes/rigs.js +2 -0
  615. package/daemon/dist/routes/rigs.js.map +1 -1
  616. package/daemon/dist/routes/seat.d.ts.map +1 -1
  617. package/daemon/dist/routes/seat.js +12 -5
  618. package/daemon/dist/routes/seat.js.map +1 -1
  619. package/daemon/dist/routes/sessions.d.ts.map +1 -1
  620. package/daemon/dist/routes/sessions.js +14 -0
  621. package/daemon/dist/routes/sessions.js.map +1 -1
  622. package/daemon/dist/routes/slices.d.ts.map +1 -1
  623. package/daemon/dist/routes/slices.js +16 -7
  624. package/daemon/dist/routes/slices.js.map +1 -1
  625. package/daemon/dist/routes/startup.d.ts.map +1 -1
  626. package/daemon/dist/routes/startup.js +49 -4
  627. package/daemon/dist/routes/startup.js.map +1 -1
  628. package/daemon/dist/routes/terminal-ws.js +28 -2
  629. package/daemon/dist/routes/terminal-ws.js.map +1 -1
  630. package/daemon/dist/routes/terminal.d.ts.map +1 -1
  631. package/daemon/dist/routes/terminal.js +3 -2
  632. package/daemon/dist/routes/terminal.js.map +1 -1
  633. package/daemon/dist/routes/transport.d.ts.map +1 -1
  634. package/daemon/dist/routes/transport.js +14 -2
  635. package/daemon/dist/routes/transport.js.map +1 -1
  636. package/daemon/dist/routes/up.js +2 -0
  637. package/daemon/dist/routes/up.js.map +1 -1
  638. package/daemon/dist/routes/workflow.d.ts.map +1 -1
  639. package/daemon/dist/routes/workflow.js +9 -3
  640. package/daemon/dist/routes/workflow.js.map +1 -1
  641. package/daemon/dist/server.d.ts +7 -0
  642. package/daemon/dist/server.d.ts.map +1 -1
  643. package/daemon/dist/server.js +8 -0
  644. package/daemon/dist/server.js.map +1 -1
  645. package/daemon/dist/startup.d.ts +3 -0
  646. package/daemon/dist/startup.d.ts.map +1 -1
  647. package/daemon/dist/startup.js +133 -7
  648. package/daemon/dist/startup.js.map +1 -1
  649. package/daemon/dist/terminal/TerminalSessionBroker.d.ts +10 -0
  650. package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
  651. package/daemon/dist/terminal/TerminalSessionBroker.js +63 -4
  652. package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
  653. package/daemon/dist/topology-trace-surface.d.ts +2 -0
  654. package/daemon/dist/topology-trace-surface.d.ts.map +1 -0
  655. package/daemon/dist/topology-trace-surface.js +2 -0
  656. package/daemon/dist/topology-trace-surface.js.map +1 -0
  657. package/daemon/docs/reference/acp-agents.md +2 -1
  658. package/daemon/docs/reference/agent-spec.md +3 -1
  659. package/daemon/docs/reference/agent-startup-guide.md +3 -1
  660. package/daemon/docs/reference/agent-state-taxonomy.md +35 -1
  661. package/daemon/docs/reference/checked-seat-stop.md +11 -1
  662. package/daemon/docs/reference/claude-status-line.md +7 -0
  663. package/daemon/docs/reference/daemon-http-clients.md +120 -18
  664. package/daemon/docs/reference/gateway-participants.md +6 -0
  665. package/daemon/docs/reference/getting-started.md +119 -12
  666. package/daemon/docs/reference/hosted-members.md +114 -0
  667. package/daemon/docs/reference/inventory-request-diagnostics.md +22 -0
  668. package/daemon/docs/reference/network-connector.md +112 -4
  669. package/daemon/docs/reference/project-workspace.md +11 -2
  670. package/daemon/docs/reference/queue-erasure.md +1 -1
  671. package/daemon/docs/reference/queue-transfer-export.md +38 -0
  672. package/daemon/docs/reference/queue-transfer-staging.md +39 -0
  673. package/daemon/docs/reference/quickstart.md +4 -4
  674. package/daemon/docs/reference/refocus-channel.md +5 -2
  675. package/daemon/docs/reference/rig-spec.md +193 -3
  676. package/daemon/docs/reference/rosters.md +18 -3
  677. package/daemon/docs/reference/sdlc-conventions.md +1 -1
  678. package/daemon/docs/reference/seat-delivery.md +21 -4
  679. package/daemon/docs/reference/seat-pools.md +116 -0
  680. package/daemon/docs/reference/terminal-sessions.md +57 -11
  681. package/daemon/docs/reference/tmux-servers.md +27 -2
  682. package/daemon/docs/reference/whats-new.md +92 -12
  683. package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +1 -1
  684. package/dist/build-info.js +3 -3
  685. package/dist/client.d.ts +2 -1
  686. package/dist/client.d.ts.map +1 -1
  687. package/dist/commands/broadcast.d.ts.map +1 -1
  688. package/dist/commands/broadcast.js +87 -8
  689. package/dist/commands/broadcast.js.map +1 -1
  690. package/dist/commands/chatroom.d.ts +3 -0
  691. package/dist/commands/chatroom.d.ts.map +1 -1
  692. package/dist/commands/chatroom.js +7 -1
  693. package/dist/commands/chatroom.js.map +1 -1
  694. package/dist/commands/config.d.ts.map +1 -1
  695. package/dist/commands/config.js +2 -1
  696. package/dist/commands/config.js.map +1 -1
  697. package/dist/commands/daemon.d.ts.map +1 -1
  698. package/dist/commands/daemon.js +18 -15
  699. package/dist/commands/daemon.js.map +1 -1
  700. package/dist/commands/exec.d.ts.map +1 -1
  701. package/dist/commands/exec.js +22 -13
  702. package/dist/commands/exec.js.map +1 -1
  703. package/dist/commands/export.d.ts.map +1 -1
  704. package/dist/commands/export.js +5 -1
  705. package/dist/commands/export.js.map +1 -1
  706. package/dist/commands/gateway.d.ts +4 -0
  707. package/dist/commands/gateway.d.ts.map +1 -1
  708. package/dist/commands/gateway.js +37 -0
  709. package/dist/commands/gateway.js.map +1 -1
  710. package/dist/commands/network.d.ts.map +1 -1
  711. package/dist/commands/network.js +54 -1
  712. package/dist/commands/network.js.map +1 -1
  713. package/dist/commands/parked.d.ts.map +1 -1
  714. package/dist/commands/parked.js +12 -6
  715. package/dist/commands/parked.js.map +1 -1
  716. package/dist/commands/provider.d.ts.map +1 -1
  717. package/dist/commands/provider.js +3 -2
  718. package/dist/commands/provider.js.map +1 -1
  719. package/dist/commands/ps.d.ts +12 -1
  720. package/dist/commands/ps.d.ts.map +1 -1
  721. package/dist/commands/ps.js +43 -10
  722. package/dist/commands/ps.js.map +1 -1
  723. package/dist/commands/queue-export.d.ts +3 -0
  724. package/dist/commands/queue-export.d.ts.map +1 -0
  725. package/dist/commands/queue-export.js +67 -0
  726. package/dist/commands/queue-export.js.map +1 -0
  727. package/dist/commands/queue-import.d.ts +4 -0
  728. package/dist/commands/queue-import.d.ts.map +1 -0
  729. package/dist/commands/queue-import.js +47 -0
  730. package/dist/commands/queue-import.js.map +1 -0
  731. package/dist/commands/queue.d.ts +1 -1
  732. package/dist/commands/queue.d.ts.map +1 -1
  733. package/dist/commands/queue.js +50 -1
  734. package/dist/commands/queue.js.map +1 -1
  735. package/dist/commands/roster.js +1 -1
  736. package/dist/commands/roster.js.map +1 -1
  737. package/dist/commands/scope.d.ts.map +1 -1
  738. package/dist/commands/scope.js +30 -18
  739. package/dist/commands/scope.js.map +1 -1
  740. package/dist/commands/seat.d.ts.map +1 -1
  741. package/dist/commands/seat.js +20 -2
  742. package/dist/commands/seat.js.map +1 -1
  743. package/dist/commands/send.d.ts.map +1 -1
  744. package/dist/commands/send.js +15 -3
  745. package/dist/commands/send.js.map +1 -1
  746. package/dist/commands/start.d.ts +14 -0
  747. package/dist/commands/start.d.ts.map +1 -1
  748. package/dist/commands/start.js +54 -5
  749. package/dist/commands/start.js.map +1 -1
  750. package/dist/commands/workflow.d.ts.map +1 -1
  751. package/dist/commands/workflow.js +4 -0
  752. package/dist/commands/workflow.js.map +1 -1
  753. package/dist/config-store.d.ts +2 -1
  754. package/dist/config-store.d.ts.map +1 -1
  755. package/dist/config-store.js +14 -1
  756. package/dist/config-store.js.map +1 -1
  757. package/dist/cross-host-executor.d.ts +3 -0
  758. package/dist/cross-host-executor.d.ts.map +1 -1
  759. package/dist/cross-host-executor.js +5 -0
  760. package/dist/cross-host-executor.js.map +1 -1
  761. package/dist/daemon-auto-start.d.ts.map +1 -1
  762. package/dist/daemon-auto-start.js +1 -0
  763. package/dist/daemon-auto-start.js.map +1 -1
  764. package/dist/daemon-lifecycle.d.ts +6 -1
  765. package/dist/daemon-lifecycle.d.ts.map +1 -1
  766. package/dist/daemon-lifecycle.js +90 -30
  767. package/dist/daemon-lifecycle.js.map +1 -1
  768. package/dist/daemon-start-lock.d.ts +38 -3
  769. package/dist/daemon-start-lock.d.ts.map +1 -1
  770. package/dist/daemon-start-lock.js +201 -48
  771. package/dist/daemon-start-lock.js.map +1 -1
  772. package/dist/lib/scope/progress-edit.d.ts.map +1 -1
  773. package/dist/lib/scope/progress-edit.js +10 -0
  774. package/dist/lib/scope/progress-edit.js.map +1 -1
  775. package/dist/lib/topology-trace.d.ts +3 -34
  776. package/dist/lib/topology-trace.d.ts.map +1 -1
  777. package/dist/lib/topology-trace.js +3 -97
  778. package/dist/lib/topology-trace.js.map +1 -1
  779. package/dist/local-db.d.ts +2 -0
  780. package/dist/local-db.d.ts.map +1 -1
  781. package/dist/local-db.js +14 -11
  782. package/dist/local-db.js.map +1 -1
  783. package/dist/mcp-caller-resolver.d.ts +36 -0
  784. package/dist/mcp-caller-resolver.d.ts.map +1 -0
  785. package/dist/mcp-caller-resolver.js +82 -0
  786. package/dist/mcp-caller-resolver.js.map +1 -0
  787. package/dist/mcp-http.d.ts +43 -2
  788. package/dist/mcp-http.d.ts.map +1 -1
  789. package/dist/mcp-http.js +223 -46
  790. package/dist/mcp-http.js.map +1 -1
  791. package/dist/mcp-server.d.ts +23 -0
  792. package/dist/mcp-server.d.ts.map +1 -1
  793. package/dist/mcp-server.js +108 -39
  794. package/dist/mcp-server.js.map +1 -1
  795. package/dist/mcp-surface.d.ts +3 -2
  796. package/dist/mcp-surface.d.ts.map +1 -1
  797. package/dist/node-support.d.ts.map +1 -1
  798. package/dist/node-support.js +10 -0
  799. package/dist/node-support.js.map +1 -1
  800. package/dist/remote-host-ops.d.ts +3 -0
  801. package/dist/remote-host-ops.d.ts.map +1 -1
  802. package/dist/remote-host-ops.js +15 -1
  803. package/dist/remote-host-ops.js.map +1 -1
  804. package/package.json +3 -3
  805. package/scripts/check-abi.mjs +15 -0
  806. package/tui/dist/attention/attention-model.d.ts.map +1 -1
  807. package/tui/dist/attention/attention-model.js +8 -4
  808. package/tui/dist/attention/attention-model.js.map +1 -1
  809. package/tui/dist/crash-cart/start-daemon.d.ts +20 -0
  810. package/tui/dist/crash-cart/start-daemon.d.ts.map +1 -1
  811. package/tui/dist/crash-cart/start-daemon.js +56 -0
  812. package/tui/dist/crash-cart/start-daemon.js.map +1 -1
  813. package/tui/dist/hydrate.d.ts.map +1 -1
  814. package/tui/dist/hydrate.js +4 -2
  815. package/tui/dist/hydrate.js.map +1 -1
  816. package/tui/dist/main.js +24 -8
  817. package/tui/dist/main.js.map +1 -1
  818. package/tui/dist/render.d.ts +2 -0
  819. package/tui/dist/render.d.ts.map +1 -1
  820. package/tui/dist/render.js +41 -9
  821. package/tui/dist/render.js.map +1 -1
@@ -10,6 +10,7 @@ import { isTmuxCredentialEnvKey } from "./tmux-credential-env.js";
10
10
  import { addSeatRuntimeDir, seatRuntimeDir } from "../domain/seat-runtime-dir.js";
11
11
  import { tmuxOnDaemonServer } from "./tmux-server.js";
12
12
  import { TMUX_SERVER_LIMIT_PREFIX, TMUX_SERVER_NO_SESSION_BUS, TMUX_SERVER_SESSION_BUS } from "../tmux-server-start.js";
13
+ import { SEAT_SCOPE_SLICE, rigSeatSlice } from "./seat-slice.js";
13
14
  /** tmux 3.4 escapes these dollar forms in command output even for show-options -v.
14
15
  * Remove only its added escape; preserve an intentionally preceding backslash. */
15
16
  export function decodeTmux34Option(value, serverVersion) {
@@ -46,6 +47,14 @@ const SEAT_SCOPE_START_CHECKS = 120;
46
47
  export function probeShowsNoServer(probe) {
47
48
  return probe.state === "transport_unavailable" && /^no server running on /.test(tmuxDiagnosticStart(probe.cause ?? ""));
48
49
  }
50
+ /** Only a reported missing server permits starting an empty one (a reboot's /tmp cleanup removes the socket); other
51
+ * unreadable/permission results do not. Shared by `rig down` and the keep_alive reconcile (#2940). */
52
+ export function isMissingTmuxServer(probe) {
53
+ if (probe.state !== "transport_unavailable" || /permission denied|operation not permitted|EACCES|EPERM/i.test(probe.cause))
54
+ return false;
55
+ return /no server running/i.test(probe.cause)
56
+ || /(?:error connecting to|tmux-\d+)[^\n]*(?:No such file or directory|Connection refused)/i.test(probe.cause);
57
+ }
49
58
  /** The first line of tmux's own diagnostic for a lost server, for a log line or a status field. */
50
59
  function serverDiagnostic(error) {
51
60
  const reported = tmuxReportedError(error);
@@ -370,13 +379,18 @@ export function noticeLine(notice) {
370
379
  return `process_limits requested, not applied: ${problemText(notice)}; the seat went on without the limit, and the ` +
371
380
  "request stays stored (a fresh launch applies it)";
372
381
  }
373
- /** The slice a seat scope goes in: seats with process limits leave the terminal server's scope (and any limit an
374
- * operator put on it) for this slice. No dash: systemd reads a dash in a slice name as nesting, which would put the
375
- * seats under `openrig.slice` and any limit on it. */
376
- export const SEAT_SCOPE_SLICE = "openrigseats.slice";
382
+ export { SEAT_SCOPE_SLICE };
383
+ /** #80: the warning of a launch whose rig groups its seats but whose scope could not go beneath the rig's slice. The
384
+ * launch took today's path instead (with any limit it has), so nothing was refused or dropped. */
385
+ export function groupingNotAppliedLine(reason) {
386
+ return `seat_slice requested, grouping not applied: ${reason}; the seat started on its ungrouped launch path ` +
387
+ "(its next launch tries the rig's slice again)";
388
+ }
377
389
  /** Why a seat with a limit can't start with the inherited tmux environment, with the way out. */
378
390
  const INHERIT_TMUX_ENVIRONMENT_REASON = "terminal.inherit_tmux_environment is on: a seat with a limit needs the scoped " +
379
391
  "launch environment (set terminal.inherit_tmux_environment to false)";
392
+ /** #80: why a grouped launch started again on its ungrouped path. */
393
+ const GROUPED_START_FAILED = "the seat's scope beneath the rig's slice did not start: its pane's command exited before entering it";
380
394
  /** How long a launch skips asking again after a failed check (it reads as `unverified`, with the observation's age). */
381
395
  const SEAT_SCOPE_RETRY_MS = 60_000;
382
396
  /** systemd-run reaches the user manager through the runtime directory, not the seat's session bus (which the launch
@@ -393,8 +407,8 @@ export function restoreEnvArgv(values) {
393
407
  }
394
408
  /** The systemd-run options of a seat scope, up to (not including) the `--` before the command. `systemdRun` is the
395
409
  * absolute path the check resolved, so the check and the launch run the same binary whatever PATH the seat has. */
396
- function seatScopeArgv(opts, unit, description, limits, systemdRun) {
397
- return [systemdRun, "--user", "--scope", "--quiet", "--collect", "--slice", SEAT_SCOPE_SLICE, "--unit", unit,
410
+ function seatScopeArgv(opts, unit, description, limits, systemdRun, slice = SEAT_SCOPE_SLICE) {
411
+ return [systemdRun, "--user", "--scope", "--quiet", "--collect", "--slice", slice, "--unit", unit,
398
412
  "--description", description,
399
413
  // As for the server's scope: the command's arguments must reach /bin/sh exactly as written (254+).
400
414
  ...(opts.literal ? ["--expand-environment=no"] : []),
@@ -539,6 +553,9 @@ export class TmuxAdapter {
539
553
  * for a node: that seat launches exactly as before. It may throw for a malformed stored value: that seat's launch
540
554
  * reads it as `invalid`, and no other seat is affected. */
541
555
  seatProcessLimits;
556
+ /** #80: the name of the rig whose slice a seat's new scopes go beneath (rig spec `seat_slice: rig`), read at each
557
+ * launch; undefined for a seat whose rig doesn't group its seats, which then launches exactly as before. */
558
+ seatSliceRig;
542
559
  /** Whether a seat runs in an environment guest (its harness is a local viewer of a guest's agent): a scope on this
543
560
  * host would hold only the viewer, so a limit can't be applied (#3253). `session` is the seat's session name, for a
544
561
  * placement not yet claimed by its node (before the seat's first launch). */
@@ -706,6 +723,55 @@ export class TmuxAdapter {
706
723
  }
707
724
  return null;
708
725
  }
726
+ /** #80: the rig slice a seat's new scope goes beneath, or why its rig's grouping can't be used; undefined when the
727
+ * seat's rig doesn't group its seats (it then launches exactly as before). */
728
+ seatGrouping(nodeId) {
729
+ if (!nodeId || !this.seatSliceRig)
730
+ return undefined;
731
+ let rig;
732
+ try {
733
+ rig = this.seatSliceRig(nodeId);
734
+ }
735
+ catch (error) {
736
+ return { notApplied: `the rig's seat_slice could not be read (${error.message})` };
737
+ }
738
+ if (rig === undefined)
739
+ return undefined;
740
+ const slice = rigSeatSlice(rig);
741
+ return slice.kind === "slice" ? { slice: slice.name } : { notApplied: slice.reason };
742
+ }
743
+ /** #80: one launch's grouping: the rig slice its scope tries first (undefined when the seat's rig doesn't group, or once
744
+ * grouping is not applied), and how that launch reports grouping not applied (a warning, and the slice is dropped). A
745
+ * retry after a grouped start failed (`notices.groupingFailed`) reports it and takes the ungrouped path. */
746
+ launchGrouping(nodeId, notices, warnings) {
747
+ const grouping = {
748
+ slice: undefined,
749
+ notApplied: (reason) => {
750
+ const line = groupingNotAppliedLine(reason);
751
+ warnings.push(line);
752
+ console.warn(`[seat launch] ${line}`);
753
+ grouping.slice = undefined;
754
+ },
755
+ };
756
+ const found = notices?.groupingFailed ? { notApplied: notices.groupingFailed } : this.seatGrouping(nodeId);
757
+ if (found && "slice" in found)
758
+ grouping.slice = found.slice;
759
+ else if (found)
760
+ grouping.notApplied(found.notApplied);
761
+ return grouping;
762
+ }
763
+ /** A limited seat's scope: beneath the rig's slice when its rig groups its seats and that scope can be made, else the
764
+ * ungrouped scope, checked exactly as without grouping (#80: grouping adds no refusal and keeps every limit). */
765
+ async seatScopeGrouped(limits, seatEnv, policy, grouping) {
766
+ if (grouping.slice) {
767
+ const outcome = await this.seatScope(limits, seatEnv, policy, grouping.slice);
768
+ if (outcome.ok)
769
+ return { ...outcome, grouped: true };
770
+ grouping.notApplied(outcome.problem.reason);
771
+ }
772
+ const outcome = await this.seatScope(limits, seatEnv, policy);
773
+ return outcome.ok ? { ...outcome, grouped: false } : outcome;
774
+ }
709
775
  /** systemd-run, systemctl and timeout, resolved once from the daemon's PATH, or why they can't be. */
710
776
  seatScopeTools() {
711
777
  const systemdRun = this.resolveExecutable("systemd-run");
@@ -725,11 +791,13 @@ export class TmuxAdapter {
725
791
  * the tmux server stays where it is, and only this seat's processes are under the limits (#3253). systemd-run
726
792
  * registers itself in the new scope and then execs the command, so the pane's process is the seat's. Or why it
727
793
  * can't, classified: never a silent start without the limit. */
728
- async seatScope(limits, seatEnv, policy) {
794
+ async seatScope(limits, seatEnv, policy, slice = SEAT_SCOPE_SLICE) {
729
795
  const requested = { ...limits };
730
796
  const fail = (problem) => ({ ok: false, problem: { ...problem, requested } });
797
+ // The status of a seat's limit (readSeatProcessLimits) reads only what the ungrouped scope showed: a rig slice that
798
+ // can't be used (#80) falls back to that scope and says nothing of the limit.
731
799
  const positive = (problem) => {
732
- if (problem.kind === "unsupported")
800
+ if (problem.kind === "unsupported" && slice === SEAT_SCOPE_SLICE)
733
801
  this.seatScopeLastPositive = { at: Date.now(), problem, probed: limits };
734
802
  return fail(problem);
735
803
  };
@@ -742,7 +810,7 @@ export class TmuxAdapter {
742
810
  const runtimeDir = this.scopeRuntimeDir();
743
811
  // A systemd-run that changed since (another PATH, an upgrade) is proven again, and so is each pair of limits: a
744
812
  // memory limit is never taken as proven by a scope that had only the task limit.
745
- const provenKey = `${tools.systemdRun}\0${limits.tasksMax ?? "-"}\0${limits.memoryMax ?? "-"}`;
813
+ const provenKey = `${tools.systemdRun}\0${limits.tasksMax ?? "-"}\0${limits.memoryMax ?? "-"}\0${slice}`;
746
814
  const probeKey = `probe:${provenKey}`;
747
815
  for (const key of ["bus", probeKey]) {
748
816
  const failed = this.seatScopeFailedAt.get(key);
@@ -768,7 +836,7 @@ export class TmuxAdapter {
768
836
  this.seatScopeFailedAt.delete("bus");
769
837
  let opts = this.seatScopeProven.get(provenKey);
770
838
  if (!opts) {
771
- const proven = await this.proveSeatScope(runtimeDir, limits, tools);
839
+ const proven = await this.proveSeatScope(runtimeDir, limits, tools, slice);
772
840
  if (!proven.ok)
773
841
  return remember(probeKey, proven.problem);
774
842
  opts = proven.opts;
@@ -780,16 +848,20 @@ export class TmuxAdapter {
780
848
  // Unit names take ASCII letters, digits and ":-_.\\"; an "@" would read as a template instance.
781
849
  const unit = `openrig-seat-${name.replace(/[^A-Za-z0-9_.-]/g, "_").slice(0, 120)}-${randomUUID().slice(0, 8)}`;
782
850
  return { ok: true, prefix: [...seatScopeBusEnv(runtimeDir),
783
- ...seatScopeArgv(opts, unit, `OpenRig seat ${name}`, limits, tools.systemdRun), "--"] };
851
+ ...seatScopeArgv(opts, unit, `OpenRig seat ${name}`, limits, tools.systemdRun, slice), "--"] };
784
852
  }
785
853
  /** One throwaway scope with the seat's own options, whose command prints the pids.max of its own cgroup (and, with
786
854
  * memory_max, its memory.max: one line per limit): the limits count as supported only when each one requested is the
787
855
  * requested value. Options this systemd lacks are dropped from its stderr, as for the server's scope. A pids.max or
788
856
  * memory.max that is another value (e.g. "max": TasksMax or MemoryMax= accepted but the controller not delegated) is a
789
857
  * positive inability; an empty result or an error not recognized is unverified. */
790
- async proveSeatScope(runtimeDir, limits, tools) {
858
+ async proveSeatScope(runtimeDir, limits, tools, slice = SEAT_SCOPE_SLICE) {
791
859
  const opts = { literal: true, oomPolicy: true };
792
860
  const tasksMax = limits.tasksMax;
861
+ // #80: a scope with no limit (a grouped seat without process_limits) proves only its placement: its own cgroup path.
862
+ const unlimited = tasksMax === undefined && limits.memoryMax === undefined;
863
+ const readOwnCgroup = 'p=; while IFS= read -r l; do case $l in 0::*) p=${l#0::};; esac; done < /proc/self/cgroup; ' +
864
+ 'if [ -z "$p" ]; then printf "nocgroup2\\n"; else printf "%s\\n" "$p"; fi';
793
865
  // Shell builtins only: no fork inside the scope, so even TasksMax=1 can be proven (the probe is the scope's one task).
794
866
  const readOwnPidsMax = 'p=; while IFS= read -r l; do case $l in 0::*) p=${l#0::};; esac; done < /proc/self/cgroup; ' +
795
867
  'if [ -z "$p" ]; then printf "nocgroup2\\n"; elif [ ! -e "/sys/fs/cgroup$p/pids.max" ]; then printf "nopids\\n"; ' +
@@ -806,10 +878,11 @@ export class TmuxAdapter {
806
878
  'fi';
807
879
  for (;;) {
808
880
  let out;
881
+ const probeUnit = `openrig-seat-probe-${randomUUID().slice(0, 8)}`;
809
882
  try {
810
883
  out = await this.exec(posixJoinArgv([...seatScopeBusEnv(runtimeDir), tools.timeout, "10",
811
- ...seatScopeArgv(opts, `openrig-seat-probe-${randomUUID().slice(0, 8)}`, "OpenRig seat scope probe", limits, tools.systemdRun),
812
- "--", "/bin/sh", "-c", limits.memoryMax === undefined ? readOwnPidsMax : readOwnLimits]));
884
+ ...seatScopeArgv(opts, probeUnit, "OpenRig seat scope probe", limits, tools.systemdRun, slice),
885
+ "--", "/bin/sh", "-c", unlimited ? readOwnCgroup : limits.memoryMax === undefined ? readOwnPidsMax : readOwnLimits]));
813
886
  }
814
887
  catch (error) {
815
888
  const stderr = execStderrText(error);
@@ -834,6 +907,17 @@ export class TmuxAdapter {
834
907
  return { ok: false, problem: classifyScopeFailure(error, "a throwaway seat scope") };
835
908
  }
836
909
  const got = out.trim();
910
+ if (unlimited) {
911
+ if (got === "nocgroup2")
912
+ return { ok: false, problem: { kind: "unsupported", reason: NO_CGROUP2 } };
913
+ // systemd nests a dashed slice under its parent: the scope is <...>/openrigseats.slice/<slice>/<unit>.scope.
914
+ const placed = `/${SEAT_SCOPE_SLICE}/${slice}/${probeUnit}.scope`;
915
+ if (got.endsWith(placed))
916
+ return { ok: true, opts };
917
+ return { ok: false, problem: { kind: got ? "unsupported" : "unverified",
918
+ reason: got ? `a throwaway seat scope ran in "${got.slice(0, 160)}", not beneath ${slice}`
919
+ : "a throwaway seat scope read no cgroup path" } };
920
+ }
837
921
  if (limits.memoryMax !== undefined) {
838
922
  const problem = scopeProbeProblem(got, limits);
839
923
  return problem ? { ok: false, problem } : { ok: true, opts };
@@ -1033,26 +1117,51 @@ export class TmuxAdapter {
1033
1117
  warnings.push(noticeLine(notice));
1034
1118
  limited = false;
1035
1119
  };
1120
+ // #80: a seat whose rig groups its seats tries a scope beneath the rig's slice first. Where that can't be made, it
1121
+ // takes today's path (the ungrouped scope of a seat with a limit, the plain launch of one without), with a warning:
1122
+ // grouping never refuses a launch, skips a limit check or drops a limit.
1123
+ const grouping = this.launchGrouping(seatEnv.OPENRIG_NODE_ID, notices, warnings);
1124
+ const groupingNotApplied = grouping.notApplied;
1125
+ const recoverWithoutScope = (problem) => {
1126
+ notApplied(problem);
1127
+ if (grouping.slice)
1128
+ groupingNotApplied("the seat's limit could not be applied, so the recovery goes on without a scope");
1129
+ };
1130
+ let grouped = false;
1036
1131
  if (lookup) {
1037
1132
  if ("invalid" in lookup)
1038
- notApplied({ kind: "invalid", reason: lookup.invalid });
1133
+ recoverWithoutScope({ kind: "invalid", reason: lookup.invalid });
1039
1134
  else if (notices?.failedStart)
1040
- notApplied({ ...notices.failedStart, requested: { ...lookup.limits } });
1135
+ recoverWithoutScope({ ...notices.failedStart, requested: { ...lookup.limits } });
1041
1136
  else {
1042
- const outcome = await this.seatScope(lookup.limits, seatEnv, policy);
1137
+ const outcome = await this.seatScopeGrouped(lookup.limits, seatEnv, policy, grouping);
1043
1138
  if (outcome.ok) {
1044
1139
  seatScope = outcome.prefix;
1045
1140
  limited = true;
1141
+ grouped = outcome.grouped;
1046
1142
  }
1047
1143
  else
1048
1144
  notApplied(outcome.problem);
1049
1145
  }
1050
1146
  }
1147
+ else if (grouping.slice) {
1148
+ // A seat without a limit gets a scope with none, beneath the rig's slice.
1149
+ const outcome = await this.seatScope({}, seatEnv, policy, grouping.slice);
1150
+ if (outcome.ok) {
1151
+ seatScope = outcome.prefix;
1152
+ grouped = true;
1153
+ }
1154
+ else
1155
+ groupingNotApplied(outcome.problem.reason);
1156
+ }
1157
+ const groupedSlice = grouped ? grouping.slice : undefined;
1051
1158
  if (!policy || !seatEnv.OPENRIG_NODE_ID)
1052
1159
  return null;
1053
1160
  if (!(policy instanceof Error) && policy.inheritTmuxEnvironment) {
1054
1161
  if (limited)
1055
1162
  notApplied({ kind: "setup", reason: INHERIT_TMUX_ENVIRONMENT_REASON, requested: { ...lookup.limits } });
1163
+ else if (grouped)
1164
+ groupingNotApplied(INHERIT_TMUX_ENVIRONMENT_REASON);
1056
1165
  return null;
1057
1166
  }
1058
1167
  try {
@@ -1106,19 +1215,26 @@ export class TmuxAdapter {
1106
1215
  DBUS_SESSION_BUS_ADDRESS: selected.DBUS_SESSION_BUS_ADDRESS, XDG_RUNTIME_DIR: selected.XDG_RUNTIME_DIR
1107
1216
  })] : [];
1108
1217
  if (notices) {
1109
- notices.capped = seatScope.length > 0;
1218
+ notices.capped = limited && seatScope.length > 0;
1110
1219
  if (marker) {
1111
1220
  notices.marker = marker;
1112
- notices.requested = { ...lookup.limits };
1221
+ notices.replacement = { command, shell };
1113
1222
  }
1223
+ if (limited && marker)
1224
+ notices.requested = { ...lookup.limits };
1225
+ if (groupedSlice)
1226
+ notices.groupedSlice = groupedSlice;
1114
1227
  }
1115
1228
  return ["/bin/sh", "-c", reset, "sh", file, ...seatScope, ...restore, shell, ...(command ? ["-c", command] : ["-l"])];
1116
1229
  }
1117
1230
  catch (error) {
1231
+ const reason = `the scoped launch environment failed: ${error.message}`;
1118
1232
  if (limited) {
1119
- notApplied({ kind: "unverified", reason: `the scoped launch environment failed: ${error.message}`,
1233
+ notApplied({ kind: "unverified", reason,
1120
1234
  requested: { ...lookup.limits } });
1121
1235
  }
1236
+ if (grouped)
1237
+ groupingNotApplied(reason);
1122
1238
  // Keep the working launch, with a diagnostic; this option is not a new admission gate.
1123
1239
  const warning = "Scoped tmux environment unavailable; retaining the previous environment for this launch.";
1124
1240
  warnings.push(warning);
@@ -1126,28 +1242,49 @@ export class TmuxAdapter {
1126
1242
  return null;
1127
1243
  }
1128
1244
  }
1129
- /** A bare-pane respawn that keeps the seat's limit (a restart in place whose process reads back under it, #3253): the
1130
- * command runs as the pane's default shell would run it, inside a new seat scope, with the bus and runtime directory
1131
- * the pane would get from tmux. Recovery only: where the scope can't be made, the respawn goes on without it. */
1132
- async keptScopeCommand(nodeId, pane, command, warnings, notices) {
1133
- const lookup = this.seatLimitsLookup(nodeId);
1134
- if (!lookup)
1245
+ /** A bare-pane respawn that keeps the seat's limit (a restart in place whose process reads back under it, #3253), and
1246
+ * (#80) puts the seat beneath its rig's slice when the rig groups its seats, with or without a limit: the command runs
1247
+ * as the pane's default shell would run it, inside a new seat scope, with the bus and runtime directory the pane would
1248
+ * get from tmux. Recovery only: where the scope can't be made, the respawn goes on without it (or ungrouped), with a
1249
+ * warning. `keepLimit` false: only the grouping (the seat's limit is not kept by this respawn). */
1250
+ async keptScopeCommand(nodeId, pane, command, warnings, notices, keepLimit = true) {
1251
+ const lookup = keepLimit ? this.seatLimitsLookup(nodeId) : undefined;
1252
+ const grouping = this.launchGrouping(nodeId, notices, warnings);
1253
+ if (!lookup && !grouping.slice)
1135
1254
  return null;
1136
1255
  const notApplied = (problem) => {
1137
1256
  const notice = notAppliedNotice(problem);
1138
1257
  notices.processLimits = notice;
1139
1258
  notices.capped = false;
1140
1259
  warnings.push(noticeLine(notice));
1260
+ if (grouping.slice)
1261
+ grouping.notApplied("the seat's limit was not kept, so the respawn goes on without a scope");
1141
1262
  return null;
1142
1263
  };
1143
- if ("invalid" in lookup)
1264
+ if (lookup && "invalid" in lookup)
1144
1265
  return notApplied({ kind: "invalid", reason: lookup.invalid });
1145
- const requested = { ...lookup.limits };
1146
- if (notices.failedStart)
1266
+ const requested = lookup ? { ...lookup.limits } : undefined;
1267
+ if (requested && notices.failedStart)
1147
1268
  return notApplied({ ...notices.failedStart, requested });
1148
- const outcome = await this.seatScope(lookup.limits, { OPENRIG_NODE_ID: nodeId }, this.readLaunchPolicy());
1149
- if (!outcome.ok)
1150
- return notApplied(outcome.problem);
1269
+ const policy = this.readLaunchPolicy();
1270
+ let prefix;
1271
+ let grouped;
1272
+ if (lookup) {
1273
+ const outcome = await this.seatScopeGrouped(lookup.limits, { OPENRIG_NODE_ID: nodeId }, policy, grouping);
1274
+ if (!outcome.ok)
1275
+ return notApplied(outcome.problem);
1276
+ prefix = outcome.prefix;
1277
+ grouped = outcome.grouped;
1278
+ }
1279
+ else {
1280
+ const outcome = await this.seatScope({}, { OPENRIG_NODE_ID: nodeId }, policy, grouping.slice);
1281
+ if (!outcome.ok) {
1282
+ grouping.notApplied(outcome.problem.reason);
1283
+ return null;
1284
+ }
1285
+ prefix = outcome.prefix;
1286
+ grouped = true;
1287
+ }
1151
1288
  try {
1152
1289
  if (!command)
1153
1290
  throw new Error("a kept scope needs the respawn's command");
@@ -1159,13 +1296,20 @@ export class TmuxAdapter {
1159
1296
  XDG_RUNTIME_DIR: await this.paneStartEnv(pane, "XDG_RUNTIME_DIR"),
1160
1297
  });
1161
1298
  const marker = await this.scopeMarker();
1162
- notices.capped = true;
1299
+ notices.capped = requested !== undefined;
1163
1300
  notices.marker = marker;
1164
- notices.requested = requested;
1165
- return [...outcome.prefix, ...scopeMarkArgv(marker), ...restore, shell, "-c", command];
1301
+ if (requested)
1302
+ notices.requested = requested;
1303
+ if (grouped && grouping.slice)
1304
+ notices.groupedSlice = grouping.slice;
1305
+ return [...prefix, ...scopeMarkArgv(marker), ...restore, shell, "-c", command];
1166
1306
  }
1167
1307
  catch (error) {
1168
- return notApplied({ kind: "unverified", reason: `the kept scope's launch could not be prepared: ${error.message}`, requested });
1308
+ const reason = `the kept scope's launch could not be prepared: ${error.message}`;
1309
+ if (requested)
1310
+ return notApplied({ kind: "unverified", reason, requested });
1311
+ grouping.notApplied(reason);
1312
+ return null;
1169
1313
  }
1170
1314
  }
1171
1315
  /** The value a new process in this pane's session gets for `key` from tmux: the session's own (undefined when it is
@@ -1199,6 +1343,10 @@ export class TmuxAdapter {
1199
1343
  await this.fileOps.unlink(notices.marker).catch(() => { });
1200
1344
  if (start === "started")
1201
1345
  return null;
1346
+ // #80: a scope beneath the rig's slice that systemd-run could not make after the check passed: the launch starts
1347
+ // again in the ungrouped scope, with its limit, checked as without grouping; never refused for the grouping.
1348
+ if (start === "failed_before_command" && notices.groupedSlice)
1349
+ return { retryUngrouped: GROUPED_START_FAILED };
1202
1350
  const requested = notices.requested ? { requested: { ...notices.requested } } : {};
1203
1351
  const failedBefore = "the seat's scope did not start: its pane's command exited before entering it";
1204
1352
  if (mode !== "recovery") {
@@ -1228,6 +1376,24 @@ export class TmuxAdapter {
1228
1376
  warnings.push(noticeLine(notice));
1229
1377
  return null;
1230
1378
  }
1379
+ /** #80: after a launch of a seat without a limit made its pane in a scope beneath the rig's slice: the reason to start
1380
+ * it again on the plain path when systemd-run failed before the seat's command started; else null (the launch
1381
+ * stands, with a warning when where it runs can't be told; nothing is run again). Never a refusal. */
1382
+ async groupedStartOutcome(pane, notices, warnings) {
1383
+ const start = pane ? await this.seatScopeStart(pane, notices.marker) : "unknown";
1384
+ if (!pane && notices.marker)
1385
+ await this.fileOps.unlink(notices.marker).catch(() => { });
1386
+ if (start === "started" || start === "ran_and_ended")
1387
+ return null;
1388
+ if (start === "failed_before_command")
1389
+ return GROUPED_START_FAILED;
1390
+ const line = "seat_slice requested; whether the seat runs beneath the rig's slice is unknown (" +
1391
+ (start === "ran_unconfirmed" ? "its command started, but its process was not seen in the scope in time"
1392
+ : "the scope's start was not confirmed in time") + "); the seat was not started again";
1393
+ warnings.push(line);
1394
+ console.warn(`[seat launch] ${line}`);
1395
+ return null;
1396
+ }
1231
1397
  /** #3315: told what each classified probe of this adapter's server showed (reachable, or the no-server/socket
1232
1398
  * diagnostic). The daemon records only changes (terminal-server-reachability.ts); an observer error never changes
1233
1399
  * the probe's own result. */
@@ -1882,7 +2048,8 @@ export class TmuxAdapter {
1882
2048
  legacyParts.push("-e", tmuxConfigQuote(`${k}=${v}`));
1883
2049
  const warnings = [];
1884
2050
  let scopedCommand;
1885
- const notices = launchOpts?.failedStart ? { failedStart: launchOpts.failedStart } : {};
2051
+ const notices = { ...(launchOpts?.failedStart ? { failedStart: launchOpts.failedStart } : {}),
2052
+ ...(launchOpts?.groupingFailed ? { groupingFailed: launchOpts.groupingFailed } : {}) };
1886
2053
  try {
1887
2054
  scopedCommand = await this.scopedLaunchCommand(seatEnv, undefined, warnings, launchOpts?.processLimitsMode, notices);
1888
2055
  }
@@ -1941,18 +2108,37 @@ export class TmuxAdapter {
1941
2108
  // never stops for the limit: when systemd-run fails after the check passed, the pane's command exits before
1942
2109
  // entering the scope, and the seat starts again without the limit, with the warning (in the same pane when tmux
1943
2110
  // kept it, else in a new session of the same name); when the start can't be told, nothing is run again.
2111
+ const startAgain = async (more) => {
2112
+ const kept = await this.probeSession(name).catch(() => ({ state: "unknown" }));
2113
+ if (kept.state !== "present")
2114
+ return this.createSessionUnchecked(name, cwd, env, more);
2115
+ const replacement = notices.replacement;
2116
+ const retried = await this.respawnPaneUnchecked(created, replacement?.command, {
2117
+ ...(cwd != null ? { cwd } : {}), env: seatEnv, ...more,
2118
+ ...(replacement ? { retryLoginShell: replacement.shell } : {}),
2119
+ });
2120
+ if (!retried.ok && retried.processLimits) {
2121
+ return processLimitsNotAppliedResult(new SeatProcessLimitsNotApplied(retried.processLimits), await this.removeRefusedSession(name, made));
2122
+ }
2123
+ return retried;
2124
+ };
2125
+ const pane = /^%\d+$/.test(created) ? created : null;
1944
2126
  if (notices.capped) {
1945
- const outcome = await this.scopeStartOutcome(/^%\d+$/.test(created) ? created : null, launchOpts?.processLimitsMode, notices, warnings);
2127
+ const outcome = await this.scopeStartOutcome(pane, launchOpts?.processLimitsMode, notices, warnings);
1946
2128
  if (outcome && "refuse" in outcome) {
1947
2129
  return processLimitsNotAppliedResult(new SeatProcessLimitsNotApplied(outcome.refuse), await this.removeRefusedSession(name, made));
1948
2130
  }
1949
- if (outcome) {
1950
- const failedStart = outcome.retryUncapped;
1951
- const kept = await this.probeSession(name).catch(() => ({ state: "unknown" }));
1952
- return kept.state === "present"
1953
- ? this.respawnPaneUnchecked(created, undefined, { ...(cwd != null ? { cwd } : {}), env: seatEnv,
1954
- processLimitsMode: "recovery", failedStart })
1955
- : this.createSessionUnchecked(name, cwd, env, { processLimitsMode: "recovery", failedStart });
2131
+ // #80: the same launch mode, so the ungrouped scope is checked exactly as without grouping.
2132
+ if (outcome && "retryUngrouped" in outcome) {
2133
+ return startAgain({ ...(launchOpts?.processLimitsMode ? { processLimitsMode: launchOpts.processLimitsMode } : {}), groupingFailed: outcome.retryUngrouped });
2134
+ }
2135
+ if (outcome)
2136
+ return startAgain({ processLimitsMode: "recovery", failedStart: outcome.retryUncapped });
2137
+ }
2138
+ else if (notices.groupedSlice) {
2139
+ const groupingFailed = await this.groupedStartOutcome(pane, notices, warnings);
2140
+ if (groupingFailed) {
2141
+ return startAgain({ ...(launchOpts?.processLimitsMode ? { processLimitsMode: launchOpts.processLimitsMode } : {}), groupingFailed });
1956
2142
  }
1957
2143
  }
1958
2144
  // A tmux server started from a Claude Code session or Herdr pane hands
@@ -2340,11 +2526,13 @@ export class TmuxAdapter {
2340
2526
  return kill();
2341
2527
  return this.deliveryGuard.input(this.freshManaged.get(name)?.nodeId ?? name, kill);
2342
2528
  }, true);
2343
- return beforeEffect ? { ...result, stopPhase } : result;
2529
+ // #2940: a failure always says how far the stop got, so "no effect" can be proven without a checked stop.
2530
+ return beforeEffect || !result.ok ? { ...result, stopPhase } : result;
2344
2531
  }
2345
2532
  if (beforeEffect)
2346
2533
  return { ok: false, code: "guard_unavailable", message: "Checked stop requires the delivery guard.", stopPhase };
2347
- return this.killSessionUnchecked(name);
2534
+ const result = await this.killSessionUnchecked(name, undefined, phase => { stopPhase = phase; });
2535
+ return result.ok ? result : { ...result, stopPhase };
2348
2536
  }
2349
2537
  /** The session a seat's stop would end is the seat's own: every session OpenRig creates for a seat carries its node's
2350
2538
  * OPENRIG_NODE_ID. One without it (adopted, bound or discovered from outside), or with another seat's, is left
@@ -2453,10 +2641,13 @@ export class TmuxAdapter {
2453
2641
  argv.push("-e", `${k}=${v}`);
2454
2642
  const warnings = [];
2455
2643
  let scopedCommand;
2456
- const notices = opts?.failedStart ? { failedStart: opts.failedStart } : {};
2644
+ const notices = { ...(opts?.failedStart ? { failedStart: opts.failedStart } : {}),
2645
+ ...(opts?.groupingFailed ? { groupingFailed: opts.groupingFailed } : {}) };
2646
+ // A bare respawn (no seat environment) keeps a limit with `keepLimitOf`, and joins the rig's slice with either.
2647
+ const bareSeat = opts?.env ? undefined : opts?.keepLimitOf ?? opts?.groupSeatOf;
2457
2648
  try {
2458
- scopedCommand = opts?.keepLimitOf && !opts.env
2459
- ? await this.keptScopeCommand(opts.keepLimitOf, exact, command, warnings, notices)
2649
+ scopedCommand = bareSeat
2650
+ ? await this.keptScopeCommand(bareSeat, exact, command, warnings, notices, Boolean(opts?.keepLimitOf))
2460
2651
  : await this.scopedLaunchCommand(opts?.env ?? {}, command, warnings, opts?.processLimitsMode, notices);
2461
2652
  }
2462
2653
  catch (error) {
@@ -2464,11 +2655,10 @@ export class TmuxAdapter {
2464
2655
  return processLimitsNotAppliedResult(error);
2465
2656
  throw error;
2466
2657
  }
2467
- // Legacy commands remain one argument; the scoped wrapper executes directly before the user shell.
2468
- if (scopedCommand)
2469
- argv.push(...scopedCommand);
2470
- else if (command != null && command.length > 0)
2471
- argv.push(command);
2658
+ // A configured command remains one argument for tmux's shell. An explicit login shell on retry
2659
+ // replaces the failed wrapper even when the scoped launch environment could not be prepared.
2660
+ const launchArgv = scopedCommand ?? (command ? [command] : opts?.retryLoginShell ? [opts.retryLoginShell, "-l"] : []);
2661
+ argv.push(...launchArgv);
2472
2662
  const quote = opts?.env && Object.keys(opts.env).length ? tmuxConfigQuote : shellQuote;
2473
2663
  const legacyRespawn = ["tmux", "respawn-pane", "-t", quote(exact)];
2474
2664
  if (opts?.cwd != null)
@@ -2476,10 +2666,7 @@ export class TmuxAdapter {
2476
2666
  if (opts?.env)
2477
2667
  for (const [k, v] of Object.entries(opts.env))
2478
2668
  legacyRespawn.push("-e", quote(`${k}=${v}`));
2479
- if (scopedCommand)
2480
- legacyRespawn.push(...scopedCommand.map(quote));
2481
- else if (command != null && command.length > 0)
2482
- legacyRespawn.push(quote(command));
2669
+ legacyRespawn.push(...launchArgv.map(quote));
2483
2670
  // The successor starts from the session environment: exclude inherited
2484
2671
  // parent-session identity there first (sessions made before this existed).
2485
2672
  // A failure here is a warning; the respawn goes ahead as it did before.
@@ -2503,9 +2690,16 @@ export class TmuxAdapter {
2503
2690
  const outcome = await this.scopeStartOutcome(exact, opts?.keepLimitOf ? "recovery" : opts?.processLimitsMode, notices, warnings);
2504
2691
  if (outcome && "refuse" in outcome)
2505
2692
  return processLimitsNotAppliedResult(new SeatProcessLimitsNotApplied(outcome.refuse));
2693
+ if (outcome && "retryUngrouped" in outcome)
2694
+ return this.respawnPaneUnchecked(paneTarget, command, { ...opts, groupingFailed: outcome.retryUngrouped });
2506
2695
  if (outcome)
2507
2696
  return this.respawnPaneUnchecked(paneTarget, command, { ...opts, failedStart: outcome.retryUncapped });
2508
2697
  }
2698
+ else if (notices.groupedSlice) {
2699
+ const groupingFailed = await this.groupedStartOutcome(exact, notices, warnings);
2700
+ if (groupingFailed)
2701
+ return this.respawnPaneUnchecked(paneTarget, command, { ...opts, groupingFailed });
2702
+ }
2509
2703
  return this.launched(warnings, notices);
2510
2704
  }
2511
2705
  catch (err) {