@openrig/cli 0.7.10 → 0.7.11

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 (699) hide show
  1. package/README.md +5 -5
  2. package/daemon/assets/claude-permission-policies.cjs +41 -0
  3. package/daemon/assets/claude-permission-policies.d.cts +3 -0
  4. package/daemon/assets/claude-team-permissions.cjs +13 -3
  5. package/daemon/assets/openshell/README.md +1 -1
  6. package/daemon/assets/pi-account-lock.cjs +39 -0
  7. package/daemon/assets/plugins/openrig/.claude-plugin/marketplace.json +15 -0
  8. package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +32 -0
  9. package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +39 -0
  10. package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +6 -0
  11. package/daemon/assets/plugins/openrig/LICENSE +200 -0
  12. package/daemon/assets/plugins/openrig/README.md +106 -0
  13. package/daemon/assets/plugins/openrig/assets/logo.svg +1 -0
  14. package/daemon/assets/plugins/openrig/mcp.json +10 -0
  15. package/daemon/assets/plugins/openrig/plugin.json +14 -0
  16. package/daemon/assets/plugins/openrig/skills/working-with-an-openrig-team/SKILL.md +90 -0
  17. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  18. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  19. package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +20 -0
  20. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +7 -0
  21. package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +1 -0
  22. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +24 -8
  23. package/daemon/assets/plugins/openrig-core/skills/refocusing/SKILL.md +5 -0
  24. package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +26 -4
  25. package/daemon/context-packs/help/manifest.yaml +1 -1
  26. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  27. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +72 -9
  28. package/daemon/context-packs/reference/acp-agents.md +68 -0
  29. package/daemon/context-packs/reference/getting-started.md +3 -2
  30. package/daemon/context-packs/reference/manifest.yaml +4 -1
  31. package/daemon/context-packs/reference/rig-spec.md +63 -6
  32. package/daemon/context-packs/reference/tmux-servers.md +214 -0
  33. package/daemon/context-packs/reference/whats-new.md +271 -21
  34. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  35. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  36. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  37. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  38. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  40. package/daemon/context-packs/skills/core/cross-host-rig-commands/SKILL.md +7 -0
  41. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  43. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  44. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  46. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +1 -0
  48. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  49. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  51. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  52. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  54. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/core/working-with-an-openrig-team/SKILL.md +90 -0
  58. package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +10 -0
  59. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  60. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/openrig-user/SKILL.md +24 -8
  65. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  66. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  68. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  74. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  76. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  77. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  78. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  79. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  80. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  81. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  82. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  83. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  84. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  85. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  86. package/daemon/context-packs/skills/refocusing/SKILL.md +5 -0
  87. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  88. package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +26 -4
  89. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  90. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  91. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  92. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  93. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  94. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  95. package/daemon/dist/adapters/claude-code-adapter.d.ts +3 -1
  96. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  97. package/daemon/dist/adapters/claude-code-adapter.js +41 -12
  98. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  99. package/daemon/dist/adapters/claude-resume.d.ts +1 -1
  100. package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
  101. package/daemon/dist/adapters/claude-resume.js +17 -3
  102. package/daemon/dist/adapters/claude-resume.js.map +1 -1
  103. package/daemon/dist/adapters/codex-resume.d.ts +1 -1
  104. package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
  105. package/daemon/dist/adapters/codex-resume.js +6 -2
  106. package/daemon/dist/adapters/codex-resume.js.map +1 -1
  107. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +2 -0
  108. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  109. package/daemon/dist/adapters/codex-runtime-adapter.js +36 -11
  110. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  111. package/daemon/dist/adapters/kernel-authority.d.ts +2 -4
  112. package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
  113. package/daemon/dist/adapters/kernel-authority.js +10 -41
  114. package/daemon/dist/adapters/kernel-authority.js.map +1 -1
  115. package/daemon/dist/adapters/openshell-podman-observer.d.ts.map +1 -1
  116. package/daemon/dist/adapters/openshell-podman-observer.js +5 -3
  117. package/daemon/dist/adapters/openshell-podman-observer.js.map +1 -1
  118. package/daemon/dist/adapters/pi-resume.d.ts +4 -1
  119. package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
  120. package/daemon/dist/adapters/pi-resume.js +38 -9
  121. package/daemon/dist/adapters/pi-resume.js.map +1 -1
  122. package/daemon/dist/adapters/pi-runner-protocol.d.ts +4 -0
  123. package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
  124. package/daemon/dist/adapters/pi-runner-protocol.js +7 -0
  125. package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
  126. package/daemon/dist/adapters/pi-runner.d.ts +5 -0
  127. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
  128. package/daemon/dist/adapters/pi-runner.js +79 -8
  129. package/daemon/dist/adapters/pi-runner.js.map +1 -1
  130. package/daemon/dist/adapters/pi-runtime-adapter.d.ts +6 -0
  131. package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
  132. package/daemon/dist/adapters/pi-runtime-adapter.js +58 -23
  133. package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
  134. package/daemon/dist/adapters/tmux-control.d.ts +32 -1
  135. package/daemon/dist/adapters/tmux-control.d.ts.map +1 -1
  136. package/daemon/dist/adapters/tmux-control.js +149 -9
  137. package/daemon/dist/adapters/tmux-control.js.map +1 -1
  138. package/daemon/dist/adapters/tmux-server.d.ts +9 -0
  139. package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
  140. package/daemon/dist/adapters/tmux-server.js +12 -0
  141. package/daemon/dist/adapters/tmux-server.js.map +1 -1
  142. package/daemon/dist/adapters/tmux.d.ts +18 -0
  143. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  144. package/daemon/dist/adapters/tmux.js +164 -12
  145. package/daemon/dist/adapters/tmux.js.map +1 -1
  146. package/daemon/dist/build-info.js +3 -3
  147. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  148. package/daemon/dist/db/all-migrations.js +10 -0
  149. package/daemon/dist/db/all-migrations.js.map +1 -1
  150. package/daemon/dist/db/migrations/150_node_launch_wrapper.d.ts +3 -0
  151. package/daemon/dist/db/migrations/150_node_launch_wrapper.d.ts.map +1 -0
  152. package/daemon/dist/db/migrations/150_node_launch_wrapper.js +5 -0
  153. package/daemon/dist/db/migrations/150_node_launch_wrapper.js.map +1 -0
  154. package/daemon/dist/db/migrations/151_pi_account_switches.d.ts +4 -0
  155. package/daemon/dist/db/migrations/151_pi_account_switches.d.ts.map +1 -0
  156. package/daemon/dist/db/migrations/151_pi_account_switches.js +44 -0
  157. package/daemon/dist/db/migrations/151_pi_account_switches.js.map +1 -0
  158. package/daemon/dist/db/migrations/152_workflow_instance_spec.d.ts +8 -0
  159. package/daemon/dist/db/migrations/152_workflow_instance_spec.d.ts.map +1 -0
  160. package/daemon/dist/db/migrations/152_workflow_instance_spec.js +13 -0
  161. package/daemon/dist/db/migrations/152_workflow_instance_spec.js.map +1 -0
  162. package/daemon/dist/db/migrations/153_events_retention_marks.d.ts +7 -0
  163. package/daemon/dist/db/migrations/153_events_retention_marks.d.ts.map +1 -0
  164. package/daemon/dist/db/migrations/153_events_retention_marks.js +17 -0
  165. package/daemon/dist/db/migrations/153_events_retention_marks.js.map +1 -0
  166. package/daemon/dist/db/migrations/154_workflow_instance_root_objective.d.ts +7 -0
  167. package/daemon/dist/db/migrations/154_workflow_instance_root_objective.d.ts.map +1 -0
  168. package/daemon/dist/db/migrations/154_workflow_instance_root_objective.js +11 -0
  169. package/daemon/dist/db/migrations/154_workflow_instance_root_objective.js.map +1 -0
  170. package/daemon/dist/domain/activity-taxonomy.d.ts +9 -0
  171. package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
  172. package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
  173. package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
  174. package/daemon/dist/domain/agent-manifest.js +11 -1
  175. package/daemon/dist/domain/agent-manifest.js.map +1 -1
  176. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +43 -3
  177. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  178. package/daemon/dist/domain/claude-compaction-enforcer.js +306 -22
  179. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  180. package/daemon/dist/domain/claude-managed-launch.d.ts +2 -0
  181. package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
  182. package/daemon/dist/domain/claude-managed-launch.js +12 -2
  183. package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
  184. package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
  185. package/daemon/dist/domain/context-monitor.js +3 -0
  186. package/daemon/dist/domain/context-monitor.js.map +1 -1
  187. package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
  188. package/daemon/dist/domain/context-usage-store.js +10 -1
  189. package/daemon/dist/domain/context-usage-store.js.map +1 -1
  190. package/daemon/dist/domain/desired-claude-activity-hooks.d.ts +4 -3
  191. package/daemon/dist/domain/desired-claude-activity-hooks.d.ts.map +1 -1
  192. package/daemon/dist/domain/desired-claude-activity-hooks.js +49 -15
  193. package/daemon/dist/domain/desired-claude-activity-hooks.js.map +1 -1
  194. package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
  195. package/daemon/dist/domain/draft-aware-delivery.js +5 -1
  196. package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
  197. package/daemon/dist/domain/event-bus.d.ts +31 -0
  198. package/daemon/dist/domain/event-bus.d.ts.map +1 -1
  199. package/daemon/dist/domain/event-bus.js +87 -1
  200. package/daemon/dist/domain/event-bus.js.map +1 -1
  201. package/daemon/dist/domain/execution-view.d.ts +9 -0
  202. package/daemon/dist/domain/execution-view.d.ts.map +1 -1
  203. package/daemon/dist/domain/execution-view.js +13 -0
  204. package/daemon/dist/domain/execution-view.js.map +1 -1
  205. package/daemon/dist/domain/gateway/connections-projection.d.ts +13 -1
  206. package/daemon/dist/domain/gateway/connections-projection.d.ts.map +1 -1
  207. package/daemon/dist/domain/gateway/connections-projection.js +38 -10
  208. package/daemon/dist/domain/gateway/connections-projection.js.map +1 -1
  209. package/daemon/dist/domain/gateway/dispatcher.d.ts +2 -0
  210. package/daemon/dist/domain/gateway/dispatcher.d.ts.map +1 -1
  211. package/daemon/dist/domain/gateway/dispatcher.js +14 -1
  212. package/daemon/dist/domain/gateway/dispatcher.js.map +1 -1
  213. package/daemon/dist/domain/gateway/gateway-subsystem.d.ts +2 -0
  214. package/daemon/dist/domain/gateway/gateway-subsystem.d.ts.map +1 -1
  215. package/daemon/dist/domain/gateway/gateway-subsystem.js +1 -0
  216. package/daemon/dist/domain/gateway/gateway-subsystem.js.map +1 -1
  217. package/daemon/dist/domain/gateway/human-readiness.d.ts +7 -0
  218. package/daemon/dist/domain/gateway/human-readiness.d.ts.map +1 -1
  219. package/daemon/dist/domain/gateway/human-readiness.js +45 -0
  220. package/daemon/dist/domain/gateway/human-readiness.js.map +1 -1
  221. package/daemon/dist/domain/gateway/human-registry.d.ts +23 -3
  222. package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
  223. package/daemon/dist/domain/gateway/human-registry.js +66 -34
  224. package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
  225. package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
  226. package/daemon/dist/domain/gateway/operator-delivery-engine.js +8 -2
  227. package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
  228. package/daemon/dist/domain/gateway/relay-config.d.ts +80 -0
  229. package/daemon/dist/domain/gateway/relay-config.d.ts.map +1 -0
  230. package/daemon/dist/domain/gateway/relay-config.js +290 -0
  231. package/daemon/dist/domain/gateway/relay-config.js.map +1 -0
  232. package/daemon/dist/domain/gateway/relay-inbound.d.ts +74 -0
  233. package/daemon/dist/domain/gateway/relay-inbound.d.ts.map +1 -0
  234. package/daemon/dist/domain/gateway/relay-inbound.js +739 -0
  235. package/daemon/dist/domain/gateway/relay-inbound.js.map +1 -0
  236. package/daemon/dist/domain/gateway/relay-outbound.d.ts +215 -0
  237. package/daemon/dist/domain/gateway/relay-outbound.d.ts.map +1 -0
  238. package/daemon/dist/domain/gateway/relay-outbound.js +770 -0
  239. package/daemon/dist/domain/gateway/relay-outbound.js.map +1 -0
  240. package/daemon/dist/domain/gateway/slack/open-asks.d.ts.map +1 -1
  241. package/daemon/dist/domain/gateway/slack/open-asks.js +14 -1
  242. package/daemon/dist/domain/gateway/slack/open-asks.js.map +1 -1
  243. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
  244. package/daemon/dist/domain/gateway/slack/slack-subsystem.js +224 -32
  245. package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
  246. package/daemon/dist/domain/hosts/pairing-ask.d.ts +10 -0
  247. package/daemon/dist/domain/hosts/pairing-ask.d.ts.map +1 -0
  248. package/daemon/dist/domain/hosts/pairing-ask.js +9 -0
  249. package/daemon/dist/domain/hosts/pairing-ask.js.map +1 -0
  250. package/daemon/dist/domain/launch-wrapper.d.ts +28 -0
  251. package/daemon/dist/domain/launch-wrapper.d.ts.map +1 -0
  252. package/daemon/dist/domain/launch-wrapper.js +93 -0
  253. package/daemon/dist/domain/launch-wrapper.js.map +1 -0
  254. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +1 -1
  255. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  256. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +85 -28
  257. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  258. package/daemon/dist/domain/model-divergence/current-model-reader.d.ts.map +1 -1
  259. package/daemon/dist/domain/model-divergence/current-model-reader.js +14 -3
  260. package/daemon/dist/domain/model-divergence/current-model-reader.js.map +1 -1
  261. package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
  262. package/daemon/dist/domain/native-process-lineage.js +32 -9
  263. package/daemon/dist/domain/native-process-lineage.js.map +1 -1
  264. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  265. package/daemon/dist/domain/node-inventory.js +7 -0
  266. package/daemon/dist/domain/node-inventory.js.map +1 -1
  267. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  268. package/daemon/dist/domain/node-launcher.js +9 -2
  269. package/daemon/dist/domain/node-launcher.js.map +1 -1
  270. package/daemon/dist/domain/outbox-handler.d.ts +53 -3
  271. package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
  272. package/daemon/dist/domain/outbox-handler.js +101 -6
  273. package/daemon/dist/domain/outbox-handler.js.map +1 -1
  274. package/daemon/dist/domain/parent-session-env.d.ts +2 -1
  275. package/daemon/dist/domain/parent-session-env.d.ts.map +1 -1
  276. package/daemon/dist/domain/parent-session-env.js +9 -1
  277. package/daemon/dist/domain/parent-session-env.js.map +1 -1
  278. package/daemon/dist/domain/parked-query.d.ts +6 -0
  279. package/daemon/dist/domain/parked-query.d.ts.map +1 -1
  280. package/daemon/dist/domain/parked-query.js +1 -0
  281. package/daemon/dist/domain/parked-query.js.map +1 -1
  282. package/daemon/dist/domain/pi-account-state.d.ts +6 -0
  283. package/daemon/dist/domain/pi-account-state.d.ts.map +1 -0
  284. package/daemon/dist/domain/pi-account-state.js +14 -0
  285. package/daemon/dist/domain/pi-account-state.js.map +1 -0
  286. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +6 -0
  287. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
  288. package/daemon/dist/domain/policies/parked-owner-consumer.js +10 -1
  289. package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
  290. package/daemon/dist/domain/policies/quiet-release.d.ts.map +1 -1
  291. package/daemon/dist/domain/policies/quiet-release.js +6 -3
  292. package/daemon/dist/domain/policies/quiet-release.js.map +1 -1
  293. package/daemon/dist/domain/projection-planner.d.ts +4 -1
  294. package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
  295. package/daemon/dist/domain/projection-planner.js +3 -0
  296. package/daemon/dist/domain/projection-planner.js.map +1 -1
  297. package/daemon/dist/domain/queue-pickup.d.ts +20 -1
  298. package/daemon/dist/domain/queue-pickup.d.ts.map +1 -1
  299. package/daemon/dist/domain/queue-pickup.js +38 -6
  300. package/daemon/dist/domain/queue-pickup.js.map +1 -1
  301. package/daemon/dist/domain/queue-recovery.d.ts +14 -0
  302. package/daemon/dist/domain/queue-recovery.d.ts.map +1 -1
  303. package/daemon/dist/domain/queue-recovery.js +33 -1
  304. package/daemon/dist/domain/queue-recovery.js.map +1 -1
  305. package/daemon/dist/domain/queue-repository.d.ts +76 -10
  306. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  307. package/daemon/dist/domain/queue-repository.js +351 -44
  308. package/daemon/dist/domain/queue-repository.js.map +1 -1
  309. package/daemon/dist/domain/queue-retention.d.ts +68 -0
  310. package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
  311. package/daemon/dist/domain/queue-retention.js +133 -0
  312. package/daemon/dist/domain/queue-retention.js.map +1 -1
  313. package/daemon/dist/domain/queue-stuck-sweep.d.ts +22 -1
  314. package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
  315. package/daemon/dist/domain/queue-stuck-sweep.js +577 -158
  316. package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
  317. package/daemon/dist/domain/queue-transition-log.d.ts +49 -1
  318. package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
  319. package/daemon/dist/domain/queue-transition-log.js +216 -3
  320. package/daemon/dist/domain/queue-transition-log.js.map +1 -1
  321. package/daemon/dist/domain/queue-waiting.d.ts +1 -1
  322. package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
  323. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  324. package/daemon/dist/domain/queue-wake-ladder.js +7 -2
  325. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  326. package/daemon/dist/domain/quiet-hold-custody.d.ts.map +1 -1
  327. package/daemon/dist/domain/quiet-hold-custody.js +7 -3
  328. package/daemon/dist/domain/quiet-hold-custody.js.map +1 -1
  329. package/daemon/dist/domain/restore-orchestrator.d.ts +13 -2
  330. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  331. package/daemon/dist/domain/restore-orchestrator.js +63 -26
  332. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  333. package/daemon/dist/domain/rig-repository.d.ts +3 -0
  334. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  335. package/daemon/dist/domain/rig-repository.js +46 -1
  336. package/daemon/dist/domain/rig-repository.js.map +1 -1
  337. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  338. package/daemon/dist/domain/rigspec-codec.js +4 -0
  339. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  340. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  341. package/daemon/dist/domain/rigspec-exporter.js +5 -0
  342. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  343. package/daemon/dist/domain/rigspec-instantiator.d.ts +17 -1
  344. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  345. package/daemon/dist/domain/rigspec-instantiator.js +68 -20
  346. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  347. package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
  348. package/daemon/dist/domain/rigspec-preflight.js +10 -0
  349. package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
  350. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  351. package/daemon/dist/domain/rigspec-schema.js +26 -1
  352. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  353. package/daemon/dist/domain/runtime-adapter.d.ts +1 -0
  354. package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
  355. package/daemon/dist/domain/runtime-adapter.js.map +1 -1
  356. package/daemon/dist/domain/runtime-switch-materials.d.ts +1 -1
  357. package/daemon/dist/domain/runtime-switch-materials.d.ts.map +1 -1
  358. package/daemon/dist/domain/runtime-switch-materials.js +2 -2
  359. package/daemon/dist/domain/runtime-switch-materials.js.map +1 -1
  360. package/daemon/dist/domain/seat-activity-service.d.ts +38 -1
  361. package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
  362. package/daemon/dist/domain/seat-activity-service.js +59 -1
  363. package/daemon/dist/domain/seat-activity-service.js.map +1 -1
  364. package/daemon/dist/domain/seat-attention-reconciler.d.ts +13 -0
  365. package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
  366. package/daemon/dist/domain/seat-attention-reconciler.js +45 -1
  367. package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
  368. package/daemon/dist/domain/seat-handover-service.d.ts +1 -0
  369. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  370. package/daemon/dist/domain/seat-handover-service.js +38 -11
  371. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  372. package/daemon/dist/domain/seat-launch-environment.d.ts +10 -0
  373. package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
  374. package/daemon/dist/domain/seat-launch-environment.js +62 -15
  375. package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
  376. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  377. package/daemon/dist/domain/seat-lifecycle-service.js +7 -3
  378. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  379. package/daemon/dist/domain/seat-restart-in-place.d.ts +2 -1
  380. package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
  381. package/daemon/dist/domain/seat-restart-in-place.js +19 -1
  382. package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
  383. package/daemon/dist/domain/seat-runtime-home.d.ts +4 -1
  384. package/daemon/dist/domain/seat-runtime-home.d.ts.map +1 -1
  385. package/daemon/dist/domain/seat-runtime-home.js +6 -4
  386. package/daemon/dist/domain/seat-runtime-home.js.map +1 -1
  387. package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
  388. package/daemon/dist/domain/seat-runtime-switch-service.js +73 -10
  389. package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
  390. package/daemon/dist/domain/seat-skill-storage.d.ts +57 -4
  391. package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -1
  392. package/daemon/dist/domain/seat-skill-storage.js +338 -8
  393. package/daemon/dist/domain/seat-skill-storage.js.map +1 -1
  394. package/daemon/dist/domain/seat-status-service.d.ts +2 -2
  395. package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
  396. package/daemon/dist/domain/seat-status-service.js +3 -2
  397. package/daemon/dist/domain/seat-status-service.js.map +1 -1
  398. package/daemon/dist/domain/self-attach-service.d.ts.map +1 -1
  399. package/daemon/dist/domain/self-attach-service.js +11 -4
  400. package/daemon/dist/domain/self-attach-service.js.map +1 -1
  401. package/daemon/dist/domain/session-transport.d.ts +25 -2
  402. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  403. package/daemon/dist/domain/session-transport.js +199 -30
  404. package/daemon/dist/domain/session-transport.js.map +1 -1
  405. package/daemon/dist/domain/skill-catalog.d.ts +37 -0
  406. package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
  407. package/daemon/dist/domain/skill-catalog.js +152 -3
  408. package/daemon/dist/domain/skill-catalog.js.map +1 -1
  409. package/daemon/dist/domain/slices/slice-detail-projector.d.ts +1 -1
  410. package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
  411. package/daemon/dist/domain/slices/slice-detail-projector.js +11 -13
  412. package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
  413. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  414. package/daemon/dist/domain/startup-orchestrator.js +7 -1
  415. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  416. package/daemon/dist/domain/successor-session-launcher.d.ts +1 -0
  417. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  418. package/daemon/dist/domain/successor-session-launcher.js +1 -0
  419. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  420. package/daemon/dist/domain/terminal/earlier-tile-attach-0711.d.ts +2 -0
  421. package/daemon/dist/domain/terminal/earlier-tile-attach-0711.d.ts.map +1 -0
  422. package/daemon/dist/domain/terminal/earlier-tile-attach-0711.js +146 -0
  423. package/daemon/dist/domain/terminal/earlier-tile-attach-0711.js.map +1 -0
  424. package/daemon/dist/domain/terminal/earlier-tile-attach.d.ts +1 -0
  425. package/daemon/dist/domain/terminal/earlier-tile-attach.d.ts.map +1 -1
  426. package/daemon/dist/domain/terminal/earlier-tile-attach.js +42 -1
  427. package/daemon/dist/domain/terminal/earlier-tile-attach.js.map +1 -1
  428. package/daemon/dist/domain/terminal/herdr-follow-view.d.ts.map +1 -1
  429. package/daemon/dist/domain/terminal/herdr-follow-view.js +43 -19
  430. package/daemon/dist/domain/terminal/herdr-follow-view.js.map +1 -1
  431. package/daemon/dist/domain/terminal/herdr-viewer.d.ts +7 -4
  432. package/daemon/dist/domain/terminal/herdr-viewer.d.ts.map +1 -1
  433. package/daemon/dist/domain/terminal/herdr-viewer.js +101 -47
  434. package/daemon/dist/domain/terminal/herdr-viewer.js.map +1 -1
  435. package/daemon/dist/domain/terminal/terminal-following.js +3 -3
  436. package/daemon/dist/domain/terminal/terminal-following.js.map +1 -1
  437. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  438. package/daemon/dist/domain/terminal/terminal-service.js +16 -1
  439. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  440. package/daemon/dist/domain/terminal/tile-attach.d.ts +6 -3
  441. package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -1
  442. package/daemon/dist/domain/terminal/tile-attach.js +11 -46
  443. package/daemon/dist/domain/terminal/tile-attach.js.map +1 -1
  444. package/daemon/dist/domain/tmux-server-selection.d.ts.map +1 -1
  445. package/daemon/dist/domain/tmux-server-selection.js +8 -2
  446. package/daemon/dist/domain/tmux-server-selection.js.map +1 -1
  447. package/daemon/dist/domain/types.d.ts +18 -1
  448. package/daemon/dist/domain/types.d.ts.map +1 -1
  449. package/daemon/dist/domain/types.js.map +1 -1
  450. package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
  451. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  452. package/daemon/dist/domain/user-settings/settings-store.js +48 -0
  453. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  454. package/daemon/dist/domain/view-event-bridge.js +1 -1
  455. package/daemon/dist/domain/view-event-bridge.js.map +1 -1
  456. package/daemon/dist/domain/view-projector.d.ts +4 -1
  457. package/daemon/dist/domain/view-projector.d.ts.map +1 -1
  458. package/daemon/dist/domain/view-projector.js +9 -4
  459. package/daemon/dist/domain/view-projector.js.map +1 -1
  460. package/daemon/dist/domain/wake-recovery.d.ts.map +1 -1
  461. package/daemon/dist/domain/wake-recovery.js +9 -2
  462. package/daemon/dist/domain/wake-recovery.js.map +1 -1
  463. package/daemon/dist/domain/workflow-exception-escalation.d.ts +3 -2
  464. package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
  465. package/daemon/dist/domain/workflow-exception-escalation.js +1 -1
  466. package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
  467. package/daemon/dist/domain/workflow-instance-store.d.ts +8 -1
  468. package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
  469. package/daemon/dist/domain/workflow-instance-store.js +21 -3
  470. package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
  471. package/daemon/dist/domain/workflow-reconciliation.d.ts.map +1 -1
  472. package/daemon/dist/domain/workflow-reconciliation.js +2 -1
  473. package/daemon/dist/domain/workflow-reconciliation.js.map +1 -1
  474. package/daemon/dist/domain/workflow-runtime.d.ts +4 -1
  475. package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
  476. package/daemon/dist/domain/workflow-runtime.js +20 -7
  477. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  478. package/daemon/dist/domain/workflow-spec-cache.d.ts +24 -4
  479. package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
  480. package/daemon/dist/domain/workflow-spec-cache.js +87 -7
  481. package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
  482. package/daemon/dist/domain/workflow-spec-unregister.d.ts +36 -0
  483. package/daemon/dist/domain/workflow-spec-unregister.d.ts.map +1 -0
  484. package/daemon/dist/domain/workflow-spec-unregister.js +105 -0
  485. package/daemon/dist/domain/workflow-spec-unregister.js.map +1 -0
  486. package/daemon/dist/domain/workflow-types.d.ts +14 -0
  487. package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
  488. package/daemon/dist/index.d.ts +2 -1
  489. package/daemon/dist/index.d.ts.map +1 -1
  490. package/daemon/dist/index.js +23 -5
  491. package/daemon/dist/index.js.map +1 -1
  492. package/daemon/dist/learned-host-bindings-surface.d.ts +2 -0
  493. package/daemon/dist/learned-host-bindings-surface.d.ts.map +1 -0
  494. package/daemon/dist/learned-host-bindings-surface.js +4 -0
  495. package/daemon/dist/learned-host-bindings-surface.js.map +1 -0
  496. package/daemon/dist/routes/activity.d.ts.map +1 -1
  497. package/daemon/dist/routes/activity.js +37 -2
  498. package/daemon/dist/routes/activity.js.map +1 -1
  499. package/daemon/dist/routes/adapters.d.ts.map +1 -1
  500. package/daemon/dist/routes/adapters.js +4 -0
  501. package/daemon/dist/routes/adapters.js.map +1 -1
  502. package/daemon/dist/routes/compaction.js +2 -0
  503. package/daemon/dist/routes/compaction.js.map +1 -1
  504. package/daemon/dist/routes/events.js +4 -0
  505. package/daemon/dist/routes/events.js.map +1 -1
  506. package/daemon/dist/routes/gateway.d.ts +3 -0
  507. package/daemon/dist/routes/gateway.d.ts.map +1 -1
  508. package/daemon/dist/routes/gateway.js +58 -8
  509. package/daemon/dist/routes/gateway.js.map +1 -1
  510. package/daemon/dist/routes/hosts.d.ts.map +1 -1
  511. package/daemon/dist/routes/hosts.js +298 -35
  512. package/daemon/dist/routes/hosts.js.map +1 -1
  513. package/daemon/dist/routes/queue.d.ts.map +1 -1
  514. package/daemon/dist/routes/queue.js +10 -3
  515. package/daemon/dist/routes/queue.js.map +1 -1
  516. package/daemon/dist/routes/seat.d.ts.map +1 -1
  517. package/daemon/dist/routes/seat.js +4 -3
  518. package/daemon/dist/routes/seat.js.map +1 -1
  519. package/daemon/dist/routes/terminal-ws.d.ts +1 -0
  520. package/daemon/dist/routes/terminal-ws.d.ts.map +1 -1
  521. package/daemon/dist/routes/terminal-ws.js +1 -1
  522. package/daemon/dist/routes/terminal-ws.js.map +1 -1
  523. package/daemon/dist/routes/workflow.d.ts.map +1 -1
  524. package/daemon/dist/routes/workflow.js +24 -0
  525. package/daemon/dist/routes/workflow.js.map +1 -1
  526. package/daemon/dist/server.d.ts +2 -0
  527. package/daemon/dist/server.d.ts.map +1 -1
  528. package/daemon/dist/server.js +7 -2
  529. package/daemon/dist/server.js.map +1 -1
  530. package/daemon/dist/startup.d.ts.map +1 -1
  531. package/daemon/dist/startup.js +65 -15
  532. package/daemon/dist/startup.js.map +1 -1
  533. package/daemon/dist/terminal/TerminalSessionBroker.d.ts +18 -13
  534. package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
  535. package/daemon/dist/terminal/TerminalSessionBroker.js +113 -76
  536. package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
  537. package/daemon/dist/terminal/window-pin.d.ts +3 -3
  538. package/daemon/dist/terminal/window-pin.d.ts.map +1 -1
  539. package/daemon/dist/terminal/window-pin.js +2 -2
  540. package/daemon/dist/terminal/window-pin.js.map +1 -1
  541. package/daemon/docs/reference/acp-agents.md +68 -0
  542. package/daemon/docs/reference/agent-spec.md +53 -1
  543. package/daemon/docs/reference/agent-startup-guide.md +28 -0
  544. package/daemon/docs/reference/agent-state-taxonomy.md +7 -0
  545. package/daemon/docs/reference/daemon-http-clients.md +16 -7
  546. package/daemon/docs/reference/gateway-participants.md +4 -1
  547. package/daemon/docs/reference/gateway-relay.md +239 -0
  548. package/daemon/docs/reference/getting-started.md +3 -2
  549. package/daemon/docs/reference/hosted-members.md +38 -1
  550. package/daemon/docs/reference/project-workspace.md +4 -0
  551. package/daemon/docs/reference/quickstart.md +1 -1
  552. package/daemon/docs/reference/reconstructions.md +90 -0
  553. package/daemon/docs/reference/rig-spec.md +63 -6
  554. package/daemon/docs/reference/seat-delivery.md +20 -0
  555. package/daemon/docs/reference/terminal-sessions.md +88 -26
  556. package/daemon/docs/reference/tmux-servers.md +48 -0
  557. package/daemon/docs/reference/whats-new.md +271 -21
  558. package/daemon/specs/agents/shared/skills/core/cross-host-rig-commands/SKILL.md +7 -0
  559. package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +1 -0
  560. package/daemon/specs/agents/shared/skills/core/working-with-an-openrig-team/SKILL.md +90 -0
  561. package/dist/acp/agent-server.d.ts +126 -0
  562. package/dist/acp/agent-server.d.ts.map +1 -0
  563. package/dist/acp/agent-server.js +449 -0
  564. package/dist/acp/agent-server.js.map +1 -0
  565. package/dist/acp/json-rpc-stdio.d.ts +24 -10
  566. package/dist/acp/json-rpc-stdio.d.ts.map +1 -1
  567. package/dist/acp/json-rpc-stdio.js +58 -36
  568. package/dist/acp/json-rpc-stdio.js.map +1 -1
  569. package/dist/bin-wrapper.d.ts.map +1 -1
  570. package/dist/bin-wrapper.js +3 -1
  571. package/dist/bin-wrapper.js.map +1 -1
  572. package/dist/build-info.js +3 -3
  573. package/dist/client.d.ts +4 -0
  574. package/dist/client.d.ts.map +1 -1
  575. package/dist/client.js +7 -0
  576. package/dist/client.js.map +1 -1
  577. package/dist/commands/acp.d.ts +14 -0
  578. package/dist/commands/acp.d.ts.map +1 -1
  579. package/dist/commands/acp.js +189 -2
  580. package/dist/commands/acp.js.map +1 -1
  581. package/dist/commands/attach.js +1 -1
  582. package/dist/commands/attach.js.map +1 -1
  583. package/dist/commands/capture.js +6 -6
  584. package/dist/commands/capture.js.map +1 -1
  585. package/dist/commands/compact.d.ts.map +1 -1
  586. package/dist/commands/compact.js +14 -2
  587. package/dist/commands/compact.js.map +1 -1
  588. package/dist/commands/config.d.ts.map +1 -1
  589. package/dist/commands/config.js +35 -6
  590. package/dist/commands/config.js.map +1 -1
  591. package/dist/commands/context-reconstruction.d.ts +5 -0
  592. package/dist/commands/context-reconstruction.d.ts.map +1 -0
  593. package/dist/commands/context-reconstruction.js +69 -0
  594. package/dist/commands/context-reconstruction.js.map +1 -0
  595. package/dist/commands/context.d.ts.map +1 -1
  596. package/dist/commands/context.js +2 -0
  597. package/dist/commands/context.js.map +1 -1
  598. package/dist/commands/daemon.d.ts.map +1 -1
  599. package/dist/commands/daemon.js +5 -2
  600. package/dist/commands/daemon.js.map +1 -1
  601. package/dist/commands/doctor.d.ts.map +1 -1
  602. package/dist/commands/doctor.js +61 -0
  603. package/dist/commands/doctor.js.map +1 -1
  604. package/dist/commands/gateway.d.ts.map +1 -1
  605. package/dist/commands/gateway.js +15 -7
  606. package/dist/commands/gateway.js.map +1 -1
  607. package/dist/commands/host.d.ts.map +1 -1
  608. package/dist/commands/host.js +59 -12
  609. package/dist/commands/host.js.map +1 -1
  610. package/dist/commands/mcp.d.ts.map +1 -1
  611. package/dist/commands/mcp.js +29 -5
  612. package/dist/commands/mcp.js.map +1 -1
  613. package/dist/commands/provider.d.ts.map +1 -1
  614. package/dist/commands/provider.js +4 -1
  615. package/dist/commands/provider.js.map +1 -1
  616. package/dist/commands/ps.d.ts +2 -0
  617. package/dist/commands/ps.d.ts.map +1 -1
  618. package/dist/commands/ps.js +3 -1
  619. package/dist/commands/ps.js.map +1 -1
  620. package/dist/commands/queue.d.ts +3 -0
  621. package/dist/commands/queue.d.ts.map +1 -1
  622. package/dist/commands/queue.js +203 -67
  623. package/dist/commands/queue.js.map +1 -1
  624. package/dist/commands/seat.d.ts.map +1 -1
  625. package/dist/commands/seat.js +15 -3
  626. package/dist/commands/seat.js.map +1 -1
  627. package/dist/commands/stream.d.ts.map +1 -1
  628. package/dist/commands/stream.js +24 -1
  629. package/dist/commands/stream.js.map +1 -1
  630. package/dist/commands/terminal.js +1 -1
  631. package/dist/commands/workflow-render.d.ts +4 -0
  632. package/dist/commands/workflow-render.d.ts.map +1 -1
  633. package/dist/commands/workflow-render.js +7 -0
  634. package/dist/commands/workflow-render.js.map +1 -1
  635. package/dist/commands/workflow.d.ts.map +1 -1
  636. package/dist/commands/workflow.js +69 -1
  637. package/dist/commands/workflow.js.map +1 -1
  638. package/dist/config-store.d.ts +8 -1
  639. package/dist/config-store.d.ts.map +1 -1
  640. package/dist/config-store.js +52 -1
  641. package/dist/config-store.js.map +1 -1
  642. package/dist/daemon-lifecycle.d.ts +2 -0
  643. package/dist/daemon-lifecycle.d.ts.map +1 -1
  644. package/dist/daemon-lifecycle.js +38 -5
  645. package/dist/daemon-lifecycle.js.map +1 -1
  646. package/dist/daemon-reachability.d.ts +1 -1
  647. package/dist/daemon-reachability.d.ts.map +1 -1
  648. package/dist/daemon-reachability.js +4 -2
  649. package/dist/daemon-reachability.js.map +1 -1
  650. package/dist/lib/reconstruction-reader.d.ts +122 -0
  651. package/dist/lib/reconstruction-reader.d.ts.map +1 -0
  652. package/dist/lib/reconstruction-reader.js +481 -0
  653. package/dist/lib/reconstruction-reader.js.map +1 -0
  654. package/dist/lib/work-install.d.ts +28 -0
  655. package/dist/lib/work-install.d.ts.map +1 -1
  656. package/dist/lib/work-install.js +80 -20
  657. package/dist/lib/work-install.js.map +1 -1
  658. package/dist/mcp-http.d.ts +7 -0
  659. package/dist/mcp-http.d.ts.map +1 -1
  660. package/dist/mcp-http.js +30 -6
  661. package/dist/mcp-http.js.map +1 -1
  662. package/dist/mcp-server.d.ts +33 -3
  663. package/dist/mcp-server.d.ts.map +1 -1
  664. package/dist/mcp-server.js +443 -52
  665. package/dist/mcp-server.js.map +1 -1
  666. package/dist/queue-artifact.d.ts +57 -0
  667. package/dist/queue-artifact.d.ts.map +1 -0
  668. package/dist/queue-artifact.js +70 -0
  669. package/dist/queue-artifact.js.map +1 -0
  670. package/dist/queue-receipt.d.ts.map +1 -1
  671. package/dist/queue-receipt.js +4 -3
  672. package/dist/queue-receipt.js.map +1 -1
  673. package/dist/system-preflight.d.ts.map +1 -1
  674. package/dist/system-preflight.js +15 -7
  675. package/dist/system-preflight.js.map +1 -1
  676. package/dist/terminal-window.d.ts.map +1 -1
  677. package/dist/terminal-window.js +13 -10
  678. package/dist/terminal-window.js.map +1 -1
  679. package/package.json +1 -1
  680. package/tui/dist/attention/attention-model.d.ts +2 -1
  681. package/tui/dist/attention/attention-model.d.ts.map +1 -1
  682. package/tui/dist/attention/attention-model.js +18 -4
  683. package/tui/dist/attention/attention-model.js.map +1 -1
  684. package/tui/dist/config/config-model.d.ts.map +1 -1
  685. package/tui/dist/config/config-model.js +2 -1
  686. package/tui/dist/config/config-model.js.map +1 -1
  687. package/tui/dist/daemon-client.d.ts +7 -0
  688. package/tui/dist/daemon-client.d.ts.map +1 -1
  689. package/tui/dist/daemon-client.js +15 -4
  690. package/tui/dist/daemon-client.js.map +1 -1
  691. package/tui/dist/demo-data.js +2 -2
  692. package/tui/dist/demo-data.js.map +1 -1
  693. package/tui/dist/main.js +5 -1
  694. package/tui/dist/main.js.map +1 -1
  695. package/ui/dist/assets/index-BOYrLyfQ.js +623 -0
  696. package/ui/dist/assets/index-DqSRu4OY.css +32 -0
  697. package/ui/dist/index.html +2 -2
  698. package/ui/dist/assets/index-BFOs3ejL.css +0 -32
  699. package/ui/dist/assets/index-CdkFwtld.js +0 -623
@@ -1,7 +1,7 @@
1
1
  # Reference guides the help pack and command help link to, loaded one file or section at a time by address
2
2
  # (rig context get reference/<file>#<section>). Each file is a symlink to docs/reference/.
3
3
  name: reference
4
- version: "0.7.10"
4
+ version: "0.7.11"
5
5
  taxonomy: world
6
6
  purpose: "Version-matched reference guides the help guide and command help link to. Load a single file or section by address; don't load the whole pack."
7
7
  files:
@@ -17,6 +17,9 @@ files:
17
17
  - path: rig-spec.md
18
18
  role: reference
19
19
  summary: "The rig specification format."
20
+ - path: tmux-servers.md
21
+ role: reference
22
+ summary: "Choosing the daemon's tmux server, and moving an existing team onto tmux control mode (linked from rig doctor and the daemon's log)."
20
23
  - path: whats-new.md
21
24
  role: reference
22
25
  summary: "What changed in the installed version, for an agent on an upgraded install."
@@ -2,7 +2,7 @@
2
2
 
3
3
  Version: 0.2 (pod-aware)
4
4
  Last validated against code: 2026-10-07, at the 0.6.6 cut `2620dea8` (whole document at `fcaf1f8e`; changes to its sources since then checked)
5
- Source of truth: `packages/daemon/src/domain/rigspec-schema.ts`, `packages/daemon/src/domain/types.ts`, `packages/daemon/src/domain/startup-validation.ts`, `packages/daemon/src/domain/permission-policy/policy-ref.ts`, `packages/daemon/src/domain/profile-resolver.ts`, `packages/daemon/src/domain/rigspec-preflight.ts`, `packages/daemon/src/adapters/kernel-authority.ts`, `packages/daemon/src/domain/native-permission-store.ts`, `packages/daemon/src/domain/codex-team-workspace.ts`
5
+ Source of truth: `packages/daemon/src/domain/rigspec-schema.ts`, `packages/daemon/src/domain/types.ts`, `packages/daemon/src/domain/launch-wrapper.ts`, `packages/daemon/src/domain/startup-validation.ts`, `packages/daemon/src/domain/permission-policy/policy-ref.ts`, `packages/daemon/src/domain/profile-resolver.ts`, `packages/daemon/src/domain/rigspec-preflight.ts`, `packages/daemon/src/adapters/kernel-authority.ts`, `packages/daemon/src/domain/native-permission-store.ts`, `packages/daemon/src/domain/codex-team-workspace.ts`
6
6
 
7
7
  This is the canonical reference for the pod-aware RigSpec YAML format. Every field, validation rule, and default documented here was traced from the actual parser and validator code, not from prior documentation.
8
8
 
@@ -404,6 +404,22 @@ ask rules; help can prompt in that fallback. A helper that disappears or times o
404
404
  after launch cannot supply a decision, leaving Claude's remaining native rules
405
405
  in effect. The hook is a convenience policy, not a containment boundary.
406
406
 
407
+ Claude sessions launched with a named `team` or `kernel` hook policy read the
408
+ installed built-in lists on each Bash hook call. Replacing those files at the
409
+ same path changes the hook's lists on its next call; native inline allowances
410
+ remain as launched. Sessions launched with an encoded policy keep their launch
411
+ lists. A session retaining a versioned runtime path continues to use the files
412
+ at that path, so installing another version elsewhere does not change its hook.
413
+ This does not reload all permission settings in a running session.
414
+
415
+ An in-place rollback to a hook from before named policies has a different effect:
416
+ that helper cannot read `team` or `kernel` and returns no hook decision. Lifecycle
417
+ asks can then disappear under the native `Bash(rig:*)` allowance. Relaunch affected
418
+ Claude sessions before relying on those asks after such a rollback. Native
419
+ personal, project and managed restrictions are not removed. This applies when
420
+ the rollback replaces the hook at the path a running named-policy session uses;
421
+ it does not describe every rollback or sessions using a retained versioned path.
422
+
407
423
  Codex keeps `workspace-write` with its existing approval policy and receives the
408
424
  configured OpenRig workspace root plus its pod's shared state directory as
409
425
  additional writable directories. The team workspace preparer creates missing
@@ -548,7 +564,7 @@ or local settings. Managed settings aren't inspected. `rig export` writes the se
548
564
  with an account home or an API-key selection (select those again after import), so a later switch shows there, and `rig provider switch --stored-login` removes it. Only
549
565
  `claude-code` members and legacy flat nodes accept it, and there's no rig-level default.
550
566
 
551
- **Switching to an isolated account home.** A running Codex or Claude Code seat can change its native account home
567
+ **Switching to an isolated account home.** A running Codex, Claude Code or Pi seat can change its account home
552
568
  while staying in its rig:
553
569
 
554
570
  ```sh
@@ -560,7 +576,20 @@ rig seat set-runtime dev-impl@my-rig --runtime claude-code \
560
576
 
561
577
  The directory must already exist and contain the runtime's login or API settings. You choose the account and budget;
562
578
  OpenRig does not choose or create credentials. `--account-home` sets `CODEX_HOME` for Codex or `CLAUDE_CONFIG_DIR` for
563
- Claude Code before the successor starts.
579
+ Claude Code before the successor starts. For Pi, the account directory must contain a readable `auth.json`; OpenRig links
580
+ that file into a separate managed successor directory. The existing Pi process keeps its credentials and runner state
581
+ until the successor confirms. Pi account changes keep the current model and effort unless explicitly overridden.
582
+
583
+ ```sh
584
+ rig provider switch --seat pi-worker@my-rig --to-account work \
585
+ --account-home /home/me/accounts/pi-work --reason "Use the work account" --dry-run
586
+ # Run again without --dry-run to stage the successor and request its confirmation.
587
+ rig provider switch --seat pi-worker@my-rig --clear-account-home --reason "Return to configured login"
588
+ ```
589
+
590
+ Pi account changes work with or without `launch_wrapper`. The wrapper receives the successor's managed Pi directory;
591
+ it must preserve the selected credentials if you want OpenRig's account choice to apply. Switching a seat between Pi
592
+ and another runtime is not supported by this account-home feature.
564
593
 
565
594
  This switch starts a fresh conversation with a handover, even when the runtime stays the same. The existing
566
595
  subscription-login switch preserves the conversation. Once the successor confirms, OpenRig commits its home, runtime,
@@ -750,6 +779,7 @@ directory's `CLAUDE.md`, including blocks written by other rigs.
750
779
  | `effort` | string | no | — | Reasoning effort override, trimmed. Claude gets `--effort`, Codex `-c model_reasoning_effort=…`, Pi `--thinking` (see "Pi" below). A non-string value is ignored with an advisory. |
751
780
  | `advisor` | string | no | — | Claude-only Advisor model for this seat. Overrides the AgentSpec profile/default; blank or non-string values are ignored with an advisory. |
752
781
  | `claude_mcp` | `none` | no | normal loading | Claude members only. Disable MCP server loading for this agent on every launch and resume. Omit the field to keep Claude's normal configuration; see [Claude MCP loading](#claude-mcp-loading-runtime-claude-code). |
782
+ | `launch_wrapper` | string[] | no | — | Local built-in `pi`, `codex` and `claude-code` members only. Literal argument prefix applied to the native executable and its arguments on fresh launch, relaunch, rebuild, resume, fork, restore and handover; `[]` explicitly clears a stored wrapper when re-applying an authored spec, while omitting the key leaves an existing seat's stored choice unchanged. See [Launch wrapper](#launch-wrapper-runtime-pi-and-codex). |
753
783
  | `permission_policy` | string | no | — | Member-level permission policy; overrides the rig's. Not valid on terminal members. |
754
784
  | `env` | map | no | — | Launch environment for this seat, laid over the rig's `env`. Same rules as the rig-level field. Valid on terminal members too. See "Launch environment" below. |
755
785
  | `agent_file` | string | no | — | Claude members only. A Claude agent definition (a `.md` file with `name` in its frontmatter) for this seat. It's copied into the seat's own storage and launched as `--agent openrig:<name>`. A path beside the spec: no `..`, not absolute. |
@@ -887,14 +917,40 @@ This requires a Claude Code version that supports `--advisor`. OpenRig never wri
887
917
  choose different Advisors. When Advisor is unset, no flag is emitted and Claude's
888
918
  own defaults/settings apply. Other runtimes ignore this field.
889
919
 
920
+ ### Launch wrapper (`runtime: pi` and `codex`)
921
+
922
+ Set `launch_wrapper` on a local built-in `pi`, `codex` or `claude-code` member to prefix its native executable and arguments with a literal argv vector:
923
+
924
+ ```yaml
925
+ members:
926
+ - id: impl
927
+ agent_ref: local:agents/impl
928
+ profile: default
929
+ runtime: codex
930
+ cwd: .
931
+ launch_wrapper: ["launcher", "exec", "--profile", "seat-a", "--"]
932
+ ```
933
+
934
+ - **Scope and literal argv:** Local built-in `pi`, `codex` and `claude-code` members, including legacy flat nodes, support `launch_wrapper`; other runtimes reject it, including `[]`. Each fork uses its target member's own selection. Arguments are literal strings without NUL, CR or LF; spaces, quotes, metacharacters and empty non-executable arguments are preserved.
935
+ - **Executable resolution:** `launch_wrapper[0]` must be an absolute path or bare command name. Preflight and launch resolve it using the daemon's launch `PATH` and working directory, before adding the seat's `rig` bin directory. Relative paths containing `/`, aliases and functions are unsupported for the wrapper itself.
936
+ - **Native child and `exec` contract:** The wrapper prefixes the resolved Codex entry, prefixes the resolved Pi child executable inside the host runner, or prefixes the real Claude executable and native arguments. Managed Claude applies it after rebuilding the environment; pinned continuations retain their executable. The wrapper must `exec` its child in place, preserving working directory, environment, signals, exit status and TTY stdio (Claude/Codex) or RPC pipes (Pi). Supervising wrappers are unsupported.
937
+ - **Classic Claude lookup:** Wrapped classic launch supports bash, zsh, sh and dash and requires `command -v claude` to resolve to an executable file; aliases and functions refuse with `launch_wrapper unavailable; no agent started.` To keep custom flags or environment, put them in a `#!` script named `claude` on `PATH`; the wrapper runs that script ([#1477](https://github.com/mvschwarz/openrig/issues/1477)).
938
+ - **Fail-closed (never unwraps):** The selected wrapper applies across fresh launch, relaunch, rebuild, resume, fork, restore, handover and supported runtime switches. Invalid stored metadata, non-POSIX panes, unavailable wrapper support, missing session identity or an unusable wrapper refuses launch. Failures after dispatch remain visible in the pane or Pi runner's markers; OpenRig never runs unwrapped, including Pi's long-command (`launch_path_too_long`) host-runner retry.
939
+ - **Persistence and clear:** On new seats, absent or `launch_wrapper: []` stores no wrapper. Applying an authored spec to an existing seat retains the stored selection when absent, clears it with `launch_wrapper: []`, and replaces it with a non-empty array. Recreation/import uses the incoming spec; older snapshots preserve the current selection. First-start retry refuses wrapper changes. Runtime switches carry it to supported successors; validation occurs at execution. There is no live edit verb: change the spec and use the supported create/recreate/apply flow. Export and node inventory include the configured value.
940
+ - **Boundary:** An argv prefix is not proof of sandbox isolation, tooling availability, memory wiring or governance enforcement. Verify the wrapper and runtime independently.
941
+
890
942
  ### Pi (`runtime: pi`)
891
943
 
892
944
  `runtime: pi` launches the Pi coding agent (`pi --mode rpc`) through OpenRig's RPC runner.
893
945
 
894
- - **State:** Each seat uses `$OPENRIG_HOME/state/pi/<session>/agent` as its Pi agent directory, with `sessions/` beside it, instead of your default `~/.pi/agent`. The runner sets `PI_CODING_AGENT_DIR` to that directory. `<session>` is the seat's session name, unchanged; for a pod member it is `{podId}-{memberId}@{rigName}`. `$OPENRIG_HOME` defaults to `~/.openrig`. OpenRig creates these directories at launch and does not copy anything from `~/.pi/agent`.
946
+ - **State:** Each seat uses `$OPENRIG_HOME/state/pi/<session>/agent` as its Pi agent directory, with `sessions/` beside it, instead of your default `~/.pi/agent`. The runner sets `PI_CODING_AGENT_DIR` to that directory. `<session>` is the seat's session name, unchanged; for a pod member it is `{podId}-{memberId}@{rigName}`. `$OPENRIG_HOME` defaults to `~/.openrig`. OpenRig creates these directories at launch and does not copy anything from `~/.pi/agent`. A confirmed account switch moves the seat into an isolated `state/pi/account-switches/<generation>/<session>/` directory; subsequent launches and resumes use that committed directory.
895
947
  - **Thinking level:** A Pi seat's effort (the choice saved with `rig seat set-effort`, else the spec's `effort`) is sent to Pi as `--thinking <level>` on every managed launch and resume: fresh launch, successor and restore. Pi accepts `off`, `minimal`, `low`, `medium`, `high`, `xhigh` and `max`; OpenRig passes the value as written and does not translate it, so Codex's `none` is not mapped to `off`. Only a value of the shape `set-effort` accepts (a letter, then up to 31 letters, digits, `-` or `_`) is sent; any other spec value, such as one with a space or one that starts with `--`, is left out, and `rig seat effort` says so. An unfamiliar level gets an advisory (a warning from `set-effort`), never a refusal, and Pi itself ignores an unknown level with a warning and keeps the level it would use without the flag: a model suffix, the resumed session's level, or its default. With no effort resolved, no flag is sent. The effort wins over a model suffix, and the model string is never changed. `rig seat effort` reports the level sent at launch and, on Pi 0.99.0 or later, the `thinkingLevel` Pi records on this launch's latest successful assistant turn (error and aborted turns are skipped); that is the session's level after Pi's own cap, not proof the provider applied it, and it is shown apart from the level sent when they differ. On older Pi it is NOT VERIFIED. Without an effort, you can still set the level as a model suffix, for example `model: openrouter/x-ai/grok-4:high`. Pi first looks for a model whose id is the whole pin, and uses it when there is one, suffix included. Only when there is none does Pi read the suffix as the level and record the model without it. Any other suffix, such as OpenRouter's `:free`, stays part of the model id. The model-divergence check reads the pin literally when the seat's `models.json` defines a model with that exact id; otherwise it accepts the model with or without the suffix. If the seat's `models.json` can't be read, a pin with a suffix stays unchecked, with the usual warning, when the recorded model matches the whole pin or the pin without its suffix. A record that matches neither is reported.
896
- - **Custom models:** Pi reads `models.json` from its agent directory, so a seat reads `$OPENRIG_HOME/state/pi/<session>/agent/models.json`, not `~/.pi/agent/models.json`. Custom provider and model definitions for a seat go in that file. A seat that uses only providers Pi already includes does not need one. OpenRig does not create or write `models.json`.
897
- - **Credentials:** The Pi process receives only `PATH`, `HOME`, `USER`, `LOGNAME`, `SSH_AUTH_SOCK`, `TERM`, `LANG`, `LC_ALL`, `SHELL`, `TMPDIR`, a fixed set of OpenRig seat and instance variables, `PI_CODING_AGENT_DIR`, `PI_CODING_AGENT_SESSION_DIR`, and at most one provider key. That key is `OPENROUTER_API_KEY`, `ZAI_API_KEY`, `KIMI_API_KEY` or `MINIMAX_API_KEY`, passed only when it is set in the seat's environment and the seat's `model` is written as `openrouter/<id>`, `zai/<id>`, `kimi-coding/<id>` or `minimax/<id>`. Naming that variable in `recovery.provider_auth_env_allowlist` (empty by default) makes the daemon add it, when set in the daemon's environment, to the seat's launch environment. No other variable reaches Pi, including other providers' keys and a custom provider's own key variable.
948
+ - **Custom models:** Pi reads `models.json` from its agent directory, so a seat reads `$OPENRIG_HOME/state/pi/<session>/agent/models.json`, not `~/.pi/agent/models.json`. Custom provider and model definitions for a seat go in that file (or the corresponding committed account-switch directory after a switch). A seat that uses only providers Pi already includes does not need one. OpenRig does not create or write `models.json`.
949
+ - **Credentials:** The Pi process receives only `PATH`, `HOME`, `USER`, `LOGNAME`, `SSH_AUTH_SOCK`, `TERM`, `LANG`, `LC_ALL`, `SHELL`, `TMPDIR`, a fixed set of OpenRig seat and instance variables, `PI_CODING_AGENT_DIR`, `PI_CODING_AGENT_SESSION_DIR`, `NODE_OPTIONS` for the selected-account Node preload, and at most one provider key. That key is `OPENROUTER_API_KEY`, `ZAI_API_KEY`, `KIMI_API_KEY` or `MINIMAX_API_KEY`, passed only when it is set in the seat's environment and the seat's `model` is written as `openrouter/<id>`, `zai/<id>`, `kimi-coding/<id>` or `minimax/<id>`. Naming that variable in `recovery.provider_auth_env_allowlist` (empty by default) makes the daemon add it, when set in the daemon's environment, to the seat's launch environment. No other variable reaches Pi, including other providers' keys and a custom provider's own key variable.
950
+
951
+ - **Account homes:** Select an account with `rig provider switch --account-home`, or declare an absolute `PI_CODING_AGENT_DIR` in the seat’s `env:` as its configured account home; the persisted selection takes precedence. `~` is not expanded. A relative value is ignored for managed account selection (and reported by status), leaving the managed seat login in use when no persisted account is selected. The chosen directory must already contain a readable `auth.json`; env-only credentials and wrappers that create credentials later are outside this prepared-account path. Launches with neither a persisted selection nor a declared absolute account home retain their existing credential behaviour. The runner links that file into its managed agent directory before starting Pi, including launches through `launch_wrapper`; settings, models, extensions and sessions remain seat-local. Selected accounts use a Node preload shim that redirects only their auth-lock filesystem operations to the chosen account’s `auth.json.lock` pathname, matching direct Pi use even when the source `auth.json` is a symlink. The preload removes its own `NODE_OPTIONS` entry before Pi starts tools, preserving other Node options; descendants and unrelated agent directories keep their normal filesystem behaviour. This requires a Node-hosted Pi executable and a wrapper that preserves `NODE_OPTIONS`; compiled executables and wrappers that discard the preload are not covered. Removing the selection removes only the managed auth link, not the source account file. A missing account file stops the launch. Direct launch refuses to replace an existing seat-local login or an unmanaged auth link; use a confirmed account switch to preserve that login. An ambient pane-shell `PI_CODING_AGENT_DIR` does not select an account; only the resolved seat configuration or persisted account selection does. Persisted account selections survive resume and cannot be bypassed by the long-command fallback; explicit selections clear inherited provider-key overrides. Use `rig provider switch --account-home` or `--clear-account-home` to change an existing Pi seat through a confirmed successor with a fresh conversation and handover. The account reference and committed state directory survive daemon restart and resume; unconfirmed successors leave the old account and state intact. Clearing returns to the configured home, or the original managed seat login if no home was configured. Status reports a configured account home when present; without one, its home is null because Pi uses the managed seat directory rather than the operator's default login.
952
+
953
+ **Upgrade note for prepared accounts:** An existing built-in Pi seat that declares an absolute `PI_CODING_AGENT_DIR` now selects that home on fresh launch, restart, resume and restore, even without a stored account override. Before upgrading, either prepare a readable `auth.json` there or remove that declaration to keep the managed seat login. Env-only accounts and wrappers that create the file after Pi starts are not supported by this path. Migration 151 preserves switch history; it does not create or copy credentials, or rewrite existing seat declarations. Relative values remain available to community harnesses and are not globally removed.
898
954
 
899
955
  - **Extension dialogs:** The RPC runner shows extension `select`, `confirm`, `input` and `editor` requests in the pane and cancels them because the managed pane cannot answer them. The seat needs attention through the end of the turn, until a new agent run starts. Review the cancelled request and send an instruction the extension can complete without a dialog. Extension `notify` text is shown without raising attention or sending a response.
900
956
 
@@ -1302,6 +1358,7 @@ spec can pass `rig spec validate` and then fail at preflight or import. Run
1302
1358
  24. Startup action `idempotent` is a required boolean.
1303
1359
  25. Non-idempotent actions must not include `restore` in `applies_on`.
1304
1360
  26. `applies_on` values must be from: `fresh_start`, `restore`.
1361
+ 27. `launch_wrapper` is valid only on `pi`, `codex` and `claude-code` members (`[]` included); it must be an array of strings without NUL/CR/LF, and `launch_wrapper[0]` (when non-empty) must be an absolute path or a bare command name on the daemon `PATH`.
1305
1362
 
1306
1363
  ---
1307
1364
 
@@ -0,0 +1,214 @@
1
+ # Choosing the tmux server for an OpenRig instance
2
+
3
+ `terminal.tmux_server` controls where the daemon creates and reads managed seats.
4
+ It accepts `inherit` (the default) or `isolated`. The environment override is
5
+ `OPENRIG_TMUX_SERVER`.
6
+
7
+ To keep managed seats out of your personal `tmux ls`, set this before starting a
8
+ new instance, or before a deliberate restart of an existing daemon:
9
+
10
+ ```sh
11
+ rig config set terminal.tmux_server isolated
12
+ ```
13
+
14
+ The setting is read once at daemon startup. Changing it does not move a running
15
+ seat. Inspect the effective choice with:
16
+
17
+ ```sh
18
+ rig terminal status --json
19
+ ```
20
+
21
+ The `tmux` object reports `requestedMode` (read at the last startup), effective
22
+ `mode`, `socketPath`, `serverArgs`, `migrationPending`, and `blockingSessions`.
23
+ The settings browser shows the configured value; terminal status shows what the
24
+ running daemon actually uses.
25
+
26
+ ## Server identity and configuration
27
+
28
+ In `inherit` mode, a new instance uses the launching shell's `TMUX` socket, or the
29
+ default socket under `TMUX_TMPDIR` (otherwise `/tmp`) when outside tmux. Native
30
+ commands retain tmux's existing environment-based selection. Printed attachments
31
+ and terminal metadata name a non-default server so a new terminal can reach it.
32
+ The default mode does not require a server record or an additional instance
33
+ identity check to start the daemon or use existing attachment paths.
34
+
35
+ In `isolated` mode, the socket is named `openrig-<hash>` under tmux's per-user
36
+ directory. The hash identifies the canonical `OPENRIG_HOME`: different homes get
37
+ different servers, and symlink aliases of one home share a server. Choose a short
38
+ `TMUX_TMPDIR` before the first isolated start if your normal temporary path would
39
+ exceed the platform's Unix socket path limit.
40
+
41
+ When isolation is requested or active, the daemon records the effective socket in
42
+ `OPENRIG_HOME/tmux-server.json` using an atomic, owner-only write. Keep this file
43
+ and the durable `tmux-server.initialized` marker with the instance state. A later shell
44
+ with different `TMUX` or `TMUX_TMPDIR` does not redirect an established isolated
45
+ instance. An invalid or unreadable isolation record is reported rather than overwritten.
46
+ If the record disappears while isolation is selected, startup and `destroy --all` stop before
47
+ touching sessions. Restore the record from an instance backup, or inspect the
48
+ running daemon's `rig terminal status --json` to recover its effective selection.
49
+ An ordinary inherited instance may record its socket for a later migration, but
50
+ missing, invalid or unwritable records do not prevent its normal startup.
51
+ The record's `pinned` flag distinguishes a fixed isolated or migration socket
52
+ from an advisory inherited record. Returning to ordinary inheritance commits
53
+ `pinned: false` and removes the active marker; an interrupted update must not
54
+ leave startup using one server and offline cleanup selecting another. A valid
55
+ unpinned record takes precedence over a leftover marker. Legacy inherited records
56
+ and the old `1` marker do not make ordinary inheritance depend on that file.
57
+
58
+ A newly started server loads tmux's normal system and user configuration,
59
+ including `~/.tmux.conf`; OpenRig does not substitute an empty configuration.
60
+ Existing OpenRig session options, such as `terminal.status_bar`, still apply.
61
+ An existing server does not reread its configuration merely because the daemon
62
+ restarts. Settings and sessions in a separate personal server are left alone.
63
+
64
+ ## Existing teams and deferred migration
65
+
66
+ At startup, the daemon checks the previously selected server before switching.
67
+ If registered sessions still exist there, it keeps that server and reports a
68
+ pending migration. Explicit `OPENRIG_HOME` ownership markers distinguish another
69
+ instance's namesakes; unmarked legacy sessions are retained conservatively. If
70
+ the old server cannot be inspected, the daemon also keeps it and reports why.
71
+
72
+ Stop the listed sessions deliberately, then restart the daemon again to apply the
73
+ new selection. Merely editing the setting or waiting for the last seat to stop
74
+ does not switch a running daemon. The same rule applies when returning to
75
+ `inherit` from isolation. A normal inherited start continues to follow its launching
76
+ environment, as before. No
77
+ live pane is moved, restarted or killed by server selection. Old viewing windows
78
+ can be closed separately after their conversations have stopped.
79
+
80
+ Bring a stopped team back with `rig up <name> --existing`. Its normal restoration
81
+ rules still apply: a seat without usable provider history requires an explicit
82
+ fresh-start choice before it launches.
83
+
84
+ On the first upgrade from a version without a socket record, the old-server
85
+ candidate comes from the launching environment. If live seats use a non-default
86
+ server, start the upgraded daemon from that original server to establish its
87
+ record, or stop those seats before changing servers. Earlier versions did not
88
+ persist enough information to find an arbitrary old socket from a different shell.
89
+
90
+ ## Moving an existing team onto tmux control mode
91
+
92
+ `OPENRIG_TMUX_CONTROL=1` in the daemon's environment sends its routine tmux commands
93
+ through one long-lived control-mode client instead of a new tmux client each time,
94
+ which saves a process start per command on a busy host. It takes effect only on a
95
+ tmux server at 3.7c or later. The version of the server that is running decides,
96
+ not the tmux binary on `PATH`, and a server keeps the version it started with until
97
+ it exits. So installing a newer tmux changes nothing for a server that is already up.
98
+ On an older server the daemon uses a spawned client for every command. It says so
99
+ once in its log (`[tmux] OPENRIG_TMUX_CONTROL=1 is set, but this daemon's tmux server
100
+ runs tmux 3.4 …`), and `rig doctor` reports it as `tmux_control_mode`.
101
+
102
+ To move a team that runs on an older server:
103
+
104
+ 1. Install tmux 3.7c or later where the daemon finds it first on its `PATH`. For a
105
+ daemon run as a service, that's the service's environment.
106
+ 2. Choose the server the team will use. `isolated` gives this OpenRig home a server of
107
+ its own, started by the daemon with that tmux, and leaves your own tmux sessions
108
+ alone: `rig config set terminal.tmux_server isolated`. In `inherit` mode the team
109
+ shares your default server, which runs the new version only after every session
110
+ on it, yours included, has ended.
111
+ 3. Stop each rig deliberately with `rig down <rig>`. Its seats' sessions end, and a
112
+ turn in progress stops. Queue rows, rigs and seats stay as they are.
113
+ 4. Restart the daemon with `OPENRIG_TMUX_CONTROL=1` in its environment.
114
+ `rig terminal status --json` should show `migrationPending: false`. If it's still
115
+ `true`, `blockingSessions` names the sessions still on the old server.
116
+ 5. Bring each rig back with `rig up <rig> --existing`. Each seat resumes its
117
+ conversation where its harness allows, under the restoration rules above.
118
+ 6. Check: the daemon's log says `[tmux] Control mode is on`, and `rig doctor` passes
119
+ `tmux_control_mode`.
120
+
121
+ ## Attachments, discovery and cleanup
122
+
123
+ `rig capture`, managed launch/stop/recovery, terminal previews and desktop viewers
124
+ use the effective server. `rig ps --nodes --json` includes `tmuxServerArgs` and a
125
+ matching `tmuxAttachCommand` for bound tmux seats. `rig tui --shared` uses that
126
+ metadata. To attach a terminal directly, use the canonical session name:
127
+
128
+ ```sh
129
+ rig terminal attach '<session>'
130
+ rig terminal attach --read-only -- '<session>'
131
+ ```
132
+
133
+ These commands attach on the daemon's machine. They do not create a seat or
134
+ switch somebody else's tmux client. A local CLI pointed at an HTTP remote daemon
135
+ cannot attach a same-named local session. For an effectively isolated server,
136
+ terminal attachment, shared TUI and desktop windows also compare the daemon's
137
+ instance identity with the local durable identity before using local terminal
138
+ tools. A loopback URL through a port forward does not bypass this isolation check;
139
+ use the matching `OPENRIG_HOME` on the daemon's machine. Inherited servers retain
140
+ the existing local-host checks without requiring a matching durable identity.
141
+ SSH view tiles follow the viewing instance's effective mode. In `inherit`, they
142
+ use remote tmux through `ssh -t`, including `-r` for read-only views, and keep the
143
+ bounded, identity-checked reattachment when a seat's session is replaced. The
144
+ remote host needs only tmux and a POSIX shell, not OpenRig. Copyable recovery
145
+ commands remain plain `ssh -t ... tmux attach`. In `isolated`, tiles run
146
+ `rig terminal attach` on the remote host,
147
+ using that host's local instance and socket; both the remote CLI and daemon must
148
+ support this command. The remote shell must select the right `OPENRIG_HOME` when
149
+ using a custom home. Local socket paths are never sent to it, and an isolated
150
+ attachment failure does not fall back to a same-named default-server session.
151
+ An inherited view does not discover an isolated remote instance's socket; use
152
+ the remote instance's `rig terminal attach` directly for that mixed setup.
153
+
154
+ Discovery and adoption see the selected server. Existing sessions on another
155
+ server are not imported automatically. `rig attach --self` reports its current
156
+ socket and, for an isolated instance, rejects a different server before binding
157
+ or adding a node; an older
158
+ CLI without socket metadata must be updated to self-attach to an isolated
159
+ instance. A shell outside tmux can still attach as `external_cli`.
160
+
161
+ `rig destroy --all` reads the recorded effective server before stopping the daemon
162
+ or removing its state when isolation or a deferred migration pins it. Ordinary
163
+ `inherit` cleanup uses the invoking environment's normal tmux selection, as before;
164
+ an old advisory socket is not used to redirect it. Cleanup kills only registered
165
+ session names on the selected server.
166
+
167
+ Dedicated selection requires POSIX tmux. On Windows, psmux retains its existing
168
+ server behavior; requesting `isolated` produces a status note and a pending choice.
169
+
170
+ ## Two instances on one machine
171
+
172
+ Isolation selects only a tmux server. Give each daemon its own OpenRig home,
173
+ database and port as well. For example, from a directory where you want to keep
174
+ the two instances:
175
+
176
+ ```sh
177
+ mkdir -p .openrig-a .openrig-b
178
+ env OPENRIG_HOME="$PWD/.openrig-a" OPENRIG_DB="$PWD/.openrig-a/rig.db" \
179
+ OPENRIG_PORT=5311 OPENRIG_TMUX_SERVER=isolated rig daemon start
180
+ env OPENRIG_HOME="$PWD/.openrig-b" OPENRIG_DB="$PWD/.openrig-b/rig.db" \
181
+ OPENRIG_PORT=5312 OPENRIG_TMUX_SERVER=isolated rig daemon start
182
+ ```
183
+
184
+ Use the same instance-specific environment for every subsequent command, including
185
+ `rig up`, `rig terminal status --json`, attachment and `rig daemon stop`. Do not
186
+ reuse a database between these homes. Other inherited `OPENRIG_*` variables still
187
+ apply; start from a shell without selectors for another running instance.
188
+
189
+ The operating-system home, provider credentials and provider conversation history
190
+ remain shared unless configured separately. This setting does not isolate the
191
+ filesystem or network. Both inherited and isolated servers support the opt-in
192
+ `OPENRIG_TMUX_CONTROL=1` execution path; its control client connects to the same
193
+ server as the daemon's other tmux commands. On servers older than tmux 3.7c, or
194
+ whose version cannot be recognized as a fixed release, OpenRig uses spawned
195
+ clients instead: starting a control client while another session is created can
196
+ crash those servers (#2304). This avoids creating OpenRig's own control client;
197
+ it cannot protect the server from other tools' control clients.
198
+
199
+ On a large fleet, the daemon's two seat-activity pollers (the activity sampler and the
200
+ structural pane cache) are a large share of its tmux traffic: each runs once a second.
201
+ The setting `daemon.seat_poll_interval_ms` slows both down, from the 1000 ms default up to
202
+ 2000 ms. Set it with `rig config set daemon.seat_poll_interval_ms 2000` (saved in
203
+ `config.json`; `rig config` shows it with its source) or with `OPENRIG_SEAT_POLL_INTERVAL_MS`,
204
+ which overrides the saved value. It is startup-only: the daemon reads it once when it starts,
205
+ so a change takes a daemon restart. `rig config set` refuses a value outside 1000..2000; an
206
+ environment value outside it is dropped with a warning and the daemon keeps the saved value or
207
+ the default.
208
+ A slower cadence makes activity and idle changes show up later, and a Codex permission prompt
209
+ can also show up as much as one interval later. Keep the default if a structural sweep of your
210
+ tmux server can take more than about 2 s (about 3 s at the default): past that, a sweep that
211
+ runs over skips the next tick, the Codex working-frame proof expires, and a working Codex seat
212
+ can briefly read idle. At 2000 ms the remaining 1 s margin is also what a lagging event loop
213
+ uses up. The two settings compose: `OPENRIG_TMUX_CONTROL=1` makes each tmux command cheaper,
214
+ and this one makes there be fewer of them.