@openrig/cli 0.4.3 → 0.4.6

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 (634) hide show
  1. package/daemon/assets/guidance/openrig-start.md +6 -0
  2. package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +47 -21
  3. package/daemon/assets/plugins/openrig-core/skills/openrig-cmux/SKILL.md +86 -0
  4. package/daemon/assets/plugins/openrig-core/skills/openrig-herdr/SKILL.md +158 -0
  5. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +742 -94
  6. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  7. package/daemon/dist/adapters/codex-runtime-adapter.js +12 -8
  8. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  9. package/daemon/dist/adapters/pi-resume.d.ts +32 -0
  10. package/daemon/dist/adapters/pi-resume.d.ts.map +1 -0
  11. package/daemon/dist/adapters/pi-resume.js +125 -0
  12. package/daemon/dist/adapters/pi-resume.js.map +1 -0
  13. package/daemon/dist/adapters/pi-runner-protocol.d.ts +88 -0
  14. package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -0
  15. package/daemon/dist/adapters/pi-runner-protocol.js +153 -0
  16. package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -0
  17. package/daemon/dist/adapters/pi-runner.d.ts +99 -0
  18. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -0
  19. package/daemon/dist/adapters/pi-runner.js +519 -0
  20. package/daemon/dist/adapters/pi-runner.js.map +1 -0
  21. package/daemon/dist/adapters/pi-runtime-adapter.d.ts +61 -0
  22. package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -0
  23. package/daemon/dist/adapters/pi-runtime-adapter.js +356 -0
  24. package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -0
  25. package/daemon/dist/adapters/tmux.d.ts +22 -1
  26. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  27. package/daemon/dist/adapters/tmux.js +40 -1
  28. package/daemon/dist/adapters/tmux.js.map +1 -1
  29. package/daemon/dist/build-info.d.ts +12 -0
  30. package/daemon/dist/build-info.d.ts.map +1 -0
  31. package/daemon/dist/build-info.js +11 -0
  32. package/daemon/dist/build-info.js.map +1 -0
  33. package/daemon/dist/builtins/workflow-specs/branched-remediation.yaml +31 -0
  34. package/daemon/dist/builtins/workflow-specs/factory-rsi.yaml +152 -0
  35. package/daemon/dist/builtins/workflow-specs/gated-release.yaml +26 -0
  36. package/daemon/dist/builtins/workflow-specs/linear-build.yaml +21 -0
  37. package/daemon/dist/db/migrations/048_queue_item_evidence_ref.d.ts +18 -0
  38. package/daemon/dist/db/migrations/048_queue_item_evidence_ref.d.ts.map +1 -0
  39. package/daemon/dist/db/migrations/048_queue_item_evidence_ref.js +22 -0
  40. package/daemon/dist/db/migrations/048_queue_item_evidence_ref.js.map +1 -0
  41. package/daemon/dist/db/migrations/049_workflow_instance_version.d.ts +20 -0
  42. package/daemon/dist/db/migrations/049_workflow_instance_version.d.ts.map +1 -0
  43. package/daemon/dist/db/migrations/049_workflow_instance_version.js +24 -0
  44. package/daemon/dist/db/migrations/049_workflow_instance_version.js.map +1 -0
  45. package/daemon/dist/db/migrations/050_workflow_spec_json.d.ts +22 -0
  46. package/daemon/dist/db/migrations/050_workflow_spec_json.d.ts.map +1 -0
  47. package/daemon/dist/db/migrations/050_workflow_spec_json.js +26 -0
  48. package/daemon/dist/db/migrations/050_workflow_spec_json.js.map +1 -0
  49. package/daemon/dist/db/migrations/051_workflow_resume.d.ts +22 -0
  50. package/daemon/dist/db/migrations/051_workflow_resume.d.ts.map +1 -0
  51. package/daemon/dist/db/migrations/051_workflow_resume.js +27 -0
  52. package/daemon/dist/db/migrations/051_workflow_resume.js.map +1 -0
  53. package/daemon/dist/db/migrations/052_workflow_instance_bound_rig.d.ts +26 -0
  54. package/daemon/dist/db/migrations/052_workflow_instance_bound_rig.d.ts.map +1 -0
  55. package/daemon/dist/db/migrations/052_workflow_instance_bound_rig.js +30 -0
  56. package/daemon/dist/db/migrations/052_workflow_instance_bound_rig.js.map +1 -0
  57. package/daemon/dist/db/migrations/053_sessions_node_id_index.d.ts +48 -0
  58. package/daemon/dist/db/migrations/053_sessions_node_id_index.d.ts.map +1 -0
  59. package/daemon/dist/db/migrations/053_sessions_node_id_index.js +53 -0
  60. package/daemon/dist/db/migrations/053_sessions_node_id_index.js.map +1 -0
  61. package/daemon/dist/db/migrations/054_queue_transitions_archive.d.ts +34 -0
  62. package/daemon/dist/db/migrations/054_queue_transitions_archive.d.ts.map +1 -0
  63. package/daemon/dist/db/migrations/054_queue_transitions_archive.js +49 -0
  64. package/daemon/dist/db/migrations/054_queue_transitions_archive.js.map +1 -0
  65. package/daemon/dist/domain/claim-service.d.ts +11 -0
  66. package/daemon/dist/domain/claim-service.d.ts.map +1 -1
  67. package/daemon/dist/domain/claim-service.js +3 -1
  68. package/daemon/dist/domain/claim-service.js.map +1 -1
  69. package/daemon/dist/domain/discovery-types.d.ts +1 -1
  70. package/daemon/dist/domain/discovery-types.d.ts.map +1 -1
  71. package/daemon/dist/domain/feed/attention-aggregator.d.ts +31 -0
  72. package/daemon/dist/domain/feed/attention-aggregator.d.ts.map +1 -0
  73. package/daemon/dist/domain/feed/attention-aggregator.js +119 -0
  74. package/daemon/dist/domain/feed/attention-aggregator.js.map +1 -0
  75. package/daemon/dist/domain/files/file-write-service.d.ts +11 -2
  76. package/daemon/dist/domain/files/file-write-service.d.ts.map +1 -1
  77. package/daemon/dist/domain/files/file-write-service.js +77 -0
  78. package/daemon/dist/domain/files/file-write-service.js.map +1 -1
  79. package/daemon/dist/domain/hosts/fanout-contract.d.ts +33 -0
  80. package/daemon/dist/domain/hosts/fanout-contract.d.ts.map +1 -0
  81. package/daemon/dist/domain/hosts/fanout-contract.js +23 -0
  82. package/daemon/dist/domain/hosts/fanout-contract.js.map +1 -0
  83. package/daemon/dist/domain/hosts/hosts-registry-reader.d.ts +50 -0
  84. package/daemon/dist/domain/hosts/hosts-registry-reader.d.ts.map +1 -0
  85. package/daemon/dist/domain/hosts/hosts-registry-reader.js +184 -0
  86. package/daemon/dist/domain/hosts/hosts-registry-reader.js.map +1 -0
  87. package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts +11 -0
  88. package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts.map +1 -0
  89. package/daemon/dist/domain/hosts/hosts-registry-writer.js +54 -0
  90. package/daemon/dist/domain/hosts/hosts-registry-writer.js.map +1 -0
  91. package/daemon/dist/domain/hosts/read-through.d.ts +28 -0
  92. package/daemon/dist/domain/hosts/read-through.d.ts.map +1 -0
  93. package/daemon/dist/domain/hosts/read-through.js +139 -0
  94. package/daemon/dist/domain/hosts/read-through.js.map +1 -0
  95. package/daemon/dist/domain/hosts/remote-daemon-http.d.ts +56 -0
  96. package/daemon/dist/domain/hosts/remote-daemon-http.d.ts.map +1 -0
  97. package/daemon/dist/domain/hosts/remote-daemon-http.js +154 -0
  98. package/daemon/dist/domain/hosts/remote-daemon-http.js.map +1 -0
  99. package/daemon/dist/domain/human-route-enforcer.d.ts +71 -0
  100. package/daemon/dist/domain/human-route-enforcer.d.ts.map +1 -0
  101. package/daemon/dist/domain/human-route-enforcer.js +80 -0
  102. package/daemon/dist/domain/human-route-enforcer.js.map +1 -0
  103. package/daemon/dist/domain/mission-control/audit-browse.d.ts +8 -0
  104. package/daemon/dist/domain/mission-control/audit-browse.d.ts.map +1 -1
  105. package/daemon/dist/domain/mission-control/audit-browse.js +19 -0
  106. package/daemon/dist/domain/mission-control/audit-browse.js.map +1 -1
  107. package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts +1 -1
  108. package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts.map +1 -1
  109. package/daemon/dist/domain/mission-control/mission-control-action-log.js +4 -0
  110. package/daemon/dist/domain/mission-control/mission-control-action-log.js.map +1 -1
  111. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js +1 -1
  112. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js.map +1 -1
  113. package/daemon/dist/domain/mission-control/mission-control-read-layer.js +1 -1
  114. package/daemon/dist/domain/mission-control/mission-control-read-layer.js.map +1 -1
  115. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +28 -0
  116. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  117. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +125 -0
  118. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  119. package/daemon/dist/domain/node-inventory.d.ts +18 -0
  120. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  121. package/daemon/dist/domain/node-inventory.js +206 -95
  122. package/daemon/dist/domain/node-inventory.js.map +1 -1
  123. package/daemon/dist/domain/node-launcher.d.ts +11 -0
  124. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  125. package/daemon/dist/domain/node-launcher.js +10 -0
  126. package/daemon/dist/domain/node-launcher.js.map +1 -1
  127. package/daemon/dist/domain/policies/workflow-keepalive.d.ts +7 -0
  128. package/daemon/dist/domain/policies/workflow-keepalive.d.ts.map +1 -1
  129. package/daemon/dist/domain/policies/workflow-keepalive.js +93 -13
  130. package/daemon/dist/domain/policies/workflow-keepalive.js.map +1 -1
  131. package/daemon/dist/domain/ps-projection.d.ts +28 -1
  132. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  133. package/daemon/dist/domain/ps-projection.js +76 -26
  134. package/daemon/dist/domain/ps-projection.js.map +1 -1
  135. package/daemon/dist/domain/queue-repository.d.ts +130 -1
  136. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  137. package/daemon/dist/domain/queue-repository.js +304 -11
  138. package/daemon/dist/domain/queue-repository.js.map +1 -1
  139. package/daemon/dist/domain/queue-retention.d.ts +130 -0
  140. package/daemon/dist/domain/queue-retention.d.ts.map +1 -0
  141. package/daemon/dist/domain/queue-retention.js +224 -0
  142. package/daemon/dist/domain/queue-retention.js.map +1 -0
  143. package/daemon/dist/domain/restore-orchestrator.d.ts +5 -0
  144. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  145. package/daemon/dist/domain/restore-orchestrator.js +29 -2
  146. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  147. package/daemon/dist/domain/resume-token-capture.d.ts +13 -0
  148. package/daemon/dist/domain/resume-token-capture.d.ts.map +1 -1
  149. package/daemon/dist/domain/resume-token-capture.js +14 -1
  150. package/daemon/dist/domain/resume-token-capture.js.map +1 -1
  151. package/daemon/dist/domain/resume-token-validation.d.ts +1 -1
  152. package/daemon/dist/domain/resume-token-validation.d.ts.map +1 -1
  153. package/daemon/dist/domain/resume-token-validation.js +58 -10
  154. package/daemon/dist/domain/resume-token-validation.js.map +1 -1
  155. package/daemon/dist/domain/review/brief-spine.d.ts +19 -0
  156. package/daemon/dist/domain/review/brief-spine.d.ts.map +1 -0
  157. package/daemon/dist/domain/review/brief-spine.js +86 -0
  158. package/daemon/dist/domain/review/brief-spine.js.map +1 -0
  159. package/daemon/dist/domain/review/compose.d.ts +277 -0
  160. package/daemon/dist/domain/review/compose.d.ts.map +1 -0
  161. package/daemon/dist/domain/review/compose.js +862 -0
  162. package/daemon/dist/domain/review/compose.js.map +1 -0
  163. package/daemon/dist/domain/review/fleet-compose.d.ts +52 -0
  164. package/daemon/dist/domain/review/fleet-compose.d.ts.map +1 -0
  165. package/daemon/dist/domain/review/fleet-compose.js +294 -0
  166. package/daemon/dist/domain/review/fleet-compose.js.map +1 -0
  167. package/daemon/dist/domain/review/freeze.d.ts +31 -0
  168. package/daemon/dist/domain/review/freeze.d.ts.map +1 -0
  169. package/daemon/dist/domain/review/freeze.js +257 -0
  170. package/daemon/dist/domain/review/freeze.js.map +1 -0
  171. package/daemon/dist/domain/review/gather.d.ts +115 -0
  172. package/daemon/dist/domain/review/gather.d.ts.map +1 -0
  173. package/daemon/dist/domain/review/gather.js +812 -0
  174. package/daemon/dist/domain/review/gather.js.map +1 -0
  175. package/daemon/dist/domain/review/types.d.ts +361 -0
  176. package/daemon/dist/domain/review/types.d.ts.map +1 -0
  177. package/daemon/dist/domain/review/types.js +35 -0
  178. package/daemon/dist/domain/review/types.js.map +1 -0
  179. package/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
  180. package/daemon/dist/domain/rig-expansion-service.js +3 -0
  181. package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
  182. package/daemon/dist/domain/rig-repository.d.ts +7 -6
  183. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  184. package/daemon/dist/domain/rig-repository.js +33 -11
  185. package/daemon/dist/domain/rig-repository.js.map +1 -1
  186. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  187. package/daemon/dist/domain/rigspec-codec.js +3 -0
  188. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  189. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  190. package/daemon/dist/domain/rigspec-exporter.js +4 -0
  191. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  192. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  193. package/daemon/dist/domain/rigspec-instantiator.js +11 -0
  194. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  195. package/daemon/dist/domain/rigspec-preflight.d.ts +6 -0
  196. package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
  197. package/daemon/dist/domain/rigspec-preflight.js +26 -1
  198. package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
  199. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  200. package/daemon/dist/domain/rigspec-schema.js +20 -1
  201. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  202. package/daemon/dist/domain/runtime-verifier.d.ts +7 -1
  203. package/daemon/dist/domain/runtime-verifier.d.ts.map +1 -1
  204. package/daemon/dist/domain/runtime-verifier.js +39 -1
  205. package/daemon/dist/domain/runtime-verifier.js.map +1 -1
  206. package/daemon/dist/domain/scope/scope-approve.d.ts +64 -0
  207. package/daemon/dist/domain/scope/scope-approve.d.ts.map +1 -0
  208. package/daemon/dist/domain/scope/scope-approve.js +153 -0
  209. package/daemon/dist/domain/scope/scope-approve.js.map +1 -0
  210. package/daemon/dist/domain/scope/scope-audit.d.ts +9 -1
  211. package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
  212. package/daemon/dist/domain/scope/scope-audit.js +173 -1
  213. package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
  214. package/daemon/dist/domain/seat-handover-service.d.ts +9 -0
  215. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  216. package/daemon/dist/domain/seat-handover-service.js +2 -0
  217. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  218. package/daemon/dist/domain/seat-identity-store.d.ts +7 -0
  219. package/daemon/dist/domain/seat-identity-store.d.ts.map +1 -1
  220. package/daemon/dist/domain/seat-identity-store.js +27 -0
  221. package/daemon/dist/domain/seat-identity-store.js.map +1 -1
  222. package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
  223. package/daemon/dist/domain/seat-status-service.js +6 -4
  224. package/daemon/dist/domain/seat-status-service.js.map +1 -1
  225. package/daemon/dist/domain/session-name.d.ts +22 -0
  226. package/daemon/dist/domain/session-name.d.ts.map +1 -1
  227. package/daemon/dist/domain/session-name.js +29 -0
  228. package/daemon/dist/domain/session-name.js.map +1 -1
  229. package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
  230. package/daemon/dist/domain/slices/slice-detail-projector.js +4 -5
  231. package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
  232. package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +18 -2
  233. package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
  234. package/daemon/dist/domain/spec-library-workflow-scanner.js +23 -1
  235. package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
  236. package/daemon/dist/domain/startup-proof.d.ts +10 -6
  237. package/daemon/dist/domain/startup-proof.d.ts.map +1 -1
  238. package/daemon/dist/domain/startup-proof.js +35 -7
  239. package/daemon/dist/domain/startup-proof.js.map +1 -1
  240. package/daemon/dist/domain/successor-session-launcher.d.ts +16 -0
  241. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  242. package/daemon/dist/domain/successor-session-launcher.js +13 -0
  243. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  244. package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts +27 -0
  245. package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts.map +1 -0
  246. package/daemon/dist/domain/terminal/cmux-provider-adapter.js +67 -0
  247. package/daemon/dist/domain/terminal/cmux-provider-adapter.js.map +1 -0
  248. package/daemon/dist/domain/terminal/herdr-adapter.d.ts +77 -0
  249. package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -0
  250. package/daemon/dist/domain/terminal/herdr-adapter.js +266 -0
  251. package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -0
  252. package/daemon/dist/domain/terminal/herdr-transport.d.ts +50 -0
  253. package/daemon/dist/domain/terminal/herdr-transport.d.ts.map +1 -0
  254. package/daemon/dist/domain/terminal/herdr-transport.js +145 -0
  255. package/daemon/dist/domain/terminal/herdr-transport.js.map +1 -0
  256. package/daemon/dist/domain/terminal/terminal-provider.d.ts +88 -0
  257. package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -0
  258. package/daemon/dist/domain/terminal/terminal-provider.js +17 -0
  259. package/daemon/dist/domain/terminal/terminal-provider.js.map +1 -0
  260. package/daemon/dist/domain/terminal/terminal-service.d.ts +60 -0
  261. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -0
  262. package/daemon/dist/domain/terminal/terminal-service.js +174 -0
  263. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -0
  264. package/daemon/dist/domain/terminal/terminal-views-store.d.ts +77 -0
  265. package/daemon/dist/domain/terminal/terminal-views-store.d.ts.map +1 -0
  266. package/daemon/dist/domain/terminal/terminal-views-store.js +146 -0
  267. package/daemon/dist/domain/terminal/terminal-views-store.js.map +1 -0
  268. package/daemon/dist/domain/terminal/view-composer.d.ts +42 -0
  269. package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -0
  270. package/daemon/dist/domain/terminal/view-composer.js +137 -0
  271. package/daemon/dist/domain/terminal/view-composer.js.map +1 -0
  272. package/daemon/dist/domain/tmux-option-defaults.d.ts +89 -0
  273. package/daemon/dist/domain/tmux-option-defaults.d.ts.map +1 -0
  274. package/daemon/dist/domain/tmux-option-defaults.js +132 -0
  275. package/daemon/dist/domain/tmux-option-defaults.js.map +1 -0
  276. package/daemon/dist/domain/topology/multi-rig-launcher.d.ts +49 -0
  277. package/daemon/dist/domain/topology/multi-rig-launcher.d.ts.map +1 -0
  278. package/daemon/dist/domain/topology/multi-rig-launcher.js +132 -0
  279. package/daemon/dist/domain/topology/multi-rig-launcher.js.map +1 -0
  280. package/daemon/dist/domain/topology/remote-up-leaf.d.ts +29 -0
  281. package/daemon/dist/domain/topology/remote-up-leaf.d.ts.map +1 -0
  282. package/daemon/dist/domain/topology/remote-up-leaf.js +60 -0
  283. package/daemon/dist/domain/topology/remote-up-leaf.js.map +1 -0
  284. package/daemon/dist/domain/topology/topology-manifest.d.ts +34 -0
  285. package/daemon/dist/domain/topology/topology-manifest.d.ts.map +1 -0
  286. package/daemon/dist/domain/topology/topology-manifest.js +195 -0
  287. package/daemon/dist/domain/topology/topology-manifest.js.map +1 -0
  288. package/daemon/dist/domain/types.d.ts +39 -1
  289. package/daemon/dist/domain/types.d.ts.map +1 -1
  290. package/daemon/dist/domain/types.js.map +1 -1
  291. package/daemon/dist/domain/up-command-router.d.ts +1 -1
  292. package/daemon/dist/domain/up-command-router.d.ts.map +1 -1
  293. package/daemon/dist/domain/up-command-router.js +34 -2
  294. package/daemon/dist/domain/up-command-router.js.map +1 -1
  295. package/daemon/dist/domain/user-settings/settings-store.d.ts +18 -1
  296. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  297. package/daemon/dist/domain/user-settings/settings-store.js +201 -0
  298. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  299. package/daemon/dist/domain/workflow/slice-workflow-projection.d.ts.map +1 -1
  300. package/daemon/dist/domain/workflow/slice-workflow-projection.js +6 -2
  301. package/daemon/dist/domain/workflow/slice-workflow-projection.js.map +1 -1
  302. package/daemon/dist/domain/workflow-boot-sweep.d.ts +28 -0
  303. package/daemon/dist/domain/workflow-boot-sweep.d.ts.map +1 -0
  304. package/daemon/dist/domain/workflow-boot-sweep.js +102 -0
  305. package/daemon/dist/domain/workflow-boot-sweep.js.map +1 -0
  306. package/daemon/dist/domain/workflow-deadline.d.ts +74 -0
  307. package/daemon/dist/domain/workflow-deadline.d.ts.map +1 -0
  308. package/daemon/dist/domain/workflow-deadline.js +165 -0
  309. package/daemon/dist/domain/workflow-deadline.js.map +1 -0
  310. package/daemon/dist/domain/workflow-exception-escalation.d.ts +33 -0
  311. package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -0
  312. package/daemon/dist/domain/workflow-exception-escalation.js +104 -0
  313. package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -0
  314. package/daemon/dist/domain/workflow-exception-router.d.ts +33 -0
  315. package/daemon/dist/domain/workflow-exception-router.d.ts.map +1 -0
  316. package/daemon/dist/domain/workflow-exception-router.js +96 -0
  317. package/daemon/dist/domain/workflow-exception-router.js.map +1 -0
  318. package/daemon/dist/domain/workflow-exception.d.ts +90 -0
  319. package/daemon/dist/domain/workflow-exception.d.ts.map +1 -0
  320. package/daemon/dist/domain/workflow-exception.js +122 -0
  321. package/daemon/dist/domain/workflow-exception.js.map +1 -0
  322. package/daemon/dist/domain/workflow-frontier-guard.d.ts +24 -0
  323. package/daemon/dist/domain/workflow-frontier-guard.d.ts.map +1 -0
  324. package/daemon/dist/domain/workflow-frontier-guard.js +30 -0
  325. package/daemon/dist/domain/workflow-frontier-guard.js.map +1 -0
  326. package/daemon/dist/domain/workflow-instance-store.d.ts +28 -0
  327. package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
  328. package/daemon/dist/domain/workflow-instance-store.js +66 -10
  329. package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
  330. package/daemon/dist/domain/workflow-keepalive-arming.d.ts +35 -0
  331. package/daemon/dist/domain/workflow-keepalive-arming.d.ts.map +1 -0
  332. package/daemon/dist/domain/workflow-keepalive-arming.js +87 -0
  333. package/daemon/dist/domain/workflow-keepalive-arming.js.map +1 -0
  334. package/daemon/dist/domain/workflow-projector.d.ts +117 -2
  335. package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
  336. package/daemon/dist/domain/workflow-projector.js +672 -41
  337. package/daemon/dist/domain/workflow-projector.js.map +1 -1
  338. package/daemon/dist/domain/workflow-role-context.d.ts +57 -0
  339. package/daemon/dist/domain/workflow-role-context.d.ts.map +1 -0
  340. package/daemon/dist/domain/workflow-role-context.js +120 -0
  341. package/daemon/dist/domain/workflow-role-context.js.map +1 -0
  342. package/daemon/dist/domain/workflow-role-resolver.d.ts +65 -0
  343. package/daemon/dist/domain/workflow-role-resolver.d.ts.map +1 -0
  344. package/daemon/dist/domain/workflow-role-resolver.js +108 -0
  345. package/daemon/dist/domain/workflow-role-resolver.js.map +1 -0
  346. package/daemon/dist/domain/workflow-runtime.d.ts +157 -1
  347. package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
  348. package/daemon/dist/domain/workflow-runtime.js +718 -11
  349. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  350. package/daemon/dist/domain/workflow-spec-cache.d.ts +26 -1
  351. package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
  352. package/daemon/dist/domain/workflow-spec-cache.js +327 -13
  353. package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
  354. package/daemon/dist/domain/workflow-types.d.ts +143 -8
  355. package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
  356. package/daemon/dist/domain/workflow-types.js +14 -1
  357. package/daemon/dist/domain/workflow-types.js.map +1 -1
  358. package/daemon/dist/domain/workflow-validator.d.ts +11 -1
  359. package/daemon/dist/domain/workflow-validator.d.ts.map +1 -1
  360. package/daemon/dist/domain/workflow-validator.js +246 -1
  361. package/daemon/dist/domain/workflow-validator.js.map +1 -1
  362. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
  363. package/daemon/dist/domain/workspace/default-workspace-scaffold.js +51 -6
  364. package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
  365. package/daemon/dist/domain/workspace/workspace-doctor.d.ts +11 -0
  366. package/daemon/dist/domain/workspace/workspace-doctor.d.ts.map +1 -1
  367. package/daemon/dist/domain/workspace/workspace-doctor.js +82 -0
  368. package/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -1
  369. package/daemon/dist/index.d.ts +17 -0
  370. package/daemon/dist/index.d.ts.map +1 -1
  371. package/daemon/dist/index.js +44 -0
  372. package/daemon/dist/index.js.map +1 -1
  373. package/daemon/dist/routes/activity.js +22 -0
  374. package/daemon/dist/routes/activity.js.map +1 -1
  375. package/daemon/dist/routes/config.d.ts.map +1 -1
  376. package/daemon/dist/routes/config.js +15 -6
  377. package/daemon/dist/routes/config.js.map +1 -1
  378. package/daemon/dist/routes/files.d.ts.map +1 -1
  379. package/daemon/dist/routes/files.js +45 -1
  380. package/daemon/dist/routes/files.js.map +1 -1
  381. package/daemon/dist/routes/hosts.d.ts +5 -0
  382. package/daemon/dist/routes/hosts.d.ts.map +1 -0
  383. package/daemon/dist/routes/hosts.js +346 -0
  384. package/daemon/dist/routes/hosts.js.map +1 -0
  385. package/daemon/dist/routes/mission-control.d.ts.map +1 -1
  386. package/daemon/dist/routes/mission-control.js +67 -2
  387. package/daemon/dist/routes/mission-control.js.map +1 -1
  388. package/daemon/dist/routes/queue.d.ts +10 -9
  389. package/daemon/dist/routes/queue.d.ts.map +1 -1
  390. package/daemon/dist/routes/queue.js +305 -10
  391. package/daemon/dist/routes/queue.js.map +1 -1
  392. package/daemon/dist/routes/review.d.ts +3 -0
  393. package/daemon/dist/routes/review.d.ts.map +1 -0
  394. package/daemon/dist/routes/review.js +195 -0
  395. package/daemon/dist/routes/review.js.map +1 -0
  396. package/daemon/dist/routes/scope-approve.d.ts +3 -0
  397. package/daemon/dist/routes/scope-approve.d.ts.map +1 -0
  398. package/daemon/dist/routes/scope-approve.js +55 -0
  399. package/daemon/dist/routes/scope-approve.js.map +1 -0
  400. package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
  401. package/daemon/dist/routes/scope-audit.js +28 -1
  402. package/daemon/dist/routes/scope-audit.js.map +1 -1
  403. package/daemon/dist/routes/seat.js +13 -0
  404. package/daemon/dist/routes/seat.js.map +1 -1
  405. package/daemon/dist/routes/slices.d.ts.map +1 -1
  406. package/daemon/dist/routes/slices.js +49 -9
  407. package/daemon/dist/routes/slices.js.map +1 -1
  408. package/daemon/dist/routes/terminal-ws.d.ts.map +1 -1
  409. package/daemon/dist/routes/terminal-ws.js +58 -21
  410. package/daemon/dist/routes/terminal-ws.js.map +1 -1
  411. package/daemon/dist/routes/terminal.d.ts +11 -0
  412. package/daemon/dist/routes/terminal.d.ts.map +1 -0
  413. package/daemon/dist/routes/terminal.js +104 -0
  414. package/daemon/dist/routes/terminal.js.map +1 -0
  415. package/daemon/dist/routes/up.d.ts.map +1 -1
  416. package/daemon/dist/routes/up.js +84 -0
  417. package/daemon/dist/routes/up.js.map +1 -1
  418. package/daemon/dist/routes/workflow.d.ts.map +1 -1
  419. package/daemon/dist/routes/workflow.js +102 -10
  420. package/daemon/dist/routes/workflow.js.map +1 -1
  421. package/daemon/dist/routes/workspace.js +2 -2
  422. package/daemon/dist/server.d.ts +6 -0
  423. package/daemon/dist/server.d.ts.map +1 -1
  424. package/daemon/dist/server.js +36 -1
  425. package/daemon/dist/server.js.map +1 -1
  426. package/daemon/dist/startup.d.ts.map +1 -1
  427. package/daemon/dist/startup.js +238 -14
  428. package/daemon/dist/startup.js.map +1 -1
  429. package/daemon/docs/reference/agent-startup-guide.md +1 -1
  430. package/daemon/docs/reference/product-factory-vps-runbook.md +132 -0
  431. package/daemon/docs/reference/sdlc-conventions.md +187 -0
  432. package/daemon/specs/agents/conveyor/builder/agent.yaml +1 -1
  433. package/daemon/specs/agents/conveyor/builder/guidance/role.md +1 -0
  434. package/daemon/specs/agents/conveyor/lead/agent.yaml +1 -1
  435. package/daemon/specs/agents/conveyor/lead/guidance/role.md +1 -0
  436. package/daemon/specs/agents/conveyor/planner/agent.yaml +1 -1
  437. package/daemon/specs/agents/conveyor/planner/guidance/role.md +1 -0
  438. package/daemon/specs/agents/conveyor/reviewer/agent.yaml +1 -1
  439. package/daemon/specs/agents/conveyor/reviewer/guidance/role.md +1 -0
  440. package/daemon/specs/agents/design/product-designer/agent.yaml +1 -1
  441. package/daemon/specs/agents/design/product-designer/guidance/role.md +1 -0
  442. package/daemon/specs/agents/development/implementer/agent.yaml +1 -1
  443. package/daemon/specs/agents/development/implementer/guidance/role.md +1 -0
  444. package/daemon/specs/agents/development/qa/agent.yaml +1 -1
  445. package/daemon/specs/agents/development/qa/guidance/role.md +1 -0
  446. package/daemon/specs/agents/factory-rsi/dogfood/agent.yaml +29 -0
  447. package/daemon/specs/agents/factory-rsi/dogfood/guidance/role.md +37 -0
  448. package/daemon/specs/agents/factory-rsi/release-manager/agent.yaml +29 -0
  449. package/daemon/specs/agents/factory-rsi/release-manager/guidance/role.md +40 -0
  450. package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +1 -1
  451. package/daemon/specs/agents/orchestration/orchestrator/guidance/role.md +1 -0
  452. package/daemon/specs/agents/product-management/pm/agent.yaml +1 -0
  453. package/daemon/specs/agents/product-management/pm/guidance/role.md +13 -0
  454. package/daemon/specs/agents/review/independent-reviewer/agent.yaml +1 -1
  455. package/daemon/specs/agents/review/independent-reviewer/guidance/role.md +1 -0
  456. package/daemon/specs/agents/shared/agent.yaml +2 -0
  457. package/daemon/specs/agents/shared/skills/core/mission-slice-sop/SKILL.md +113 -0
  458. package/daemon/specs/agents/shared/skills/core/openrig-cmux/SKILL.md +86 -0
  459. package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +158 -0
  460. package/daemon/specs/agents/shared/skills/core/openrig-operator/SKILL.md +4 -4
  461. package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +75 -29
  462. package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +2 -2
  463. package/daemon/specs/rigs/focused/pm-team/CULTURE.md +4 -0
  464. package/daemon/specs/rigs/launch/factory-rsi/CULTURE.md +47 -0
  465. package/daemon/specs/rigs/launch/factory-rsi/rig.yaml +115 -0
  466. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +1 -1
  467. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +1 -1
  468. package/daemon/specs/rigs/preview/product-team/CULTURE.md +4 -0
  469. package/dist/build-info.d.ts +8 -0
  470. package/dist/build-info.d.ts.map +1 -0
  471. package/dist/build-info.js +11 -0
  472. package/dist/build-info.js.map +1 -0
  473. package/dist/commands/broadcast.d.ts +6 -1
  474. package/dist/commands/broadcast.d.ts.map +1 -1
  475. package/dist/commands/broadcast.js +101 -15
  476. package/dist/commands/broadcast.js.map +1 -1
  477. package/dist/commands/capture.d.ts.map +1 -1
  478. package/dist/commands/capture.js +99 -8
  479. package/dist/commands/capture.js.map +1 -1
  480. package/dist/commands/config-init-workspace.d.ts.map +1 -1
  481. package/dist/commands/config-init-workspace.js +20 -4
  482. package/dist/commands/config-init-workspace.js.map +1 -1
  483. package/dist/commands/config.d.ts.map +1 -1
  484. package/dist/commands/config.js +4 -0
  485. package/dist/commands/config.js.map +1 -1
  486. package/dist/commands/doctor.js +2 -2
  487. package/dist/commands/doctor.js.map +1 -1
  488. package/dist/commands/down.d.ts.map +1 -1
  489. package/dist/commands/down.js +5 -0
  490. package/dist/commands/down.js.map +1 -1
  491. package/dist/commands/expand.js +1 -1
  492. package/dist/commands/expand.js.map +1 -1
  493. package/dist/commands/file.d.ts +7 -0
  494. package/dist/commands/file.d.ts.map +1 -0
  495. package/dist/commands/file.js +77 -0
  496. package/dist/commands/file.js.map +1 -0
  497. package/dist/commands/host.d.ts +48 -0
  498. package/dist/commands/host.d.ts.map +1 -0
  499. package/dist/commands/host.js +772 -0
  500. package/dist/commands/host.js.map +1 -0
  501. package/dist/commands/launch.d.ts.map +1 -1
  502. package/dist/commands/launch.js +5 -0
  503. package/dist/commands/launch.js.map +1 -1
  504. package/dist/commands/proof.d.ts +54 -0
  505. package/dist/commands/proof.d.ts.map +1 -0
  506. package/dist/commands/proof.js +311 -0
  507. package/dist/commands/proof.js.map +1 -0
  508. package/dist/commands/ps.d.ts +41 -7
  509. package/dist/commands/ps.d.ts.map +1 -1
  510. package/dist/commands/ps.js +353 -135
  511. package/dist/commands/ps.js.map +1 -1
  512. package/dist/commands/queue.d.ts +36 -0
  513. package/dist/commands/queue.d.ts.map +1 -1
  514. package/dist/commands/queue.js +149 -7
  515. package/dist/commands/queue.js.map +1 -1
  516. package/dist/commands/restore-packet.d.ts.map +1 -1
  517. package/dist/commands/restore-packet.js +13 -2
  518. package/dist/commands/restore-packet.js.map +1 -1
  519. package/dist/commands/scope.d.ts.map +1 -1
  520. package/dist/commands/scope.js +140 -3
  521. package/dist/commands/scope.js.map +1 -1
  522. package/dist/commands/send.d.ts.map +1 -1
  523. package/dist/commands/send.js +127 -13
  524. package/dist/commands/send.js.map +1 -1
  525. package/dist/commands/terminal.d.ts +6 -0
  526. package/dist/commands/terminal.d.ts.map +1 -0
  527. package/dist/commands/terminal.js +116 -0
  528. package/dist/commands/terminal.js.map +1 -0
  529. package/dist/commands/transcript.d.ts +6 -1
  530. package/dist/commands/transcript.d.ts.map +1 -1
  531. package/dist/commands/transcript.js +113 -30
  532. package/dist/commands/transcript.js.map +1 -1
  533. package/dist/commands/up.d.ts +2 -0
  534. package/dist/commands/up.d.ts.map +1 -1
  535. package/dist/commands/up.js +78 -2
  536. package/dist/commands/up.js.map +1 -1
  537. package/dist/commands/whoami.d.ts.map +1 -1
  538. package/dist/commands/whoami.js +11 -0
  539. package/dist/commands/whoami.js.map +1 -1
  540. package/dist/commands/workflow-errors.d.ts +23 -0
  541. package/dist/commands/workflow-errors.d.ts.map +1 -0
  542. package/dist/commands/workflow-errors.js +100 -0
  543. package/dist/commands/workflow-errors.js.map +1 -0
  544. package/dist/commands/workflow-follow.d.ts +71 -0
  545. package/dist/commands/workflow-follow.d.ts.map +1 -0
  546. package/dist/commands/workflow-follow.js +259 -0
  547. package/dist/commands/workflow-follow.js.map +1 -0
  548. package/dist/commands/workflow-render.d.ts +114 -0
  549. package/dist/commands/workflow-render.d.ts.map +1 -0
  550. package/dist/commands/workflow-render.js +223 -0
  551. package/dist/commands/workflow-render.js.map +1 -0
  552. package/dist/commands/workflow.d.ts +1 -0
  553. package/dist/commands/workflow.d.ts.map +1 -1
  554. package/dist/commands/workflow.js +278 -14
  555. package/dist/commands/workflow.js.map +1 -1
  556. package/dist/commands/workspace.js +6 -6
  557. package/dist/commands/workspace.js.map +1 -1
  558. package/dist/config-store.d.ts +19 -1
  559. package/dist/config-store.d.ts.map +1 -1
  560. package/dist/config-store.js +171 -0
  561. package/dist/config-store.js.map +1 -1
  562. package/dist/cross-host-cli-helpers.d.ts +13 -0
  563. package/dist/cross-host-cli-helpers.d.ts.map +1 -1
  564. package/dist/cross-host-cli-helpers.js +27 -0
  565. package/dist/cross-host-cli-helpers.js.map +1 -1
  566. package/dist/cross-host-executor.d.ts +1 -0
  567. package/dist/cross-host-executor.d.ts.map +1 -1
  568. package/dist/cross-host-executor.js +4 -1
  569. package/dist/cross-host-executor.js.map +1 -1
  570. package/dist/cross-host-target.d.ts +49 -0
  571. package/dist/cross-host-target.d.ts.map +1 -0
  572. package/dist/cross-host-target.js +35 -0
  573. package/dist/cross-host-target.js.map +1 -0
  574. package/dist/daemon-lifecycle.d.ts.map +1 -1
  575. package/dist/daemon-lifecycle.js +4 -1
  576. package/dist/daemon-lifecycle.js.map +1 -1
  577. package/dist/host-registry.d.ts +17 -0
  578. package/dist/host-registry.d.ts.map +1 -1
  579. package/dist/host-registry.js +64 -2
  580. package/dist/host-registry.js.map +1 -1
  581. package/dist/host-selection.d.ts +13 -0
  582. package/dist/host-selection.d.ts.map +1 -0
  583. package/dist/host-selection.js +54 -0
  584. package/dist/host-selection.js.map +1 -0
  585. package/dist/index.d.ts +2 -0
  586. package/dist/index.d.ts.map +1 -1
  587. package/dist/index.js +9 -0
  588. package/dist/index.js.map +1 -1
  589. package/dist/lib/file-transfer.d.ts +89 -0
  590. package/dist/lib/file-transfer.d.ts.map +1 -0
  591. package/dist/lib/file-transfer.js +300 -0
  592. package/dist/lib/file-transfer.js.map +1 -0
  593. package/dist/lib/hosts/fanout-contract.d.ts +33 -0
  594. package/dist/lib/hosts/fanout-contract.d.ts.map +1 -0
  595. package/dist/lib/hosts/fanout-contract.js +23 -0
  596. package/dist/lib/hosts/fanout-contract.js.map +1 -0
  597. package/dist/lib/scope/scope-audit.d.ts +9 -1
  598. package/dist/lib/scope/scope-audit.d.ts.map +1 -1
  599. package/dist/lib/scope/scope-audit.js +173 -1
  600. package/dist/lib/scope/scope-audit.js.map +1 -1
  601. package/dist/lib/scope/templates.d.ts +1 -0
  602. package/dist/lib/scope/templates.d.ts.map +1 -1
  603. package/dist/lib/scope/templates.js +9 -0
  604. package/dist/lib/scope/templates.js.map +1 -1
  605. package/dist/lib/scope-templates/backlog-deprecation.md +16 -0
  606. package/dist/lib/scope-templates/backlog-tech-debt.md +16 -0
  607. package/dist/lib/scope-templates/bug-fix.md +16 -0
  608. package/dist/lib/scope-templates/implementation-prd.md +33 -0
  609. package/dist/lib/scope-templates/mission-placeholder.md +1 -1
  610. package/dist/lib/scope-templates/mission-progress.md +1 -1
  611. package/dist/lib/scope-templates/mission-release.md +1 -1
  612. package/dist/lib/scope-templates/placeholder.md +11 -7
  613. package/dist/lib/scope-templates/proof.md +5 -1
  614. package/dist/lib/scope-templates/release-feature.md +14 -6
  615. package/dist/lib/scope-templates/research.md +16 -0
  616. package/dist/lib/scope-templates/slice-progress.md +1 -1
  617. package/dist/remote-host-ops.d.ts +1 -0
  618. package/dist/remote-host-ops.d.ts.map +1 -1
  619. package/dist/remote-host-ops.js +11 -4
  620. package/dist/remote-host-ops.js.map +1 -1
  621. package/dist/session-name.d.ts +23 -0
  622. package/dist/session-name.d.ts.map +1 -0
  623. package/dist/session-name.js +61 -0
  624. package/dist/session-name.js.map +1 -0
  625. package/dist/version.d.ts +5 -0
  626. package/dist/version.d.ts.map +1 -1
  627. package/dist/version.js +11 -1
  628. package/dist/version.js.map +1 -1
  629. package/package.json +1 -1
  630. package/ui/dist/assets/index-CFqxa0zW.css +32 -0
  631. package/ui/dist/assets/index-zrFqS7gL.js +623 -0
  632. package/ui/dist/index.html +2 -2
  633. package/ui/dist/assets/index-DYZniQcc.js +0 -597
  634. package/ui/dist/assets/index-trcb4Yf_.css +0 -32
@@ -1,6 +1,7 @@
1
1
  import type { TmuxAdapter } from "../adapters/tmux.js";
2
2
  import type { DiscoveryRepository } from "./discovery-repository.js";
3
3
  import type { RuntimeAdapter } from "./runtime-adapter.js";
4
+ import type { TmuxOptionDefaultsApplier } from "./tmux-option-defaults.js";
4
5
  /**
5
6
  * OPR.0.4.3.04 — the explicit successor-creation seam for the seat-handover
6
7
  * full-cycle composer (IMPL-SPEC §2.1b; resolves the rev1-dual BLOCKING B1).
@@ -41,6 +42,13 @@ export type SuccessorLaunchResult = {
41
42
  tmuxPane: string;
42
43
  resumeToken?: string;
43
44
  resumeType?: string;
45
+ /**
46
+ * OPR.0.4.6.02 S1 — non-fatal tmux option-default warnings from the
47
+ * fresh successor's launch (mouse/status/clipboard). Present only when
48
+ * an option-set degraded; omitted (undefined) on the clean path so the
49
+ * shape stays byte-compatible with pre-02 successors.
50
+ */
51
+ warnings?: string[];
44
52
  } | {
45
53
  ok: false;
46
54
  code: string;
@@ -55,6 +63,7 @@ export declare class SuccessorSessionLauncher {
55
63
  private runtimeAdapters;
56
64
  private readinessTimeoutMs;
57
65
  private sleep;
66
+ private tmuxOptionDefaults;
58
67
  constructor(tmuxAdapter: TmuxAdapter, discoveryRepo: DiscoveryRepository, opts?: {
59
68
  sessionEnv?: Record<string, string | undefined>;
60
69
  newId?: () => string;
@@ -65,6 +74,13 @@ export declare class SuccessorSessionLauncher {
65
74
  readinessTimeoutMs?: number;
66
75
  /** Injectable sleep (tests). */
67
76
  sleep?: (ms: number) => Promise<void>;
77
+ /**
78
+ * OPR.0.4.6.02 S1 — the SHARED tmux option-defaults applier. A FRESH
79
+ * successor is a new operator/agent seat (same launch-only class as
80
+ * NodeLauncher), so it gets the same mouse/status/clipboard defaults on
81
+ * its just-created session. Omitted → option application is skipped.
82
+ */
83
+ tmuxOptionDefaults?: TmuxOptionDefaultsApplier;
68
84
  });
69
85
  /**
70
86
  * Create the unmanaged successor tmux session, launch it into a LIVE agent,
@@ -1 +1 @@
1
- {"version":3,"file":"successor-session-launcher.d.ts","sourceRoot":"","sources":["../../src/domain/successor-session-launcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,sBAAsB,CAAC;AAGzF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAED,MAAM,MAAM,qBAAqB,GAC7B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,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"version":3,"file":"successor-session-launcher.d.ts","sourceRoot":"","sources":["../../src/domain/successor-session-launcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,sBAAsB,CAAC;AAEzF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAED,MAAM,MAAM,qBAAqB,GAC7B;IACE,EAAE,EAAE,IAAI,CAAC;IACT,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,GACD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,kBAAkB,GAAG,cAAc,GAAG,aAAa,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5G,qBAAa,wBAAwB;IACnC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,UAAU,CAAqC;IACvD,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,eAAe,CAAiC;IACxD,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,KAAK,CAAgC;IAC7C,OAAO,CAAC,kBAAkB,CAAmC;gBAG3D,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,mBAAmB,EAClC,IAAI,GAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;QAChD,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC;QACrB;8EACsE;QACtE,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;QACjD,4EAA4E;QAC5E,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,gCAAgC;QAChC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;QACtC;;;;;WAKG;QACH,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;KAC3C;IAYR;;;;;;;OAOG;IACG,eAAe,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,aAAa,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAsGnH;;;;;;OAMG;YACW,UAAU;IAmFxB;;;OAGG;YACW,YAAY;IAsB1B;;;;;OAKG;IACG,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;YAKhE,cAAc;CAO7B"}
@@ -8,6 +8,7 @@ export class SuccessorSessionLauncher {
8
8
  runtimeAdapters;
9
9
  readinessTimeoutMs;
10
10
  sleep;
11
+ tmuxOptionDefaults;
11
12
  constructor(tmuxAdapter, discoveryRepo, opts = {}) {
12
13
  this.tmuxAdapter = tmuxAdapter;
13
14
  this.discoveryRepo = discoveryRepo;
@@ -16,6 +17,7 @@ export class SuccessorSessionLauncher {
16
17
  this.runtimeAdapters = opts.runtimeAdapters ?? {};
17
18
  this.readinessTimeoutMs = opts.readinessTimeoutMs ?? 30_000;
18
19
  this.sleep = opts.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
20
+ this.tmuxOptionDefaults = opts.tmuxOptionDefaults ?? null;
19
21
  }
20
22
  /**
21
23
  * Create the unmanaged successor tmux session, launch it into a LIVE agent,
@@ -51,6 +53,16 @@ export class SuccessorSessionLauncher {
51
53
  }
52
54
  return { ok: false, code: created.code, step: "create_successor", message: created.message };
53
55
  }
56
+ // OPR.0.4.6.02 S1 — a FRESH successor is a brand-new operator/agent seat
57
+ // (the same launch-only class as NodeLauncher), so apply the daemon's tmux
58
+ // option defaults (mouse/status/clipboard) to its JUST-CREATED session via
59
+ // the shared applier. `createSuccessor` only ever makes fresh sessions —
60
+ // DISCOVERED (pre-existing) successors never reach this seam — so the
61
+ // never-retro-flip rail (BR-1) holds. Failures are non-fatal (a handover
62
+ // must not die over a cosmetic option); the warnings ride the ok result.
63
+ const optionWarnings = this.tmuxOptionDefaults
64
+ ? await this.tmuxOptionDefaults.applyToFreshSession(distinctName)
65
+ : [];
54
66
  // Driver note 2: resolve the real tmux pane AFTER create, BEFORE upsertDiscoveredSession —
55
67
  // upsert requires a pane, and createSession returns only { ok: true }.
56
68
  // A list-panes probe can THROW (permission/socket errors rethrow from the
@@ -107,6 +119,7 @@ export class SuccessorSessionLauncher {
107
119
  tmuxPane: pane.id,
108
120
  resumeToken: started.resumeToken,
109
121
  resumeType: started.resumeType,
122
+ warnings: optionWarnings.length > 0 ? optionWarnings : undefined,
110
123
  };
111
124
  }
112
125
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"successor-session-launcher.js","sourceRoot":"","sources":["../../src/domain/successor-session-launcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAK5B,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAwCxE,MAAM,OAAO,wBAAwB;IAC3B,WAAW,CAAc;IACzB,aAAa,CAAsB;IACnC,UAAU,CAAqC;IAC/C,KAAK,CAAe;IACpB,eAAe,CAAiC;IAChD,kBAAkB,CAAS;IAC3B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CAAC;IAEO,KAAK,CAAC,cAAc,CAAC,WAAmB;QAC9C,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAClD,CAAC;QAAC,MAAM,CAAC;YACP,8CAA8C;QAChD,CAAC;IACH,CAAC;CACF;AAED,SAAS,UAAU,CAAC,KAAyC;IAC3D,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACzE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"successor-session-launcher.js","sourceRoot":"","sources":["../../src/domain/successor-session-launcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAK5B,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAuDxE,MAAM,OAAO,wBAAwB;IAC3B,WAAW,CAAc;IACzB,aAAa,CAAsB;IACnC,UAAU,CAAqC;IAC/C,KAAK,CAAe;IACpB,eAAe,CAAiC;IAChD,kBAAkB,CAAS;IAC3B,KAAK,CAAgC;IACrC,kBAAkB,CAAmC;IAE7D,YACE,WAAwB,EACxB,aAAkC,EAClC,OAiBI,EAAE;QAEN,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC;QAChC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,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AChD,IAAI,YAAY;YAAE,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;IACpE,CAAC;IAEO,KAAK,CAAC,cAAc,CAAC,WAAmB;QAC9C,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAClD,CAAC;QAAC,MAAM,CAAC;YACP,8CAA8C;QAChD,CAAC;IACH,CAAC;CACF;AAED,SAAS,UAAU,CAAC,KAAyC;IAC3D,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACzE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { CmuxAdapter } from "../../adapters/cmux.js";
2
+ import type { NodeCmuxService } from "../node-cmux-service.js";
3
+ import type { ComposedView, OpenViewResult, ProviderLiveness, ProviderStatus, TerminalProvider } from "./terminal-provider.js";
4
+ /** Rig + node coordinates the shipped NodeCmuxService needs to open a surface. */
5
+ export interface SeatNodeRef {
6
+ rigId: string;
7
+ logicalId: string;
8
+ }
9
+ export interface CmuxProviderDeps {
10
+ cmuxAdapter: CmuxAdapter;
11
+ nodeCmuxService: NodeCmuxService;
12
+ /**
13
+ * Map a seat (canonical session name) to its rig + node so the shipped
14
+ * NodeCmuxService can open/focus its surface. A seat that does not resolve to
15
+ * a managed local node degrades honestly (cmux tiles managed nodes only).
16
+ */
17
+ resolveSeatNode(seat: string): SeatNodeRef | null;
18
+ }
19
+ export declare class CmuxProviderAdapter implements TerminalProvider {
20
+ private readonly deps;
21
+ readonly name = "cmux";
22
+ constructor(deps: CmuxProviderDeps);
23
+ status(): Promise<ProviderStatus>;
24
+ liveness(): Promise<ProviderLiveness>;
25
+ openView(view: ComposedView): Promise<OpenViewResult>;
26
+ }
27
+ //# sourceMappingURL=cmux-provider-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmux-provider-adapter.d.ts","sourceRoot":"","sources":["../../../src/domain/terminal/cmux-provider-adapter.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAEV,YAAY,EAEZ,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAEhC,kFAAkF;AAClF,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,eAAe,CAAC;IACjC;;;;OAIG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAAC;CACnD;AAKD,qBAAa,mBAAoB,YAAW,gBAAgB;IAG9C,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,QAAQ,CAAC,IAAI,UAAU;gBAEM,IAAI,EAAE,gBAAgB;IAE7C,MAAM,IAAI,OAAO,CAAC,cAAc,CAAC;IAKjC,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAKrC,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;CAuC5D"}
@@ -0,0 +1,67 @@
1
+ // OPR.0.4.6.02 C2 — the cmux TerminalProvider facade.
2
+ //
3
+ // A THIN facade over the SHIPPED `NodeCmuxService` + `CmuxAdapter`. It wraps,
4
+ // it does not rewrite: `openView` delegates each pane to the existing
5
+ // `openOrFocusNodeSurface` (the shipped open/focus semantics, unchanged), and
6
+ // `status`/`liveness` read the shipped `CmuxAdapter` status. cmux stays
7
+ // best-effort / non-gating / no-regression — a seat cmux can't tile is
8
+ // degraded honestly (never a hard failure, never a silent drop).
9
+ //
10
+ // cmux surfaces are always LOCAL (cmux runs on the operator's machine), so a
11
+ // cmux-level degrade stamps the `local` host sentinel.
12
+ /** Sentinel host for cmux-level degrades (cmux surfaces are always local). */
13
+ const CMUX_LOCAL_HOST = "local";
14
+ export class CmuxProviderAdapter {
15
+ deps;
16
+ name = "cmux";
17
+ constructor(deps) {
18
+ this.deps = deps;
19
+ }
20
+ async status() {
21
+ const s = this.deps.cmuxAdapter.getStatus();
22
+ return { provider: this.name, available: s.available, capabilities: s.capabilities };
23
+ }
24
+ async liveness() {
25
+ const alive = this.deps.cmuxAdapter.isAvailable();
26
+ return alive ? { alive: true } : { alive: false, detail: "cmux is not connected" };
27
+ }
28
+ async openView(view) {
29
+ // Carry forward the composer's honest-partial classification verbatim.
30
+ const absent = [...view.absent];
31
+ const degraded = [...view.degraded];
32
+ const opened = [];
33
+ for (const pane of view.opened) {
34
+ const ref = this.deps.resolveSeatNode(pane.seat);
35
+ if (!ref) {
36
+ degraded.push({
37
+ seat: pane.seat,
38
+ host: CMUX_LOCAL_HOST,
39
+ reason: "cmux: seat is not a managed local node (cmux tiles managed nodes only)",
40
+ });
41
+ continue;
42
+ }
43
+ const res = await this.deps.nodeCmuxService.openOrFocusNodeSurface(ref.rigId, ref.logicalId);
44
+ if (res.ok) {
45
+ opened.push(pane.seat);
46
+ }
47
+ else {
48
+ degraded.push({
49
+ seat: pane.seat,
50
+ host: CMUX_LOCAL_HOST,
51
+ reason: `cmux: ${res.error ?? res.code ?? "open failed"}`,
52
+ });
53
+ }
54
+ }
55
+ // cmux is non-gating: a partial render is still ok=true (the honest-partial
56
+ // detail lives in absent/degraded). Only an unexpected throw is a failure.
57
+ return {
58
+ provider: this.name,
59
+ ok: true,
60
+ opened,
61
+ absent,
62
+ degraded,
63
+ pages: view.pages.length,
64
+ };
65
+ }
66
+ }
67
+ //# sourceMappingURL=cmux-provider-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmux-provider-adapter.js","sourceRoot":"","sources":["../../../src/domain/terminal/cmux-provider-adapter.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,EAAE;AACF,8EAA8E;AAC9E,sEAAsE;AACtE,8EAA8E;AAC9E,wEAAwE;AACxE,uEAAuE;AACvE,iEAAiE;AACjE,EAAE;AACF,6EAA6E;AAC7E,uDAAuD;AA+BvD,8EAA8E;AAC9E,MAAM,eAAe,GAAG,OAAO,CAAC;AAEhC,MAAM,OAAO,mBAAmB;IAGD;IAFpB,IAAI,GAAG,MAAM,CAAC;IAEvB,YAA6B,IAAsB;QAAtB,SAAI,GAAJ,IAAI,CAAkB;IAAG,CAAC;IAEvD,KAAK,CAAC,MAAM;QACV,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;QAC5C,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,YAAY,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC;IACvF,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;QAClD,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,uBAAuB,EAAE,CAAC;IACrF,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,IAAkB;QAC/B,uEAAuE;QACvE,MAAM,MAAM,GAAiB,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QAC9C,MAAM,QAAQ,GAAmB,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpD,MAAM,MAAM,GAAa,EAAE,CAAC;QAE5B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAC/B,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjD,IAAI,CAAC,GAAG,EAAE,CAAC;gBACT,QAAQ,CAAC,IAAI,CAAC;oBACZ,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,IAAI,EAAE,eAAe;oBACrB,MAAM,EAAE,wEAAwE;iBACjF,CAAC,CAAC;gBACH,SAAS;YACX,CAAC;YACD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,sBAAsB,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;YAC7F,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC;gBACX,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACzB,CAAC;iBAAM,CAAC;gBACN,QAAQ,CAAC,IAAI,CAAC;oBACZ,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,IAAI,EAAE,eAAe;oBACrB,MAAM,EAAE,SAAS,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,IAAI,IAAI,aAAa,EAAE;iBAC1D,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,4EAA4E;QAC5E,2EAA2E;QAC3E,OAAO;YACL,QAAQ,EAAE,IAAI,CAAC,IAAI;YACnB,EAAE,EAAE,IAAI;YACR,MAAM;YACN,MAAM;YACN,QAAQ;YACR,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;SACzB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,77 @@
1
+ import type { ComposedPane, ComposedView, OpenViewResult, ProviderLiveness, ProviderStatus, TerminalProvider } from "./terminal-provider.js";
2
+ import type { HerdrResult, HerdrTransportFactory } from "./herdr-transport.js";
3
+ /** A herdr layout-tree pane leaf — `command` is an ARGV array (capture-verified). */
4
+ export interface HerdrPaneNode {
5
+ type: "pane";
6
+ label: string;
7
+ command: string[];
8
+ }
9
+ /** A herdr layout-tree binary split (capture-verified shape). */
10
+ export interface HerdrSplitNode {
11
+ type: "split";
12
+ direction: "right" | "down";
13
+ ratio: number;
14
+ first: HerdrLayoutNode;
15
+ second: HerdrLayoutNode;
16
+ }
17
+ export type HerdrLayoutNode = HerdrPaneNode | HerdrSplitNode;
18
+ /**
19
+ * Build the balanced BSP layout tree for one page of panes. PURE. Splits
20
+ * alternate right/down by depth at ratio 0.5 → same-size tiles (the documented
21
+ * v1 layout; asymmetric layouts are out of scope). Each leaf runs the
22
+ * composer's shell `paneCommand` via `["sh","-c",…]` so the composed quoting
23
+ * (read-only `-r`, ssh-wrap) is preserved untouched.
24
+ */
25
+ export declare function buildBspRoot(panes: ComposedPane[], depth?: number): HerdrLayoutNode;
26
+ /** The per-page socket request plan — pure, so it is asserted directly in tests. */
27
+ export interface HerdrPagePlan {
28
+ /** Fresh tab label for this page (embeds the launch token → fresh-on-relaunch). */
29
+ tabLabel: string;
30
+ /** The whole page's layout tree — ONE atomic layout.apply request body. */
31
+ root: HerdrLayoutNode;
32
+ }
33
+ export interface HerdrLayoutPlan {
34
+ /** The label for the fresh per-open workspace (same token discipline as tabs). */
35
+ workspaceLabel: string;
36
+ pages: HerdrPagePlan[];
37
+ }
38
+ /**
39
+ * Build the herdr socket plan for a composed view. PURE — no I/O. Each page
40
+ * gets a fresh tab labeled `${tabPrefix}:${view.id}#${launchToken}/<pageIndex>`;
41
+ * two calls with different `launchToken`s produce DIFFERENT labels, which is
42
+ * exactly the fresh-tab-on-relaunch (not-replace) invariant.
43
+ */
44
+ export declare function planHerdrLayout(view: ComposedView, launchToken: string, tabPrefix?: string): HerdrLayoutPlan;
45
+ /**
46
+ * Extract the created workspace's id from a `workspace.create` result body.
47
+ * DEFENSIVE — this envelope was not captured verbatim, so the known plausible
48
+ * homes are tried in order: a top-level `workspace_id`, then a nested
49
+ * `workspace`/`layout` object's `workspace_id`/`id`, then a top-level string
50
+ * `id`. Returns null when nothing string-shaped is found (the caller degrades
51
+ * honestly rather than guessing).
52
+ */
53
+ export declare function extractWorkspaceId(result: HerdrResult): string | null;
54
+ export interface HerdrAdapterDeps {
55
+ transportFactory: HerdrTransportFactory;
56
+ /**
57
+ * Mint a fresh launch token per `openView` so a relaunch creates a new tab
58
+ * (BR-5). Injectable for deterministic tests. Default: a per-instance
59
+ * monotonic counter (unique within a daemon lifetime).
60
+ */
61
+ newLaunchToken?: () => string;
62
+ /** Tab-name prefix (default `openrig`). */
63
+ tabPrefix?: string;
64
+ }
65
+ export declare class HerdrAdapter implements TerminalProvider {
66
+ private readonly deps;
67
+ readonly name = "herdr";
68
+ private readonly transport;
69
+ private readonly newLaunchToken;
70
+ private readonly tabPrefix;
71
+ private launchCounter;
72
+ constructor(deps: HerdrAdapterDeps);
73
+ status(): Promise<ProviderStatus>;
74
+ liveness(): Promise<ProviderLiveness>;
75
+ openView(view: ComposedView): Promise<OpenViewResult>;
76
+ }
77
+ //# sourceMappingURL=herdr-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"herdr-adapter.d.ts","sourceRoot":"","sources":["../../../src/domain/terminal/herdr-adapter.ts"],"names":[],"mappings":"AA6CA,OAAO,KAAK,EAEV,YAAY,EACZ,YAAY,EAEZ,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,WAAW,EAEX,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAK9B,qFAAqF;AACrF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,IAAI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AEG,IAAI,EAAE,gBAAgB;IAO7C,MAAM,IAAI,OAAO,CAAC,cAAc,CAAC;IAkBjC,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAYrC,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;CAyH5D"}
@@ -0,0 +1,266 @@
1
+ // OPR.0.4.6.02 C2+FB4 — the herdr TerminalProvider (the proof-gated primary
2
+ // provider). Arm's-length AGPL: it drives the installed herdr's local control
3
+ // SOCKET through the injected `HerdrTransport` (see herdr-transport.ts) and
4
+ // never links herdr.
5
+ //
6
+ // FB4 (the VM-RED correction): herdr 0.7.1 has NO `layout` CLI command — the
7
+ // prior CLI shape (`herdr layout apply …`) could never tile (proven RED in the
8
+ // VM at e373f741). herdr's real layout mechanism is the socket `layout.apply`,
9
+ // validated verbatim in research/herdr-socket-captures/herdr-phase3-*.json:
10
+ // request {id, method:"layout.apply",
11
+ // params:{workspace_id, tab_label, focus, root}}
12
+ // root = {type:"split", direction:"right"|"down", ratio, first, second}
13
+ // | {type:"pane", label, command:[argv…]}
14
+ // response {id, result:{type:"layout_apply", layout:{workspace_id, tab_id,…}}}
15
+ //
16
+ // Behavior contract (unchanged from the guard-cleared shape):
17
+ // - ONE atomic `layout.apply` per grid page — the whole page's panes land in
18
+ // a single request so a page is never half-tiled.
19
+ // - FRESH tab/workspace on every relaunch (BR-5, not-replace-idempotent):
20
+ // each open creates its own workspace (`workspace.create`) and the tab
21
+ // label embeds a per-launch token — and `layout.apply` itself is
22
+ // empirically non-idempotent (the four-reapply capture shows a re-apply
23
+ // minting tab t3, never replacing t2), so a re-open can never clobber a
24
+ // previous view.
25
+ // - Pane labels ride the layout.apply pane nodes' `label` field (AC-7
26
+ // `<agent> · <slice>`) — the captures show the label echoed per pane, so
27
+ // no separate `pane rename` pass is needed (there is no `pane rename` CLI
28
+ // to shell anyway).
29
+ // - The composer's `paneCommand` is a SHELL string (`tmux attach -r -t 's'`,
30
+ // `ssh 'dest' tmux attach …`); the pane node's `command` is an ARGV array —
31
+ // so it is carried as `["sh", "-c", paneCommand]`, preserving the composed
32
+ // quoting byte-for-byte without the adapter re-parsing shell.
33
+ // - Liveness/availability = the socket `ping` (is the multiplexer's OWN
34
+ // control socket answering — NOT a daemon server ping; HERDR-FINDINGS #3's
35
+ // intent, carried to the socket transport). No "layout command" probe: the
36
+ // CLI help surface is irrelevant to the socket API.
37
+ // - SAME-SIZE panes only. The BSP tree below splits 0.5/0.5 alternating
38
+ // right/down; asymmetric pane layouts are a DOCUMENTED limitation, not
39
+ // faked here (the inherent tmux multi-client resize limit).
40
+ //
41
+ // The `workspace.create` response envelope was NOT captured verbatim (only
42
+ // layout.apply/ping were); the workspace id is therefore extracted
43
+ // DEFENSIVELY (see extractWorkspaceId) — to be confirmed by the fresh VM
44
+ // re-proof (unproven until that proof artifact lands).
45
+ /** Sentinel host for herdr-surface degrades (a pane herdr itself failed to render). */
46
+ const HERDR_SURFACE_HOST = "herdr";
47
+ /**
48
+ * Build the balanced BSP layout tree for one page of panes. PURE. Splits
49
+ * alternate right/down by depth at ratio 0.5 → same-size tiles (the documented
50
+ * v1 layout; asymmetric layouts are out of scope). Each leaf runs the
51
+ * composer's shell `paneCommand` via `["sh","-c",…]` so the composed quoting
52
+ * (read-only `-r`, ssh-wrap) is preserved untouched.
53
+ */
54
+ export function buildBspRoot(panes, depth = 0) {
55
+ if (panes.length === 1) {
56
+ const pane = panes[0];
57
+ return { type: "pane", label: pane.label, command: ["sh", "-c", pane.paneCommand] };
58
+ }
59
+ const mid = Math.ceil(panes.length / 2);
60
+ return {
61
+ type: "split",
62
+ direction: depth % 2 === 0 ? "right" : "down",
63
+ ratio: 0.5,
64
+ first: buildBspRoot(panes.slice(0, mid), depth + 1),
65
+ second: buildBspRoot(panes.slice(mid), depth + 1),
66
+ };
67
+ }
68
+ /**
69
+ * Build the herdr socket plan for a composed view. PURE — no I/O. Each page
70
+ * gets a fresh tab labeled `${tabPrefix}:${view.id}#${launchToken}/<pageIndex>`;
71
+ * two calls with different `launchToken`s produce DIFFERENT labels, which is
72
+ * exactly the fresh-tab-on-relaunch (not-replace) invariant.
73
+ */
74
+ export function planHerdrLayout(view, launchToken, tabPrefix = "openrig") {
75
+ const base = `${tabPrefix}:${view.id}#${launchToken}`;
76
+ const pages = view.pages.map((page, pageIndex) => ({
77
+ tabLabel: view.pages.length > 1 ? `${base}/${pageIndex + 1}` : base,
78
+ root: buildBspRoot(page),
79
+ }));
80
+ return { workspaceLabel: base, pages };
81
+ }
82
+ /**
83
+ * Extract the created workspace's id from a `workspace.create` result body.
84
+ * DEFENSIVE — this envelope was not captured verbatim, so the known plausible
85
+ * homes are tried in order: a top-level `workspace_id`, then a nested
86
+ * `workspace`/`layout` object's `workspace_id`/`id`, then a top-level string
87
+ * `id`. Returns null when nothing string-shaped is found (the caller degrades
88
+ * honestly rather than guessing).
89
+ */
90
+ export function extractWorkspaceId(result) {
91
+ const direct = result["workspace_id"];
92
+ if (typeof direct === "string" && direct)
93
+ return direct;
94
+ for (const key of ["workspace", "layout"]) {
95
+ const nested = result[key];
96
+ if (nested && typeof nested === "object") {
97
+ const obj = nested;
98
+ const id = obj["workspace_id"] ?? obj["id"];
99
+ if (typeof id === "string" && id)
100
+ return id;
101
+ }
102
+ }
103
+ const bare = result["id"];
104
+ if (typeof bare === "string" && bare)
105
+ return bare;
106
+ return null;
107
+ }
108
+ export class HerdrAdapter {
109
+ deps;
110
+ name = "herdr";
111
+ transport;
112
+ newLaunchToken;
113
+ tabPrefix;
114
+ launchCounter = 0;
115
+ constructor(deps) {
116
+ this.deps = deps;
117
+ this.transport = deps.transportFactory();
118
+ this.tabPrefix = deps.tabPrefix ?? "openrig";
119
+ this.newLaunchToken =
120
+ deps.newLaunchToken ?? (() => `l${(this.launchCounter += 1)}`);
121
+ }
122
+ async status() {
123
+ try {
124
+ const probe = await this.transport.probe();
125
+ return {
126
+ provider: this.name,
127
+ available: probe.alive,
128
+ ...(probe.version ? { version: probe.version } : {}),
129
+ // The socket answering ping IS the capability surface: layout.apply is
130
+ // the protocol's layout verb (there is no per-command discovery on
131
+ // 0.7.1 — `api schema` is absent; HERDR-FINDINGS §3).
132
+ capabilities: { socket: probe.alive, "layout.apply": probe.alive },
133
+ };
134
+ }
135
+ catch {
136
+ // An unreachable socket (herdr not running) = honestly unavailable.
137
+ return { provider: this.name, available: false, capabilities: {} };
138
+ }
139
+ }
140
+ async liveness() {
141
+ // Liveness is the multiplexer's OWN control socket answering ping.
142
+ try {
143
+ const probe = await this.transport.probe();
144
+ return probe.alive
145
+ ? { alive: true }
146
+ : { alive: false, detail: "herdr control socket is not answering ping" };
147
+ }
148
+ catch (err) {
149
+ return { alive: false, detail: err instanceof Error ? err.message : String(err) };
150
+ }
151
+ }
152
+ async openView(view) {
153
+ const absent = [...view.absent];
154
+ const degraded = [...view.degraded];
155
+ const opened = [];
156
+ // Gate on the socket being alive — the honest "herdr isn't running" refuse.
157
+ // (No CLI-help "layout command" probe: the socket API is the layout surface.)
158
+ const probe = await this.transport.probe();
159
+ if (!probe.alive) {
160
+ return {
161
+ provider: this.name,
162
+ ok: false,
163
+ opened,
164
+ absent,
165
+ degraded,
166
+ pages: 0,
167
+ error: "herdr control socket is not answering ping; is herdr running?",
168
+ code: "herdr_unavailable",
169
+ };
170
+ }
171
+ const launchToken = this.newLaunchToken();
172
+ const plan = planHerdrLayout(view, launchToken, this.tabPrefix);
173
+ // Nothing to tile (an all-absent/degraded view) → no workspace side effect.
174
+ if (plan.pages.length === 0) {
175
+ return {
176
+ provider: this.name,
177
+ ok: view.opened.length === 0,
178
+ opened,
179
+ absent,
180
+ degraded,
181
+ pages: 0,
182
+ };
183
+ }
184
+ // A fresh workspace per open (BR-5 fresh-on-relaunch, strongest form).
185
+ // The labeled create is tried first; because the label param is an
186
+ // uncaptured assumption, a failure falls back ONCE to a bare create
187
+ // before degrading (defensive; to be confirmed by the fresh VM re-proof).
188
+ let workspaceId = null;
189
+ let createErr = null;
190
+ try {
191
+ workspaceId = extractWorkspaceId(await this.transport.request("workspace.create", {
192
+ focus: false,
193
+ label: plan.workspaceLabel,
194
+ }));
195
+ }
196
+ catch (err) {
197
+ createErr = err;
198
+ }
199
+ if (workspaceId == null) {
200
+ try {
201
+ workspaceId = extractWorkspaceId(await this.transport.request("workspace.create", { focus: false }));
202
+ createErr = null;
203
+ }
204
+ catch (err) {
205
+ createErr = createErr ?? err;
206
+ }
207
+ }
208
+ if (workspaceId == null) {
209
+ // No workspace → nothing can tile. Degrade every pane honestly.
210
+ const reason = `herdr workspace.create failed: ${createErr instanceof Error
211
+ ? createErr.message
212
+ : createErr != null
213
+ ? String(createErr)
214
+ : "no workspace id in the response"}`;
215
+ for (const page of view.pages) {
216
+ for (const pane of page) {
217
+ degraded.push({ seat: pane.seat, host: HERDR_SURFACE_HOST, reason });
218
+ }
219
+ }
220
+ return {
221
+ provider: this.name,
222
+ ok: view.opened.length === 0,
223
+ opened,
224
+ absent,
225
+ degraded,
226
+ pages: 0,
227
+ error: reason,
228
+ code: "herdr_workspace_failed",
229
+ };
230
+ }
231
+ for (let pageIndex = 0; pageIndex < plan.pages.length; pageIndex++) {
232
+ const pagePlan = plan.pages[pageIndex];
233
+ const pagePanes = view.pages[pageIndex];
234
+ try {
235
+ // ONE atomic layout.apply for the whole page (capture-verified shape).
236
+ await this.transport.request("layout.apply", {
237
+ workspace_id: workspaceId,
238
+ tab_label: pagePlan.tabLabel,
239
+ focus: true,
240
+ root: pagePlan.root,
241
+ });
242
+ for (const pane of pagePanes)
243
+ opened.push(pane.seat);
244
+ }
245
+ catch (err) {
246
+ // The whole page failed to apply — degrade its seats honestly.
247
+ for (const pane of pagePanes) {
248
+ degraded.push({
249
+ seat: pane.seat,
250
+ host: HERDR_SURFACE_HOST,
251
+ reason: `herdr layout.apply failed: ${err instanceof Error ? err.message : String(err)}`,
252
+ });
253
+ }
254
+ }
255
+ }
256
+ return {
257
+ provider: this.name,
258
+ ok: opened.length > 0 || view.opened.length === 0,
259
+ opened,
260
+ absent,
261
+ degraded,
262
+ pages: plan.pages.length,
263
+ };
264
+ }
265
+ }
266
+ //# sourceMappingURL=herdr-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"herdr-adapter.js","sourceRoot":"","sources":["../../../src/domain/terminal/herdr-adapter.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,8EAA8E;AAC9E,4EAA4E;AAC5E,qBAAqB;AACrB,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,+EAA+E;AAC/E,4EAA4E;AAC5E,yCAAyC;AACzC,6DAA6D;AAC7D,8EAA8E;AAC9E,uDAAuD;AACvD,iFAAiF;AACjF,EAAE;AACF,8DAA8D;AAC9D,8EAA8E;AAC9E,qDAAqD;AACrD,2EAA2E;AAC3E,0EAA0E;AAC1E,oEAAoE;AACpE,2EAA2E;AAC3E,2EAA2E;AAC3E,oBAAoB;AACpB,uEAAuE;AACvE,4EAA4E;AAC5E,6EAA6E;AAC7E,uBAAuB;AACvB,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,iEAAiE;AACjE,yEAAyE;AACzE,8EAA8E;AAC9E,8EAA8E;AAC9E,uDAAuD;AACvD,yEAAyE;AACzE,0EAA0E;AAC1E,+DAA+D;AAC/D,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,yEAAyE;AACzE,uDAAuD;AAkBvD,uFAAuF;AACvF,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAoBnC;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,KAAqB,EAAE,KAAK,GAAG,CAAC;IAC3D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC;QACvB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,I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