@openrig/cli 0.7.10 → 0.7.12

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 (1131) hide show
  1. package/README.md +9 -6
  2. package/daemon/assets/claude-permission-policies.cjs +41 -0
  3. package/daemon/assets/claude-permission-policies.d.cts +3 -0
  4. package/daemon/assets/claude-team-permissions.cjs +13 -3
  5. package/daemon/assets/guidance/openrig-context-entry.md +8 -0
  6. package/daemon/assets/herdr-app/mods/rig-cell-header/main.js +15 -0
  7. package/daemon/assets/herdr-app/mods/rig-cell-header/mod.json +1 -0
  8. package/daemon/assets/herdr-app/mods/rig-ended/main.js +14 -0
  9. package/daemon/assets/herdr-app/mods/rig-ended/mod.json +1 -0
  10. package/daemon/assets/herdr-app/mods/rig-pad/main.js +10 -0
  11. package/daemon/assets/herdr-app/mods/rig-pad/mod.json +1 -0
  12. package/daemon/assets/herdr-app/mods/rig-strip/main.js +153 -0
  13. package/daemon/assets/herdr-app/mods/rig-strip/mod.json +1 -0
  14. package/daemon/assets/openshell/README.md +1 -1
  15. package/daemon/assets/pi-account-lock.cjs +39 -0
  16. package/daemon/assets/plugins/openrig/.claude-plugin/marketplace.json +15 -0
  17. package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +32 -0
  18. package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +39 -0
  19. package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +6 -0
  20. package/daemon/assets/plugins/openrig/LICENSE +200 -0
  21. package/daemon/assets/plugins/openrig/README.md +106 -0
  22. package/daemon/assets/plugins/openrig/assets/logo.svg +1 -0
  23. package/daemon/assets/plugins/openrig/mcp.json +10 -0
  24. package/daemon/assets/plugins/openrig/plugin.json +14 -0
  25. package/daemon/assets/plugins/openrig/skills/working-with-an-openrig-team/SKILL.md +90 -0
  26. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  27. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  28. package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +35 -0
  29. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus-state.cjs +103 -0
  30. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +177 -86
  31. package/daemon/assets/plugins/openrig-core/skills/agent-operated-software/SKILL.md +5 -1
  32. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +3 -2
  33. package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +1 -0
  34. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +25 -9
  35. package/daemon/assets/plugins/openrig-core/skills/refocusing/SKILL.md +5 -0
  36. package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +26 -4
  37. package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +1 -1
  38. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +10 -6
  39. package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +1 -1
  40. package/daemon/assets/skills/rigs/SKILL.md +37 -2
  41. package/daemon/context-packs/help/help.md +18 -0
  42. package/daemon/context-packs/help/manifest.yaml +1 -1
  43. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  44. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +104 -14
  45. package/daemon/context-packs/reference/acp-agents.md +68 -0
  46. package/daemon/context-packs/reference/getting-started.md +19 -3
  47. package/daemon/context-packs/reference/manifest.yaml +4 -1
  48. package/daemon/context-packs/reference/rig-spec.md +71 -8
  49. package/daemon/context-packs/reference/tmux-servers.md +214 -0
  50. package/daemon/context-packs/reference/whats-new.md +402 -132
  51. package/daemon/context-packs/skills/agent-operated-software/SKILL.md +5 -1
  52. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  54. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +3 -2
  56. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  59. package/daemon/context-packs/skills/core/cross-host-rig-commands/SKILL.md +7 -0
  60. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/core/openrig-herdr/SKILL.md +1 -0
  66. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +1 -0
  68. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  74. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  76. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  77. package/daemon/context-packs/skills/core/working-with-an-openrig-team/SKILL.md +90 -0
  78. package/daemon/context-packs/skills/core/working-with-an-openrig-team/manifest.yaml +10 -0
  79. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  80. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  81. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  82. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  83. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  84. package/daemon/context-packs/skills/openrig-user/SKILL.md +25 -9
  85. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  86. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  87. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  88. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  89. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  90. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  91. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  92. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  93. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  94. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  95. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  96. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  97. package/daemon/context-packs/skills/pods/review-team/SKILL.md +2 -0
  98. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  99. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  100. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  101. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  102. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  103. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  104. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  105. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  106. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  107. package/daemon/context-packs/skills/refocusing/SKILL.md +5 -0
  108. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  109. package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +26 -4
  110. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/SKILL.md +1 -1
  111. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  112. package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +10 -6
  113. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  114. package/daemon/context-packs/skills/session-compaction-and-restore/SKILL.md +1 -1
  115. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  116. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  117. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  118. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  119. package/daemon/dist/adapters/claude-code-adapter.d.ts +3 -1
  120. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  121. package/daemon/dist/adapters/claude-code-adapter.js +59 -15
  122. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  123. package/daemon/dist/adapters/claude-resume.d.ts +2 -1
  124. package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
  125. package/daemon/dist/adapters/claude-resume.js +28 -6
  126. package/daemon/dist/adapters/claude-resume.js.map +1 -1
  127. package/daemon/dist/adapters/codex-resume.d.ts +1 -1
  128. package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
  129. package/daemon/dist/adapters/codex-resume.js +6 -2
  130. package/daemon/dist/adapters/codex-resume.js.map +1 -1
  131. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +2 -0
  132. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  133. package/daemon/dist/adapters/codex-runtime-adapter.js +54 -13
  134. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  135. package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +10 -6
  136. package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
  137. package/daemon/dist/adapters/community-harness-runtime-adapter.js +78 -24
  138. package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
  139. package/daemon/dist/adapters/kernel-authority.d.ts +2 -4
  140. package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
  141. package/daemon/dist/adapters/kernel-authority.js +10 -41
  142. package/daemon/dist/adapters/kernel-authority.js.map +1 -1
  143. package/daemon/dist/adapters/openshell-podman-observer.d.ts.map +1 -1
  144. package/daemon/dist/adapters/openshell-podman-observer.js +5 -3
  145. package/daemon/dist/adapters/openshell-podman-observer.js.map +1 -1
  146. package/daemon/dist/adapters/pi-community-runtime-adapter.d.ts +27 -0
  147. package/daemon/dist/adapters/pi-community-runtime-adapter.d.ts.map +1 -0
  148. package/daemon/dist/adapters/pi-community-runtime-adapter.js +38 -0
  149. package/daemon/dist/adapters/pi-community-runtime-adapter.js.map +1 -0
  150. package/daemon/dist/adapters/pi-resume.d.ts +4 -1
  151. package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
  152. package/daemon/dist/adapters/pi-resume.js +38 -9
  153. package/daemon/dist/adapters/pi-resume.js.map +1 -1
  154. package/daemon/dist/adapters/pi-runner-protocol.d.ts +9 -3
  155. package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
  156. package/daemon/dist/adapters/pi-runner-protocol.js +13 -1
  157. package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
  158. package/daemon/dist/adapters/pi-runner.d.ts +14 -4
  159. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
  160. package/daemon/dist/adapters/pi-runner.js +174 -29
  161. package/daemon/dist/adapters/pi-runner.js.map +1 -1
  162. package/daemon/dist/adapters/pi-runtime-adapter.d.ts +37 -14
  163. package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
  164. package/daemon/dist/adapters/pi-runtime-adapter.js +97 -31
  165. package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
  166. package/daemon/dist/adapters/tmux-control.d.ts +32 -1
  167. package/daemon/dist/adapters/tmux-control.d.ts.map +1 -1
  168. package/daemon/dist/adapters/tmux-control.js +149 -9
  169. package/daemon/dist/adapters/tmux-control.js.map +1 -1
  170. package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
  171. package/daemon/dist/adapters/tmux-exec.js +13 -4
  172. package/daemon/dist/adapters/tmux-exec.js.map +1 -1
  173. package/daemon/dist/adapters/tmux-server.d.ts +11 -0
  174. package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
  175. package/daemon/dist/adapters/tmux-server.js +13 -1
  176. package/daemon/dist/adapters/tmux-server.js.map +1 -1
  177. package/daemon/dist/adapters/tmux.d.ts +32 -1
  178. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  179. package/daemon/dist/adapters/tmux.js +241 -27
  180. package/daemon/dist/adapters/tmux.js.map +1 -1
  181. package/daemon/dist/attention-surface.d.ts +7 -0
  182. package/daemon/dist/attention-surface.d.ts.map +1 -1
  183. package/daemon/dist/attention-surface.js.map +1 -1
  184. package/daemon/dist/build-info.js +3 -3
  185. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  186. package/daemon/dist/db/all-migrations.js +20 -0
  187. package/daemon/dist/db/all-migrations.js.map +1 -1
  188. package/daemon/dist/db/migrations/150_node_launch_wrapper.d.ts +3 -0
  189. package/daemon/dist/db/migrations/150_node_launch_wrapper.d.ts.map +1 -0
  190. package/daemon/dist/db/migrations/150_node_launch_wrapper.js +5 -0
  191. package/daemon/dist/db/migrations/150_node_launch_wrapper.js.map +1 -0
  192. package/daemon/dist/db/migrations/151_pi_account_switches.d.ts +4 -0
  193. package/daemon/dist/db/migrations/151_pi_account_switches.d.ts.map +1 -0
  194. package/daemon/dist/db/migrations/151_pi_account_switches.js +44 -0
  195. package/daemon/dist/db/migrations/151_pi_account_switches.js.map +1 -0
  196. package/daemon/dist/db/migrations/152_workflow_instance_spec.d.ts +8 -0
  197. package/daemon/dist/db/migrations/152_workflow_instance_spec.d.ts.map +1 -0
  198. package/daemon/dist/db/migrations/152_workflow_instance_spec.js +13 -0
  199. package/daemon/dist/db/migrations/152_workflow_instance_spec.js.map +1 -0
  200. package/daemon/dist/db/migrations/153_events_retention_marks.d.ts +7 -0
  201. package/daemon/dist/db/migrations/153_events_retention_marks.d.ts.map +1 -0
  202. package/daemon/dist/db/migrations/153_events_retention_marks.js +17 -0
  203. package/daemon/dist/db/migrations/153_events_retention_marks.js.map +1 -0
  204. package/daemon/dist/db/migrations/154_workflow_instance_root_objective.d.ts +7 -0
  205. package/daemon/dist/db/migrations/154_workflow_instance_root_objective.d.ts.map +1 -0
  206. package/daemon/dist/db/migrations/154_workflow_instance_root_objective.js +11 -0
  207. package/daemon/dist/db/migrations/154_workflow_instance_root_objective.js.map +1 -0
  208. package/daemon/dist/db/migrations/155_queue_erasure.d.ts +12 -0
  209. package/daemon/dist/db/migrations/155_queue_erasure.d.ts.map +1 -0
  210. package/daemon/dist/db/migrations/155_queue_erasure.js +28 -0
  211. package/daemon/dist/db/migrations/155_queue_erasure.js.map +1 -0
  212. package/daemon/dist/db/migrations/156_queue_erasure_link_indexes.d.ts +4 -0
  213. package/daemon/dist/db/migrations/156_queue_erasure_link_indexes.d.ts.map +1 -0
  214. package/daemon/dist/db/migrations/156_queue_erasure_link_indexes.js +14 -0
  215. package/daemon/dist/db/migrations/156_queue_erasure_link_indexes.js.map +1 -0
  216. package/daemon/dist/db/migrations/157_queue_erasure_batches.d.ts +9 -0
  217. package/daemon/dist/db/migrations/157_queue_erasure_batches.d.ts.map +1 -0
  218. package/daemon/dist/db/migrations/157_queue_erasure_batches.js +18 -0
  219. package/daemon/dist/db/migrations/157_queue_erasure_batches.js.map +1 -0
  220. package/daemon/dist/db/migrations/158_queue_inbox_checkins.d.ts +8 -0
  221. package/daemon/dist/db/migrations/158_queue_inbox_checkins.d.ts.map +1 -0
  222. package/daemon/dist/db/migrations/158_queue_inbox_checkins.js +15 -0
  223. package/daemon/dist/db/migrations/158_queue_inbox_checkins.js.map +1 -0
  224. package/daemon/dist/db/migrations/159_queue_items_handed_off_from_index.d.ts +5 -0
  225. package/daemon/dist/db/migrations/159_queue_items_handed_off_from_index.d.ts.map +1 -0
  226. package/daemon/dist/db/migrations/159_queue_items_handed_off_from_index.js +9 -0
  227. package/daemon/dist/db/migrations/159_queue_items_handed_off_from_index.js.map +1 -0
  228. package/daemon/dist/domain/activity-taxonomy.d.ts +9 -0
  229. package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
  230. package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
  231. package/daemon/dist/domain/agent-activity-store.d.ts +4 -2
  232. package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
  233. package/daemon/dist/domain/agent-activity-store.js +11 -7
  234. package/daemon/dist/domain/agent-activity-store.js.map +1 -1
  235. package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
  236. package/daemon/dist/domain/agent-manifest.js +11 -1
  237. package/daemon/dist/domain/agent-manifest.js.map +1 -1
  238. package/daemon/dist/domain/builtin-startup-files.d.ts +8 -0
  239. package/daemon/dist/domain/builtin-startup-files.d.ts.map +1 -1
  240. package/daemon/dist/domain/builtin-startup-files.js +37 -11
  241. package/daemon/dist/domain/builtin-startup-files.js.map +1 -1
  242. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +73 -20
  243. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  244. package/daemon/dist/domain/claude-compaction-enforcer.js +442 -84
  245. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  246. package/daemon/dist/domain/claude-continuation-launch.d.ts +16 -0
  247. package/daemon/dist/domain/claude-continuation-launch.d.ts.map +1 -0
  248. package/daemon/dist/domain/claude-continuation-launch.js +110 -0
  249. package/daemon/dist/domain/claude-continuation-launch.js.map +1 -0
  250. package/daemon/dist/domain/claude-git-trust-root.d.ts +11 -0
  251. package/daemon/dist/domain/claude-git-trust-root.d.ts.map +1 -0
  252. package/daemon/dist/domain/claude-git-trust-root.js +72 -0
  253. package/daemon/dist/domain/claude-git-trust-root.js.map +1 -0
  254. package/daemon/dist/domain/claude-managed-launch.d.ts +3 -0
  255. package/daemon/dist/domain/claude-managed-launch.d.ts.map +1 -1
  256. package/daemon/dist/domain/claude-managed-launch.js +17 -7
  257. package/daemon/dist/domain/claude-managed-launch.js.map +1 -1
  258. package/daemon/dist/domain/community-harness-presets.d.ts +5 -0
  259. package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
  260. package/daemon/dist/domain/community-harness-presets.js +33 -6
  261. package/daemon/dist/domain/community-harness-presets.js.map +1 -1
  262. package/daemon/dist/domain/compaction-restore-notice.d.ts +3 -1
  263. package/daemon/dist/domain/compaction-restore-notice.d.ts.map +1 -1
  264. package/daemon/dist/domain/compaction-restore-notice.js +37 -6
  265. package/daemon/dist/domain/compaction-restore-notice.js.map +1 -1
  266. package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
  267. package/daemon/dist/domain/context-monitor.js +3 -0
  268. package/daemon/dist/domain/context-monitor.js.map +1 -1
  269. package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
  270. package/daemon/dist/domain/context-usage-store.js +10 -1
  271. package/daemon/dist/domain/context-usage-store.js.map +1 -1
  272. package/daemon/dist/domain/current-work.d.ts +52 -0
  273. package/daemon/dist/domain/current-work.d.ts.map +1 -1
  274. package/daemon/dist/domain/current-work.js +215 -0
  275. package/daemon/dist/domain/current-work.js.map +1 -1
  276. package/daemon/dist/domain/default-receiver.d.ts +40 -0
  277. package/daemon/dist/domain/default-receiver.d.ts.map +1 -0
  278. package/daemon/dist/domain/default-receiver.js +70 -0
  279. package/daemon/dist/domain/default-receiver.js.map +1 -0
  280. package/daemon/dist/domain/desired-claude-activity-hooks.d.ts +4 -3
  281. package/daemon/dist/domain/desired-claude-activity-hooks.d.ts.map +1 -1
  282. package/daemon/dist/domain/desired-claude-activity-hooks.js +49 -15
  283. package/daemon/dist/domain/desired-claude-activity-hooks.js.map +1 -1
  284. package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
  285. package/daemon/dist/domain/draft-aware-delivery.js +6 -2
  286. package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
  287. package/daemon/dist/domain/escalation-owner.d.ts.map +1 -1
  288. package/daemon/dist/domain/escalation-owner.js +8 -3
  289. package/daemon/dist/domain/escalation-owner.js.map +1 -1
  290. package/daemon/dist/domain/event-bus.d.ts +47 -8
  291. package/daemon/dist/domain/event-bus.d.ts.map +1 -1
  292. package/daemon/dist/domain/event-bus.js +137 -17
  293. package/daemon/dist/domain/event-bus.js.map +1 -1
  294. package/daemon/dist/domain/execution-view.d.ts +9 -0
  295. package/daemon/dist/domain/execution-view.d.ts.map +1 -1
  296. package/daemon/dist/domain/execution-view.js +41 -3
  297. package/daemon/dist/domain/execution-view.js.map +1 -1
  298. package/daemon/dist/domain/gateway/connections-projection.d.ts +13 -1
  299. package/daemon/dist/domain/gateway/connections-projection.d.ts.map +1 -1
  300. package/daemon/dist/domain/gateway/connections-projection.js +38 -10
  301. package/daemon/dist/domain/gateway/connections-projection.js.map +1 -1
  302. package/daemon/dist/domain/gateway/dispatcher.d.ts +2 -0
  303. package/daemon/dist/domain/gateway/dispatcher.d.ts.map +1 -1
  304. package/daemon/dist/domain/gateway/dispatcher.js +14 -1
  305. package/daemon/dist/domain/gateway/dispatcher.js.map +1 -1
  306. package/daemon/dist/domain/gateway/gateway-subsystem.d.ts +5 -0
  307. package/daemon/dist/domain/gateway/gateway-subsystem.d.ts.map +1 -1
  308. package/daemon/dist/domain/gateway/gateway-subsystem.js +10 -0
  309. package/daemon/dist/domain/gateway/gateway-subsystem.js.map +1 -1
  310. package/daemon/dist/domain/gateway/human-quiet-windows.d.ts +2 -1
  311. package/daemon/dist/domain/gateway/human-quiet-windows.d.ts.map +1 -1
  312. package/daemon/dist/domain/gateway/human-quiet-windows.js +2 -1
  313. package/daemon/dist/domain/gateway/human-quiet-windows.js.map +1 -1
  314. package/daemon/dist/domain/gateway/human-readiness.d.ts +7 -0
  315. package/daemon/dist/domain/gateway/human-readiness.d.ts.map +1 -1
  316. package/daemon/dist/domain/gateway/human-readiness.js +45 -0
  317. package/daemon/dist/domain/gateway/human-readiness.js.map +1 -1
  318. package/daemon/dist/domain/gateway/human-registry.d.ts +35 -4
  319. package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
  320. package/daemon/dist/domain/gateway/human-registry.js +130 -42
  321. package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
  322. package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
  323. package/daemon/dist/domain/gateway/operator-delivery-engine.js +8 -2
  324. package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
  325. package/daemon/dist/domain/gateway/relay-config.d.ts +83 -0
  326. package/daemon/dist/domain/gateway/relay-config.d.ts.map +1 -0
  327. package/daemon/dist/domain/gateway/relay-config.js +321 -0
  328. package/daemon/dist/domain/gateway/relay-config.js.map +1 -0
  329. package/daemon/dist/domain/gateway/relay-inbound.d.ts +85 -0
  330. package/daemon/dist/domain/gateway/relay-inbound.d.ts.map +1 -0
  331. package/daemon/dist/domain/gateway/relay-inbound.js +981 -0
  332. package/daemon/dist/domain/gateway/relay-inbound.js.map +1 -0
  333. package/daemon/dist/domain/gateway/relay-outbound.d.ts +218 -0
  334. package/daemon/dist/domain/gateway/relay-outbound.d.ts.map +1 -0
  335. package/daemon/dist/domain/gateway/relay-outbound.js +801 -0
  336. package/daemon/dist/domain/gateway/relay-outbound.js.map +1 -0
  337. package/daemon/dist/domain/gateway/slack/config.d.ts +21 -0
  338. package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
  339. package/daemon/dist/domain/gateway/slack/config.js +30 -3
  340. package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
  341. package/daemon/dist/domain/gateway/slack/message.d.ts +4 -0
  342. package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
  343. package/daemon/dist/domain/gateway/slack/message.js +7 -2
  344. package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
  345. package/daemon/dist/domain/gateway/slack/open-asks.d.ts +13 -1
  346. package/daemon/dist/domain/gateway/slack/open-asks.d.ts.map +1 -1
  347. package/daemon/dist/domain/gateway/slack/open-asks.js +72 -8
  348. package/daemon/dist/domain/gateway/slack/open-asks.js.map +1 -1
  349. package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts +9 -0
  350. package/daemon/dist/domain/gateway/slack/outbound-driver.d.ts.map +1 -1
  351. package/daemon/dist/domain/gateway/slack/outbound-driver.js.map +1 -1
  352. package/daemon/dist/domain/gateway/slack/settled-asks.d.ts.map +1 -1
  353. package/daemon/dist/domain/gateway/slack/settled-asks.js +19 -1
  354. package/daemon/dist/domain/gateway/slack/settled-asks.js.map +1 -1
  355. package/daemon/dist/domain/gateway/slack/slack-api.d.ts +3 -0
  356. package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
  357. package/daemon/dist/domain/gateway/slack/slack-api.js +12 -4
  358. package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
  359. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +2 -0
  360. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
  361. package/daemon/dist/domain/gateway/slack/slack-delivery.js +38 -12
  362. package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
  363. package/daemon/dist/domain/gateway/slack/slack-recovery.d.ts +12 -1
  364. package/daemon/dist/domain/gateway/slack/slack-recovery.d.ts.map +1 -1
  365. package/daemon/dist/domain/gateway/slack/slack-recovery.js +68 -10
  366. package/daemon/dist/domain/gateway/slack/slack-recovery.js.map +1 -1
  367. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
  368. package/daemon/dist/domain/gateway/slack/slack-subsystem.js +363 -67
  369. package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
  370. package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts +1 -0
  371. package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts.map +1 -1
  372. package/daemon/dist/domain/gateway/slack/socket-inbound.js +5 -0
  373. package/daemon/dist/domain/gateway/slack/socket-inbound.js.map +1 -1
  374. package/daemon/dist/domain/gateway/slack/state-store.d.ts +4 -0
  375. package/daemon/dist/domain/gateway/slack/state-store.d.ts.map +1 -1
  376. package/daemon/dist/domain/gateway/slack/state-store.js +4 -1
  377. package/daemon/dist/domain/gateway/slack/state-store.js.map +1 -1
  378. package/daemon/dist/domain/gateway/slack/thread-recovery.d.ts +23 -3
  379. package/daemon/dist/domain/gateway/slack/thread-recovery.d.ts.map +1 -1
  380. package/daemon/dist/domain/gateway/slack/thread-recovery.js +52 -10
  381. package/daemon/dist/domain/gateway/slack/thread-recovery.js.map +1 -1
  382. package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts +4 -1
  383. package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts.map +1 -1
  384. package/daemon/dist/domain/gateway/slack/thread-seat-map.js +7 -4
  385. package/daemon/dist/domain/gateway/slack/thread-seat-map.js.map +1 -1
  386. package/daemon/dist/domain/guidance-projection.d.ts +39 -0
  387. package/daemon/dist/domain/guidance-projection.d.ts.map +1 -0
  388. package/daemon/dist/domain/guidance-projection.js +91 -0
  389. package/daemon/dist/domain/guidance-projection.js.map +1 -0
  390. package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
  391. package/daemon/dist/domain/health-passive-ceremony.js +31 -12
  392. package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
  393. package/daemon/dist/domain/hosted-wake.d.ts +5 -1
  394. package/daemon/dist/domain/hosted-wake.d.ts.map +1 -1
  395. package/daemon/dist/domain/hosted-wake.js +13 -3
  396. package/daemon/dist/domain/hosted-wake.js.map +1 -1
  397. package/daemon/dist/domain/hosts/pairing-ask.d.ts +10 -0
  398. package/daemon/dist/domain/hosts/pairing-ask.d.ts.map +1 -0
  399. package/daemon/dist/domain/hosts/pairing-ask.js +9 -0
  400. package/daemon/dist/domain/hosts/pairing-ask.js.map +1 -0
  401. package/daemon/dist/domain/launch-wrapper.d.ts +29 -0
  402. package/daemon/dist/domain/launch-wrapper.d.ts.map +1 -0
  403. package/daemon/dist/domain/launch-wrapper.js +97 -0
  404. package/daemon/dist/domain/launch-wrapper.js.map +1 -0
  405. package/daemon/dist/domain/managed-blocks.d.ts +3 -0
  406. package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
  407. package/daemon/dist/domain/managed-blocks.js +5 -0
  408. package/daemon/dist/domain/managed-blocks.js.map +1 -1
  409. package/daemon/dist/domain/markdown-address.d.ts.map +1 -1
  410. package/daemon/dist/domain/markdown-address.js +12 -1
  411. package/daemon/dist/domain/markdown-address.js.map +1 -1
  412. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +1 -1
  413. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  414. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +116 -28
  415. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  416. package/daemon/dist/domain/model-divergence/current-model-reader.d.ts.map +1 -1
  417. package/daemon/dist/domain/model-divergence/current-model-reader.js +14 -3
  418. package/daemon/dist/domain/model-divergence/current-model-reader.js.map +1 -1
  419. package/daemon/dist/domain/native-process-arguments.d.ts +5 -0
  420. package/daemon/dist/domain/native-process-arguments.d.ts.map +1 -1
  421. package/daemon/dist/domain/native-process-arguments.js +60 -5
  422. package/daemon/dist/domain/native-process-arguments.js.map +1 -1
  423. package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
  424. package/daemon/dist/domain/native-process-lineage.js +32 -9
  425. package/daemon/dist/domain/native-process-lineage.js.map +1 -1
  426. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  427. package/daemon/dist/domain/node-inventory.js +9 -2
  428. package/daemon/dist/domain/node-inventory.js.map +1 -1
  429. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  430. package/daemon/dist/domain/node-launcher.js +9 -2
  431. package/daemon/dist/domain/node-launcher.js.map +1 -1
  432. package/daemon/dist/domain/outbox-handler.d.ts +53 -3
  433. package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
  434. package/daemon/dist/domain/outbox-handler.js +101 -6
  435. package/daemon/dist/domain/outbox-handler.js.map +1 -1
  436. package/daemon/dist/domain/package-manifest.d.ts.map +1 -1
  437. package/daemon/dist/domain/package-manifest.js +10 -5
  438. package/daemon/dist/domain/package-manifest.js.map +1 -1
  439. package/daemon/dist/domain/parent-session-env.d.ts +2 -1
  440. package/daemon/dist/domain/parent-session-env.d.ts.map +1 -1
  441. package/daemon/dist/domain/parent-session-env.js +9 -1
  442. package/daemon/dist/domain/parent-session-env.js.map +1 -1
  443. package/daemon/dist/domain/parked-query.d.ts +6 -0
  444. package/daemon/dist/domain/parked-query.d.ts.map +1 -1
  445. package/daemon/dist/domain/parked-query.js +1 -0
  446. package/daemon/dist/domain/parked-query.js.map +1 -1
  447. package/daemon/dist/domain/pi-account-state.d.ts +6 -0
  448. package/daemon/dist/domain/pi-account-state.d.ts.map +1 -0
  449. package/daemon/dist/domain/pi-account-state.js +14 -0
  450. package/daemon/dist/domain/pi-account-state.js.map +1 -0
  451. package/daemon/dist/domain/policies/delivery-digest-flush.d.ts.map +1 -1
  452. package/daemon/dist/domain/policies/delivery-digest-flush.js +9 -1
  453. package/daemon/dist/domain/policies/delivery-digest-flush.js.map +1 -1
  454. package/daemon/dist/domain/policies/mode-scheduled-end.d.ts +4 -1
  455. package/daemon/dist/domain/policies/mode-scheduled-end.d.ts.map +1 -1
  456. package/daemon/dist/domain/policies/mode-scheduled-end.js +19 -10
  457. package/daemon/dist/domain/policies/mode-scheduled-end.js.map +1 -1
  458. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +6 -0
  459. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
  460. package/daemon/dist/domain/policies/parked-owner-consumer.js +13 -3
  461. package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
  462. package/daemon/dist/domain/policies/quiet-release.d.ts +19 -6
  463. package/daemon/dist/domain/policies/quiet-release.d.ts.map +1 -1
  464. package/daemon/dist/domain/policies/quiet-release.js +50 -10
  465. package/daemon/dist/domain/policies/quiet-release.js.map +1 -1
  466. package/daemon/dist/domain/projection-planner.d.ts +4 -1
  467. package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
  468. package/daemon/dist/domain/projection-planner.js +3 -0
  469. package/daemon/dist/domain/projection-planner.js.map +1 -1
  470. package/daemon/dist/domain/proof/judgments.d.ts +11 -0
  471. package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
  472. package/daemon/dist/domain/proof/judgments.js +61 -38
  473. package/daemon/dist/domain/proof/judgments.js.map +1 -1
  474. package/daemon/dist/domain/queue-blocker.d.ts +5 -0
  475. package/daemon/dist/domain/queue-blocker.d.ts.map +1 -0
  476. package/daemon/dist/domain/queue-blocker.js +12 -0
  477. package/daemon/dist/domain/queue-blocker.js.map +1 -0
  478. package/daemon/dist/domain/queue-erasure.d.ts +173 -0
  479. package/daemon/dist/domain/queue-erasure.d.ts.map +1 -0
  480. package/daemon/dist/domain/queue-erasure.js +885 -0
  481. package/daemon/dist/domain/queue-erasure.js.map +1 -0
  482. package/daemon/dist/domain/queue-owner.d.ts +6 -0
  483. package/daemon/dist/domain/queue-owner.d.ts.map +1 -1
  484. package/daemon/dist/domain/queue-owner.js +13 -4
  485. package/daemon/dist/domain/queue-owner.js.map +1 -1
  486. package/daemon/dist/domain/queue-pickup.d.ts +20 -1
  487. package/daemon/dist/domain/queue-pickup.d.ts.map +1 -1
  488. package/daemon/dist/domain/queue-pickup.js +38 -6
  489. package/daemon/dist/domain/queue-pickup.js.map +1 -1
  490. package/daemon/dist/domain/queue-recovery.d.ts +14 -0
  491. package/daemon/dist/domain/queue-recovery.d.ts.map +1 -1
  492. package/daemon/dist/domain/queue-recovery.js +33 -1
  493. package/daemon/dist/domain/queue-recovery.js.map +1 -1
  494. package/daemon/dist/domain/queue-repository.d.ts +226 -20
  495. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  496. package/daemon/dist/domain/queue-repository.js +786 -91
  497. package/daemon/dist/domain/queue-repository.js.map +1 -1
  498. package/daemon/dist/domain/queue-retention.d.ts +82 -0
  499. package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
  500. package/daemon/dist/domain/queue-retention.js +168 -0
  501. package/daemon/dist/domain/queue-retention.js.map +1 -1
  502. package/daemon/dist/domain/queue-stuck-sweep.d.ts +38 -4
  503. package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
  504. package/daemon/dist/domain/queue-stuck-sweep.js +763 -190
  505. package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
  506. package/daemon/dist/domain/queue-transition-log.d.ts +52 -1
  507. package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
  508. package/daemon/dist/domain/queue-transition-log.js +241 -3
  509. package/daemon/dist/domain/queue-transition-log.js.map +1 -1
  510. package/daemon/dist/domain/queue-waiting.d.ts +49 -3
  511. package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
  512. package/daemon/dist/domain/queue-waiting.js +73 -13
  513. package/daemon/dist/domain/queue-waiting.js.map +1 -1
  514. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  515. package/daemon/dist/domain/queue-wake-ladder.js +86 -30
  516. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  517. package/daemon/dist/domain/quiet-hold-custody.d.ts.map +1 -1
  518. package/daemon/dist/domain/quiet-hold-custody.js +7 -3
  519. package/daemon/dist/domain/quiet-hold-custody.js.map +1 -1
  520. package/daemon/dist/domain/rebuild-priming-chain.d.ts +3 -1
  521. package/daemon/dist/domain/rebuild-priming-chain.d.ts.map +1 -1
  522. package/daemon/dist/domain/rebuild-priming-chain.js +3 -1
  523. package/daemon/dist/domain/rebuild-priming-chain.js.map +1 -1
  524. package/daemon/dist/domain/refocus-record.d.ts +17 -0
  525. package/daemon/dist/domain/refocus-record.d.ts.map +1 -0
  526. package/daemon/dist/domain/refocus-record.js +94 -0
  527. package/daemon/dist/domain/refocus-record.js.map +1 -0
  528. package/daemon/dist/domain/restore-check-service.js +1 -1
  529. package/daemon/dist/domain/restore-check-service.js.map +1 -1
  530. package/daemon/dist/domain/restore-guidance.d.ts.map +1 -1
  531. package/daemon/dist/domain/restore-guidance.js +5 -6
  532. package/daemon/dist/domain/restore-guidance.js.map +1 -1
  533. package/daemon/dist/domain/restore-orchestrator.d.ts +15 -2
  534. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  535. package/daemon/dist/domain/restore-orchestrator.js +100 -42
  536. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  537. package/daemon/dist/domain/restore-plan-preview.d.ts.map +1 -1
  538. package/daemon/dist/domain/restore-plan-preview.js +2 -1
  539. package/daemon/dist/domain/restore-plan-preview.js.map +1 -1
  540. package/daemon/dist/domain/resume-token-validation.d.ts +7 -0
  541. package/daemon/dist/domain/resume-token-validation.d.ts.map +1 -1
  542. package/daemon/dist/domain/resume-token-validation.js +13 -3
  543. package/daemon/dist/domain/resume-token-validation.js.map +1 -1
  544. package/daemon/dist/domain/rig-repository.d.ts +3 -0
  545. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  546. package/daemon/dist/domain/rig-repository.js +46 -1
  547. package/daemon/dist/domain/rig-repository.js.map +1 -1
  548. package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
  549. package/daemon/dist/domain/rig-teardown.js +2 -1
  550. package/daemon/dist/domain/rig-teardown.js.map +1 -1
  551. package/daemon/dist/domain/rigs-being-built.d.ts +5 -0
  552. package/daemon/dist/domain/rigs-being-built.d.ts.map +1 -0
  553. package/daemon/dist/domain/rigs-being-built.js +18 -0
  554. package/daemon/dist/domain/rigs-being-built.js.map +1 -0
  555. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  556. package/daemon/dist/domain/rigspec-codec.js +4 -0
  557. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  558. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  559. package/daemon/dist/domain/rigspec-exporter.js +5 -0
  560. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  561. package/daemon/dist/domain/rigspec-instantiator.d.ts +20 -1
  562. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  563. package/daemon/dist/domain/rigspec-instantiator.js +100 -22
  564. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  565. package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
  566. package/daemon/dist/domain/rigspec-preflight.js +13 -0
  567. package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
  568. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  569. package/daemon/dist/domain/rigspec-schema.js +26 -1
  570. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  571. package/daemon/dist/domain/runner-permissions.d.ts +16 -0
  572. package/daemon/dist/domain/runner-permissions.d.ts.map +1 -1
  573. package/daemon/dist/domain/runner-permissions.js +95 -14
  574. package/daemon/dist/domain/runner-permissions.js.map +1 -1
  575. package/daemon/dist/domain/runtime-adapter.d.ts +2 -0
  576. package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
  577. package/daemon/dist/domain/runtime-adapter.js.map +1 -1
  578. package/daemon/dist/domain/runtime-switch-materials.d.ts +1 -1
  579. package/daemon/dist/domain/runtime-switch-materials.d.ts.map +1 -1
  580. package/daemon/dist/domain/runtime-switch-materials.js +2 -2
  581. package/daemon/dist/domain/runtime-switch-materials.js.map +1 -1
  582. package/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -1
  583. package/daemon/dist/domain/scope/logical-checkbox.js +14 -0
  584. package/daemon/dist/domain/scope/logical-checkbox.js.map +1 -1
  585. package/daemon/dist/domain/seat-activity-service.d.ts +50 -1
  586. package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
  587. package/daemon/dist/domain/seat-activity-service.js +144 -5
  588. package/daemon/dist/domain/seat-activity-service.js.map +1 -1
  589. package/daemon/dist/domain/seat-attention-reconciler.d.ts +13 -0
  590. package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
  591. package/daemon/dist/domain/seat-attention-reconciler.js +45 -1
  592. package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
  593. package/daemon/dist/domain/seat-handover-service.d.ts +8 -0
  594. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  595. package/daemon/dist/domain/seat-handover-service.js +61 -19
  596. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  597. package/daemon/dist/domain/seat-kinds.d.ts +21 -0
  598. package/daemon/dist/domain/seat-kinds.d.ts.map +1 -0
  599. package/daemon/dist/domain/seat-kinds.js +27 -0
  600. package/daemon/dist/domain/seat-kinds.js.map +1 -0
  601. package/daemon/dist/domain/seat-launch-environment.d.ts +14 -0
  602. package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
  603. package/daemon/dist/domain/seat-launch-environment.js +64 -16
  604. package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
  605. package/daemon/dist/domain/seat-lifecycle-service.d.ts +12 -0
  606. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  607. package/daemon/dist/domain/seat-lifecycle-service.js +59 -14
  608. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  609. package/daemon/dist/domain/seat-restart-in-place.d.ts +2 -1
  610. package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
  611. package/daemon/dist/domain/seat-restart-in-place.js +19 -1
  612. package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
  613. package/daemon/dist/domain/seat-runtime-home.d.ts +4 -1
  614. package/daemon/dist/domain/seat-runtime-home.d.ts.map +1 -1
  615. package/daemon/dist/domain/seat-runtime-home.js +6 -4
  616. package/daemon/dist/domain/seat-runtime-home.js.map +1 -1
  617. package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
  618. package/daemon/dist/domain/seat-runtime-switch-service.js +87 -13
  619. package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
  620. package/daemon/dist/domain/seat-skill-apply.d.ts +2 -0
  621. package/daemon/dist/domain/seat-skill-apply.d.ts.map +1 -1
  622. package/daemon/dist/domain/seat-skill-apply.js +5 -2
  623. package/daemon/dist/domain/seat-skill-apply.js.map +1 -1
  624. package/daemon/dist/domain/seat-skill-storage.d.ts +57 -4
  625. package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -1
  626. package/daemon/dist/domain/seat-skill-storage.js +339 -9
  627. package/daemon/dist/domain/seat-skill-storage.js.map +1 -1
  628. package/daemon/dist/domain/seat-status-service.d.ts +12 -2
  629. package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
  630. package/daemon/dist/domain/seat-status-service.js +39 -4
  631. package/daemon/dist/domain/seat-status-service.js.map +1 -1
  632. package/daemon/dist/domain/seat-structural-activity-service.d.ts +8 -0
  633. package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
  634. package/daemon/dist/domain/seat-structural-activity-service.js +8 -2
  635. package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
  636. package/daemon/dist/domain/self-attach-service.d.ts.map +1 -1
  637. package/daemon/dist/domain/self-attach-service.js +11 -4
  638. package/daemon/dist/domain/self-attach-service.js.map +1 -1
  639. package/daemon/dist/domain/session-jsonl.d.ts +4 -2
  640. package/daemon/dist/domain/session-jsonl.d.ts.map +1 -1
  641. package/daemon/dist/domain/session-jsonl.js +56 -22
  642. package/daemon/dist/domain/session-jsonl.js.map +1 -1
  643. package/daemon/dist/domain/session-registry.d.ts +20 -3
  644. package/daemon/dist/domain/session-registry.d.ts.map +1 -1
  645. package/daemon/dist/domain/session-registry.js +39 -3
  646. package/daemon/dist/domain/session-registry.js.map +1 -1
  647. package/daemon/dist/domain/session-transport.d.ts +52 -5
  648. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  649. package/daemon/dist/domain/session-transport.js +434 -85
  650. package/daemon/dist/domain/session-transport.js.map +1 -1
  651. package/daemon/dist/domain/skill-catalog.d.ts +37 -0
  652. package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
  653. package/daemon/dist/domain/skill-catalog.js +152 -3
  654. package/daemon/dist/domain/skill-catalog.js.map +1 -1
  655. package/daemon/dist/domain/slices/slice-detail-projector.d.ts +1 -1
  656. package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
  657. package/daemon/dist/domain/slices/slice-detail-projector.js +11 -13
  658. package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
  659. package/daemon/dist/domain/slices/slice-indexer.d.ts +41 -0
  660. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  661. package/daemon/dist/domain/slices/slice-indexer.js +463 -22
  662. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  663. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  664. package/daemon/dist/domain/startup-orchestrator.js +12 -3
  665. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  666. package/daemon/dist/domain/startup-submission-evidence.d.ts +1 -0
  667. package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
  668. package/daemon/dist/domain/startup-submission-evidence.js +18 -4
  669. package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
  670. package/daemon/dist/domain/successor-session-launcher.d.ts +1 -0
  671. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  672. package/daemon/dist/domain/successor-session-launcher.js +1 -0
  673. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  674. package/daemon/dist/domain/terminal/earlier-tile-attach-0711.d.ts +2 -0
  675. package/daemon/dist/domain/terminal/earlier-tile-attach-0711.d.ts.map +1 -0
  676. package/daemon/dist/domain/terminal/earlier-tile-attach-0711.js +146 -0
  677. package/daemon/dist/domain/terminal/earlier-tile-attach-0711.js.map +1 -0
  678. package/daemon/dist/domain/terminal/earlier-tile-attach.d.ts +1 -0
  679. package/daemon/dist/domain/terminal/earlier-tile-attach.d.ts.map +1 -1
  680. package/daemon/dist/domain/terminal/earlier-tile-attach.js +42 -1
  681. package/daemon/dist/domain/terminal/earlier-tile-attach.js.map +1 -1
  682. package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
  683. package/daemon/dist/domain/terminal/herdr-adapter.js +3 -2
  684. package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
  685. package/daemon/dist/domain/terminal/herdr-app-install.d.ts +28 -0
  686. package/daemon/dist/domain/terminal/herdr-app-install.d.ts.map +1 -0
  687. package/daemon/dist/domain/terminal/herdr-app-install.js +170 -0
  688. package/daemon/dist/domain/terminal/herdr-app-install.js.map +1 -0
  689. package/daemon/dist/domain/terminal/herdr-app-layout.d.ts +79 -0
  690. package/daemon/dist/domain/terminal/herdr-app-layout.d.ts.map +1 -0
  691. package/daemon/dist/domain/terminal/herdr-app-layout.js +134 -0
  692. package/daemon/dist/domain/terminal/herdr-app-layout.js.map +1 -0
  693. package/daemon/dist/domain/terminal/herdr-app-provider.d.ts +123 -0
  694. package/daemon/dist/domain/terminal/herdr-app-provider.d.ts.map +1 -0
  695. package/daemon/dist/domain/terminal/herdr-app-provider.js +681 -0
  696. package/daemon/dist/domain/terminal/herdr-app-provider.js.map +1 -0
  697. package/daemon/dist/domain/terminal/herdr-app-state.d.ts +91 -0
  698. package/daemon/dist/domain/terminal/herdr-app-state.d.ts.map +1 -0
  699. package/daemon/dist/domain/terminal/herdr-app-state.js +140 -0
  700. package/daemon/dist/domain/terminal/herdr-app-state.js.map +1 -0
  701. package/daemon/dist/domain/terminal/herdr-app-transport.d.ts +68 -0
  702. package/daemon/dist/domain/terminal/herdr-app-transport.d.ts.map +1 -0
  703. package/daemon/dist/domain/terminal/herdr-app-transport.js +133 -0
  704. package/daemon/dist/domain/terminal/herdr-app-transport.js.map +1 -0
  705. package/daemon/dist/domain/terminal/herdr-follow-view.d.ts.map +1 -1
  706. package/daemon/dist/domain/terminal/herdr-follow-view.js +43 -19
  707. package/daemon/dist/domain/terminal/herdr-follow-view.js.map +1 -1
  708. package/daemon/dist/domain/terminal/herdr-viewer.d.ts +7 -4
  709. package/daemon/dist/domain/terminal/herdr-viewer.d.ts.map +1 -1
  710. package/daemon/dist/domain/terminal/herdr-viewer.js +101 -47
  711. package/daemon/dist/domain/terminal/herdr-viewer.js.map +1 -1
  712. package/daemon/dist/domain/terminal/terminal-following.js +3 -3
  713. package/daemon/dist/domain/terminal/terminal-following.js.map +1 -1
  714. package/daemon/dist/domain/terminal/terminal-provider.d.ts +18 -0
  715. package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
  716. package/daemon/dist/domain/terminal/terminal-service.d.ts +28 -3
  717. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  718. package/daemon/dist/domain/terminal/terminal-service.js +56 -8
  719. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  720. package/daemon/dist/domain/terminal/tile-attach.d.ts +6 -3
  721. package/daemon/dist/domain/terminal/tile-attach.d.ts.map +1 -1
  722. package/daemon/dist/domain/terminal/tile-attach.js +11 -46
  723. package/daemon/dist/domain/terminal/tile-attach.js.map +1 -1
  724. package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
  725. package/daemon/dist/domain/terminal/view-composer.js +1 -0
  726. package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
  727. package/daemon/dist/domain/time-bound-advisory.js +3 -3
  728. package/daemon/dist/domain/time-bound-advisory.js.map +1 -1
  729. package/daemon/dist/domain/tmux-server-selection.d.ts.map +1 -1
  730. package/daemon/dist/domain/tmux-server-selection.js +8 -2
  731. package/daemon/dist/domain/tmux-server-selection.js.map +1 -1
  732. package/daemon/dist/domain/types.d.ts +69 -1
  733. package/daemon/dist/domain/types.d.ts.map +1 -1
  734. package/daemon/dist/domain/types.js.map +1 -1
  735. package/daemon/dist/domain/user-settings/settings-browser.d.ts +2 -1
  736. package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
  737. package/daemon/dist/domain/user-settings/settings-browser.js +22 -3
  738. package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
  739. package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
  740. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  741. package/daemon/dist/domain/user-settings/settings-store.js +83 -0
  742. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  743. package/daemon/dist/domain/view-event-bridge.js +1 -1
  744. package/daemon/dist/domain/view-event-bridge.js.map +1 -1
  745. package/daemon/dist/domain/view-projector.d.ts +4 -1
  746. package/daemon/dist/domain/view-projector.d.ts.map +1 -1
  747. package/daemon/dist/domain/view-projector.js +9 -4
  748. package/daemon/dist/domain/view-projector.js.map +1 -1
  749. package/daemon/dist/domain/wake-recovery.d.ts.map +1 -1
  750. package/daemon/dist/domain/wake-recovery.js +10 -2
  751. package/daemon/dist/domain/wake-recovery.js.map +1 -1
  752. package/daemon/dist/domain/whoami-service.d.ts +6 -0
  753. package/daemon/dist/domain/whoami-service.d.ts.map +1 -1
  754. package/daemon/dist/domain/whoami-service.js +9 -1
  755. package/daemon/dist/domain/whoami-service.js.map +1 -1
  756. package/daemon/dist/domain/workflow-exception-escalation.d.ts +3 -2
  757. package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
  758. package/daemon/dist/domain/workflow-exception-escalation.js +1 -1
  759. package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
  760. package/daemon/dist/domain/workflow-instance-store.d.ts +8 -1
  761. package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
  762. package/daemon/dist/domain/workflow-instance-store.js +21 -3
  763. package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
  764. package/daemon/dist/domain/workflow-projector.js +1 -1
  765. package/daemon/dist/domain/workflow-projector.js.map +1 -1
  766. package/daemon/dist/domain/workflow-reconciliation.d.ts.map +1 -1
  767. package/daemon/dist/domain/workflow-reconciliation.js +2 -1
  768. package/daemon/dist/domain/workflow-reconciliation.js.map +1 -1
  769. package/daemon/dist/domain/workflow-runtime.d.ts +4 -1
  770. package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
  771. package/daemon/dist/domain/workflow-runtime.js +24 -11
  772. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  773. package/daemon/dist/domain/workflow-spec-cache.d.ts +38 -4
  774. package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
  775. package/daemon/dist/domain/workflow-spec-cache.js +115 -14
  776. package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
  777. package/daemon/dist/domain/workflow-spec-unregister.d.ts +36 -0
  778. package/daemon/dist/domain/workflow-spec-unregister.d.ts.map +1 -0
  779. package/daemon/dist/domain/workflow-spec-unregister.js +105 -0
  780. package/daemon/dist/domain/workflow-spec-unregister.js.map +1 -0
  781. package/daemon/dist/domain/workflow-types.d.ts +14 -0
  782. package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
  783. package/daemon/dist/index.d.ts +3 -1
  784. package/daemon/dist/index.d.ts.map +1 -1
  785. package/daemon/dist/index.js +31 -5
  786. package/daemon/dist/index.js.map +1 -1
  787. package/daemon/dist/learned-host-bindings-surface.d.ts +2 -0
  788. package/daemon/dist/learned-host-bindings-surface.d.ts.map +1 -0
  789. package/daemon/dist/learned-host-bindings-surface.js +4 -0
  790. package/daemon/dist/learned-host-bindings-surface.js.map +1 -0
  791. package/daemon/dist/lib/pane-envelope.d.ts +3 -0
  792. package/daemon/dist/lib/pane-envelope.d.ts.map +1 -1
  793. package/daemon/dist/lib/pane-envelope.js +3 -1
  794. package/daemon/dist/lib/pane-envelope.js.map +1 -1
  795. package/daemon/dist/routes/activity.d.ts.map +1 -1
  796. package/daemon/dist/routes/activity.js +147 -25
  797. package/daemon/dist/routes/activity.js.map +1 -1
  798. package/daemon/dist/routes/adapters.d.ts.map +1 -1
  799. package/daemon/dist/routes/adapters.js +4 -0
  800. package/daemon/dist/routes/adapters.js.map +1 -1
  801. package/daemon/dist/routes/attention.d.ts.map +1 -1
  802. package/daemon/dist/routes/attention.js +2 -0
  803. package/daemon/dist/routes/attention.js.map +1 -1
  804. package/daemon/dist/routes/compaction.js +2 -0
  805. package/daemon/dist/routes/compaction.js.map +1 -1
  806. package/daemon/dist/routes/config.d.ts.map +1 -1
  807. package/daemon/dist/routes/config.js +9 -1
  808. package/daemon/dist/routes/config.js.map +1 -1
  809. package/daemon/dist/routes/events.js +11 -2
  810. package/daemon/dist/routes/events.js.map +1 -1
  811. package/daemon/dist/routes/gateway.d.ts +3 -0
  812. package/daemon/dist/routes/gateway.d.ts.map +1 -1
  813. package/daemon/dist/routes/gateway.js +87 -8
  814. package/daemon/dist/routes/gateway.js.map +1 -1
  815. package/daemon/dist/routes/hosts.d.ts.map +1 -1
  816. package/daemon/dist/routes/hosts.js +400 -37
  817. package/daemon/dist/routes/hosts.js.map +1 -1
  818. package/daemon/dist/routes/provider.js +1 -1
  819. package/daemon/dist/routes/provider.js.map +1 -1
  820. package/daemon/dist/routes/queue.d.ts +19 -0
  821. package/daemon/dist/routes/queue.d.ts.map +1 -1
  822. package/daemon/dist/routes/queue.js +242 -46
  823. package/daemon/dist/routes/queue.js.map +1 -1
  824. package/daemon/dist/routes/seat.d.ts.map +1 -1
  825. package/daemon/dist/routes/seat.js +4 -3
  826. package/daemon/dist/routes/seat.js.map +1 -1
  827. package/daemon/dist/routes/skills.d.ts.map +1 -1
  828. package/daemon/dist/routes/skills.js +8 -2
  829. package/daemon/dist/routes/skills.js.map +1 -1
  830. package/daemon/dist/routes/slices.d.ts.map +1 -1
  831. package/daemon/dist/routes/slices.js +156 -28
  832. package/daemon/dist/routes/slices.js.map +1 -1
  833. package/daemon/dist/routes/terminal-ws.d.ts +1 -0
  834. package/daemon/dist/routes/terminal-ws.d.ts.map +1 -1
  835. package/daemon/dist/routes/terminal-ws.js +1 -1
  836. package/daemon/dist/routes/terminal-ws.js.map +1 -1
  837. package/daemon/dist/routes/terminal.d.ts.map +1 -1
  838. package/daemon/dist/routes/terminal.js +40 -3
  839. package/daemon/dist/routes/terminal.js.map +1 -1
  840. package/daemon/dist/routes/transport.d.ts.map +1 -1
  841. package/daemon/dist/routes/transport.js +0 -1
  842. package/daemon/dist/routes/transport.js.map +1 -1
  843. package/daemon/dist/routes/workflow.d.ts.map +1 -1
  844. package/daemon/dist/routes/workflow.js +24 -0
  845. package/daemon/dist/routes/workflow.js.map +1 -1
  846. package/daemon/dist/server.d.ts +2 -0
  847. package/daemon/dist/server.d.ts.map +1 -1
  848. package/daemon/dist/server.js +7 -2
  849. package/daemon/dist/server.js.map +1 -1
  850. package/daemon/dist/startup.d.ts +34 -0
  851. package/daemon/dist/startup.d.ts.map +1 -1
  852. package/daemon/dist/startup.js +255 -25
  853. package/daemon/dist/startup.js.map +1 -1
  854. package/daemon/dist/terminal/TerminalSessionBroker.d.ts +18 -13
  855. package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
  856. package/daemon/dist/terminal/TerminalSessionBroker.js +113 -76
  857. package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
  858. package/daemon/dist/terminal/window-pin.d.ts +3 -3
  859. package/daemon/dist/terminal/window-pin.d.ts.map +1 -1
  860. package/daemon/dist/terminal/window-pin.js +2 -2
  861. package/daemon/dist/terminal/window-pin.js.map +1 -1
  862. package/daemon/docs/reference/acp-agents.md +68 -0
  863. package/daemon/docs/reference/agent-spec.md +51 -1
  864. package/daemon/docs/reference/agent-startup-guide.md +52 -2
  865. package/daemon/docs/reference/agent-state-taxonomy.md +7 -0
  866. package/daemon/docs/reference/community-harness-examples/omo/omo.yaml +14 -0
  867. package/daemon/docs/reference/community-harness-presets.md +56 -2
  868. package/daemon/docs/reference/daemon-http-clients.md +31 -8
  869. package/daemon/docs/reference/edge-types.md +6 -4
  870. package/daemon/docs/reference/gateway-participants.md +23 -1
  871. package/daemon/docs/reference/gateway-relay.md +268 -0
  872. package/daemon/docs/reference/getting-started.md +19 -3
  873. package/daemon/docs/reference/harness-runner-contract.md +61 -12
  874. package/daemon/docs/reference/health-diagnosis.md +5 -1
  875. package/daemon/docs/reference/help.md +18 -0
  876. package/daemon/docs/reference/herdr-app.md +148 -0
  877. package/daemon/docs/reference/hosted-members.md +56 -7
  878. package/daemon/docs/reference/keeping-a-watch.md +3 -1
  879. package/daemon/docs/reference/project-workspace.md +4 -0
  880. package/daemon/docs/reference/queue-erasure.md +161 -0
  881. package/daemon/docs/reference/quickstart.md +1 -1
  882. package/daemon/docs/reference/reconstructions.md +90 -0
  883. package/daemon/docs/reference/rig-spec.md +71 -8
  884. package/daemon/docs/reference/runner-conformance/README.md +3 -0
  885. package/daemon/docs/reference/runner-conformance/check-runner.mjs +27 -6
  886. package/daemon/docs/reference/runner-conformance/fake-acp-agent.mjs +1 -1
  887. package/daemon/docs/reference/sdlc-conventions.md +16 -1
  888. package/daemon/docs/reference/seat-delivery.md +30 -3
  889. package/daemon/docs/reference/slack-app-setup.md +37 -12
  890. package/daemon/docs/reference/terminal-sessions.md +101 -26
  891. package/daemon/docs/reference/tmux-servers.md +50 -2
  892. package/daemon/docs/reference/whats-new.md +402 -132
  893. package/daemon/specs/agents/shared/skills/core/cross-host-rig-commands/SKILL.md +7 -0
  894. package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +1 -0
  895. package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +1 -0
  896. package/daemon/specs/agents/shared/skills/core/working-with-an-openrig-team/SKILL.md +90 -0
  897. package/daemon/specs/agents/shared/skills/pods/review-team/SKILL.md +2 -0
  898. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +24 -0
  899. package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +7 -4
  900. package/daemon/specs/rigs/launch/kernel/rig.yaml +6 -3
  901. package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +3 -1
  902. package/dist/acp/agent-server.d.ts +126 -0
  903. package/dist/acp/agent-server.d.ts.map +1 -0
  904. package/dist/acp/agent-server.js +449 -0
  905. package/dist/acp/agent-server.js.map +1 -0
  906. package/dist/acp/json-rpc-stdio.d.ts +24 -10
  907. package/dist/acp/json-rpc-stdio.d.ts.map +1 -1
  908. package/dist/acp/json-rpc-stdio.js +58 -36
  909. package/dist/acp/json-rpc-stdio.js.map +1 -1
  910. package/dist/bin-wrapper.d.ts.map +1 -1
  911. package/dist/bin-wrapper.js +3 -1
  912. package/dist/bin-wrapper.js.map +1 -1
  913. package/dist/build-info.js +3 -3
  914. package/dist/client.d.ts +4 -0
  915. package/dist/client.d.ts.map +1 -1
  916. package/dist/client.js +9 -2
  917. package/dist/client.js.map +1 -1
  918. package/dist/commands/acp.d.ts +14 -0
  919. package/dist/commands/acp.d.ts.map +1 -1
  920. package/dist/commands/acp.js +189 -2
  921. package/dist/commands/acp.js.map +1 -1
  922. package/dist/commands/attach.js +1 -1
  923. package/dist/commands/attach.js.map +1 -1
  924. package/dist/commands/capture.js +6 -6
  925. package/dist/commands/capture.js.map +1 -1
  926. package/dist/commands/compact.d.ts.map +1 -1
  927. package/dist/commands/compact.js +14 -2
  928. package/dist/commands/compact.js.map +1 -1
  929. package/dist/commands/config.d.ts.map +1 -1
  930. package/dist/commands/config.js +46 -7
  931. package/dist/commands/config.js.map +1 -1
  932. package/dist/commands/context-reconstruction.d.ts +5 -0
  933. package/dist/commands/context-reconstruction.d.ts.map +1 -0
  934. package/dist/commands/context-reconstruction.js +69 -0
  935. package/dist/commands/context-reconstruction.js.map +1 -0
  936. package/dist/commands/context.d.ts.map +1 -1
  937. package/dist/commands/context.js +46 -4
  938. package/dist/commands/context.js.map +1 -1
  939. package/dist/commands/daemon.d.ts.map +1 -1
  940. package/dist/commands/daemon.js +22 -5
  941. package/dist/commands/daemon.js.map +1 -1
  942. package/dist/commands/doctor.d.ts.map +1 -1
  943. package/dist/commands/doctor.js +61 -0
  944. package/dist/commands/doctor.js.map +1 -1
  945. package/dist/commands/gateway.d.ts.map +1 -1
  946. package/dist/commands/gateway.js +36 -11
  947. package/dist/commands/gateway.js.map +1 -1
  948. package/dist/commands/host.d.ts.map +1 -1
  949. package/dist/commands/host.js +68 -12
  950. package/dist/commands/host.js.map +1 -1
  951. package/dist/commands/launch.d.ts +1 -0
  952. package/dist/commands/launch.d.ts.map +1 -1
  953. package/dist/commands/launch.js +1 -1
  954. package/dist/commands/launch.js.map +1 -1
  955. package/dist/commands/mcp.d.ts.map +1 -1
  956. package/dist/commands/mcp.js +29 -5
  957. package/dist/commands/mcp.js.map +1 -1
  958. package/dist/commands/proof.d.ts.map +1 -1
  959. package/dist/commands/proof.js +18 -6
  960. package/dist/commands/proof.js.map +1 -1
  961. package/dist/commands/provider.d.ts.map +1 -1
  962. package/dist/commands/provider.js +4 -1
  963. package/dist/commands/provider.js.map +1 -1
  964. package/dist/commands/ps.d.ts +11 -1
  965. package/dist/commands/ps.d.ts.map +1 -1
  966. package/dist/commands/ps.js +26 -3
  967. package/dist/commands/ps.js.map +1 -1
  968. package/dist/commands/queue.d.ts +3 -0
  969. package/dist/commands/queue.d.ts.map +1 -1
  970. package/dist/commands/queue.js +429 -75
  971. package/dist/commands/queue.js.map +1 -1
  972. package/dist/commands/scope.d.ts +2 -0
  973. package/dist/commands/scope.d.ts.map +1 -1
  974. package/dist/commands/scope.js +15 -0
  975. package/dist/commands/scope.js.map +1 -1
  976. package/dist/commands/seat.d.ts.map +1 -1
  977. package/dist/commands/seat.js +79 -13
  978. package/dist/commands/seat.js.map +1 -1
  979. package/dist/commands/send.d.ts +2 -0
  980. package/dist/commands/send.d.ts.map +1 -1
  981. package/dist/commands/send.js +16 -6
  982. package/dist/commands/send.js.map +1 -1
  983. package/dist/commands/setup.js +1 -1
  984. package/dist/commands/setup.js.map +1 -1
  985. package/dist/commands/skill.d.ts.map +1 -1
  986. package/dist/commands/skill.js +5 -0
  987. package/dist/commands/skill.js.map +1 -1
  988. package/dist/commands/slack.d.ts +1 -1
  989. package/dist/commands/slack.d.ts.map +1 -1
  990. package/dist/commands/slack.js +5 -1
  991. package/dist/commands/slack.js.map +1 -1
  992. package/dist/commands/status.d.ts.map +1 -1
  993. package/dist/commands/status.js +11 -1
  994. package/dist/commands/status.js.map +1 -1
  995. package/dist/commands/stream.d.ts.map +1 -1
  996. package/dist/commands/stream.js +24 -1
  997. package/dist/commands/stream.js.map +1 -1
  998. package/dist/commands/terminal.d.ts +22 -0
  999. package/dist/commands/terminal.d.ts.map +1 -1
  1000. package/dist/commands/terminal.js +117 -8
  1001. package/dist/commands/terminal.js.map +1 -1
  1002. package/dist/commands/up.d.ts.map +1 -1
  1003. package/dist/commands/up.js +22 -0
  1004. package/dist/commands/up.js.map +1 -1
  1005. package/dist/commands/whoami.d.ts.map +1 -1
  1006. package/dist/commands/whoami.js +13 -2
  1007. package/dist/commands/whoami.js.map +1 -1
  1008. package/dist/commands/workflow-errors.js +1 -1
  1009. package/dist/commands/workflow-errors.js.map +1 -1
  1010. package/dist/commands/workflow-render.d.ts +4 -0
  1011. package/dist/commands/workflow-render.d.ts.map +1 -1
  1012. package/dist/commands/workflow-render.js +7 -0
  1013. package/dist/commands/workflow-render.js.map +1 -1
  1014. package/dist/commands/workflow.d.ts.map +1 -1
  1015. package/dist/commands/workflow.js +70 -2
  1016. package/dist/commands/workflow.js.map +1 -1
  1017. package/dist/config-store.d.ts +15 -1
  1018. package/dist/config-store.d.ts.map +1 -1
  1019. package/dist/config-store.js +112 -1
  1020. package/dist/config-store.js.map +1 -1
  1021. package/dist/daemon-lifecycle.d.ts +2 -0
  1022. package/dist/daemon-lifecycle.d.ts.map +1 -1
  1023. package/dist/daemon-lifecycle.js +38 -5
  1024. package/dist/daemon-lifecycle.js.map +1 -1
  1025. package/dist/daemon-reachability.d.ts +1 -1
  1026. package/dist/daemon-reachability.d.ts.map +1 -1
  1027. package/dist/daemon-reachability.js +4 -2
  1028. package/dist/daemon-reachability.js.map +1 -1
  1029. package/dist/daemon-start-lock.d.ts +24 -2
  1030. package/dist/daemon-start-lock.d.ts.map +1 -1
  1031. package/dist/daemon-start-lock.js +125 -4
  1032. package/dist/daemon-start-lock.js.map +1 -1
  1033. package/dist/lib/reconstruction-reader.d.ts +122 -0
  1034. package/dist/lib/reconstruction-reader.d.ts.map +1 -0
  1035. package/dist/lib/reconstruction-reader.js +481 -0
  1036. package/dist/lib/reconstruction-reader.js.map +1 -0
  1037. package/dist/lib/scope/logical-checkbox.d.ts.map +1 -1
  1038. package/dist/lib/scope/logical-checkbox.js +14 -0
  1039. package/dist/lib/scope/logical-checkbox.js.map +1 -1
  1040. package/dist/lib/scope/scope-fs.d.ts.map +1 -1
  1041. package/dist/lib/scope/scope-fs.js +36 -2
  1042. package/dist/lib/scope/scope-fs.js.map +1 -1
  1043. package/dist/lib/work-install.d.ts +28 -0
  1044. package/dist/lib/work-install.d.ts.map +1 -1
  1045. package/dist/lib/work-install.js +80 -20
  1046. package/dist/lib/work-install.js.map +1 -1
  1047. package/dist/mcp-http.d.ts +7 -0
  1048. package/dist/mcp-http.d.ts.map +1 -1
  1049. package/dist/mcp-http.js +30 -6
  1050. package/dist/mcp-http.js.map +1 -1
  1051. package/dist/mcp-server.d.ts +33 -3
  1052. package/dist/mcp-server.d.ts.map +1 -1
  1053. package/dist/mcp-server.js +489 -57
  1054. package/dist/mcp-server.js.map +1 -1
  1055. package/dist/queue-artifact.d.ts +57 -0
  1056. package/dist/queue-artifact.d.ts.map +1 -0
  1057. package/dist/queue-artifact.js +70 -0
  1058. package/dist/queue-artifact.js.map +1 -0
  1059. package/dist/queue-receipt.d.ts.map +1 -1
  1060. package/dist/queue-receipt.js +4 -3
  1061. package/dist/queue-receipt.js.map +1 -1
  1062. package/dist/recap-seat.d.ts +28 -0
  1063. package/dist/recap-seat.d.ts.map +1 -0
  1064. package/dist/recap-seat.js +41 -0
  1065. package/dist/recap-seat.js.map +1 -0
  1066. package/dist/seat-attention.d.ts +24 -0
  1067. package/dist/seat-attention.d.ts.map +1 -0
  1068. package/dist/seat-attention.js +119 -0
  1069. package/dist/seat-attention.js.map +1 -0
  1070. package/dist/system-preflight.d.ts.map +1 -1
  1071. package/dist/system-preflight.js +15 -7
  1072. package/dist/system-preflight.js.map +1 -1
  1073. package/dist/terminal-window.d.ts.map +1 -1
  1074. package/dist/terminal-window.js +16 -13
  1075. package/dist/terminal-window.js.map +1 -1
  1076. package/package.json +1 -1
  1077. package/tui/dist/attention/attention-model.d.ts +2 -1
  1078. package/tui/dist/attention/attention-model.d.ts.map +1 -1
  1079. package/tui/dist/attention/attention-model.js +21 -4
  1080. package/tui/dist/attention/attention-model.js.map +1 -1
  1081. package/tui/dist/config/config-model.d.ts.map +1 -1
  1082. package/tui/dist/config/config-model.js +7 -1
  1083. package/tui/dist/config/config-model.js.map +1 -1
  1084. package/tui/dist/config/pairing.d.ts +49 -0
  1085. package/tui/dist/config/pairing.d.ts.map +1 -0
  1086. package/tui/dist/config/pairing.js +98 -0
  1087. package/tui/dist/config/pairing.js.map +1 -0
  1088. package/tui/dist/daemon-client.d.ts +18 -1
  1089. package/tui/dist/daemon-client.d.ts.map +1 -1
  1090. package/tui/dist/daemon-client.js +33 -9
  1091. package/tui/dist/daemon-client.js.map +1 -1
  1092. package/tui/dist/demo-data.js +2 -2
  1093. package/tui/dist/demo-data.js.map +1 -1
  1094. package/tui/dist/detail.d.ts +3 -0
  1095. package/tui/dist/detail.d.ts.map +1 -1
  1096. package/tui/dist/detail.js +6 -1
  1097. package/tui/dist/detail.js.map +1 -1
  1098. package/tui/dist/execution/execution-model.d.ts +2 -0
  1099. package/tui/dist/execution/execution-model.d.ts.map +1 -1
  1100. package/tui/dist/execution/execution-model.js +10 -3
  1101. package/tui/dist/execution/execution-model.js.map +1 -1
  1102. package/tui/dist/health/health-model.d.ts.map +1 -1
  1103. package/tui/dist/health/health-model.js +27 -11
  1104. package/tui/dist/health/health-model.js.map +1 -1
  1105. package/tui/dist/hydrate.d.ts.map +1 -1
  1106. package/tui/dist/hydrate.js +4 -2
  1107. package/tui/dist/hydrate.js.map +1 -1
  1108. package/tui/dist/main.js +11 -2
  1109. package/tui/dist/main.js.map +1 -1
  1110. package/tui/dist/scopes/scopes-model.d.ts +9 -0
  1111. package/tui/dist/scopes/scopes-model.d.ts.map +1 -1
  1112. package/tui/dist/scopes/scopes-model.js +27 -1
  1113. package/tui/dist/scopes/scopes-model.js.map +1 -1
  1114. package/tui/dist/state.d.ts.map +1 -1
  1115. package/tui/dist/state.js +4 -3
  1116. package/tui/dist/state.js.map +1 -1
  1117. package/tui/dist/terminals/open-window.d.ts +21 -1
  1118. package/tui/dist/terminals/open-window.d.ts.map +1 -1
  1119. package/tui/dist/terminals/open-window.js +46 -9
  1120. package/tui/dist/terminals/open-window.js.map +1 -1
  1121. package/tui/dist/terminals/terminal-model.d.ts +8 -1
  1122. package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
  1123. package/tui/dist/terminals/terminal-model.js +25 -8
  1124. package/tui/dist/terminals/terminal-model.js.map +1 -1
  1125. package/tui/dist/types.d.ts +18 -2
  1126. package/tui/dist/types.d.ts.map +1 -1
  1127. package/ui/dist/assets/index-BOYrLyfQ.js +623 -0
  1128. package/ui/dist/assets/index-DqSRu4OY.css +32 -0
  1129. package/ui/dist/index.html +2 -2
  1130. package/ui/dist/assets/index-BFOs3ejL.css +0 -32
  1131. package/ui/dist/assets/index-CdkFwtld.js +0 -623
@@ -0,0 +1,268 @@
1
+ # Gateway Relay: HTTP Loopback Transport Adapter & Custody Reference
2
+
3
+ OpenRig's Gateway Relay is a local HTTP loopback transport adapter. It enables registered people to receive outbound notifications and questions (asks, updates, and operator digests) through an operator-owned local bridge process, and to post answers back into OpenRig with sender attribution resolved against registered human bindings.
4
+
5
+ OpenRig does not embed third-party messaging platform SDKs (such as WhatsApp, Matrix, or Signal). An external bridge process translates between OpenRig loopback HTTP requests and external messaging platforms.
6
+
7
+ ```
8
+ +--------------------+ HTTP Loopback +--------------------+
9
+ | OpenRig Daemon | POST <OPENRIG_RELAY_URL> ---> | Operator Bridge |
10
+ | (Gateway Subsys) | <--- POST .../relay/inbound | (Loopback Server) |
11
+ +--------------------+ +--------------------+
12
+ |
13
+ Platform-specific transport
14
+ v
15
+ +--------------------+
16
+ | External Platform |
17
+ | (Mobile / Client) |
18
+ +--------------------+
19
+ ```
20
+
21
+ ---
22
+
23
+ ## 1. System Topology & Custody Boundaries
24
+
25
+ ### Outbound Custody & Recovery
26
+ - OpenRig enqueues outbound decisions to a local `DispatchBuffer` before issuing any HTTP `POST` to `OPENRIG_RELAY_URL` (in `push` mode) or holding the decision for connector pull (in `pull` mode).
27
+ - Each logical decision freezes its complete `relayEnvelope` onto the parent `DispatchBuffer` entry before the first delivery pass, with no self-imposed outbound 64 KiB cap or multi-part splitting.
28
+ - **Push mode (`OPENRIG_RELAY_MODE=push`, default)**:
29
+ - Transport is at-least-once: OpenRig sends the complete JSON envelope in a single HTTP `POST` per attempt with `deliveryId = <decisionId>` (preserving the full `body`, `humanDetail`, `humanQuestions`/options, `summary` overflow, and digest `items` without silent clipping).
30
+ - An HTTP `2xx` response from the bridge acknowledges durable bridge custody of that complete envelope (`deliveryId`). The bridge must persist each envelope by `deliveryId` and deduplicate replayed `deliveryId`s idempotently.
31
+ - OpenRig records the logical queue acceptance receipt (`relay-owner-notification-accepted` with `deliveryId`) and drains the decision from `DispatchBuffer` once the HTTP `POST` returns `2xx`.
32
+ - Failed dispatches remain in OpenRig's `DispatchBuffer` and record a relay-specific failure transition note (`relay-owner-notification-transport-failed` naming the `connectorRef`, distinct from Slack's `slack-owner-notification-transport-failed`). Replays after a lost ACK or daemon/bridge restart re-send the exact frozen `relayEnvelope` with the same `deliveryId` and bytes. If the relay subsystem stops while an outbound HTTP `POST` is in flight (or before it starts), the transport aborts cleanly (`stopped`) without recording a false failure transition note or false acceptance receipt, retaining the buffered decision for replay on restart. There is currently no periodic background timer redriving outbound dispatches on timeout.
33
+ - **Pull mode (`OPENRIG_RELAY_MODE=pull`)**:
34
+ - Client-only connectors that do not bind a listening HTTP server set `OPENRIG_RELAY_MODE=pull`. A pull profile is ready with `OPENRIG_RELAY_INBOUND_TOKEN` alone (`OPENRIG_RELAY_URL` and `OPENRIG_RELAY_OUTBOUND_TOKEN` are optional and unused in pull mode).
35
+ - Outbound decisions remain in `DispatchBuffer` awaiting connector pull and are never treated as failed push destinations (`relay-owner-notification-transport-failed` is not recorded). While the outbox lists a notice (staged in `DispatchBuffer` and `relay-attempted-decisions.jsonl` for its `connectorRef`), it is not a missing post for up to **24 hours** (`PULL_OUTBOX_NEVER_POSTED_WINDOW_MS`) and reads `never-posted` (`undelivered-human-notice`) if still unacknowledged after that. A notice the outbox does not list (never staged, staging failed, or its `DispatchBuffer` or seen stores are unreadable, so the outbox answers `503`) uses the usual 120-second window (`NEVER_POSTED_WINDOW_MS`). This is reporting only: nothing is held, refused or re-sent.
36
+ - The connector lists its pending complete envelopes via `GET /api/gateway/relay/outbox` (read-only; no consumer leases, read receipts, or required polling cadences) and acknowledges durable custody via `POST /api/gateway/relay/outbox/ack`.
37
+ - An acknowledgment on `POST /api/gateway/relay/outbox/ack` has the exact same custody meaning as a push `2xx`: OpenRig records `relay-owner-notification-accepted` (closing informational `update` items as delivered), marks its local outbound seen/delivered guards, and drains the decision from `DispatchBuffer`. Duplicate acknowledgments reconcile idempotently (`alreadyAccepted: true`), and retries after a partial local write failure finish the remaining receipt and drain sequence.
38
+ - **Custody boundary (both modes)**: Bridge acceptance (via push `2xx` or pull `POST /api/gateway/relay/outbox/ack`) confirms durable custody of the complete envelope by the connector only (projected as `accepted` / `"Accepted by bridge"`, whereas Slack posts use `posted` / `"Delivered"`). It does not mean posted, seen, answered, or approved.
39
+
40
+ ### Inbound Custody & Resolution
41
+ - The operator bridge posts replies to `POST /api/gateway/relay/inbound`.
42
+ - Requests require `Authorization: Bearer <OPENRIG_RELAY_INBOUND_TOKEN>` matching a configured, ready relay profile.
43
+ - OpenRig verifies that the caller is a direct loopback peer (`127.0.0.1/8` or `::1`) over the underlying TCP socket. Proxy and forwarding headers (`Via`, `X-Forwarded-*`, `Forwarded`, `X-Real-Ip`) are ignored rather than rejected because caller identity is established directly from the loopback socket peer and the bearer token.
44
+ - Sender attribution resolves by matching `sender.handle` against human fragments registered to the authenticated connector. Harmless extra fields on the top-level inbound JSON object or inside `sender` are ignored and can never override handle-to-person attribution or alter the event fingerprint. The handle is asserted by the trusted bridge; it does not provide independent proof of the physical human on the external platform.
45
+ - When an inbound reply is accepted (`200 OK`), OpenRig reserves the event in `relay-inbound-seen.jsonl` (`received:<fingerprint>`), durably commits the answer/resolve action and its `mission_control_actions` audit record atomically through its Mission Control write contract (using existing `excludeOperationReply` revision checking without a second answer store or synthetic revision refresh), and marks the event `processed:<fingerprint>`. Exact duplicate replays of the same `eventId` and payload succeed idempotently (`deduplicated: true`).
46
+
47
+ ### Exclusions & Scope
48
+ The relay adapter does not handle interactive UI buttons, message attachments, group rooms, unsolicited inbound triggers, multi-bridge failover clustering, or third-party platform SDK backends.
49
+
50
+ ---
51
+
52
+ ## 2. Secrets & Environment Configuration
53
+
54
+ Each relay connector loads configuration from an absolute file referenced by the binding's `secretsRef` (`file:<absolute-path>`).
55
+
56
+ ### Security & File Requirements
57
+ - **Absolute Path Only**: Must begin with `file:/`. Relative paths, bare paths, and `file://` authority URLs are rejected.
58
+ - **File Permissions**: The file should restrict access to the owner only (no group or other permission bits set, i.e. `(mode & 0o077) === 0`, such as `0600` or `0400`). Owner-only modes (`0600`, `0400`) produce no warning. If group or world permission bits are set (e.g. `0644`), OpenRig logs a redacted warning in the profile's readiness `warnings` and `reason` (matching the Slack secret-file posture) while keeping the profile `ready`. Missing or unreadable secret files remain `not-ready`.
59
+ - **No Environment Fallback**: OpenRig does not fall back to process environment variables (`process.env`). All variables must come directly from the referenced file.
60
+ - **Profile Independence**: If a secrets file is missing, unreadable, or missing required keys, only connectors bound to that file report `not-ready`. Other connectors remain functional.
61
+
62
+ ### Required Secrets Keys
63
+
64
+ **Push mode (`OPENRIG_RELAY_MODE=push`, default when omitted):**
65
+ ```ini
66
+ OPENRIG_RELAY_URL=http://127.0.0.1:8088/webhook
67
+ OPENRIG_RELAY_OUTBOUND_TOKEN=sec_outbound_token_value
68
+ OPENRIG_RELAY_INBOUND_TOKEN=sec_inbound_token_value
69
+ ```
70
+
71
+ **Pull mode (`OPENRIG_RELAY_MODE=pull`):**
72
+ ```ini
73
+ OPENRIG_RELAY_MODE=pull
74
+ OPENRIG_RELAY_INBOUND_TOKEN=sec_inbound_token_value
75
+ ```
76
+
77
+ - `OPENRIG_RELAY_MODE`: Optional mode selector (`push` or `pull`; defaults to `push` when omitted). Any other value is rejected as `not-ready`.
78
+ - `OPENRIG_RELAY_URL`: Required in `push` mode; ignored/unused in `pull` mode (`endpointUrl: null`). When required, must use `http:`, loopback host (`127.0.0.1/8`, `::1`, or `localhost`), without URL credentials or hash fragments. Redirects (3xx) are rejected.
79
+ - `OPENRIG_RELAY_OUTBOUND_TOKEN`: Required in `push` mode; ignored/unused in `pull` mode. Non-empty Bearer token sent by OpenRig on outbound HTTP `POST` requests to the bridge.
80
+ - `OPENRIG_RELAY_INBOUND_TOKEN`: Non-empty Bearer token required in both `push` and `pull` modes to authenticate connector requests (`GET /api/gateway/relay/outbox`, `POST /api/gateway/relay/outbox/ack`, and `POST /api/gateway/relay/inbound`). Must be unique across different configured relay connector profiles (`connectorRef`); sharing the same inbound token across multiple relay profiles is rejected as ambiguous (`not-ready`). Using the same token value for both `OPENRIG_RELAY_OUTBOUND_TOKEN` and `OPENRIG_RELAY_INBOUND_TOKEN` within a single `push` profile is allowed, with a redacted readiness warning explaining why separate directional tokens are recommended so an outbound capture cannot authenticate inbound replies.
81
+
82
+ ---
83
+
84
+ ## 3. Wire Protocol Specifications
85
+
86
+ ### Outbound Envelope (`POST <OPENRIG_RELAY_URL>` or `GET /api/gateway/relay/outbox`)
87
+
88
+ ```json
89
+ {
90
+ "v": 1,
91
+ "deliveryId": "dec-019283-abc",
92
+ "recipient": { "handle": "alice-ops" },
93
+ "intent": "decision",
94
+ "outcome": "interrupt",
95
+ "summary": "Database Migration Approval",
96
+ "body": "Production migration script 004_add_indexes.sql is ready to execute. Reply YES to approve, NO to abort.",
97
+ "replyRef": "eyJ2IjoxLCJwYXlsb2FkSGFzaCI6...<base64url>"
98
+ }
99
+ ```
100
+
101
+ - `v`: Protocol version integer (`1`).
102
+ - `deliveryId`: Stable whole-decision delivery identifier (`<decisionId>`).
103
+ - `recipient.handle`: Recipient's registered safe alias for this connector.
104
+ - `intent`: `"decision"` (actionable question) or `"update"` (informational notice).
105
+ - `outcome`: Delivery classification (`"interrupt"`, `"notify"`, or `"digest"`).
106
+ - `summary`: Plain text summary preview (up to 1,000 characters on the `summary` field, cut on a Unicode code-point boundary; any summary text exceeding 1,000 characters is preserved in full at the beginning of `body` or `item.body`).
107
+ - `body`: Complete plain text content (including full `summary` overflow, `body`, `humanDetail`, and rendered `humanQuestions` headers, prompts, and option labels/descriptions) sent in a single complete JSON envelope without silent character clipping or self-imposed outbound byte splitting.
108
+ - `replyRef`: Fixed-size opaque base64url token (`<= 4,096` characters for any supported ID lengths — `246`–`266` characters in protocol v1, hashing the canonical frozen `RelayReplyRefPayload` and binding `connectorHash`, `mode`, and optional `digest: true`) for actionable decisions; `null` for informational updates (and `null` at the top level of multi-item digests).
109
+ - `items`: Present when `outcome` is `"digest"`. Array of objects with `qitemId`, `notificationKey`, `summary`, optional `body`, and per-item `replyRef` (or `null`).
110
+
111
+ ### Pull Outbox Endpoints (`GET /api/gateway/relay/outbox` & `POST /api/gateway/relay/outbox/ack`)
112
+
113
+ Both endpoints require a direct loopback TCP peer (`127.0.0.1/8` or `::1`), reject browser cross-origin headers (`403`), and authenticate the caller via `Authorization: Bearer <OPENRIG_RELAY_INBOUND_TOKEN>` (`401`). If the human registry, `DispatchBuffer` (`pendingStrict()`), or outbound `SeenStore` cannot be read, both return `503` (`human_registry_unavailable`, `dispatch_buffer_unavailable`, `seen_store_unavailable`, `queue_store_unavailable`, or `receipt_write_failed`) rather than returning an empty `deliveries` array.
114
+
115
+ - **`GET /api/gateway/relay/outbox?limit=<1..200>`** (default `50`): Returns `{ "ok": true, "connectorRef": "<ref>", "deliveries": [ <RelayOutboundEnvelope>, ... ] }` with complete pending envelopes from `DispatchBuffer` belonging to the authenticated `connectorRef` in FIFO buffer order. Strictly read-only (no leases or read receipts).
116
+ - **`POST /api/gateway/relay/outbox/ack`**: Closed JSON object `{ "deliveryId": "<decisionId>" }` accepting any non-empty string `deliveryId` the outbox can list, within the 64 KiB request-body size bound (`413 payload_too_large`); unknown fields or an empty or non-string `deliveryId` return `400 invalid_envelope`. Finishes any remaining `relay-owner-notification-accepted` transition receipts, marks `slack-outbound-seen.jsonl` and `relay-delivered-decisions.jsonl`, releases the in-memory outbound poll guard, and drains `deliveryId` from `DispatchBuffer`. Returns `200 { "ok": true, "deliveryId": "<id>", "connectorRef": "<ref>", "alreadyAccepted": false }` (`"alreadyAccepted": true` on duplicate ack for the same `connectorRef`, or `404 unknown_delivery` if unknown or owned by another connector; duplicate and unknown acks are answered from `relay-delivered-decisions.jsonl` and `relay-attempted-decisions.jsonl`, and the transition receipt scan runs only when those disagree). On any `503` partial failure, a retry with the same `deliveryId` finishes the remaining receipt and drain steps.
117
+
118
+ ### Inbound Envelope (`POST /api/gateway/relay/inbound`)
119
+
120
+ ```json
121
+ {
122
+ "eventId": "evt-relay-20261107-001",
123
+ "sender": { "handle": "alice-ops" },
124
+ "replyRef": "eyJ2IjoxLCJwYXlsb2FkSGFzaCI6...<base64url>",
125
+ "text": "Approved. Proceed with rollout.",
126
+ "ordering": "after-question"
127
+ }
128
+ ```
129
+
130
+ - `eventId`: Bridge-assigned identifier (`1..256` chars, matching `/^[A-Za-z0-9._:-]{1,256}$/`).
131
+ - `sender.handle`: Sender's alias, matching `/^[A-Za-z0-9._-]+$/`. Must match a human fragment bound to the authenticated connector. Harmless extra fields inside `sender` or on the top-level JSON object are ignored and never override `sender.handle` resolution or affect the event fingerprint.
132
+ - `replyRef`: Exact fixed-size opaque base64url token copied from the outbound envelope (maximum 4,096 characters). Bridges must not parse or alter `replyRef`.
133
+ - `text`: Plain text response (maximum 32,768 characters, non-empty after trim, no NUL bytes). Processed as unstructured text without automatic natural-language approval parsing.
134
+ - `ordering`: Optional enum (`"after-question"` | `"uncertain"`, default `"uncertain"`). When `"uncertain"`, text is accepted as recorded context rather than verified sequence relative to the question.
135
+
136
+ #### Inbound Statuses & Responses
137
+ - **200 OK**: Request accepted (`{ ok: true, deduplicated: false, reconciled: false, qitemId, verb, actorSession, actionId }`). Exact duplicate submissions of the same `eventId` return `ok: true` with `deduplicated: true`.
138
+ - **400 Bad Request**: Malformed JSON, non-object payload, or invalid required field syntax/bounds (`eventId`, `sender.handle`, `replyRef`, `text`, or `ordering`). Harmless extra fields are ignored.
139
+ - **401 Unauthorized**: Missing, malformed, unrecognized, unready, or cross-profile ambiguous inbound Bearer token, or no humans configured (`noHumans`).
140
+ - **403 Forbidden**: Non-loopback TCP socket peer, browser cross-origin request, connector mismatch (`replyRef` emitted by another connector), or unregistered `sender.handle`. (`Via` and `X-Forwarded-*` headers are ignored).
141
+ - **404 Not Found**: Queue item referenced in `replyRef` does not exist.
142
+ - **409 Conflict**: Stale `decisionRevision` (question cancelled, answered, or re-asked), attempt to answer an informational update, unrecognized `replyRef` when both durable receipts and the pending dispatch buffer are readable, or conflicting payload submitted under an existing `eventId`.
143
+ - **413 Payload Too Large**: Request body exceeds 64 KiB (65,536 bytes).
144
+ - **503 Service Unavailable**:
145
+ - `human_registry_unavailable`: Local human registry (`gateway/humans/*.yaml`) failed to load due to a broken fragment or filesystem read error (normal `noHumans` returns `401`).
146
+ - `queue_store_unavailable`: Local SQLite queue/transition store read failed while resolving or verifying `replyRef`, returning `503` with zero seen-store reservation or Mission Control action side effects.
147
+ - `dispatch_buffer_unavailable`: An un-receipted `replyRef` required fallback verification against `<openrig-home>/gateway/dispatch-buffer.json`, and reading the buffer failed (`pendingStrict()`), returning `503` with zero seen-store reservation or Mission Control action side effects. (`replyRef`s already vouched for by durable accepted receipts in `queue_transitions` or `queue_transitions_archive` are verified before consulting the buffer and still succeed.)
148
+ - `seen_store_unavailable` (response includes `seenPath`): Local seen-ledger (`state/relay-inbound-seen.jsonl`) is unreadable, contains unparseable JSONL or unkeyable records (missing `id`), failed a reservation/processed mark, or has a corrupt/unvouched record for the requested `eventId`'s key. Keyed suspect records (`missing/invalid status` or conflicting recorded fingerprints for the same key; diagnostic `ts` or extra metadata fields are ignored) scope refusal to that `eventId` key only so unrelated `eventId`s continue to operate normally, while never treating unparseable or suspect history as unseen.
149
+
150
+ ---
151
+
152
+ ## 4. Identity & Binding Configuration
153
+
154
+ Bindings are managed through human fragment files (`gateway/humans/<entityId>.yaml`) and CLI verbs (`rig gateway human`).
155
+
156
+ ### Binding Syntax
157
+ ```
158
+ relay:<connectorRef>:file:<absolute-env-file>:<role>[:handle=<alias>]
159
+ ```
160
+ - `kind`: `relay`.
161
+ - `connectorRef`: Identifier for the connector instance (e.g. `local-bridge`).
162
+ - `secretsRef`: Absolute file path reference (`file:/path/to/relay.env`).
163
+ - `role`: `primary` or `secondary` (at least one primary binding required for outbound dispatch).
164
+ - `handle`: Optional platform alias (`handle=<alias>`). Required for inbound reply resolution; omitted means outbound-only.
165
+
166
+ Handles must match `/^[A-Za-z0-9._-]+$/` and are unique per `connectorRef`. Multiple people can share a connector, each registered with their own handle.
167
+
168
+ ---
169
+
170
+ ## 5. Operational Lifecycle
171
+
172
+ ### Step 1: Provision Secrets File
173
+ Create an owner-only secrets file (no group/other access bits, e.g. `0600` or `0400`):
174
+ ```bash
175
+ mkdir -p "$HOME/.config/openrig-relay"
176
+ touch "$HOME/.config/openrig-relay/relay.env"
177
+ chmod 600 "$HOME/.config/openrig-relay/relay.env"
178
+
179
+ cat << 'EOF' > "$HOME/.config/openrig-relay/relay.env"
180
+ OPENRIG_RELAY_URL=http://127.0.0.1:8088/webhook
181
+ OPENRIG_RELAY_OUTBOUND_TOKEN=replace_with_outbound_token
182
+ OPENRIG_RELAY_INBOUND_TOKEN=replace_with_inbound_token
183
+ EOF
184
+ ```
185
+
186
+ ### Step 2: Register Human Binding
187
+ ```bash
188
+ # Add a person with a primary relay binding
189
+ rig gateway human add alice --display-name "Alice Smith" --delivery-class B \
190
+ --binding "relay:local-bridge:file:$HOME/.config/openrig-relay/relay.env:primary:handle=alice-ops"
191
+
192
+ # Replace an existing binding slot (requires the full binding spec)
193
+ rig gateway human set alice binding.0 "relay:local-bridge:file:$HOME/.config/openrig-relay/relay.env:primary:handle=alice-ops"
194
+ ```
195
+
196
+ > [!NOTE]
197
+ > `rig gateway human set alice binding.<n>` accepts either a full binding specification string or `unset` to remove that binding slot:
198
+ > - **One-primary rule:** No replacement primary is chosen silently. If removing a `primary` binding would leave other bindings, the command refuses. To replace the primary in place, set its slot to the new primary spec; to promote an existing secondary binding, first save that binding's full spec (`kind:connectorRef:secretsRef:role[:handle=<id>]`) from `rig gateway human show <entityId> --json`, then unset that secondary slot, then find the primary's current slot in `remainingBindings` (or `rig gateway human show <entityId> --json`, since the primary's slot shifts down when a lower-index secondary is removed) and set it to the saved spec with role `primary` (promotion replaces the former primary binding; its connector reference and inbound handle are not retained as a secondary); to remove every binding, unset the secondary bindings first using their current slot indexes from `remainingBindings` or `rig gateway human show <entityId>`, then finish at `binding.0` (once all secondaries are gone, the primary is at `binding.0`).
199
+ > - **Shifted slot indexes:** Removal returns `remainingBindings` with their new `binding.<n>` slot numbers (the primary's slot shifts down too when a lower-index secondary is removed). Because indexes shift down after removal, do not blindly retry `binding.0 unset`; inspect `remainingBindings`, the operation receipt, or `rig gateway human show <entityId>` before retrying.
200
+ > - **What removal does:** Removing a binding keeps the person, their preferences, their other bindings, and their open questions. Removing the last binding makes the current delivery episode inactive, so new missing-post findings stop (an already-open recovery item for an undelivered notice may remain); the current delivery-outcome display may disappear too, while historical receipt notes remain. It does not answer, close, or cancel open questions, cancel or reroute already-prepared deliveries, or retract anything a bridge has already accepted. A person with no binding needs a daemon from the release that accepts one (v0.7.9+); do not roll back past it while any fragment has `connectorBindings: []`.
201
+
202
+ Operator notices use the existing default person. If several people are registered, choose the recipient explicitly when needed:
203
+
204
+ ```bash
205
+ rig gateway default alice
206
+ ```
207
+
208
+ ### Step 3: Activate Daemon
209
+ When bindings or secrets files change, restart the daemon process:
210
+ ```bash
211
+ rig daemon stop
212
+ rig daemon start
213
+ ```
214
+ *(OpenRig does not provide a `rig daemon restart` command).*
215
+
216
+ ### Step 4: Verify Readiness & Status
217
+ ```bash
218
+ # Check delivery readiness for all participants
219
+ rig gateway human list
220
+
221
+ # Inspect detailed readiness status for an individual
222
+ rig gateway human show alice
223
+
224
+ # Check daemon process status
225
+ rig daemon status
226
+ ```
227
+
228
+ In `rig gateway human show <entityId> --json`, `deliveryReadiness.state` reports `ready` when the binding configuration and local secrets file are valid. This confirms local readiness, not whether the operator bridge process is currently running.
229
+
230
+ ### Step 5: Removing Bindings or Participants
231
+ To remove a connector binding while keeping the participant, their preferences, their other bindings, and their open questions, unset the binding slot:
232
+ ```bash
233
+ rig gateway human set alice binding.0 unset --reason "retire relay bridge"
234
+ ```
235
+ Before removing a participant altogether, ensure any pending queue items and conversations assigned to them are resolved:
236
+ ```bash
237
+ rig gateway human remove alice
238
+ ```
239
+ *(The remove verb refuses to delete a participant if open conversations or non-terminal items exist, unless `--force` is specified).*
240
+
241
+ ---
242
+
243
+ ## 6. Troubleshooting Common Conditions
244
+
245
+ | Condition | Observation | Resolution |
246
+ | :--- | :--- | :--- |
247
+ | **Missing Secrets File** | `deliveryReadiness.state: not-ready`<br>`reason: relay secret file ... is missing or unreadable` | Verify file path in `secretsRef` is absolute and readable. |
248
+ | **Insecure Permissions** | `deliveryReadiness.state: ready` (with warning)<br>`reason: ... warning: ... insecure permissions (mode 0644; group/other access bits are set ...)` | Restrict permissions so group/other have no access (`chmod 600 <secrets-file>` or `chmod 400 <secrets-file>`). |
249
+ | **Identical Directional Tokens** | `deliveryReadiness.state: ready` (with warning)<br>`reason: ... warning: ... uses the same token for OPENRIG_RELAY_OUTBOUND_TOKEN and OPENRIG_RELAY_INBOUND_TOKEN; separate tokens are recommended ...` | Provision distinct outbound and inbound tokens so outbound capture cannot authenticate inbound replies. |
250
+ | **Invalid Loopback URL** | `deliveryReadiness.state: not-ready`<br>`reason: ... OPENRIG_RELAY_URL host must be loopback ...` | Ensure URL uses `http://` and host is `127.0.0.1/8`, `::1`, or `localhost`. |
251
+ | **Reused Inbound Token Across Profiles** | `deliveryReadiness.state: not-ready`<br>`reason: ... reuses an ambiguous OPENRIG_RELAY_INBOUND_TOKEN shared with relay profile(s): ...` | Each distinct relay connector profile (`connectorRef`) must declare a unique inbound token. |
252
+ | **Stale Question Reply** | HTTP 409 on inbound endpoint | Question was already answered, cancelled, or superseded by a newer revision. |
253
+ | **Unregistered Handle** | HTTP 403 on inbound endpoint | The `sender.handle` is not bound to the authenticated `connectorRef`. |
254
+ | **Non-Loopback Inbound** | HTTP 403 on inbound endpoint | Connection originated from a non-loopback TCP socket peer or included a cross-origin browser header. (`Via` and `X-Forwarded-*` headers are ignored). |
255
+ | **Registry or Buffer Read Failure** | HTTP 503 on inbound endpoint (`human_registry_unavailable` or `dispatch_buffer_unavailable`) | Inspect local `gateway/humans/*.yaml` fragments or `<openrig-home>/gateway/dispatch-buffer.json` for syntax/permission corruption before retrying the bridge event. |
256
+ | **Seen-Ledger Corrupt / Suspect** | HTTP 503 on inbound endpoint (`seen_store_unavailable`, includes `seenPath`) | Unreadable/unparseable/unkeyable `relay-inbound-seen.jsonl` refuses all inbound requests; a keyed suspect entry refuses only that specific `eventId`. Follow the conservative recovery procedure below. |
257
+
258
+ ### Conservative Seen-Ledger Recovery (`seen_store_unavailable`)
259
+
260
+ When `POST /api/gateway/relay/inbound` returns `503` with `error: "seen_store_unavailable"`, the response body and message include the resolved `seenPath` (`<openrig-home>/state/relay-inbound-seen.jsonl`):
261
+
262
+ 1. **Quiesce writers first**: Pause the loopback bridge and stop the daemon (`rig daemon stop`) so no concurrent inbound request or retry appends to the ledger during inspection.
263
+ 2. **Preserve a full backup**: Copy `<seenPath>` to a timestamped backup outside `state/` before making any edit.
264
+ 3. **Correlate against durable evidence**: Each ledger entry keys `id` by `eventKey = SHA256(JSON.stringify([connectorRef, eventId]))` (64-character lowercase hex digest) and stores `status` as `received:<fingerprint>` or `processed:<fingerprint>`. Because `eventKey` is a one-way hash, correlate any damaged line or keyed suspect `id` against `mission_control_actions.audit_notes_json` (which records `operationId: "relay:<eventKey>:<fingerprint>"`, `connectorRef`, and `eventId`) and bridge delivery logs by computing `SHA256(JSON.stringify([connectorRef, eventId]))` for candidate events—never by guessing or assuming the hash is reversible.
265
+ 4. **Apply only evidence-verified, history-preserving repair**: Repair a damaged record only when its exact `id` (`<eventKey>`) and `status` (`received:<fingerprint>` or `processed:<fingerprint>`) are verified from `mission_control_actions.audit_notes_json` or bridge evidence, or restore only from a backup that preserves every subsequently acknowledged event. Do **not** delete, truncate, or skip unknown/unparseable records, and do **not** restore an older backup that omits acknowledged events; if an entry cannot be verified without losing history, leave the ledger in place (continuing to fail closed with `503`) and retain the backup.
266
+ 5. **Resume and retry**: After a verified, history-preserving repair is saved at `<seenPath>`, start the daemon (`rig daemon start`), resume the loopback bridge, and retry the original inbound delivery with the same `eventId`.
267
+
268
+ For automated loopback bridge test reference, see `packages/daemon/test/fixtures/recording-relay.ts`.
@@ -201,11 +201,11 @@ You can also read [`skills/rigs/SKILL.md`](../../skills/rigs/SKILL.md) directly.
201
201
  script will do and changes nothing:
202
202
 
203
203
  ```sh
204
- curl -fsSL https://raw.githubusercontent.com/mvschwarz/openrig/v0.7.10/scripts/install.sh | sh -s -- --dry-run
204
+ curl -fsSL https://raw.githubusercontent.com/mvschwarz/openrig/v0.7.12/scripts/install.sh | sh -s -- --dry-run
205
205
  ```
206
206
 
207
207
  The same command without `--dry-run`,
208
- `curl -fsSL https://raw.githubusercontent.com/mvschwarz/openrig/v0.7.10/scripts/install.sh | sh`, installs the
208
+ `curl -fsSL https://raw.githubusercontent.com/mvschwarz/openrig/v0.7.12/scripts/install.sh | sh`, installs the
209
209
  latest published `@openrig/cli` with `npm install -g`,
210
210
  runs the Node.js and SQLite check, then `rig setup --dry-run` and `rig setup`. `rig setup` checks both Claude Code and
211
211
  Codex and may install a missing one, as described below. A failed step prints
@@ -816,6 +816,19 @@ option, the seat's agent spec for the target runtime, or the runtime's own
816
816
  default), what is cleared, and the costs below. Nothing changes until you run it
817
817
  without `--dry-run`.
818
818
 
819
+ Use `--runtime pi` to move a Claude Code or Codex seat to Pi; use `--runtime
820
+ claude-code` or `--runtime codex` to move back. Pi uses a fresh managed state
821
+ directory. Select a prepared Pi account with `--account-home /absolute/path`
822
+ (the directory must contain readable `auth.json`), or use the target's configured
823
+ login. A source account override or Claude token is cleared only at commit;
824
+ credentials are never converted between runtimes. Pi-to-Pi account changes keep
825
+ Pi settings, but cross-runtime switches resolve settings afresh for the target.
826
+
827
+ A configured `launch_wrapper` carries across runtime switches among Pi, Codex
828
+ and Claude Code. It must support each successor executable and preserve that
829
+ runtime's credential environment. A wrapped Pi seat cannot switch to Claude
830
+ Code; set `launch_wrapper: []` in the authored spec and re-apply it first.
831
+
819
832
  The new runtime takes over before the old one stops. Its successor starts beside
820
833
  the current occupant, reads a handover (the seat's recap, its open rows and the
821
834
  predecessor's screen), and confirms it with `rig seat set-runtime <seat>
@@ -847,7 +860,7 @@ What it costs:
847
860
  again afterwards to reach whoever holds the seat.
848
861
  - **Leftover files after a failed switch.** The target runtime's prepared seat
849
862
  storage and projections can remain.
850
- - **Codex and Claude Code, single-pane seats.** Startup slash commands aren't
863
+ - **Codex, Claude Code and Pi, single-pane seats.** Startup slash commands aren't
851
864
  run by a switch; the dry run lists them.
852
865
 
853
866
  ## Stop your teams
@@ -882,9 +895,12 @@ the lifecycle API without booting a new kernel, then stop the remaining rigs.
882
895
  | --- | --- |
883
896
  | Tool missing or login fails | Use the specific setup/auth hint; recheck that executable in the launch shell. Do not send work to an unready seat. |
884
897
  | "Startup attention" or "Startup details" names a prompt | Answer the login, trust or bypass prompt in that seat's terminal, then run the `rig seat continue <seat>` it shows. |
898
+ | A restored seat still counts as needing attention after its prompt was answered | Its restore outcome is still `attention_required`, and answering the prompt or running `rig seat continue` doesn't change it. Once the agent is up in its pane, run `rig seat clear-attention <seat>`; see [After a restored seat's prompt](agent-startup-guide.md#after-a-restored-seats-prompt). |
885
899
  | "Readiness timeout after 30s — harness did not become interactive" | The harness took longer than the readiness window. Raise it for the next launch with `rig config set runtime.readiness_timeout_seconds <1-600>`, then relaunch that seat. |
886
900
  | "Claude resume did not finish within Ns; Claude may still be starting, so the launch was kept" | A restored Claude seat was not interactive when the wait ended. Its pane and resume token are kept. Look at the pane; once Claude is up, run `rig seat clear-attention <seat>`. The wait is about `runtime.readiness_timeout_seconds` in total for each seat (default 30 s), counting the first 3.2 s, and the time adds up seat by seat in a restore. Raising the setting for slow fresh launches lengthens it. If `rig up` or `rig launch` times out at 120 s, that is not a rollback: check `rig ps` before running it again. |
887
901
  | Daemon is healthy, kernel is still starting | Read `rig status` and `rig ps --nodes --rig kernel`; kernel readiness is separate. |
902
+ | `rig status`, `rig terminal open` or `rig daemon start --wait-for-kernel` says a seat "needs attention" or "is waiting on a person" | The daemon flags that seat, and the line gives its recorded reason: a startup that failed or stopped at a sign-in, trust or other gate, a held message, a missing required file, or a question. "Is waiting on a person" means the daemon sees a live question you can answer in that seat's terminal. Look at it with `rig capture <seat>` or in its tile, then follow the row above that matches its message. "Couldn't check" means the check itself failed; it says nothing either way. |
903
+ | A Codex seat, including the kernel's operator, answers every turn with a model error such as "… not supported when using Codex with a ChatGPT account" | Its Codex sign-in works, but that account can't run the model; the kernel picks its runtimes from the providers chosen at setup and their sign-ins, not from which models an account can run. If Claude Code is signed in, move just that seat: `rig seat set-runtime <seat> --runtime claude-code --reason "<model> isn't available to this Codex account"` (`--dry-run` first). Otherwise give it a model the account can run with `rig seat set-model <seat> --model <id> --reason "…"`, then start it again with `rig seat launch <seat> --fresh --stop --reason "…"` and check the model it reports. |
888
904
  | Kernel seats fail within a second of the first start, and tmux reports "server exited unexpectedly" | Check that your tmux can capture a pane, then start the failed seats again; see the tmux check below this table. |
889
905
  | Shared terminal is absent | Check the kernel's `operator.human` terminal separately from its agents; recover only that seat as described below. Standalone `rig tui` remains available while resolving it. |
890
906
  | Viewing terminal was closed | Open the conversations again with `rig terminal open saved:kernel --window`; `rig tui --shared` is only the dashboard fallback if that window cannot open. Do not relaunch the team. |
@@ -39,14 +39,19 @@ This chapter covers **which agent runs in a seat and how OpenRig talks to it**.
39
39
  sandbox, another machine) is the [execution platform chapter](execution-platform-contract.md). The two are separate on purpose:
40
40
  the same harness can run in many places, and one place can host many harnesses.
41
41
 
42
- ## 1. Plain preset or runner preset?
42
+ ## 1. Plain preset, runner preset, or OpenRig-hosted protocol runner?
43
43
 
44
- | | Plain community preset | Runner preset (`runner: true`) |
45
- |---|---|---|
46
- | **What runs in the pane** | The harness's own terminal app | A small program you maintain, *the runner*, which hosts the agent (for example an ACP agent over stdio) |
47
- | **How OpenRig reads activity** | From the screen: a changing screen reads working; a quiet one reads **unknown**, never idle | From the runner's reports: working, idle, needs input |
48
- | **How input arrives** | Typed into the app's prompt | Typed into the runner, which turns each submitted message into one agent prompt |
49
- | **Choose it when** | The harness has a usable terminal UI (Cursor, Hermes, OpenClaw examples) | The harness speaks a protocol rather than a screen (ACP, JSON-RPC, stream-JSON), or you can report turn boundaries reliably |
44
+ | | Plain community preset | Runner preset (`runner: true`) | OpenRig-hosted protocol runner (`protocol: pi-rpc`) |
45
+ |---|---|---|---|
46
+ | **What runs in the pane** | The harness's own terminal app | A small program you maintain, *the runner*, which hosts the agent (for example an ACP agent over stdio) | OpenRig's own Pi runner, which starts your binary (`command`) in Pi's RPC mode |
47
+ | **How OpenRig reads activity** | From the screen: a changing screen reads working; a quiet one reads **unknown**, never idle | From the runner's reports: working, idle, needs input | From the Pi runner's reports, through the same channel as built-in Pi; identity is the session file Pi's `get_state` reports |
48
+ | **How input arrives** | Typed into the app's prompt | Typed into the runner, which turns each submitted message into one agent prompt; a message sent mid-turn waits | Pi's input: a submitted block is a prompt, a message sent while busy steers the current turn, `/followup` queues after it and `/abort` cancels it |
49
+ | **Choose it when** | The harness has a usable terminal UI (Cursor, Hermes, OpenClaw examples) | The harness speaks a protocol rather than a screen (ACP, JSON-RPC, stream-JSON), or you can report turn boundaries reliably | Your harness is a Pi fork, or speaks Pi's CLI and JSONL RPC protocol |
50
+
51
+ **For the third shape, you promise your binary's Pi-RPC compatibility at a version you name in `limits`.** OpenRig doesn't
52
+ test each fork. It can't be combined with `runner`, `launch_result`, `names_conversation`, `startup_assisted` or
53
+ `first_input`. The flags it must accept are in
54
+ [Pi-compatible RPC harnesses](community-harness-presets.md#pi-compatible-rpc-harnesses-protocol-pi-rpc).
50
55
 
51
56
  **If your harness works well as a terminal app, a plain preset is enough. Use a runner only when you can report state
52
57
  honestly.** A runner that guesses is worse than a quiet screen read as unknown.
@@ -78,7 +83,20 @@ limits:
78
83
  - **A preset without `runner` behaves exactly as today,** and so does a session recorded before the field existed.
79
84
  - **The other fields keep their existing meanings:**
80
85
  - `first_input: true` passes the seat's first startup turn in a file named by `OPENRIG_FIRST_INPUT`;
81
- - `passes_model: true` passes the seat's declared model as `OPENRIG_MODEL`.
86
+ - `passes_model: true` passes the seat's declared model as `OPENRIG_MODEL`;
87
+ - `launch_wrapper: true` declares that the runner applies a member's configured wrapper to its native child.
88
+
89
+ **Launch wrapper.** `launch_wrapper` is an optional boolean in format 1 and requires `runner: true`. When the member
90
+ has a wrapper and its runner preset declares `launch_wrapper: true`, OpenRig passes `OPENRIG_LAUNCH_WRAPPER` as a JSON array of resolved argv strings.
91
+ The runner must exec its native child as `<argv...> <agent> <args>`, preserving argument boundaries, and keep its own
92
+ process outside the wrapper. The runner must remove `OPENRIG_LAUNCH_WRAPPER` from the environment it passes to the wrapper
93
+ and native child; the handoff belongs to the runner only. The wrapper must `exec` the agent in place. If wrapping fails,
94
+ the runner must never fall back to an unwrapped spawn. A runner preset without the flag is refused at preflight and launch (not schema validation) when a wrapper is
95
+ configured: `launch_wrapper unsupported: the community preset "<runtime>" runs a runner without launch_wrapper: true; no agent started. Add launch_wrapper: true to the preset if its runner applies OPENRIG_LAUNCH_WRAPPER, or remove launch_wrapper from this member.`
96
+ A plain preset needs no flag: OpenRig prefixes its command
97
+ immediately before the preset's native command, after OpenRig's launcher assignments (for example,
98
+ `/usr/bin/env OPENRIG_LAUNCH_RESULT=… <wrapper> <preset.command>`), at the same seam as Codex. OpenRig never sets
99
+ `OPENRIG_LAUNCH_WRAPPER` for a plain preset and removes any inherited value.
82
100
 
83
101
  ## 3. Identity: report the conversation once, in the launch record
84
102
 
@@ -223,8 +241,15 @@ permission or input handling in existing built-in runtimes or require every poss
223
241
 
224
242
  - **On `/abort` or Ctrl-C:** send the agent's cancel (for ACP, the `session/cancel` notification, which has no reply),
225
243
  and record when you sent it.
226
- - A person cancels by typing `/abort` in the seat's pane. A `/abort` sent with `rig send` arrives inside a From/To
227
- envelope, so it's an ordinary prompt.
244
+ - **Sending it:** a person types `/abort` in the seat's pane. From another seat or a script,
245
+ `rig send <seat> "/abort" --raw` pastes exactly `/abort`, with no From/To envelope, and presses Enter, so a runner
246
+ that follows section 5 gets the control. 0.7.8's native runs typed it in the pane; a raw send hasn't been run
247
+ natively. An ordinary `rig send` wraps its text in a From/To envelope, so there `/abort` is an ordinary prompt.
248
+ - **Not while the seat needs input:** a raw send is still refused while the seat reads needs input
249
+ (`target_needs_input`), for example while the runner holds a permission request for a person (section 7). Type
250
+ `/abort` in the pane then.
251
+ - **A sent `/abort` is a request.** A typed control can't name the turn it was meant for: the runner cancels whatever
252
+ turn is running when it reads it. Whether a turn was cancelled is the runner's `Stop` / `cancelled` below.
228
253
  - **Report "cancelled" only when the agent says so:** for ACP, when `session/prompt` returns `stopReason: "cancelled"`.
229
254
  Then post `Stop` / `cancelled`.
230
255
  - **Whether the provider stopped work or spend is unknown.** Don't claim it.
@@ -280,9 +305,31 @@ that runs without asking gains no approval step. Ordinary conversation and `rig
280
305
  | replies with just a no ("no", "deny", "reject", "stop" …), or denies it in the Feed | the agent's reject (`reject_once`, else `reject_always`), or, with no reject option, cancelled. A person's no is never a grant |
281
306
  | routes or hands it to another person | the ask waits for that person, who gets the same options; their answer counts as if they'd been asked. The handoff itself never permits |
282
307
  | routes or hands it to an agent seat | that seat gets no options. The request waits until that row is closed, by the seat or a person. Closed as done without a choice (including a drop), or as failed, is no answer, so it's permitted. Closed as denied (the Feed's deny, `--closure-reason denied`, or the state `denied`) is a no. A row set to the state `canceled` cancels the request, and a further handoff is followed; a person it reaches gets the same options. Or the request waits until the agent's turn ends |
283
- | closes it without choosing: drop, approve, or other typed words | no answer, so the default applies: **permitted** with the agent's allow, and OpenRig records the permit (below) |
308
+ | closes it with no answer at all (a drop) | no answer, so the default applies: **permitted** with the agent's allow, and OpenRig records the permit (below) |
309
+ | answers in other words that nobody decides on | after 0.7.11, **the request waits**: the words are kept, never the default permit, until an explicit decision (`rig seat decide-permission`) or the turn's end |
284
310
  | doesn't answer | the request **stays pending and visible** (the seat reads needs input) until the agent's turn ends. It's never timed out into a grant. |
285
311
 
312
+ **After 0.7.11, a person's answer goes to an agent that decides, or waits:**
313
+ - **Who decides:** this host's receiving agent (`agents.operator_session`, else the kernel operator
314
+ `operator-agent@kernel`), unless it's the runner that asked (the request's first row, however it was handed on) or
315
+ a seat this host doesn't have; then the kernel operator, unless it's the runner that asked.
316
+ - **What happens to the answer:** a click, a plain yes or no, other words, or Steering's Approve or Deny on the request
317
+ (a yes or a no) is kept on the row it was given on. The request is handed to that agent with the person's whole
318
+ answer, the question and the options, and the person is told once who decides and in what recorded state.
319
+ - **The runner keeps reading `pending`.** The agent decides with `rig seat decide-permission <askId> --option <id>
320
+ --reason "…"` (`POST <base>/api/activity/permission-requests/<askId>/decide` with `{"optionId", "reason"}`).
321
+ - It accepts only an option the agent offered.
322
+ - It records an agent's decision: who decided, why, and the person's words.
323
+ - A request that's no longer pending comes back as it is, and nothing is written.
324
+ - **A kept answer counts only through an explicit decision.** If the row is closed without one (an agent's or a
325
+ person's ordinary close), the answer stays kept and the request waits; `rig seat decide-permission` still settles it.
326
+ A refusing close (denied) is still a no.
327
+ - **With no agent that can decide,** any answer is kept, the request waits, and the person is told once that the tool
328
+ hasn't run and how to decide directly (`rig seat decide-permission`) or set up a receiving agent. A handoff that fails
329
+ leaves the request waiting the same way.
330
+ - **No timeout refuses a request.** If the turn ends first, nothing is sent.
331
+ - **The default permit stays** for a request nobody can be asked about (above), and one closed with no answer at all.
332
+
286
333
  - **An answer reaches only the live request it was asked for,** once. A request from an earlier occupant reads
287
334
  `stale`, and one withdrawn at the turn's end reads `withdrawn`. Neither can take a later answer.
288
335
  - **Text typed into the runner's pane, an agent's own text, and `rig send` are never an answer.** While a request waits
@@ -327,7 +374,9 @@ that runs without asking gains no approval step. Ordinary conversation and `rig
327
374
  `no_allow_offered` when it was closed without a choice and the agent offered no allow option), `withdrawn` or
328
375
  `stale`.
329
376
  - **From 0.7.9, `said`,** with `permitted` or `refused` (`no_allow_offered`), is the person's own words, when they
330
- answered in words that were neither a choice nor a plain yes or no. It never changes the outcome.
377
+ answered in words that were neither a choice nor a plain yes or no. It never changes the outcome. After 0.7.11, words are never
378
+ answered with the default permit (they keep the request waiting), so `said` no longer arrives. A runner that handles
379
+ it keeps working.
331
380
  - **A seat grant reads and withdraws only its own launch's requests.** Once its occupant is replaced, the grant is
332
381
  refused (`409 activity_grant_stale`), even during a read's wait.
333
382
  3. **Deliver** `{"outcome": {"outcome": "selected", "optionId": "<optionId>"}}` to the agent once, and only while that
@@ -91,7 +91,11 @@ and `severity=info`. CLI/TUI call this **needs diagnosis**, not a confirmed
91
91
  warning. Enabled diagnosis policy admits one bounded packet even though the
92
92
  product denominator is unknown. Ordinary unavailable/stale detector records
93
93
  remain ineligible. Diagnosis and human-notification traffic are excluded from
94
- the numerator and cannot recursively generate another investigation.
94
+ the numerator and cannot recursively generate another investigation. So is the
95
+ daemon's own bookkeeping: transitions by system actors (`*@system` and the
96
+ bare `system` of claim handover) and daemon notes recorded under any actor
97
+ (`auto-unparked:`, `blocker custody moved `, `park wake `, `parked-owner `).
98
+ The reported `transitionIds` are the counted transitions.
95
99
 
96
100
  The agent reads the actual evidence, including beyond the supplied references,
97
101
  and resolves the semantic outcome granularity and consequence boundary. Use the
@@ -97,6 +97,24 @@ missing tools or logins, kernel startup, a closed viewing terminal and recovery
97
97
  before choosing an action. A healthy daemon doesn't by itself mean the project's seats are ready: check
98
98
  `rig ps --nodes --rig <rig-name>`.
99
99
 
100
+ If the whole team stopped when a herdr terminal closed, OpenRig or its tmux server was started from inside that
101
+ terminal: herdr-core ends every process started there when the terminal closes. `rig daemon start` no longer passes a
102
+ herdr terminal's scope on, but processes started before that keep it until they restart. OpenRig never restarts them
103
+ for you; restart at a time you choose, from a terminal outside herdr.
104
+
105
+ With `terminal.tmux_server` at its default (`inherit`), OpenRig puts seats on the tmux server of the shell that
106
+ started it, usually your own default server. If that server was already running, and you had started it from a herdr
107
+ terminal, it carries that terminal's scope. OpenRig can't prevent this, because the server is yours.
108
+ The same applies when a command like `rig chatroom watch`, run in a herdr terminal, starts the default server. Start
109
+ tmux outside herdr, or use `terminal.tmux_server isolated` (see `tmux-servers.md`), which gives OpenRig a server it
110
+ starts itself.
111
+
112
+ The daemon keeps `HC_SESSION` and `HC_SOCKET`. The herdr-core they select is the one the herdr-app provider starts
113
+ viewers in; `rig terminal status --provider herdr-app` names it (`core` and `assumption`), as do open failures
114
+ (`viewer_start_failed`, `herdr_app_unavailable`) and the note when a window has not confirmed showing a view. If your
115
+ herdr-app window is attached to a different herdr-core than the daemon's, its viewers will not appear there; start the
116
+ daemon with that core's `HC_SESSION` and `HC_SOCKET`.
117
+
100
118
  ### The agent is waiting for permission or can't reach the daemon
101
119
 
102
120
  Read [Have your agent configure permissions](getting-started.md#have-your-agent-configure-permissions)