@openrig/cli 0.7.18 → 0.7.19

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 (647) hide show
  1. package/README.md +7 -6
  2. package/daemon/assets/claude-hook-bridge.cjs +146 -0
  3. package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +1 -1
  4. package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +1 -1
  5. package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
  6. package/daemon/assets/plugins/openrig/plugin.json +1 -1
  7. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  8. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  9. package/daemon/assets/plugins/openrig-core/README.md +1 -1
  10. package/daemon/assets/plugins/openrig-core/hooks/claude.json +14 -14
  11. package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +43 -22
  12. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +1 -0
  13. package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +1 -1
  14. package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +70 -2
  15. package/daemon/assets/skills/rigs/SKILL.md +40 -19
  16. package/daemon/context-packs/help/manifest.yaml +1 -1
  17. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  18. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +16 -7
  19. package/daemon/context-packs/reference/getting-started.md +9 -4
  20. package/daemon/context-packs/reference/manifest.yaml +1 -1
  21. package/daemon/context-packs/reference/rig-spec.md +56 -26
  22. package/daemon/context-packs/reference/whats-new.md +82 -11
  23. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  24. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  25. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  26. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  27. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  28. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  29. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  30. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  31. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  32. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  33. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  34. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  35. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  36. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
  37. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  38. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  40. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  41. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  43. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  44. package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  46. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  48. package/daemon/context-packs/skills/mission-slice-sop/SKILL.md +1 -1
  49. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  51. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  52. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  54. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  59. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  60. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  66. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  68. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +70 -2
  74. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  76. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  77. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  78. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  79. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  80. package/daemon/dist/adapters/claude-code-adapter.d.ts +9 -0
  81. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  82. package/daemon/dist/adapters/claude-code-adapter.js +41 -4
  83. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  84. package/daemon/dist/adapters/claude-resume.d.ts +2 -0
  85. package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
  86. package/daemon/dist/adapters/claude-resume.js +3 -1
  87. package/daemon/dist/adapters/claude-resume.js.map +1 -1
  88. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +5 -0
  89. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  90. package/daemon/dist/adapters/codex-runtime-adapter.js +45 -10
  91. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  92. package/daemon/dist/adapters/kernel-authority.d.ts +7 -0
  93. package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
  94. package/daemon/dist/adapters/kernel-authority.js +24 -1
  95. package/daemon/dist/adapters/kernel-authority.js.map +1 -1
  96. package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
  97. package/daemon/dist/adapters/pi-resume.js +5 -7
  98. package/daemon/dist/adapters/pi-resume.js.map +1 -1
  99. package/daemon/dist/adapters/pi-runner-protocol.d.ts +5 -1
  100. package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
  101. package/daemon/dist/adapters/pi-runner.d.ts +34 -0
  102. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
  103. package/daemon/dist/adapters/pi-runner.js +359 -26
  104. package/daemon/dist/adapters/pi-runner.js.map +1 -1
  105. package/daemon/dist/adapters/pi-runtime-adapter.d.ts +7 -1
  106. package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
  107. package/daemon/dist/adapters/pi-runtime-adapter.js +29 -19
  108. package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
  109. package/daemon/dist/adapters/tmux.d.ts +54 -34
  110. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  111. package/daemon/dist/adapters/tmux.js +183 -57
  112. package/daemon/dist/adapters/tmux.js.map +1 -1
  113. package/daemon/dist/build-info.js +3 -3
  114. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  115. package/daemon/dist/db/all-migrations.js +6 -0
  116. package/daemon/dist/db/all-migrations.js.map +1 -1
  117. package/daemon/dist/db/migrations/171_seat_hook_bridge.d.ts +5 -0
  118. package/daemon/dist/db/migrations/171_seat_hook_bridge.d.ts.map +1 -0
  119. package/daemon/dist/db/migrations/171_seat_hook_bridge.js +25 -0
  120. package/daemon/dist/db/migrations/171_seat_hook_bridge.js.map +1 -0
  121. package/daemon/dist/db/migrations/174_session_launched_cwd.d.ts +6 -0
  122. package/daemon/dist/db/migrations/174_session_launched_cwd.d.ts.map +1 -0
  123. package/daemon/dist/db/migrations/174_session_launched_cwd.js +8 -0
  124. package/daemon/dist/db/migrations/174_session_launched_cwd.js.map +1 -0
  125. package/daemon/dist/db/migrations/175_core_app_access.d.ts +3 -0
  126. package/daemon/dist/db/migrations/175_core_app_access.d.ts.map +1 -0
  127. package/daemon/dist/db/migrations/175_core_app_access.js +26 -0
  128. package/daemon/dist/db/migrations/175_core_app_access.js.map +1 -0
  129. package/daemon/dist/domain/activity-grants.d.ts.map +1 -1
  130. package/daemon/dist/domain/activity-grants.js +6 -4
  131. package/daemon/dist/domain/activity-grants.js.map +1 -1
  132. package/daemon/dist/domain/agent-activity-store.d.ts +23 -0
  133. package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
  134. package/daemon/dist/domain/agent-activity-store.js +62 -5
  135. package/daemon/dist/domain/agent-activity-store.js.map +1 -1
  136. package/daemon/dist/domain/claude-activity-hooks.d.ts +4 -2
  137. package/daemon/dist/domain/claude-activity-hooks.d.ts.map +1 -1
  138. package/daemon/dist/domain/claude-activity-hooks.js +5 -3
  139. package/daemon/dist/domain/claude-activity-hooks.js.map +1 -1
  140. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +64 -3
  141. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  142. package/daemon/dist/domain/claude-compaction-enforcer.js +203 -6
  143. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  144. package/daemon/dist/domain/compaction-restore-notice.d.ts +3 -1
  145. package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
  146. package/daemon/dist/domain/compaction-restore-notice.js +22 -3
  147. package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
  148. package/daemon/dist/domain/configured-account.d.ts +3 -0
  149. package/daemon/dist/domain/configured-account.d.ts.map +1 -0
  150. package/daemon/dist/domain/configured-account.js +10 -0
  151. package/daemon/dist/domain/configured-account.js.map +1 -0
  152. package/daemon/dist/domain/core-app-access.d.ts +51 -0
  153. package/daemon/dist/domain/core-app-access.d.ts.map +1 -0
  154. package/daemon/dist/domain/core-app-access.js +107 -0
  155. package/daemon/dist/domain/core-app-access.js.map +1 -0
  156. package/daemon/dist/domain/core-app-job.d.ts +411 -0
  157. package/daemon/dist/domain/core-app-job.d.ts.map +1 -0
  158. package/daemon/dist/domain/core-app-job.js +537 -0
  159. package/daemon/dist/domain/core-app-job.js.map +1 -0
  160. package/daemon/dist/domain/current-park-arm.d.ts +4 -0
  161. package/daemon/dist/domain/current-park-arm.d.ts.map +1 -0
  162. package/daemon/dist/domain/current-park-arm.js +14 -0
  163. package/daemon/dist/domain/current-park-arm.js.map +1 -0
  164. package/daemon/dist/domain/cwd-resolution.d.ts +12 -0
  165. package/daemon/dist/domain/cwd-resolution.d.ts.map +1 -1
  166. package/daemon/dist/domain/cwd-resolution.js +21 -1
  167. package/daemon/dist/domain/cwd-resolution.js.map +1 -1
  168. package/daemon/dist/domain/execution-view.d.ts.map +1 -1
  169. package/daemon/dist/domain/execution-view.js +9 -3
  170. package/daemon/dist/domain/execution-view.js.map +1 -1
  171. package/daemon/dist/domain/gateway/participants.d.ts +2 -0
  172. package/daemon/dist/domain/gateway/participants.d.ts.map +1 -1
  173. package/daemon/dist/domain/gateway/participants.js +5 -1
  174. package/daemon/dist/domain/gateway/participants.js.map +1 -1
  175. package/daemon/dist/domain/gateway/slack/message.d.ts +1 -0
  176. package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
  177. package/daemon/dist/domain/gateway/slack/message.js +37 -17
  178. package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
  179. package/daemon/dist/domain/gateway/slack/settled-asks.js +1 -1
  180. package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -1
  181. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +1 -0
  182. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
  183. package/daemon/dist/domain/gateway/slack/slack-delivery.js +2 -0
  184. package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
  185. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +4 -0
  186. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
  187. package/daemon/dist/domain/gateway/slack/slack-subsystem.js +26 -2
  188. package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
  189. package/daemon/dist/domain/hook-bridge.d.ts +345 -0
  190. package/daemon/dist/domain/hook-bridge.d.ts.map +1 -0
  191. package/daemon/dist/domain/hook-bridge.js +547 -0
  192. package/daemon/dist/domain/hook-bridge.js.map +1 -0
  193. package/daemon/dist/domain/hosted-wake.d.ts +9 -0
  194. package/daemon/dist/domain/hosted-wake.d.ts.map +1 -1
  195. package/daemon/dist/domain/hosted-wake.js +45 -6
  196. package/daemon/dist/domain/hosted-wake.js.map +1 -1
  197. package/daemon/dist/domain/human-ask-attention.d.ts +10 -0
  198. package/daemon/dist/domain/human-ask-attention.d.ts.map +1 -0
  199. package/daemon/dist/domain/human-ask-attention.js +22 -0
  200. package/daemon/dist/domain/human-ask-attention.js.map +1 -0
  201. package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts +4 -0
  202. package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts.map +1 -1
  203. package/daemon/dist/domain/mission-control/mission-control-action-log.js +8 -1
  204. package/daemon/dist/domain/mission-control/mission-control-action-log.js.map +1 -1
  205. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +10 -0
  206. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  207. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +64 -12
  208. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  209. package/daemon/dist/domain/native-continuation-notice.d.ts +16 -0
  210. package/daemon/dist/domain/native-continuation-notice.d.ts.map +1 -0
  211. package/daemon/dist/domain/native-continuation-notice.js +79 -0
  212. package/daemon/dist/domain/native-continuation-notice.js.map +1 -0
  213. package/daemon/dist/domain/native-process-lineage.d.ts +16 -0
  214. package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
  215. package/daemon/dist/domain/native-process-lineage.js +48 -3
  216. package/daemon/dist/domain/native-process-lineage.js.map +1 -1
  217. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  218. package/daemon/dist/domain/node-inventory.js +27 -6
  219. package/daemon/dist/domain/node-inventory.js.map +1 -1
  220. package/daemon/dist/domain/node-launcher.d.ts +6 -0
  221. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  222. package/daemon/dist/domain/node-launcher.js +16 -2
  223. package/daemon/dist/domain/node-launcher.js.map +1 -1
  224. package/daemon/dist/domain/outbox-handler.d.ts +21 -3
  225. package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
  226. package/daemon/dist/domain/outbox-handler.js +88 -8
  227. package/daemon/dist/domain/outbox-handler.js.map +1 -1
  228. package/daemon/dist/domain/park-wake-text.d.ts +18 -0
  229. package/daemon/dist/domain/park-wake-text.d.ts.map +1 -1
  230. package/daemon/dist/domain/park-wake-text.js +44 -0
  231. package/daemon/dist/domain/park-wake-text.js.map +1 -1
  232. package/daemon/dist/domain/policies/idle-gate-qitem.d.ts +3 -0
  233. package/daemon/dist/domain/policies/idle-gate-qitem.d.ts.map +1 -1
  234. package/daemon/dist/domain/policies/idle-gate-qitem.js +15 -0
  235. package/daemon/dist/domain/policies/idle-gate-qitem.js.map +1 -1
  236. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +6 -1
  237. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
  238. package/daemon/dist/domain/policies/parked-owner-consumer.js +28 -1
  239. package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
  240. package/daemon/dist/domain/process-limits.d.ts +21 -11
  241. package/daemon/dist/domain/process-limits.d.ts.map +1 -1
  242. package/daemon/dist/domain/process-limits.js +74 -20
  243. package/daemon/dist/domain/process-limits.js.map +1 -1
  244. package/daemon/dist/domain/process-table.d.ts +15 -0
  245. package/daemon/dist/domain/process-table.d.ts.map +1 -1
  246. package/daemon/dist/domain/process-table.js +39 -0
  247. package/daemon/dist/domain/process-table.js.map +1 -1
  248. package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
  249. package/daemon/dist/domain/queue-erasure.js +3 -0
  250. package/daemon/dist/domain/queue-erasure.js.map +1 -1
  251. package/daemon/dist/domain/queue-repository.d.ts +60 -7
  252. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  253. package/daemon/dist/domain/queue-repository.js +178 -36
  254. package/daemon/dist/domain/queue-repository.js.map +1 -1
  255. package/daemon/dist/domain/queue-stuck-sweep.d.ts +2 -0
  256. package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
  257. package/daemon/dist/domain/queue-stuck-sweep.js +29 -0
  258. package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
  259. package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
  260. package/daemon/dist/domain/queue-waiting.js +28 -3
  261. package/daemon/dist/domain/queue-waiting.js.map +1 -1
  262. package/daemon/dist/domain/queue-wake-ladder.d.ts +12 -0
  263. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  264. package/daemon/dist/domain/queue-wake-ladder.js +115 -14
  265. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  266. package/daemon/dist/domain/queue-wake-repository.d.ts +8 -0
  267. package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
  268. package/daemon/dist/domain/queue-wake-repository.js +48 -8
  269. package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
  270. package/daemon/dist/domain/reconciler.d.ts +18 -2
  271. package/daemon/dist/domain/reconciler.d.ts.map +1 -1
  272. package/daemon/dist/domain/reconciler.js +40 -0
  273. package/daemon/dist/domain/reconciler.js.map +1 -1
  274. package/daemon/dist/domain/restore-attempt-receipt.d.ts.map +1 -1
  275. package/daemon/dist/domain/restore-attempt-receipt.js +3 -2
  276. package/daemon/dist/domain/restore-attempt-receipt.js.map +1 -1
  277. package/daemon/dist/domain/restore-orchestrator.d.ts +5 -1
  278. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  279. package/daemon/dist/domain/restore-orchestrator.js +73 -8
  280. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  281. package/daemon/dist/domain/restore-topology.d.ts +7 -1
  282. package/daemon/dist/domain/restore-topology.d.ts.map +1 -1
  283. package/daemon/dist/domain/restore-topology.js +21 -0
  284. package/daemon/dist/domain/restore-topology.js.map +1 -1
  285. package/daemon/dist/domain/resume-metadata-refresher.d.ts +2 -3
  286. package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
  287. package/daemon/dist/domain/resume-metadata-refresher.js +6 -25
  288. package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
  289. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  290. package/daemon/dist/domain/rig-repository.js +7 -6
  291. package/daemon/dist/domain/rig-repository.js.map +1 -1
  292. package/daemon/dist/domain/rig-teardown.d.ts +16 -3
  293. package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
  294. package/daemon/dist/domain/rig-teardown.js +73 -9
  295. package/daemon/dist/domain/rig-teardown.js.map +1 -1
  296. package/daemon/dist/domain/rigspec-exporter.js +2 -2
  297. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  298. package/daemon/dist/domain/rigspec-instantiator.d.ts +5 -0
  299. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  300. package/daemon/dist/domain/rigspec-instantiator.js +17 -7
  301. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  302. package/daemon/dist/domain/rosters.d.ts +11 -0
  303. package/daemon/dist/domain/rosters.d.ts.map +1 -1
  304. package/daemon/dist/domain/rosters.js +21 -2
  305. package/daemon/dist/domain/rosters.js.map +1 -1
  306. package/daemon/dist/domain/runner-channel.d.ts +35 -3
  307. package/daemon/dist/domain/runner-channel.d.ts.map +1 -1
  308. package/daemon/dist/domain/runner-channel.js +177 -8
  309. package/daemon/dist/domain/runner-channel.js.map +1 -1
  310. package/daemon/dist/domain/runner-permissions.d.ts +26 -3
  311. package/daemon/dist/domain/runner-permissions.d.ts.map +1 -1
  312. package/daemon/dist/domain/runner-permissions.js +160 -39
  313. package/daemon/dist/domain/runner-permissions.js.map +1 -1
  314. package/daemon/dist/domain/scope/mission-parent.d.ts +19 -0
  315. package/daemon/dist/domain/scope/mission-parent.d.ts.map +1 -0
  316. package/daemon/dist/domain/scope/mission-parent.js +134 -0
  317. package/daemon/dist/domain/scope/mission-parent.js.map +1 -0
  318. package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
  319. package/daemon/dist/domain/scope/scope-audit.js +8 -0
  320. package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
  321. package/daemon/dist/domain/scope/types.d.ts +3 -1
  322. package/daemon/dist/domain/scope/types.d.ts.map +1 -1
  323. package/daemon/dist/domain/scope/types.js +5 -1
  324. package/daemon/dist/domain/scope/types.js.map +1 -1
  325. package/daemon/dist/domain/seat-delivery-guard.d.ts +14 -2
  326. package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
  327. package/daemon/dist/domain/seat-delivery-guard.js +53 -14
  328. package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
  329. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  330. package/daemon/dist/domain/seat-handover-service.js +9 -4
  331. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  332. package/daemon/dist/domain/seat-identity-reconciler.d.ts +4 -3
  333. package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
  334. package/daemon/dist/domain/seat-identity-reconciler.js +40 -5
  335. package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
  336. package/daemon/dist/domain/seat-lifecycle-service.d.ts +14 -6
  337. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  338. package/daemon/dist/domain/seat-lifecycle-service.js +104 -22
  339. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  340. package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
  341. package/daemon/dist/domain/seat-restart-in-place.js +4 -1
  342. package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
  343. package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
  344. package/daemon/dist/domain/seat-runtime-switch-service.js +2 -0
  345. package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
  346. package/daemon/dist/domain/seat-skill-apply.d.ts +1 -1
  347. package/daemon/dist/domain/seat-skill-apply.d.ts.map +1 -1
  348. package/daemon/dist/domain/seat-skill-apply.js +3 -2
  349. package/daemon/dist/domain/seat-skill-apply.js.map +1 -1
  350. package/daemon/dist/domain/session-registry.d.ts +5 -1
  351. package/daemon/dist/domain/session-registry.d.ts.map +1 -1
  352. package/daemon/dist/domain/session-registry.js +12 -1
  353. package/daemon/dist/domain/session-registry.js.map +1 -1
  354. package/daemon/dist/domain/session-transport.d.ts +40 -1
  355. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  356. package/daemon/dist/domain/session-transport.js +211 -10
  357. package/daemon/dist/domain/session-transport.js.map +1 -1
  358. package/daemon/dist/domain/shared-history-selection.d.ts.map +1 -1
  359. package/daemon/dist/domain/shared-history-selection.js +9 -5
  360. package/daemon/dist/domain/shared-history-selection.js.map +1 -1
  361. package/daemon/dist/domain/slices/slice-indexer.d.ts +1 -1
  362. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  363. package/daemon/dist/domain/slices/slice-indexer.js +4 -0
  364. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  365. package/daemon/dist/domain/startup-orchestrator.d.ts +1 -0
  366. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  367. package/daemon/dist/domain/startup-orchestrator.js +6 -4
  368. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  369. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  370. package/daemon/dist/domain/successor-session-launcher.js +10 -4
  371. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  372. package/daemon/dist/domain/terminal/herdr-adapter.d.ts +35 -1
  373. package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
  374. package/daemon/dist/domain/terminal/herdr-adapter.js +231 -33
  375. package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
  376. package/daemon/dist/domain/terminal/herdr-sessions.d.ts.map +1 -1
  377. package/daemon/dist/domain/terminal/herdr-sessions.js +2 -1
  378. package/daemon/dist/domain/terminal/herdr-sessions.js.map +1 -1
  379. package/daemon/dist/domain/terminal/rig-viewer-records.d.ts +59 -0
  380. package/daemon/dist/domain/terminal/rig-viewer-records.d.ts.map +1 -0
  381. package/daemon/dist/domain/terminal/rig-viewer-records.js +210 -0
  382. package/daemon/dist/domain/terminal/rig-viewer-records.js.map +1 -0
  383. package/daemon/dist/domain/terminal/terminal-provider.d.ts +2 -0
  384. package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
  385. package/daemon/dist/domain/terminal/terminal-service.d.ts +99 -4
  386. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  387. package/daemon/dist/domain/terminal/terminal-service.js +556 -36
  388. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  389. package/daemon/dist/domain/terminal/tile-layout.js +1 -1
  390. package/daemon/dist/domain/terminal/tile-layout.js.map +1 -1
  391. package/daemon/dist/domain/terminal/tmux-viewer-guard.d.ts +25 -0
  392. package/daemon/dist/domain/terminal/tmux-viewer-guard.d.ts.map +1 -0
  393. package/daemon/dist/domain/terminal/tmux-viewer-guard.js +70 -0
  394. package/daemon/dist/domain/terminal/tmux-viewer-guard.js.map +1 -0
  395. package/daemon/dist/domain/transcript-grep-worker.d.ts +2 -0
  396. package/daemon/dist/domain/transcript-grep-worker.d.ts.map +1 -0
  397. package/daemon/dist/domain/transcript-grep-worker.js +108 -0
  398. package/daemon/dist/domain/transcript-grep-worker.js.map +1 -0
  399. package/daemon/dist/domain/transcript-grep.d.ts +26 -0
  400. package/daemon/dist/domain/transcript-grep.d.ts.map +1 -0
  401. package/daemon/dist/domain/transcript-grep.js +90 -0
  402. package/daemon/dist/domain/transcript-grep.js.map +1 -0
  403. package/daemon/dist/domain/transcript-store.d.ts +8 -2
  404. package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  405. package/daemon/dist/domain/transcript-store.js +10 -60
  406. package/daemon/dist/domain/transcript-store.js.map +1 -1
  407. package/daemon/dist/domain/types.d.ts +69 -2
  408. package/daemon/dist/domain/types.d.ts.map +1 -1
  409. package/daemon/dist/domain/types.js.map +1 -1
  410. package/daemon/dist/domain/watchdog-delivery-receipts.d.ts +4 -0
  411. package/daemon/dist/domain/watchdog-delivery-receipts.d.ts.map +1 -1
  412. package/daemon/dist/domain/watchdog-delivery-receipts.js +35 -2
  413. package/daemon/dist/domain/watchdog-delivery-receipts.js.map +1 -1
  414. package/daemon/dist/domain/watchdog-delivery.d.ts +44 -0
  415. package/daemon/dist/domain/watchdog-delivery.d.ts.map +1 -1
  416. package/daemon/dist/domain/watchdog-delivery.js +60 -2
  417. package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
  418. package/daemon/dist/domain/watchdog-history-log.d.ts +12 -0
  419. package/daemon/dist/domain/watchdog-history-log.d.ts.map +1 -1
  420. package/daemon/dist/domain/watchdog-history-log.js +19 -1
  421. package/daemon/dist/domain/watchdog-history-log.js.map +1 -1
  422. package/daemon/dist/domain/watchdog-jobs-repository.d.ts +32 -0
  423. package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
  424. package/daemon/dist/domain/watchdog-jobs-repository.js +78 -0
  425. package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
  426. package/daemon/dist/domain/watchdog-policy-engine.d.ts +17 -3
  427. package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
  428. package/daemon/dist/domain/watchdog-policy-engine.js +19 -5
  429. package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
  430. package/daemon/dist/domain/workflow-projector.js +1 -1
  431. package/daemon/dist/domain/workflow-projector.js.map +1 -1
  432. package/daemon/dist/domain/workflow-runtime.d.ts +12 -0
  433. package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
  434. package/daemon/dist/domain/workflow-runtime.js +64 -7
  435. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  436. package/daemon/dist/domain/workflow-step-trail-log.d.ts +2 -2
  437. package/daemon/dist/domain/workflow-step-trail-log.d.ts.map +1 -1
  438. package/daemon/dist/domain/workflow-step-trail-log.js.map +1 -1
  439. package/daemon/dist/domain/workflow-types.d.ts +3 -1
  440. package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
  441. package/daemon/dist/domain/workflow-types.js.map +1 -1
  442. package/daemon/dist/index.d.ts.map +1 -1
  443. package/daemon/dist/index.js +5 -1
  444. package/daemon/dist/index.js.map +1 -1
  445. package/daemon/dist/lib/pane-envelope.d.ts +3 -0
  446. package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
  447. package/daemon/dist/lib/pane-envelope.js +3 -1
  448. package/daemon/dist/lib/pane-envelope.js.map +1 -1
  449. package/daemon/dist/mission-parent-surface.d.ts +2 -0
  450. package/daemon/dist/mission-parent-surface.d.ts.map +1 -0
  451. package/daemon/dist/mission-parent-surface.js +2 -0
  452. package/daemon/dist/mission-parent-surface.js.map +1 -0
  453. package/daemon/dist/routes/activity.d.ts +18 -1
  454. package/daemon/dist/routes/activity.d.ts.map +1 -1
  455. package/daemon/dist/routes/activity.js +47 -9
  456. package/daemon/dist/routes/activity.js.map +1 -1
  457. package/daemon/dist/routes/attention.d.ts.map +1 -1
  458. package/daemon/dist/routes/attention.js +194 -177
  459. package/daemon/dist/routes/attention.js.map +1 -1
  460. package/daemon/dist/routes/core-app.d.ts +10 -0
  461. package/daemon/dist/routes/core-app.d.ts.map +1 -0
  462. package/daemon/dist/routes/core-app.js +175 -0
  463. package/daemon/dist/routes/core-app.js.map +1 -0
  464. package/daemon/dist/routes/hook-bridge.d.ts +3 -0
  465. package/daemon/dist/routes/hook-bridge.d.ts.map +1 -0
  466. package/daemon/dist/routes/hook-bridge.js +158 -0
  467. package/daemon/dist/routes/hook-bridge.js.map +1 -0
  468. package/daemon/dist/routes/missions.d.ts.map +1 -1
  469. package/daemon/dist/routes/missions.js +14 -2
  470. package/daemon/dist/routes/missions.js.map +1 -1
  471. package/daemon/dist/routes/queue.d.ts +1 -1
  472. package/daemon/dist/routes/queue.d.ts.map +1 -1
  473. package/daemon/dist/routes/queue.js +8 -5
  474. package/daemon/dist/routes/queue.js.map +1 -1
  475. package/daemon/dist/routes/rigspec.js +1 -1
  476. package/daemon/dist/routes/rigspec.js.map +1 -1
  477. package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
  478. package/daemon/dist/routes/scope-audit.js +7 -1
  479. package/daemon/dist/routes/scope-audit.js.map +1 -1
  480. package/daemon/dist/routes/seat.d.ts.map +1 -1
  481. package/daemon/dist/routes/seat.js +30 -4
  482. package/daemon/dist/routes/seat.js.map +1 -1
  483. package/daemon/dist/routes/slices.d.ts.map +1 -1
  484. package/daemon/dist/routes/slices.js +21 -2
  485. package/daemon/dist/routes/slices.js.map +1 -1
  486. package/daemon/dist/routes/startup.js +2 -1
  487. package/daemon/dist/routes/startup.js.map +1 -1
  488. package/daemon/dist/routes/terminal.d.ts.map +1 -1
  489. package/daemon/dist/routes/terminal.js +47 -6
  490. package/daemon/dist/routes/terminal.js.map +1 -1
  491. package/daemon/dist/routes/transcripts.d.ts.map +1 -1
  492. package/daemon/dist/routes/transcripts.js +16 -1
  493. package/daemon/dist/routes/transcripts.js.map +1 -1
  494. package/daemon/dist/routes/watchdog.d.ts.map +1 -1
  495. package/daemon/dist/routes/watchdog.js +3 -2
  496. package/daemon/dist/routes/watchdog.js.map +1 -1
  497. package/daemon/dist/routes/workflow.d.ts.map +1 -1
  498. package/daemon/dist/routes/workflow.js +5 -0
  499. package/daemon/dist/routes/workflow.js.map +1 -1
  500. package/daemon/dist/server.d.ts +2 -0
  501. package/daemon/dist/server.d.ts.map +1 -1
  502. package/daemon/dist/server.js +11 -0
  503. package/daemon/dist/server.js.map +1 -1
  504. package/daemon/dist/startup.d.ts.map +1 -1
  505. package/daemon/dist/startup.js +90 -33
  506. package/daemon/dist/startup.js.map +1 -1
  507. package/daemon/dist/terminal-viewer-guard-surface.d.ts +2 -0
  508. package/daemon/dist/terminal-viewer-guard-surface.d.ts.map +1 -0
  509. package/daemon/dist/terminal-viewer-guard-surface.js +2 -0
  510. package/daemon/dist/terminal-viewer-guard-surface.js.map +1 -0
  511. package/daemon/docs/reference/agent-startup-guide.md +4 -1
  512. package/daemon/docs/reference/claude-status-line.md +3 -2
  513. package/daemon/docs/reference/community-harness-examples/cursor/openrig-cursor-launch +6 -0
  514. package/daemon/docs/reference/community-harness-examples/dsh/README.md +1 -1
  515. package/daemon/docs/reference/community-harness-examples/dsh/openrig-dsh-runner.mjs +186 -30
  516. package/daemon/docs/reference/community-harness-examples/hermes/openrig-hermes-launch +6 -0
  517. package/daemon/docs/reference/community-harness-examples/openclaw/openrig-openclaw-launch +6 -0
  518. package/daemon/docs/reference/community-harness-examples/openshell/README.md +2 -0
  519. package/daemon/docs/reference/community-harness-examples/pi-tui/openrig-pi-tui-launch +6 -0
  520. package/daemon/docs/reference/community-harness-presets.md +6 -5
  521. package/daemon/docs/reference/core-app.md +212 -0
  522. package/daemon/docs/reference/daemon-http-clients.md +6 -0
  523. package/daemon/docs/reference/getting-started.md +9 -4
  524. package/daemon/docs/reference/harness-runner-contract.md +50 -4
  525. package/daemon/docs/reference/hosted-members.md +21 -1
  526. package/daemon/docs/reference/quickstart.md +4 -3
  527. package/daemon/docs/reference/rig-spec.md +56 -26
  528. package/daemon/docs/reference/rosters.md +8 -0
  529. package/daemon/docs/reference/sdlc-conventions.md +42 -5
  530. package/daemon/docs/reference/seat-delivery.md +87 -6
  531. package/daemon/docs/reference/terminal-sessions.md +99 -1
  532. package/daemon/docs/reference/whats-new.md +82 -11
  533. package/daemon/specs/rigs/launch/factory/guidance/lead-first-move.md +4 -3
  534. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +13 -3
  535. package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +4 -3
  536. package/dist/ask-wake.d.ts.map +1 -1
  537. package/dist/ask-wake.js +8 -1
  538. package/dist/ask-wake.js.map +1 -1
  539. package/dist/build-info.js +3 -3
  540. package/dist/commands/archive.js +1 -1
  541. package/dist/commands/archive.js.map +1 -1
  542. package/dist/commands/daemon.d.ts.map +1 -1
  543. package/dist/commands/daemon.js +7 -0
  544. package/dist/commands/daemon.js.map +1 -1
  545. package/dist/commands/down.d.ts.map +1 -1
  546. package/dist/commands/down.js +5 -0
  547. package/dist/commands/down.js.map +1 -1
  548. package/dist/commands/ps.d.ts +2 -1
  549. package/dist/commands/ps.d.ts.map +1 -1
  550. package/dist/commands/ps.js +9 -4
  551. package/dist/commands/ps.js.map +1 -1
  552. package/dist/commands/queue.js +4 -4
  553. package/dist/commands/queue.js.map +1 -1
  554. package/dist/commands/roster.d.ts +5 -0
  555. package/dist/commands/roster.d.ts.map +1 -1
  556. package/dist/commands/scope.d.ts.map +1 -1
  557. package/dist/commands/scope.js +346 -9
  558. package/dist/commands/scope.js.map +1 -1
  559. package/dist/commands/seat.d.ts.map +1 -1
  560. package/dist/commands/seat.js +90 -8
  561. package/dist/commands/seat.js.map +1 -1
  562. package/dist/commands/send.d.ts +2 -0
  563. package/dist/commands/send.d.ts.map +1 -1
  564. package/dist/commands/send.js +3 -1
  565. package/dist/commands/send.js.map +1 -1
  566. package/dist/commands/terminal.d.ts +56 -0
  567. package/dist/commands/terminal.d.ts.map +1 -1
  568. package/dist/commands/terminal.js +194 -4
  569. package/dist/commands/terminal.js.map +1 -1
  570. package/dist/commands/transcript.js +1 -1
  571. package/dist/commands/transcript.js.map +1 -1
  572. package/dist/commands/unarchive.js +1 -1
  573. package/dist/commands/unarchive.js.map +1 -1
  574. package/dist/commands/workflow-follow.d.ts +3 -1
  575. package/dist/commands/workflow-follow.d.ts.map +1 -1
  576. package/dist/commands/workflow-follow.js +25 -6
  577. package/dist/commands/workflow-follow.js.map +1 -1
  578. package/dist/commands/workflow-render.d.ts.map +1 -1
  579. package/dist/commands/workflow-render.js +5 -1
  580. package/dist/commands/workflow-render.js.map +1 -1
  581. package/dist/commands/workflow.d.ts.map +1 -1
  582. package/dist/commands/workflow.js +14 -4
  583. package/dist/commands/workflow.js.map +1 -1
  584. package/dist/daemon-lifecycle.d.ts.map +1 -1
  585. package/dist/daemon-lifecycle.js +11 -0
  586. package/dist/daemon-lifecycle.js.map +1 -1
  587. package/dist/lib/scope/mission-composition.d.ts +1 -0
  588. package/dist/lib/scope/mission-composition.d.ts.map +1 -1
  589. package/dist/lib/scope/mission-composition.js +14 -0
  590. package/dist/lib/scope/mission-composition.js.map +1 -1
  591. package/dist/lib/scope/scope-audit.d.ts.map +1 -1
  592. package/dist/lib/scope/scope-audit.js +8 -0
  593. package/dist/lib/scope/scope-audit.js.map +1 -1
  594. package/dist/lib/scope/scope-fs.d.ts +10 -0
  595. package/dist/lib/scope/scope-fs.d.ts.map +1 -1
  596. package/dist/lib/scope/scope-fs.js +60 -0
  597. package/dist/lib/scope/scope-fs.js.map +1 -1
  598. package/dist/lib/scope/types.d.ts +3 -1
  599. package/dist/lib/scope/types.d.ts.map +1 -1
  600. package/dist/lib/scope/types.js +5 -1
  601. package/dist/lib/scope/types.js.map +1 -1
  602. package/dist/mcp-server.d.ts.map +1 -1
  603. package/dist/mcp-server.js +18 -8
  604. package/dist/mcp-server.js.map +1 -1
  605. package/dist/restore-packet/packet-writer.d.ts.map +1 -1
  606. package/dist/restore-packet/packet-writer.js +8 -5
  607. package/dist/restore-packet/packet-writer.js.map +1 -1
  608. package/dist/terminal-window.d.ts +2 -1
  609. package/dist/terminal-window.d.ts.map +1 -1
  610. package/dist/terminal-window.js +567 -41
  611. package/dist/terminal-window.js.map +1 -1
  612. package/package.json +1 -1
  613. package/tui/dist/daemon-client.d.ts +4 -0
  614. package/tui/dist/daemon-client.d.ts.map +1 -1
  615. package/tui/dist/daemon-client.js.map +1 -1
  616. package/tui/dist/execution/execution-model.d.ts.map +1 -1
  617. package/tui/dist/execution/execution-model.js +22 -5
  618. package/tui/dist/execution/execution-model.js.map +1 -1
  619. package/tui/dist/hydrate.d.ts.map +1 -1
  620. package/tui/dist/hydrate.js +6 -3
  621. package/tui/dist/hydrate.js.map +1 -1
  622. package/tui/dist/navigator.d.ts +1 -1
  623. package/tui/dist/navigator.d.ts.map +1 -1
  624. package/tui/dist/navigator.js +4 -2
  625. package/tui/dist/navigator.js.map +1 -1
  626. package/tui/dist/pulse/render-pulse.d.ts.map +1 -1
  627. package/tui/dist/pulse/render-pulse.js +7 -14
  628. package/tui/dist/pulse/render-pulse.js.map +1 -1
  629. package/tui/dist/render.d.ts.map +1 -1
  630. package/tui/dist/render.js +29 -21
  631. package/tui/dist/render.js.map +1 -1
  632. package/tui/dist/stylize.d.ts.map +1 -1
  633. package/tui/dist/stylize.js +3 -3
  634. package/tui/dist/stylize.js.map +1 -1
  635. package/tui/dist/terminals/terminal-model.d.ts +1 -0
  636. package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
  637. package/tui/dist/terminals/terminal-model.js +4 -2
  638. package/tui/dist/terminals/terminal-model.js.map +1 -1
  639. package/tui/dist/types.d.ts +1 -0
  640. package/tui/dist/types.d.ts.map +1 -1
  641. package/tui/dist/visual-layout.d.ts +3 -0
  642. package/tui/dist/visual-layout.d.ts.map +1 -1
  643. package/tui/dist/visual-layout.js +17 -0
  644. package/tui/dist/visual-layout.js.map +1 -1
  645. package/ui/dist/assets/{index-1O1f3A7K.js → index-B-sMy02c.js} +107 -107
  646. package/ui/dist/assets/{index-BX8TUZ0E.css → index-DiN7RwWg.css} +1 -1
  647. package/ui/dist/index.html +2 -2
@@ -147,6 +147,9 @@ export function writtenFact(result) {
147
147
  return "none";
148
148
  return "unknown"; // An offer or custody ACK establishes no native submission.
149
149
  }
150
+ // Queued for the seat's hook bridge: nothing was typed; the result's outcome says it was deposited for the hook.
151
+ if (result.outcome === "bridged")
152
+ return "none";
150
153
  if (result.ok && result.outcome !== "retained") {
151
154
  if (result.submitOnly)
152
155
  return "submit_only";
@@ -1978,6 +1981,23 @@ export function readInputBox(pane, runtime, text, beforeEnter) {
1978
1981
  // composerRegion's body has every space removed (the startup guard's matcher, unchanged); identity reads the rows.
1979
1982
  return boxHoldsText(stripBoxGlyph(pane.split("\n").slice(markerLine - 1, closingRuleLine - 1)), text);
1980
1983
  }
1984
+ /** OpenRig's own delivery-evidence observers, added to a send whose caller watches no input effect. They only record
1985
+ * what a typed write did; they ask nothing of the write, so they don't make a send ineligible for the hook bridge. */
1986
+ const evidenceOnlyObservers = new WeakSet();
1987
+ /** Whether the seat's hook bridge may take this send in place of typing it. Only a plain message: the bridge hands text
1988
+ * to the model at a turn boundary, so it can't run what is checked or done at the moment of writing (a write-time
1989
+ * check, an input-effect callback, staged or exact text, an idle or draft rule), it can't hold a send to an original
1990
+ * conversation, and Claude runs a slash command only from typed input. Those, and a caller that can't represent a
1991
+ * queued message, are typed as today. */
1992
+ function bridgeable(text, opts) {
1993
+ if (!opts)
1994
+ return !/^\s*\/[A-Za-z]/.test(text);
1995
+ return !opts.hookBridgeFallback && !opts.noHookBridge && !opts.expectedIdentity && !opts.submitOnly && !opts.dangerouslyInteract
1996
+ && !opts.beforeWrite && (!opts.onInputEffect || evidenceOnlyObservers.has(opts.onInputEffect)) && !opts.postCompactTurnBoundary && !opts.readinessFromPaneOnly && !opts.preserveInput
1997
+ && !opts.allowDraftWhileIdle && !opts.allowUnknownWhileIdle && !opts.typeWithoutChecking && opts.exactText === undefined && !opts.typedExactly
1998
+ && opts.expectedStagedText === undefined && !opts.requireFullStagedText && !opts.onStartupMismatch
1999
+ && !/^\s*\/[A-Za-z]/.test(text);
2000
+ }
1981
2001
  const CALLER_CANCELLED = "caller_cancelled";
1982
2002
  /** The readiness reason's tail when only the retained hook says the seat waits on a person: the pane shows no prompt it
1983
2003
  * recognizes. */
@@ -2013,6 +2033,10 @@ export class SessionTransport {
2013
2033
  tmuxAdapter;
2014
2034
  agentActivityStore;
2015
2035
  eventBus;
2036
+ hookBridge;
2037
+ queueWakeApplicable;
2038
+ hookBridgeSweep = null;
2039
+ hookBridgeSweepAgain = false;
2016
2040
  now;
2017
2041
  sleep;
2018
2042
  waitForIdlePollMs;
@@ -2034,6 +2058,7 @@ export class SessionTransport {
2034
2058
  this.tmuxAdapter = deps.tmuxAdapter;
2035
2059
  this.agentActivityStore = deps.agentActivityStore;
2036
2060
  this.eventBus = deps.eventBus;
2061
+ this.hookBridge = deps.hookBridge;
2037
2062
  this.now = deps.now ?? (() => new Date());
2038
2063
  this.sleep = deps.sleep ?? delay;
2039
2064
  this.waitForIdlePollMs = deps.waitForIdlePollMs ?? 500;
@@ -2051,6 +2076,10 @@ export class SessionTransport {
2051
2076
  }
2052
2077
  configureGuardedWakes(applicable) {
2053
2078
  this.guardedDelivery?.configureWakes(applicable);
2079
+ // The hook bridge checks the same predicate before it queues an automatic wake and before it hands one over.
2080
+ this.queueWakeApplicable = applicable;
2081
+ if (this.hookBridge)
2082
+ this.hookBridge.wakeApplicable = applicable;
2054
2083
  }
2055
2084
  attachRuntimeAdapters(adapters) {
2056
2085
  this.runtimeAdapters = { ...this.runtimeAdapters, ...adapters };
@@ -2390,13 +2419,18 @@ export class SessionTransport {
2390
2419
  const seat = this.evidenceSeat(sessionName);
2391
2420
  // The text the paste actually wrote (a terminal seat's exact text, a combined wake), not the text asked for.
2392
2421
  let wire = null;
2393
- const observed = seat ? { ...opts, onInputEffect: (phase, written) => {
2394
- if (phase === "pasted" && written)
2395
- wire = { text: written.text, at: this.now().toISOString() };
2396
- opts?.onInputEffect?.(phase, written);
2397
- } } : opts;
2422
+ const observer = (phase, written) => {
2423
+ if (phase === "pasted" && written)
2424
+ wire = { text: written.text, at: this.now().toISOString() };
2425
+ opts?.onInputEffect?.(phase, written);
2426
+ };
2427
+ // Only the caller's own input-effect callback is a write-time contract; this observer alone isn't (bridgeable).
2428
+ if (!opts?.onInputEffect)
2429
+ evidenceOnlyObservers.add(observer);
2430
+ let bridgeUnavailable = null;
2431
+ const observed = seat ? { ...opts, onInputEffect: observer, onHookBridgeUnavailable: (reason) => { bridgeUnavailable = reason; } } : opts;
2398
2432
  const result = await this.sendMarkingUrgent(sessionName, text, observed);
2399
- this.recordDeliveryEvidence(sessionName, seat, opts, result, wire);
2433
+ this.recordDeliveryEvidence(sessionName, seat, opts, result, wire, bridgeUnavailable);
2400
2434
  return result;
2401
2435
  }
2402
2436
  /** The seat a send is for, when evidence is recorded at all: its kind, pane and current occupant generation. */
@@ -2416,7 +2450,7 @@ export class SessionTransport {
2416
2450
  /** One additive record of what this send's result says, beside it. Best effort: a record that
2417
2451
  * can't be written never changes the result, holds the send or resends anything. A fact the result doesn't give is
2418
2452
  * unknown. Only an outbox row that exists counts as admitted. */
2419
- recordDeliveryEvidence(sessionName, seat, opts, result, wire) {
2453
+ recordDeliveryEvidence(sessionName, seat, opts, result, wire, bridgeUnavailable) {
2420
2454
  if (!this.eventBus || !seat)
2421
2455
  return;
2422
2456
  try {
@@ -2438,6 +2472,7 @@ export class SessionTransport {
2438
2472
  admitted: admissionUnknown ? "unknown" : admitted.length > 0 ? { outboxIds: admitted } : "none", written: writtenFact(result),
2439
2473
  terminalObserved: { outcome: result.outcome ?? null, verified: result.verified ?? null }, inputBoundary: "unknown", source: "send_result",
2440
2474
  ...wireFingerprint(wire), outcome: readSendOutcome(result, writtenFact(result)),
2475
+ ...(bridgeUnavailable ? { hookBridgeUnavailable: bridgeUnavailable } : {}),
2441
2476
  });
2442
2477
  }
2443
2478
  catch (err) {
@@ -2499,7 +2534,7 @@ export class SessionTransport {
2499
2534
  await resolveExpectedConversation(expected, this.sessionRegistry, this.tmuxAdapter, this.contextUsageStore);
2500
2535
  const result = await this.sendClassifiedInput(sessionName, text, { ...opts, expectedIdentity: expected,
2501
2536
  ...(opts?.committedOutboxIds ? {} : { deliveryId: ids[0] }) });
2502
- if (result.outcome !== "retained") {
2537
+ if (result.outcome !== "retained" && result.outcome !== "bridged") {
2503
2538
  try {
2504
2539
  for (const id of ids) {
2505
2540
  if (result.ok) {
@@ -2549,6 +2584,105 @@ export class SessionTransport {
2549
2584
  ...(receiptUnconfirmed ? { warning: "Conditional input receipt could not be finalized; inspect before retrying." } : {}) };
2550
2585
  }
2551
2586
  }
2587
+ /** Slice 13: type the messages queued for a hook bridge that has no live arm (or, with `nodeId`, every message queued
2588
+ * for that seat), oldest first, each under its own outbox id through the ordinary send path. The daemon runs this on
2589
+ * an interval; a send that finds the bridge unavailable runs it for its seat. */
2590
+ async sweepHookBridge(opts = {}) {
2591
+ // One sweep at a time: the interval's and a send's share the one running sweep, and a sweep asked for while one runs
2592
+ // runs once after it.
2593
+ if (this.hookBridgeSweep) {
2594
+ this.hookBridgeSweepAgain = true;
2595
+ return this.hookBridgeSweep;
2596
+ }
2597
+ this.hookBridgeSweep = (async () => {
2598
+ const typed = [];
2599
+ do {
2600
+ this.hookBridgeSweepAgain = false;
2601
+ typed.push(...await this.sweepHookBridgeOnce(opts));
2602
+ } while (this.hookBridgeSweepAgain);
2603
+ return typed;
2604
+ })().finally(() => { this.hookBridgeSweep = null; });
2605
+ return this.hookBridgeSweep;
2606
+ }
2607
+ async sweepHookBridgeOnce(opts) {
2608
+ const bridge = this.hookBridge;
2609
+ if (!bridge)
2610
+ return [];
2611
+ bridge.reconcileUnacked();
2612
+ const due = bridge.dueForFallback();
2613
+ if (opts.nodeId && !due.some((d) => d.nodeId === opts.nodeId) && !bridge.live(opts.nodeId)) {
2614
+ // By the same rule as the poll and the fallback: what a delivery drain holds stays queued (superseded wakes end).
2615
+ const ids = bridge.queuedForTyping(opts.nodeId);
2616
+ if (ids.length)
2617
+ due.push({ nodeId: opts.nodeId, outboxIds: ids, reason: bridge.unavailable(opts.nodeId) });
2618
+ }
2619
+ const outbox = new OutboxHandler(this.db);
2620
+ const typed = [];
2621
+ for (const { nodeId, outboxIds, reason } of due) {
2622
+ const saved = new Map(bridge.queued(nodeId).map((row) => [row.outboxId, row]));
2623
+ // Oldest first. Each is taken back from the bridge only under the seat's lease, just before it's typed: one the
2624
+ // bridge took first isn't typed, and the seat's loop stops there, so nothing is typed twice and nothing behind it
2625
+ // overtakes it. Each keeps its own delivery contract: its admission, and the occupant it was queued for.
2626
+ for (const outboxId of outboxIds) {
2627
+ const entry = outbox.getById(outboxId);
2628
+ const row = saved.get(outboxId);
2629
+ if (!entry || !row)
2630
+ break;
2631
+ // Its body already carries any urgent line; its admission says how the guard admits it.
2632
+ const result = await this.send(entry.destinationSession, entry.body, { committedOutboxIds: [outboxId],
2633
+ hookBridgeFallback: { nodeId, reason, admission: row.admission }, actorSession: entry.senderSession,
2634
+ ...(entry.auditPointer ? { auditPointer: entry.auditPointer } : {}) });
2635
+ if (result.reason === "hook_bridge_claimed")
2636
+ break;
2637
+ // A drain that began since the selection holds it: untouched, and what's behind it may still go.
2638
+ if (result.reason === "delivery_drain_held")
2639
+ continue;
2640
+ // Its wake no longer applies: ended not delivered at the handback.
2641
+ if (result.reason === "draft_wake_superseded" && result.sent === false) {
2642
+ typed.push({ outboxId, result });
2643
+ continue;
2644
+ }
2645
+ if (result.reason === "guard_target_changed" && result.sent === false) {
2646
+ bridge.abandon(nodeId, entry.destinationSession, outboxId, "it was queued for an earlier occupant of the seat, which is gone");
2647
+ typed.push({ outboxId, result });
2648
+ continue;
2649
+ }
2650
+ if (result.outcome !== "retained") {
2651
+ outbox.finalizeDelivery(outboxId, result.ok && result.outcome !== "rendered-unconfirmed" ? "delivered"
2652
+ : result.ok || result.inputPhase === "attempted" || result.inputPhase === "written" ? "indeterminate" : "failed");
2653
+ }
2654
+ // Its sender's record (a queue wake's nudge result) reads how it actually ended.
2655
+ bridge.typedEnd(outboxId, result);
2656
+ typed.push({ outboxId, result });
2657
+ }
2658
+ }
2659
+ return typed;
2660
+ }
2661
+ /** A hook-bridge fallback takes its row back from the bridge under the seat's lease, just before typing it. Null when
2662
+ * it may type; otherwise why it doesn't: the row was queued for an occupant who's gone (it isn't typed into the new
2663
+ * one), or the bridge's waiter took it first. */
2664
+ takeFromHookBridge(sessionName, ids, opts) {
2665
+ const fallback = opts?.hookBridgeFallback;
2666
+ if (!fallback)
2667
+ return null;
2668
+ const outboxId = ids[0];
2669
+ const entry = new OutboxHandler(this.db).getById(outboxId);
2670
+ const target = this.tmuxAdapter.deliveryGuard.target(sessionName);
2671
+ if (entry?.guardBinding && JSON.stringify(entry.guardBinding) !== JSON.stringify(target)) {
2672
+ return { ok: false, sessionName, sent: false, inputPhase: "not_reached", reason: "guard_target_changed", error: "This message was queued for another occupant of the seat; no input written." };
2673
+ }
2674
+ const refused = this.hookBridge?.handbackRefusal(fallback.nodeId, outboxId);
2675
+ if (refused === "drained") {
2676
+ return { ok: false, sessionName, sent: false, inputPhase: "not_reached", reason: "delivery_drain_held", error: "The seat's rig is in a delivery drain; this message stays queued until it ends." };
2677
+ }
2678
+ if (refused === "superseded") {
2679
+ return { ok: false, sessionName, sent: false, inputPhase: "not_reached", reason: "draft_wake_superseded", error: "The queue wake is no longer applicable; it ended not delivered, and nothing was typed." };
2680
+ }
2681
+ if (!this.hookBridge?.releaseForTyping(fallback.nodeId, sessionName, outboxId, fallback.reason)) {
2682
+ return { ok: false, sessionName, sent: false, inputPhase: "not_reached", reason: "hook_bridge_claimed", error: "The seat's hook bridge took this message first; nothing typed." };
2683
+ }
2684
+ return null;
2685
+ }
2552
2686
  sendNativeWake(sessionName, question, requestId, actorSession) {
2553
2687
  return this.send(sessionName, question, { nativeWake: true, deliveryId: requestId, actorSession });
2554
2688
  }
@@ -2582,7 +2716,8 @@ export class SessionTransport {
2582
2716
  // control keeps its existing guarded editor path; ordinary OpenRig notices still select native.
2583
2717
  const typedControl = opts?.dangerouslyInteract === true || opts?.submitOnly === true || opts?.typedExactly === true
2584
2718
  || opts?.openrigNotice === true && /^\/openrig-compact ([\w-]+)$/.test(text) && this.getSessionMeta(sessionName).runtime === "pi";
2585
- const inputRoute = (nodeId) => typedControl ? "typed" : this.inputRoute(nodeId);
2719
+ // A bridge handback continues its original typed attempt; a changed preference selects new messages only.
2720
+ const inputRoute = (nodeId) => typedControl || opts?.hookBridgeFallback ? "typed" : this.inputRoute(nodeId);
2586
2721
  const history = new OutboxHandler(this.db);
2587
2722
  const inputId = opts?.committedOutboxIds?.[0] ?? opts?.deliveryId;
2588
2723
  const primaryId = inputId ? history.runnerPrimary(inputId) : null;
@@ -2620,7 +2755,9 @@ export class SessionTransport {
2620
2755
  return { ok: false, sessionName, sent: false, reason: "native_route_required", error: "A live native wake requires this seat's native input route." };
2621
2756
  if (!guard && this.getSessionMeta(sessionName).nodeId && inputRoute(this.getSessionMeta(sessionName).nodeId) === "native")
2622
2757
  return { ok: false, sessionName, sent: false, reason: "guard_unavailable", error: "Native admission requires the delivery guard." };
2623
- const admission = { source: opts?.openrigNotice ? "openrig" : "agent", urgent: !!opts?.urgent, override: opts?.dangerouslyInteract === true };
2758
+ const saved = opts?.hookBridgeFallback?.admission;
2759
+ const admission = saved ? { source: saved.source, urgent: saved.urgent, override: false }
2760
+ : { source: opts?.openrigNotice ? "openrig" : "agent", urgent: !!opts?.urgent, override: opts?.dangerouslyInteract === true };
2624
2761
  if (!guard) {
2625
2762
  try {
2626
2763
  const nodeId = this.getSessionMeta(sessionName).nodeId;
@@ -2695,7 +2832,11 @@ export class SessionTransport {
2695
2832
  sendOpts = { ...opts, preWaitedIdle: pre.evidence, preWaitBound: pre.bound };
2696
2833
  }
2697
2834
  }
2835
+ let bridgeWarning;
2698
2836
  const result = await guard.operation(sessionName, async () => {
2837
+ const taken = this.takeFromHookBridge(sessionName, ids, opts);
2838
+ if (taken)
2839
+ return taken;
2699
2840
  const members = recheck(false);
2700
2841
  const memberText = members?.text ?? text;
2701
2842
  const memberOpts = members ? { ...sendOpts, committedOutboxIds: members.outboxIds } : sendOpts;
@@ -2713,6 +2854,61 @@ export class SessionTransport {
2713
2854
  return callerCancelled(sessionName);
2714
2855
  return this.admitNative(sessionName, memberText, memberOpts, currentIds);
2715
2856
  }
2857
+ // Slice 13: an occupant launched with its hook bridge gets the message at its next turn boundary, nothing typed.
2858
+ // Admission (hold, the levels) has already decided above. With no live arm, it's typed, with a warning; messages
2859
+ // already queued go first, so a send never overtakes them.
2860
+ const bridge = this.hookBridge;
2861
+ // Only a plain message is bridged (see bridgeable): everything else is typed, where its checks run.
2862
+ if (bridge && bridgeable(memberText, memberOpts)) {
2863
+ const target = guard.target(sessionName);
2864
+ const routed = bridge.routes(target);
2865
+ // Messages already queued that a typed send would take now go first: a new one goes behind them even when
2866
+ // the bridge no longer routes (an opt-out after they were queued).
2867
+ const ahead = bridge.queuedForTyping(target.nodeId).length > 0;
2868
+ if (routed || ahead) {
2869
+ // As the typed path checks before typing: a caller gone while it waited for the lease, and an automatic
2870
+ // wake its queue row no longer wants (an explicit notice isn't subject to it), queue nothing.
2871
+ if (callerSignal(memberOpts)?.aborted)
2872
+ return callerCancelled(sessionName);
2873
+ const bridgeIds = memberOpts?.committedOutboxIds ?? ids;
2874
+ if (memberOpts?.queueWake && !memberOpts.drainExempt && this.queueWakeApplicable) {
2875
+ const outbox = new OutboxHandler(this.db);
2876
+ const facts = memberOpts.committedOutboxIds ? bridgeIds.map((id) => outbox.getById(id)).filter((e) => !!e)
2877
+ : [{ outboxId: bridgeIds[0], auditPointer: memberOpts.auditPointer ?? null, destinationSession: sessionName }];
2878
+ let applicable = true;
2879
+ try {
2880
+ applicable = this.queueWakeApplicable(facts);
2881
+ }
2882
+ catch (error) {
2883
+ console.error(`[hook-bridge] ${sessionName}'s queue wake couldn't be read; delivering:`, error);
2884
+ }
2885
+ if (!applicable)
2886
+ return { ok: true, sessionName, outcome: "retained", sent: false, verified: false, inputPhase: "not_reached",
2887
+ reason: "draft_wake_superseded", error: "The queue wake is no longer applicable; nothing was queued or typed.",
2888
+ warning: "Held, not delivered. Retry the current request when the input is free; no saved callback or message is replayed automatically." };
2889
+ }
2890
+ const queueOpts = { ...(memberOpts ?? {}), admission };
2891
+ // A deposit that queued nothing (an id already settled) isn't reported queued: the send goes on as it would
2892
+ // without the bridge.
2893
+ if (routed && bridge.live(target.nodeId)) {
2894
+ const queued = bridge.deposit(target, sessionName, memberText, queueOpts, bridgeIds);
2895
+ if (queued)
2896
+ return queued;
2897
+ }
2898
+ else {
2899
+ const reason = routed ? bridge.unavailable(target.nodeId) : "the seat no longer routes through it";
2900
+ const queued = ahead ? bridge.deposit(target, sessionName, memberText, queueOpts, bridgeIds) : null;
2901
+ if (queued) {
2902
+ setImmediate(() => { void this.sweepHookBridge({ nodeId: target.nodeId }).catch(() => { }); });
2903
+ return { ...queued, warning: `${sessionName}'s hook bridge isn't available (${reason}): this message is typed after the ones already queued for it.` };
2904
+ }
2905
+ if (routed) {
2906
+ bridgeWarning = `${sessionName}'s hook bridge isn't available (${reason}): delivered by typing instead.`;
2907
+ memberOpts?.onHookBridgeUnavailable?.(reason);
2908
+ }
2909
+ }
2910
+ }
2911
+ }
2716
2912
  if (this.guardedDelivery && !memberOpts?.submitOnly && !memberOpts?.dangerouslyInteract && guard.needsInputCheck(sessionName)) {
2717
2913
  if (callerSignal(memberOpts)?.aborted)
2718
2914
  return callerCancelled(sessionName);
@@ -2725,6 +2921,9 @@ export class SessionTransport {
2725
2921
  // Nothing is retained yet: a caller that went away while this send waited for the lease ends it here.
2726
2922
  if (callerSignal(opts)?.aborted)
2727
2923
  return callerCancelled(sessionName);
2924
+ const taken = this.takeFromHookBridge(sessionName, ids, opts);
2925
+ if (taken)
2926
+ return taken;
2728
2927
  const members = recheck(true);
2729
2928
  if (members)
2730
2929
  ids = members.outboxIds;
@@ -2762,6 +2961,8 @@ export class SessionTransport {
2762
2961
  }
2763
2962
  return retainedResult();
2764
2963
  }, admission);
2964
+ if (bridgeWarning)
2965
+ result.warning = [bridgeWarning, result.warning].filter(Boolean).join(" ");
2765
2966
  if (result.ok && result.sent !== false) {
2766
2967
  await this.reconcileStartupReadiness(sessionName).catch(() => { });
2767
2968
  }