@openrig/cli 0.7.7 → 0.7.8

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 (590) hide show
  1. package/README.md +5 -5
  2. package/daemon/assets/openshell/Dockerfile +15 -0
  3. package/daemon/assets/openshell/README.md +137 -0
  4. package/daemon/assets/openshell/agents/coordinator/agent.yaml +20 -0
  5. package/daemon/assets/openshell/agents/coordinator/role.md +1 -0
  6. package/daemon/assets/openshell/agents/worker/agent.yaml +20 -0
  7. package/daemon/assets/openshell/agents/worker/role.md +3 -0
  8. package/daemon/assets/openshell/claude-code-provider.yaml +55 -0
  9. package/daemon/assets/openshell/driver-v1.schema.json +81 -0
  10. package/daemon/assets/openshell/guest.py +306 -0
  11. package/daemon/assets/openshell/policy.yaml +33 -0
  12. package/daemon/assets/openshell/preset.yaml +12 -0
  13. package/daemon/assets/openshell/rig.yaml +20 -0
  14. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  15. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  16. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +1 -1
  17. package/daemon/context-packs/help/manifest.yaml +1 -1
  18. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  19. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +16 -6
  20. package/daemon/context-packs/reference/getting-started.md +8 -3
  21. package/daemon/context-packs/reference/manifest.yaml +1 -1
  22. package/daemon/context-packs/reference/rig-spec.md +69 -12
  23. package/daemon/context-packs/reference/whats-new.md +119 -15
  24. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  25. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  26. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  27. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  28. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  29. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  30. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  31. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  32. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  33. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  34. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  35. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  36. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  37. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
  38. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  40. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  41. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  43. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  44. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  46. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  48. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  49. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  51. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  52. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  54. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  59. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  60. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  66. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  68. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +1 -1
  74. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  76. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  77. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  78. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  79. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  80. package/daemon/dist/adapters/claude-code-adapter.js +37 -6
  81. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  82. package/daemon/dist/adapters/claude-resume.d.ts +2 -1
  83. package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
  84. package/daemon/dist/adapters/claude-resume.js +6 -3
  85. package/daemon/dist/adapters/claude-resume.js.map +1 -1
  86. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +4 -7
  87. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  88. package/daemon/dist/adapters/codex-runtime-adapter.js +86 -33
  89. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  90. package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts +13 -1
  91. package/daemon/dist/adapters/community-harness-runtime-adapter.d.ts.map +1 -1
  92. package/daemon/dist/adapters/community-harness-runtime-adapter.js +28 -1
  93. package/daemon/dist/adapters/community-harness-runtime-adapter.js.map +1 -1
  94. package/daemon/dist/adapters/openshell-driver.d.ts +39 -0
  95. package/daemon/dist/adapters/openshell-driver.d.ts.map +1 -0
  96. package/daemon/dist/adapters/openshell-driver.js +139 -0
  97. package/daemon/dist/adapters/openshell-driver.js.map +1 -0
  98. package/daemon/dist/adapters/openshell-podman-observer.d.ts +30 -0
  99. package/daemon/dist/adapters/openshell-podman-observer.d.ts.map +1 -0
  100. package/daemon/dist/adapters/openshell-podman-observer.js +94 -0
  101. package/daemon/dist/adapters/openshell-podman-observer.js.map +1 -0
  102. package/daemon/dist/adapters/pi-openrouter-charge.d.ts +1 -0
  103. package/daemon/dist/adapters/pi-openrouter-charge.d.ts.map +1 -1
  104. package/daemon/dist/adapters/pi-openrouter-charge.js +17 -3
  105. package/daemon/dist/adapters/pi-openrouter-charge.js.map +1 -1
  106. package/daemon/dist/adapters/tmux-control.d.ts +12 -6
  107. package/daemon/dist/adapters/tmux-control.d.ts.map +1 -1
  108. package/daemon/dist/adapters/tmux-control.js +42 -21
  109. package/daemon/dist/adapters/tmux-control.js.map +1 -1
  110. package/daemon/dist/adapters/tmux-server.d.ts +6 -3
  111. package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
  112. package/daemon/dist/adapters/tmux-server.js +13 -8
  113. package/daemon/dist/adapters/tmux-server.js.map +1 -1
  114. package/daemon/dist/adapters/tmux.d.ts +8 -2
  115. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  116. package/daemon/dist/adapters/tmux.js +38 -11
  117. package/daemon/dist/adapters/tmux.js.map +1 -1
  118. package/daemon/dist/build-info.js +3 -3
  119. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  120. package/daemon/dist/db/all-migrations.js +8 -0
  121. package/daemon/dist/db/all-migrations.js.map +1 -1
  122. package/daemon/dist/db/migrations/142_node_claude_mcp.d.ts +3 -0
  123. package/daemon/dist/db/migrations/142_node_claude_mcp.d.ts.map +1 -0
  124. package/daemon/dist/db/migrations/142_node_claude_mcp.js +5 -0
  125. package/daemon/dist/db/migrations/142_node_claude_mcp.js.map +1 -0
  126. package/daemon/dist/db/migrations/143_activity_grants.d.ts +8 -0
  127. package/daemon/dist/db/migrations/143_activity_grants.d.ts.map +1 -0
  128. package/daemon/dist/db/migrations/143_activity_grants.js +22 -0
  129. package/daemon/dist/db/migrations/143_activity_grants.js.map +1 -0
  130. package/daemon/dist/db/migrations/144_environment_bindings.d.ts +4 -0
  131. package/daemon/dist/db/migrations/144_environment_bindings.d.ts.map +1 -0
  132. package/daemon/dist/db/migrations/144_environment_bindings.js +31 -0
  133. package/daemon/dist/db/migrations/144_environment_bindings.js.map +1 -0
  134. package/daemon/dist/db/migrations/145_node_permissions_to.d.ts +5 -0
  135. package/daemon/dist/db/migrations/145_node_permissions_to.d.ts.map +1 -0
  136. package/daemon/dist/db/migrations/145_node_permissions_to.js +7 -0
  137. package/daemon/dist/db/migrations/145_node_permissions_to.js.map +1 -0
  138. package/daemon/dist/domain/active-occupant.d.ts +2 -0
  139. package/daemon/dist/domain/active-occupant.d.ts.map +1 -1
  140. package/daemon/dist/domain/active-occupant.js +9 -1
  141. package/daemon/dist/domain/active-occupant.js.map +1 -1
  142. package/daemon/dist/domain/activity-grants.d.ts +63 -0
  143. package/daemon/dist/domain/activity-grants.d.ts.map +1 -0
  144. package/daemon/dist/domain/activity-grants.js +106 -0
  145. package/daemon/dist/domain/activity-grants.js.map +1 -0
  146. package/daemon/dist/domain/agent-images/agent-image-library-service.d.ts.map +1 -1
  147. package/daemon/dist/domain/agent-images/agent-image-library-service.js +5 -2
  148. package/daemon/dist/domain/agent-images/agent-image-library-service.js.map +1 -1
  149. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +11 -4
  150. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  151. package/daemon/dist/domain/claude-compaction-enforcer.js +34 -10
  152. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  153. package/daemon/dist/domain/claude-mcp.d.ts +10 -0
  154. package/daemon/dist/domain/claude-mcp.d.ts.map +1 -0
  155. package/daemon/dist/domain/claude-mcp.js +19 -0
  156. package/daemon/dist/domain/claude-mcp.js.map +1 -0
  157. package/daemon/dist/domain/codex-owned-plugin-trust.d.ts.map +1 -1
  158. package/daemon/dist/domain/codex-owned-plugin-trust.js +2 -1
  159. package/daemon/dist/domain/codex-owned-plugin-trust.js.map +1 -1
  160. package/daemon/dist/domain/community-harness-presets.d.ts +2 -1
  161. package/daemon/dist/domain/community-harness-presets.d.ts.map +1 -1
  162. package/daemon/dist/domain/community-harness-presets.js +3 -2
  163. package/daemon/dist/domain/community-harness-presets.js.map +1 -1
  164. package/daemon/dist/domain/context-monitor.d.ts +2 -2
  165. package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
  166. package/daemon/dist/domain/context-monitor.js +8 -2
  167. package/daemon/dist/domain/context-monitor.js.map +1 -1
  168. package/daemon/dist/domain/desired-claude-activity-hooks.d.ts +21 -0
  169. package/daemon/dist/domain/desired-claude-activity-hooks.d.ts.map +1 -0
  170. package/daemon/dist/domain/desired-claude-activity-hooks.js +30 -0
  171. package/daemon/dist/domain/desired-claude-activity-hooks.js.map +1 -0
  172. package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
  173. package/daemon/dist/domain/draft-aware-delivery.js +6 -2
  174. package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
  175. package/daemon/dist/domain/environment-artifacts.d.ts +49 -0
  176. package/daemon/dist/domain/environment-artifacts.d.ts.map +1 -0
  177. package/daemon/dist/domain/environment-artifacts.js +158 -0
  178. package/daemon/dist/domain/environment-artifacts.js.map +1 -0
  179. package/daemon/dist/domain/environment-lifecycle.d.ts +119 -0
  180. package/daemon/dist/domain/environment-lifecycle.d.ts.map +1 -0
  181. package/daemon/dist/domain/environment-lifecycle.js +461 -0
  182. package/daemon/dist/domain/environment-lifecycle.js.map +1 -0
  183. package/daemon/dist/domain/environment-platform.d.ts +121 -0
  184. package/daemon/dist/domain/environment-platform.d.ts.map +1 -0
  185. package/daemon/dist/domain/environment-platform.js +280 -0
  186. package/daemon/dist/domain/environment-platform.js.map +1 -0
  187. package/daemon/dist/domain/environment-startup.d.ts +41 -0
  188. package/daemon/dist/domain/environment-startup.d.ts.map +1 -0
  189. package/daemon/dist/domain/environment-startup.js +281 -0
  190. package/daemon/dist/domain/environment-startup.js.map +1 -0
  191. package/daemon/dist/domain/expected-conversation.d.ts +20 -0
  192. package/daemon/dist/domain/expected-conversation.d.ts.map +1 -0
  193. package/daemon/dist/domain/expected-conversation.js +101 -0
  194. package/daemon/dist/domain/expected-conversation.js.map +1 -0
  195. package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts +8 -1
  196. package/daemon/dist/domain/gateway/operator-delivery-engine.d.ts.map +1 -1
  197. package/daemon/dist/domain/gateway/operator-delivery-engine.js +61 -4
  198. package/daemon/dist/domain/gateway/operator-delivery-engine.js.map +1 -1
  199. package/daemon/dist/domain/gateway/slack/inbound.d.ts +2 -0
  200. package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
  201. package/daemon/dist/domain/gateway/slack/inbound.js +40 -8
  202. package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
  203. package/daemon/dist/domain/gateway/slack/message.d.ts +16 -0
  204. package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
  205. package/daemon/dist/domain/gateway/slack/message.js +216 -7
  206. package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
  207. package/daemon/dist/domain/gateway/slack/queue-access.d.ts +14 -0
  208. package/daemon/dist/domain/gateway/slack/queue-access.d.ts.map +1 -1
  209. package/daemon/dist/domain/gateway/slack/queue-access.js +9 -1
  210. package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
  211. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
  212. package/daemon/dist/domain/gateway/slack/slack-delivery.js +9 -4
  213. package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
  214. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +2 -0
  215. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
  216. package/daemon/dist/domain/gateway/slack/slack-subsystem.js +6 -1
  217. package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
  218. package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts +22 -0
  219. package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts.map +1 -1
  220. package/daemon/dist/domain/hosts/hosts-registry-writer.js +116 -0
  221. package/daemon/dist/domain/hosts/hosts-registry-writer.js.map +1 -1
  222. package/daemon/dist/domain/kernel-hook-review.d.ts +16 -0
  223. package/daemon/dist/domain/kernel-hook-review.d.ts.map +1 -0
  224. package/daemon/dist/domain/kernel-hook-review.js +49 -0
  225. package/daemon/dist/domain/kernel-hook-review.js.map +1 -0
  226. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +3 -0
  227. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  228. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +20 -5
  229. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  230. package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
  231. package/daemon/dist/domain/model-divergence/current-generation-record.js +10 -6
  232. package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
  233. package/daemon/dist/domain/native-process-lineage.d.ts +3 -0
  234. package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
  235. package/daemon/dist/domain/native-process-lineage.js +34 -1
  236. package/daemon/dist/domain/native-process-lineage.js.map +1 -1
  237. package/daemon/dist/domain/native-resume-probe.d.ts +2 -1
  238. package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
  239. package/daemon/dist/domain/native-resume-probe.js +4 -2
  240. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  241. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  242. package/daemon/dist/domain/node-inventory.js +18 -8
  243. package/daemon/dist/domain/node-inventory.js.map +1 -1
  244. package/daemon/dist/domain/node-launcher.d.ts +3 -0
  245. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  246. package/daemon/dist/domain/node-launcher.js +6 -0
  247. package/daemon/dist/domain/node-launcher.js.map +1 -1
  248. package/daemon/dist/domain/outbox-handler.d.ts +12 -0
  249. package/daemon/dist/domain/outbox-handler.d.ts.map +1 -1
  250. package/daemon/dist/domain/outbox-handler.js +32 -3
  251. package/daemon/dist/domain/outbox-handler.js.map +1 -1
  252. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts +10 -0
  253. package/daemon/dist/domain/policies/parked-owner-consumer.d.ts.map +1 -1
  254. package/daemon/dist/domain/policies/parked-owner-consumer.js +60 -4
  255. package/daemon/dist/domain/policies/parked-owner-consumer.js.map +1 -1
  256. package/daemon/dist/domain/provider/claude-seat-switch.d.ts +9 -3
  257. package/daemon/dist/domain/provider/claude-seat-switch.d.ts.map +1 -1
  258. package/daemon/dist/domain/provider/claude-seat-switch.js +100 -17
  259. package/daemon/dist/domain/provider/claude-seat-switch.js.map +1 -1
  260. package/daemon/dist/domain/provider/provider-service-impl.js +1 -1
  261. package/daemon/dist/domain/provider/provider-service-impl.js.map +1 -1
  262. package/daemon/dist/domain/provider/provider-service.d.ts +32 -2
  263. package/daemon/dist/domain/provider/provider-service.d.ts.map +1 -1
  264. package/daemon/dist/domain/provider/provider-types.d.ts +1 -1
  265. package/daemon/dist/domain/provider/provider-types.d.ts.map +1 -1
  266. package/daemon/dist/domain/queue-repository.d.ts +36 -5
  267. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  268. package/daemon/dist/domain/queue-repository.js +155 -37
  269. package/daemon/dist/domain/queue-repository.js.map +1 -1
  270. package/daemon/dist/domain/queue-stuck-sweep.d.ts +1 -1
  271. package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
  272. package/daemon/dist/domain/queue-stuck-sweep.js +31 -0
  273. package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
  274. package/daemon/dist/domain/queue-wake-ladder.d.ts +3 -0
  275. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  276. package/daemon/dist/domain/queue-wake-ladder.js +124 -25
  277. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  278. package/daemon/dist/domain/restore-check-service.d.ts +2 -7
  279. package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
  280. package/daemon/dist/domain/restore-check-service.js.map +1 -1
  281. package/daemon/dist/domain/restore-orchestrator.d.ts +35 -3
  282. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  283. package/daemon/dist/domain/restore-orchestrator.js +166 -21
  284. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  285. package/daemon/dist/domain/resume-metadata-refresher.d.ts +2 -1
  286. package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
  287. package/daemon/dist/domain/resume-metadata-refresher.js +20 -6
  288. package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
  289. package/daemon/dist/domain/rig-expansion-service.js +1 -1
  290. package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
  291. package/daemon/dist/domain/rig-repository.d.ts +10 -0
  292. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  293. package/daemon/dist/domain/rig-repository.js +37 -0
  294. package/daemon/dist/domain/rig-repository.js.map +1 -1
  295. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  296. package/daemon/dist/domain/rigspec-codec.js +4 -0
  297. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  298. package/daemon/dist/domain/rigspec-exporter.d.ts +8 -0
  299. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  300. package/daemon/dist/domain/rigspec-exporter.js +60 -2
  301. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  302. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  303. package/daemon/dist/domain/rigspec-instantiator.js +19 -4
  304. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  305. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  306. package/daemon/dist/domain/rigspec-schema.js +24 -1
  307. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  308. package/daemon/dist/domain/runner-permissions.d.ts +135 -0
  309. package/daemon/dist/domain/runner-permissions.d.ts.map +1 -0
  310. package/daemon/dist/domain/runner-permissions.js +318 -0
  311. package/daemon/dist/domain/runner-permissions.js.map +1 -0
  312. package/daemon/dist/domain/runtime-adapter.d.ts +10 -0
  313. package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
  314. package/daemon/dist/domain/runtime-adapter.js.map +1 -1
  315. package/daemon/dist/domain/seat-effort.d.ts +6 -0
  316. package/daemon/dist/domain/seat-effort.d.ts.map +1 -1
  317. package/daemon/dist/domain/seat-effort.js +0 -2
  318. package/daemon/dist/domain/seat-effort.js.map +1 -1
  319. package/daemon/dist/domain/seat-handover-planner.js +1 -1
  320. package/daemon/dist/domain/seat-handover-planner.js.map +1 -1
  321. package/daemon/dist/domain/seat-handover-service.d.ts +2 -0
  322. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  323. package/daemon/dist/domain/seat-handover-service.js +45 -28
  324. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  325. package/daemon/dist/domain/seat-lifecycle-service.d.ts +24 -2
  326. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  327. package/daemon/dist/domain/seat-lifecycle-service.js +62 -1
  328. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  329. package/daemon/dist/domain/seat-restart-in-place.d.ts.map +1 -1
  330. package/daemon/dist/domain/seat-restart-in-place.js +6 -1
  331. package/daemon/dist/domain/seat-restart-in-place.js.map +1 -1
  332. package/daemon/dist/domain/seat-runtime-switch-service.d.ts.map +1 -1
  333. package/daemon/dist/domain/seat-runtime-switch-service.js +4 -0
  334. package/daemon/dist/domain/seat-runtime-switch-service.js.map +1 -1
  335. package/daemon/dist/domain/seat-skill-storage.d.ts +6 -4
  336. package/daemon/dist/domain/seat-skill-storage.d.ts.map +1 -1
  337. package/daemon/dist/domain/seat-skill-storage.js +25 -5
  338. package/daemon/dist/domain/seat-skill-storage.js.map +1 -1
  339. package/daemon/dist/domain/seat-status-service.d.ts +5 -0
  340. package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
  341. package/daemon/dist/domain/seat-status-service.js +9 -0
  342. package/daemon/dist/domain/seat-status-service.js.map +1 -1
  343. package/daemon/dist/domain/self-attach-service.d.ts +8 -1
  344. package/daemon/dist/domain/self-attach-service.d.ts.map +1 -1
  345. package/daemon/dist/domain/self-attach-service.js +26 -0
  346. package/daemon/dist/domain/self-attach-service.js.map +1 -1
  347. package/daemon/dist/domain/session-transport.d.ts +10 -0
  348. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  349. package/daemon/dist/domain/session-transport.js +112 -10
  350. package/daemon/dist/domain/session-transport.js.map +1 -1
  351. package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
  352. package/daemon/dist/domain/snapshot-capture.js +14 -0
  353. package/daemon/dist/domain/snapshot-capture.js.map +1 -1
  354. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  355. package/daemon/dist/domain/startup-orchestrator.js +32 -1
  356. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  357. package/daemon/dist/domain/successor-session-launcher.d.ts +1 -0
  358. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  359. package/daemon/dist/domain/successor-session-launcher.js +1 -0
  360. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  361. package/daemon/dist/domain/terminal/herdr-follow-view.d.ts.map +1 -1
  362. package/daemon/dist/domain/terminal/herdr-follow-view.js +22 -4
  363. package/daemon/dist/domain/terminal/herdr-follow-view.js.map +1 -1
  364. package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts +12 -1
  365. package/daemon/dist/domain/terminal/scope-task-terminal-view.d.ts.map +1 -1
  366. package/daemon/dist/domain/terminal/scope-task-terminal-view.js +120 -18
  367. package/daemon/dist/domain/terminal/scope-task-terminal-view.js.map +1 -1
  368. package/daemon/dist/domain/terminal/terminal-following.js +1 -1
  369. package/daemon/dist/domain/terminal/terminal-following.js.map +1 -1
  370. package/daemon/dist/domain/terminal/terminal-provider.d.ts +2 -0
  371. package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
  372. package/daemon/dist/domain/terminal/terminal-service.d.ts +3 -2
  373. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  374. package/daemon/dist/domain/terminal/terminal-service.js +18 -27
  375. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  376. package/daemon/dist/domain/terminal/view-composer.d.ts +6 -3
  377. package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
  378. package/daemon/dist/domain/terminal/view-composer.js +15 -5
  379. package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
  380. package/daemon/dist/domain/tmux-server-selection.d.ts +47 -0
  381. package/daemon/dist/domain/tmux-server-selection.d.ts.map +1 -0
  382. package/daemon/dist/domain/tmux-server-selection.js +220 -0
  383. package/daemon/dist/domain/tmux-server-selection.js.map +1 -0
  384. package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  385. package/daemon/dist/domain/transcript-store.js +8 -5
  386. package/daemon/dist/domain/transcript-store.js.map +1 -1
  387. package/daemon/dist/domain/types.d.ts +38 -0
  388. package/daemon/dist/domain/types.d.ts.map +1 -1
  389. package/daemon/dist/domain/types.js.map +1 -1
  390. package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
  391. package/daemon/dist/domain/user-settings/settings-browser.js +3 -1
  392. package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
  393. package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
  394. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  395. package/daemon/dist/domain/user-settings/settings-store.js +9 -0
  396. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  397. package/daemon/dist/domain/watchdog-delivery.d.ts +1 -0
  398. package/daemon/dist/domain/watchdog-delivery.d.ts.map +1 -1
  399. package/daemon/dist/domain/watchdog-delivery.js +15 -3
  400. package/daemon/dist/domain/watchdog-delivery.js.map +1 -1
  401. package/daemon/dist/domain/watchdog-policy-engine.d.ts +2 -0
  402. package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
  403. package/daemon/dist/domain/watchdog-policy-engine.js +3 -1
  404. package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
  405. package/daemon/dist/domain/workflow-runtime.d.ts +1 -1
  406. package/daemon/dist/index.d.ts +4 -0
  407. package/daemon/dist/index.d.ts.map +1 -1
  408. package/daemon/dist/index.js +14 -0
  409. package/daemon/dist/index.js.map +1 -1
  410. package/daemon/dist/routes/activity.d.ts +4 -0
  411. package/daemon/dist/routes/activity.d.ts.map +1 -1
  412. package/daemon/dist/routes/activity.js +258 -18
  413. package/daemon/dist/routes/activity.js.map +1 -1
  414. package/daemon/dist/routes/compaction.js +4 -2
  415. package/daemon/dist/routes/compaction.js.map +1 -1
  416. package/daemon/dist/routes/environments.d.ts +3 -0
  417. package/daemon/dist/routes/environments.d.ts.map +1 -0
  418. package/daemon/dist/routes/environments.js +104 -0
  419. package/daemon/dist/routes/environments.js.map +1 -0
  420. package/daemon/dist/routes/hosts.d.ts.map +1 -1
  421. package/daemon/dist/routes/hosts.js +80 -4
  422. package/daemon/dist/routes/hosts.js.map +1 -1
  423. package/daemon/dist/routes/provider.d.ts.map +1 -1
  424. package/daemon/dist/routes/provider.js +53 -7
  425. package/daemon/dist/routes/provider.js.map +1 -1
  426. package/daemon/dist/routes/restore-check.d.ts.map +1 -1
  427. package/daemon/dist/routes/restore-check.js +5 -19
  428. package/daemon/dist/routes/restore-check.js.map +1 -1
  429. package/daemon/dist/routes/rigs.js +3 -0
  430. package/daemon/dist/routes/rigs.js.map +1 -1
  431. package/daemon/dist/routes/rigspec.d.ts.map +1 -1
  432. package/daemon/dist/routes/rigspec.js +8 -3
  433. package/daemon/dist/routes/rigspec.js.map +1 -1
  434. package/daemon/dist/routes/seat.d.ts.map +1 -1
  435. package/daemon/dist/routes/seat.js +29 -2
  436. package/daemon/dist/routes/seat.js.map +1 -1
  437. package/daemon/dist/routes/sessions.d.ts.map +1 -1
  438. package/daemon/dist/routes/sessions.js +66 -20
  439. package/daemon/dist/routes/sessions.js.map +1 -1
  440. package/daemon/dist/routes/transport.d.ts.map +1 -1
  441. package/daemon/dist/routes/transport.js +23 -2
  442. package/daemon/dist/routes/transport.js.map +1 -1
  443. package/daemon/dist/server.d.ts +6 -0
  444. package/daemon/dist/server.d.ts.map +1 -1
  445. package/daemon/dist/server.js +56 -1
  446. package/daemon/dist/server.js.map +1 -1
  447. package/daemon/dist/startup.d.ts +2 -0
  448. package/daemon/dist/startup.d.ts.map +1 -1
  449. package/daemon/dist/startup.js +61 -26
  450. package/daemon/dist/startup.js.map +1 -1
  451. package/daemon/docs/reference/agent-startup-guide.md +4 -0
  452. package/daemon/docs/reference/author-contracts.md +6 -6
  453. package/daemon/docs/reference/community-harness-examples/dsh/README.md +71 -0
  454. package/daemon/docs/reference/community-harness-examples/dsh/dsh.yaml +20 -0
  455. package/daemon/docs/reference/community-harness-examples/dsh/openrig-dsh-runner.mjs +543 -0
  456. package/daemon/docs/reference/community-harness-examples/openshell/README.md +5 -0
  457. package/daemon/docs/reference/community-harness-presets.md +25 -1
  458. package/daemon/docs/reference/execution-platform-contract.md +1 -1
  459. package/daemon/docs/reference/getting-started.md +8 -3
  460. package/daemon/docs/reference/harness-runner-contract.md +151 -16
  461. package/daemon/docs/reference/pi-tool-selection-recovery.md +83 -0
  462. package/daemon/docs/reference/quickstart.md +1 -1
  463. package/daemon/docs/reference/rig-spec.md +69 -12
  464. package/daemon/docs/reference/runner-conformance/README.md +75 -0
  465. package/daemon/docs/reference/runner-conformance/check-runner.mjs +698 -0
  466. package/daemon/docs/reference/runner-conformance/fake-acp-agent.mjs +143 -0
  467. package/daemon/docs/reference/terminal-sessions.md +85 -9
  468. package/daemon/docs/reference/tmux-servers.md +166 -0
  469. package/daemon/docs/reference/whats-new.md +119 -15
  470. package/dist/acp/connector.d.ts.map +1 -1
  471. package/dist/acp/connector.js +6 -1
  472. package/dist/acp/connector.js.map +1 -1
  473. package/dist/build-info.js +3 -3
  474. package/dist/client.d.ts +3 -0
  475. package/dist/client.d.ts.map +1 -1
  476. package/dist/client.js +28 -0
  477. package/dist/client.js.map +1 -1
  478. package/dist/commands/attach.d.ts +1 -0
  479. package/dist/commands/attach.d.ts.map +1 -1
  480. package/dist/commands/attach.js +8 -2
  481. package/dist/commands/attach.js.map +1 -1
  482. package/dist/commands/compact.d.ts.map +1 -1
  483. package/dist/commands/compact.js +7 -4
  484. package/dist/commands/compact.js.map +1 -1
  485. package/dist/commands/config.d.ts.map +1 -1
  486. package/dist/commands/config.js +8 -3
  487. package/dist/commands/config.js.map +1 -1
  488. package/dist/commands/daemon.d.ts.map +1 -1
  489. package/dist/commands/daemon.js +7 -1
  490. package/dist/commands/daemon.js.map +1 -1
  491. package/dist/commands/destroy.d.ts.map +1 -1
  492. package/dist/commands/destroy.js +2 -0
  493. package/dist/commands/destroy.js.map +1 -1
  494. package/dist/commands/doctor.d.ts +8 -1
  495. package/dist/commands/doctor.d.ts.map +1 -1
  496. package/dist/commands/doctor.js +79 -5
  497. package/dist/commands/doctor.js.map +1 -1
  498. package/dist/commands/env.js +1 -1
  499. package/dist/commands/env.js.map +1 -1
  500. package/dist/commands/environment.d.ts +8 -0
  501. package/dist/commands/environment.d.ts.map +1 -0
  502. package/dist/commands/environment.js +194 -0
  503. package/dist/commands/environment.js.map +1 -0
  504. package/dist/commands/export.d.ts.map +1 -1
  505. package/dist/commands/export.js +5 -2
  506. package/dist/commands/export.js.map +1 -1
  507. package/dist/commands/host.d.ts.map +1 -1
  508. package/dist/commands/host.js +77 -7
  509. package/dist/commands/host.js.map +1 -1
  510. package/dist/commands/provider.d.ts.map +1 -1
  511. package/dist/commands/provider.js +2 -0
  512. package/dist/commands/provider.js.map +1 -1
  513. package/dist/commands/queue.d.ts.map +1 -1
  514. package/dist/commands/queue.js +12 -2
  515. package/dist/commands/queue.js.map +1 -1
  516. package/dist/commands/seat.d.ts.map +1 -1
  517. package/dist/commands/seat.js +54 -4
  518. package/dist/commands/seat.js.map +1 -1
  519. package/dist/commands/setup.d.ts.map +1 -1
  520. package/dist/commands/setup.js +18 -0
  521. package/dist/commands/setup.js.map +1 -1
  522. package/dist/commands/terminal.d.ts +2 -0
  523. package/dist/commands/terminal.d.ts.map +1 -1
  524. package/dist/commands/terminal.js +31 -2
  525. package/dist/commands/terminal.js.map +1 -1
  526. package/dist/commands/tui.d.ts +3 -2
  527. package/dist/commands/tui.d.ts.map +1 -1
  528. package/dist/commands/tui.js.map +1 -1
  529. package/dist/config-store.d.ts +3 -1
  530. package/dist/config-store.d.ts.map +1 -1
  531. package/dist/config-store.js +10 -0
  532. package/dist/config-store.js.map +1 -1
  533. package/dist/cross-host-target.d.ts.map +1 -1
  534. package/dist/cross-host-target.js +3 -1
  535. package/dist/cross-host-target.js.map +1 -1
  536. package/dist/daemon-lifecycle.d.ts +6 -0
  537. package/dist/daemon-lifecycle.d.ts.map +1 -1
  538. package/dist/daemon-lifecycle.js +66 -4
  539. package/dist/daemon-lifecycle.js.map +1 -1
  540. package/dist/daemon-reachability.d.ts +2 -1
  541. package/dist/daemon-reachability.d.ts.map +1 -1
  542. package/dist/daemon-reachability.js +3 -2
  543. package/dist/daemon-reachability.js.map +1 -1
  544. package/dist/destroy-helpers.d.ts +3 -2
  545. package/dist/destroy-helpers.d.ts.map +1 -1
  546. package/dist/destroy-helpers.js +6 -3
  547. package/dist/destroy-helpers.js.map +1 -1
  548. package/dist/host-bindings.js +1 -1
  549. package/dist/host-bindings.js.map +1 -1
  550. package/dist/host-registry.d.ts +22 -0
  551. package/dist/host-registry.d.ts.map +1 -1
  552. package/dist/host-registry.js +121 -0
  553. package/dist/host-registry.js.map +1 -1
  554. package/dist/index.d.ts +2 -0
  555. package/dist/index.d.ts.map +1 -1
  556. package/dist/index.js +2 -0
  557. package/dist/index.js.map +1 -1
  558. package/dist/lazy-program.d.ts.map +1 -1
  559. package/dist/lazy-program.js +1 -0
  560. package/dist/lazy-program.js.map +1 -1
  561. package/dist/mcp-server.d.ts.map +1 -1
  562. package/dist/mcp-server.js +36 -2
  563. package/dist/mcp-server.js.map +1 -1
  564. package/dist/openrig-compat.d.ts +1 -1
  565. package/dist/openrig-compat.d.ts.map +1 -1
  566. package/dist/openrig-compat.js +2 -2
  567. package/dist/openrig-compat.js.map +1 -1
  568. package/dist/shared-tui.d.ts +4 -2
  569. package/dist/shared-tui.d.ts.map +1 -1
  570. package/dist/shared-tui.js +4 -11
  571. package/dist/shared-tui.js.map +1 -1
  572. package/dist/terminal-window.d.ts.map +1 -1
  573. package/dist/terminal-window.js +34 -29
  574. package/dist/terminal-window.js.map +1 -1
  575. package/dist/tmux-attachment.d.ts +17 -0
  576. package/dist/tmux-attachment.d.ts.map +1 -0
  577. package/dist/tmux-attachment.js +89 -0
  578. package/dist/tmux-attachment.js.map +1 -0
  579. package/package.json +2 -2
  580. package/tui/dist/hydrate.d.ts.map +1 -1
  581. package/tui/dist/hydrate.js +8 -3
  582. package/tui/dist/hydrate.js.map +1 -1
  583. package/tui/dist/render.d.ts.map +1 -1
  584. package/tui/dist/render.js +7 -1
  585. package/tui/dist/render.js.map +1 -1
  586. package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
  587. package/tui/dist/terminals/terminal-model.js +2 -1
  588. package/tui/dist/terminals/terminal-model.js.map +1 -1
  589. package/ui/dist/assets/{index-CMBgYrS7.js → index-Ch6UxNld.js} +88 -88
  590. package/ui/dist/index.html +1 -1
@@ -0,0 +1,143 @@
1
+ #!/usr/bin/env node
2
+ // A scriptable fake ACP agent for the runner conformance check (check-runner.mjs). It speaks just enough of ACP v1 over
3
+ // stdio, newline-delimited JSON-RPC, to exercise a runner without a model, credentials or the network. It was written
4
+ // after the fake agent in bpamiri/dsh-seat (Apache-2.0), which showed the approach.
5
+ //
6
+ // node fake-acp-agent.mjs --scenario <file.json> --log <file.jsonl> [any arguments the runner adds are ignored]
7
+ //
8
+ // The scenario says how to answer; the log records every message in and out, so the check can compare them.
9
+ // sessionId the id `session/new` returns (default "fake-session-1")
10
+ // initialize "error" or "exit" to fail the handshake there
11
+ // newSession "error" or "exit" to fail `session/new`
12
+ // newDelayMs wait this long before answering `session/new`
13
+ // knownSessions ids `session/load` and `session/resume` reopen
14
+ // reopenError "missing" (the agent's own "no such session") or "error", for an id it doesn't know
15
+ // unknownRequest send the runner a request with a method it can't know, once, after `initialize`
16
+ // stubborn keep running after a hangup or after input closes; only SIGTERM or SIGKILL ends it
17
+ // turns one entry per `session/prompt`, in order (the last one repeats):
18
+ // holdMs keep the turn open this long; `session/cancel` ends it early as "cancelled"
19
+ // ignoreCancel on `session/cancel`, keep the turn open and end it with stopReason (default end_turn) anyway
20
+ // permission ask `session/request_permission` first, then carry on whatever the answer. As an object:
21
+ // options the options offered (default: allow-once, allow_once; reject-once, reject_once)
22
+ // waitMs stop waiting for the answer after this long, and end the turn
23
+ // exitAfterMs exit with status 3 this long after asking, while the request waits
24
+ // A `session/cancel` while the request waits ends the turn "cancelled" once it's answered.
25
+ // error answer the prompt with a JSON-RPC error
26
+ // exit exit with status 3 instead of answering
27
+ // stopReason the stop reason to return (default "end_turn")
28
+ import { appendFileSync, readFileSync } from "node:fs";
29
+ import { createInterface } from "node:readline";
30
+
31
+ const arg = (name) => { const i = process.argv.indexOf(name); return i > 0 ? process.argv[i + 1] : undefined; };
32
+ const scenarioFile = arg("--scenario") ?? process.env.RUNNER_CHECK_SCENARIO;
33
+ const logFile = arg("--log") ?? process.env.RUNNER_CHECK_AGENT_LOG;
34
+ const scenario = scenarioFile ? JSON.parse(readFileSync(scenarioFile, "utf8")) : {};
35
+
36
+ const log = (entry) => { if (logFile) appendFileSync(logFile, `${JSON.stringify({ at: Date.now(), ...entry })}\n`); };
37
+ const send = (msg) => { log({ dir: "out", msg }); process.stdout.write(`${JSON.stringify(msg)}\n`); };
38
+ const reply = (id, result) => send({ jsonrpc: "2.0", id, result });
39
+ const fail = (id, code, message) => send({ jsonrpc: "2.0", id, error: { code, message } });
40
+ const exit = (status, why) => { log({ dir: "event", event: "exit", status, why }); process.exit(status); };
41
+ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
42
+
43
+ log({ dir: "event", event: "started", pid: process.pid, cwd: process.cwd(), argv: process.argv.slice(2) });
44
+ // Ctrl-C is the runner's to handle, so the agent never takes it as a signal. A stubborn agent also outlives a hangup and
45
+ // its input closing, as some real agents do: only the runner ending it (SIGTERM or SIGKILL) stops it.
46
+ process.on("SIGINT", () => log({ dir: "event", event: "signal", signal: "SIGINT" }));
47
+ process.on("SIGHUP", () => scenario.stubborn ? log({ dir: "event", event: "signal", signal: "SIGHUP" }) : exit(0, "SIGHUP"));
48
+ process.on("SIGTERM", () => exit(0, "SIGTERM"));
49
+
50
+ let sessionId;
51
+ let turn = 0;
52
+ let nextId = 1;
53
+ const answers = new Map();
54
+ let cancelTurn = null;
55
+
56
+ // Numbers, as JSON-RPC agents commonly use. A runner passes one on unchanged, and OpenRig reads it as its decimal string.
57
+ function ask(method, params) {
58
+ const id = 1000 + nextId++;
59
+ send({ jsonrpc: "2.0", id, method, params });
60
+ return new Promise((resolve) => answers.set(id, resolve));
61
+ }
62
+
63
+ async function prompt(id, params) {
64
+ const spec = (scenario.turns ?? [])[Math.min(turn, (scenario.turns?.length ?? 1) - 1)] ?? {};
65
+ turn += 1;
66
+ if (spec.exit) exit(3, `turn ${turn}`);
67
+ if (spec.error) { fail(id, -32603, "fake agent: this turn fails"); return; }
68
+ send({ jsonrpc: "2.0", method: "session/update",
69
+ params: { sessionId: params.sessionId, update: { sessionUpdate: "agent_message_chunk", content: { type: "text", text: `turn ${turn}` } } } });
70
+ let stopReason = spec.stopReason ?? "end_turn";
71
+ if (spec.permission) {
72
+ const p = typeof spec.permission === "object" ? spec.permission : {};
73
+ const asked = ask("session/request_permission", {
74
+ sessionId: params.sessionId,
75
+ toolCall: { toolCallId: `call-${turn}`, title: "Edit notes.txt", kind: "edit" },
76
+ options: p.options ?? [
77
+ { optionId: "allow-once", name: "Allow once", kind: "allow_once" },
78
+ { optionId: "reject-once", name: "Reject", kind: "reject_once" },
79
+ ],
80
+ });
81
+ if (p.exitAfterMs) setTimeout(() => exit(3, "while a permission request waits"), p.exitAfterMs);
82
+ let cancelled = false;
83
+ cancelTurn = () => { cancelled = true; };
84
+ const answer = await (p.waitMs ? Promise.race([asked, sleep(p.waitMs).then(() => null)]) : asked);
85
+ cancelTurn = null;
86
+ if (!answer) log({ dir: "event", event: "permission-wait-ended" });
87
+ if (cancelled) { reply(id, { stopReason: "cancelled" }); return; }
88
+ }
89
+ if (spec.holdMs) {
90
+ const cancelled = await new Promise((resolve) => {
91
+ const timer = setTimeout(() => { cancelTurn = null; resolve(false); }, spec.holdMs);
92
+ cancelTurn = () => { if (spec.ignoreCancel) return; clearTimeout(timer); cancelTurn = null; resolve(true); };
93
+ });
94
+ if (cancelled) stopReason = "cancelled";
95
+ }
96
+ reply(id, { stopReason });
97
+ }
98
+
99
+ async function reopen(id, params) {
100
+ if ((scenario.knownSessions ?? []).includes(params.sessionId)) { sessionId = params.sessionId; reply(id, null); return; }
101
+ if (scenario.reopenError === "missing") fail(id, -32002, `Session not found: ${params.sessionId}`);
102
+ else fail(id, -32603, "fake agent: reopen failed");
103
+ }
104
+
105
+ async function handle(msg) {
106
+ if (msg.id !== undefined && msg.method === undefined) { answers.get(msg.id)?.(msg); answers.delete(msg.id); return; }
107
+ switch (msg.method) {
108
+ case "initialize":
109
+ if (scenario.initialize === "exit") exit(2, "initialize");
110
+ if (scenario.initialize === "error") { fail(msg.id, -32603, "fake agent: initialize fails"); return; }
111
+ reply(msg.id, { protocolVersion: 1, agentCapabilities: { loadSession: true }, authMethods: [] });
112
+ if (scenario.unknownRequest) await ask("fake/unknown_method", { note: "a method no runner knows" });
113
+ return;
114
+ case "session/new":
115
+ if (scenario.newDelayMs) await sleep(scenario.newDelayMs);
116
+ if (scenario.newSession === "exit") exit(2, "session/new");
117
+ if (scenario.newSession === "error") { fail(msg.id, -32603, "fake agent: session/new fails"); return; }
118
+ sessionId = scenario.sessionId ?? "fake-session-1";
119
+ reply(msg.id, { sessionId });
120
+ return;
121
+ case "session/load":
122
+ case "session/resume":
123
+ await reopen(msg.id, msg.params ?? {});
124
+ return;
125
+ case "session/prompt":
126
+ await prompt(msg.id, msg.params ?? {});
127
+ return;
128
+ case "session/cancel":
129
+ cancelTurn?.();
130
+ return;
131
+ default:
132
+ if (msg.id !== undefined) fail(msg.id, -32601, `Method not found: ${msg.method}`);
133
+ }
134
+ }
135
+
136
+ const lines = createInterface({ input: process.stdin });
137
+ lines.on("line", (line) => {
138
+ let msg;
139
+ try { msg = JSON.parse(line); } catch { log({ dir: "event", event: "garbage", line }); return; }
140
+ log({ dir: "in", msg });
141
+ void handle(msg);
142
+ });
143
+ lines.on("close", () => { if (scenario.stubborn) { log({ dir: "event", event: "stdin-closed" }); setInterval(() => {}, 60_000); } else exit(0, "stdin closed"); });
@@ -308,7 +308,7 @@ only sizing client. Observers of a Herdr terminal do not themselves resize it;
308
308
  a controlling browser can. No cross-version resize guarantee is implied.
309
309
 
310
310
 
311
- ## Following a slice's current work
311
+ ## Following a slice or mission's current work
312
312
 
313
313
  Use `rig terminal open slice:<name-or-id> --follow --provider herdr` to keep
314
314
  one workspace following the current destination owners of that slice's active
@@ -329,9 +329,30 @@ unplaceable mission/alias tags make the snapshot incomplete, retaining previous
329
329
  viewers. A unique alias on its own retains exact matching. Flat legacy slices
330
330
  without an indexed parent mission cannot disambiguate a colliding alias.
331
331
 
332
- Slice keys are case-sensitive and can include Unicode, plus signs and internal
332
+ Mission views use `mission:<directory-id>`, from the same configured index.
333
+ A mission is known when its directory contains `slices/` (even empty) or a
334
+ readable `mission.yaml` declaration. Its directory ID is its exact identity;
335
+ mission frontmatter is not an alias. Membership is the union of active rows
336
+ with that exact `mission:` tag and rows associated with any physically indexed
337
+ child slice by its exact name or unique ID. Each row counts once even when it
338
+ has both tags. Flat legacy slices without that parent association are not
339
+ inferred into a mission. A child's historical status or composition activation
340
+ flag does not remove its current obligations from the union. Duplicate mission
341
+ IDs are ambiguous. Shared child names/IDs are omitted from bare slice matching;
342
+ rows with one indexed claimant mission are placed through their mission tag.
343
+ A direct mission tag takes precedence, including work tagged to both missions.
344
+ Without that direct tag, a shared-key row with missing, contradictory or
345
+ non-claimant mission tags is named in `issues` and makes the snapshot incomplete;
346
+ known owners remain.
347
+ The launcher reads this same terminal preview and submits its `expectedPlan`
348
+ when opening, rather than using the review-agent roster.
349
+
350
+ Slice and mission keys are case-sensitive and can include Unicode, plus signs and internal
333
351
  spaces. They cannot be empty or contain slash, backslash, control characters,
334
- or leading/trailing whitespace. Pass the literal selector in JSON or a quoted
352
+ or leading/trailing whitespace in the scope reader. The service trims the whole
353
+ selector before composition, so a trailing selector space is accepted by
354
+ preview/ensure with the same plan; ensure rejects a leading selector space.
355
+ Prefer the exact canonical selector in every call. Pass it in JSON or a quoted
335
356
  CLI argument; encode it once as a GET query value. Do not double-decode it.
336
357
 
337
358
  Slice previews and open results use `task: {kind:"slice", id, name, complete,
@@ -343,21 +364,25 @@ view/provider implements ensure; the existing member, completeness, owner and
343
364
  `expectedPlan` checks still apply. A missing capability/task on an older daemon
344
365
  is unsupported scoped membership, not an empty team.
345
366
 
346
- New slice workspaces default to four automatic tiles; `--max-tiles` overrides
367
+ Mission results use the same shape with `task.kind:"mission"`; `task.id` and
368
+ `task.name` are the directory ID, with no synthetic `qitemId`. Ordinary mission
369
+ preview/open uses this current-obligation membership too: past participants
370
+ without active obligations are excluded, while unavailable current owners
371
+ remain named. Follow, preview and ensure share the same authority.
372
+
373
+ New slice and mission workspaces default to four automatic tiles; `--max-tiles` overrides
347
374
  that. Qitem views retain their eight-tile default. The full membership and
348
375
  obligation list remains available when tiles exceed capacity. Pins, drafts,
349
376
  unknown input and focus retention still protect departed viewers. Closing a
350
377
  viewer never stops its agent. Opening a tile can change the agent's dimensions.
351
378
 
352
- A known empty slice remains enabled in the same workspace; later associated
379
+ A known empty slice or mission remains enabled in the same workspace; later associated
353
380
  work can join it. An incomplete queue read (`task.complete:false` plus `issues`)
354
381
  retains previous viewers. A missing scope is `scope_not_found`, duplicate scope
355
382
  identity is `scope_ambiguous`, unreadable/capped index data is `scope_unavailable`,
356
383
  and an unavailable resolver is `scope_unsupported`. None is authoritative empty.
357
384
  Ensure of an incomplete snapshot returns `viewer_unconfirmed`; changed plans
358
- return `preview_changed` before provisioning. Mission following is a separate
359
- increment; the existing mission display projection is not authoritative follow
360
- or ensure capability.
385
+ return `preview_changed` before provisioning.
361
386
 
362
387
  Ordinary ownership changes follow queue/session/node events. Node and directory
363
388
  changes under the primary configured index use the existing filesystem watcher,
@@ -390,5 +415,56 @@ ensure view kinds now return `view_required` (400), where they previously return
390
415
  200 with an error body. Unsupported follow view kinds
391
416
  retain `follow_view_required` in a 200 `ok:false` body, as before. A changed
392
417
  preview remains `preview_changed` (409). During automatic refresh a missing or
393
- ambiguous slice retains the existing tiles and names the source problem in the
418
+ ambiguous scope retains the existing tiles and names the source problem in the
394
419
  explanation strip; refresh or reopen it under the current unambiguous key.
420
+
421
+
422
+ ## Reading or sending to an expected native conversation
423
+
424
+ An application that selects an original Claude Code or Codex conversation can opt
425
+ into an expected-identity check. The identity is the exact tuple `nodeId`, canonical
426
+ `sessionName`, `runtime` (`claude-code` or `codex`) and native `nativeId`. A registry
427
+ resume token by itself is not a current-process identity observation.
428
+
429
+ Read `GET /api/sessions/:sessionName/generation-record-expected` with query fields
430
+ `expectedNodeId`, `expectedRuntime`, `expectedNativeId` and optional `sinceBytes`.
431
+ It resolves the verified current occupant and native process, opens that native
432
+ record, checks its identity, and returns identity and bounded suffix bytes from
433
+ the same opened file. Its existing byte cursor and `generationId` semantics match
434
+ `generation-record`. Success adds `identityContract:1` and `checkedIdentity`, the
435
+ exact expected tuple. Check both before displaying the suffix as that conversation.
436
+
437
+ Send `POST /api/transport/send-expected` with the ordinary send body and a required
438
+ `expectedIdentity` object containing those four fields. The check runs again after
439
+ buffer preparation immediately before paste, and before Enter after any wait.
440
+ A retained input stores the constraint in its outbox receipt; committed dispatch
441
+ and reuse of its delivery ID cannot select a different original conversation or
442
+ omit the stored constraint. Delivery IDs still do not deduplicate explicit input.
443
+ Success adds `identityContract:1` and `checkedIdentity`. Retained is not sent;
444
+ `checkedIdentity` is an observation at an input boundary, not model consumption.
445
+ If replacement is observed after paste, the result reports `inputPhase:"written"`
446
+ and `sent:true`, with Enter refused. Inspect that input before deciding what to do.
447
+
448
+ Malformed expectations return 400 (`invalid_expected_identity`). A different
449
+ observed identity returns 409 (`expected_identity_mismatch`); a missing or
450
+ unverified identity returns 409 (`expected_identity_unavailable`). Conflicting
451
+ reuse of a delivery ID returns 409 (`delivery_identity_conflict`). No conditional
452
+ operation falls back to the replacement. Use these dedicated paths when detecting
453
+ support: older daemons return 404 instead of silently ignoring an unknown field.
454
+ Ordinary reads and sends without an expectation or an ID bound by an earlier
455
+ conditional send keep their existing behavior. Reusing a bound ID also carries
456
+ its stored constraint when the caller omits the expectation.
457
+
458
+ While a runtime switch is preparing or confirmed, a conditional send returns
459
+ 409 `expected_identity_unavailable` with `sent:false` and `inputPhase:"not_reached"`.
460
+ It retains neither the input nor the expectation. Retry the conditional endpoint
461
+ with the original `expectedIdentity`; an ordinary send is not an identity-bound
462
+ retry unless its ID already has a stored constraint. Ordinary sends during the
463
+ switch keep their existing retained response.
464
+
465
+ This is a finite process/record observation followed by a terminal write; tmux has
466
+ no atomic native-conversation compare-and-write operation. A native conversation
467
+ change after the final observation remains a race. The check does not turn a
468
+ terminal attachment into a conversation pin: existing terminal viewers follow
469
+ managed pane/session bindings and may display their replacement. Applications
470
+ must keep that attachment limit separate from checked record reads and sends.
@@ -0,0 +1,166 @@
1
+ # Choosing the tmux server for an OpenRig instance
2
+
3
+ `terminal.tmux_server` controls where the daemon creates and reads managed seats.
4
+ It accepts `inherit` (the default) or `isolated`. The environment override is
5
+ `OPENRIG_TMUX_SERVER`.
6
+
7
+ To keep managed seats out of your personal `tmux ls`, set this before starting a
8
+ new instance, or before a deliberate restart of an existing daemon:
9
+
10
+ ```sh
11
+ rig config set terminal.tmux_server isolated
12
+ ```
13
+
14
+ The setting is read once at daemon startup. Changing it does not move a running
15
+ seat. Inspect the effective choice with:
16
+
17
+ ```sh
18
+ rig terminal status --json
19
+ ```
20
+
21
+ The `tmux` object reports `requestedMode` (read at the last startup), effective
22
+ `mode`, `socketPath`, `serverArgs`, `migrationPending`, and `blockingSessions`.
23
+ The settings browser shows the configured value; terminal status shows what the
24
+ running daemon actually uses.
25
+
26
+ ## Server identity and configuration
27
+
28
+ In `inherit` mode, a new instance uses the launching shell's `TMUX` socket, or the
29
+ default socket under `TMUX_TMPDIR` (otherwise `/tmp`) when outside tmux. Native
30
+ commands retain tmux's existing environment-based selection. Printed attachments
31
+ and terminal metadata name a non-default server so a new terminal can reach it.
32
+ The default mode does not require a server record or an additional instance
33
+ identity check to start the daemon or use existing attachment paths.
34
+
35
+ In `isolated` mode, the socket is named `openrig-<hash>` under tmux's per-user
36
+ directory. The hash identifies the canonical `OPENRIG_HOME`: different homes get
37
+ different servers, and symlink aliases of one home share a server. Choose a short
38
+ `TMUX_TMPDIR` before the first isolated start if your normal temporary path would
39
+ exceed the platform's Unix socket path limit.
40
+
41
+ When isolation is requested or active, the daemon records the effective socket in
42
+ `OPENRIG_HOME/tmux-server.json` using an atomic, owner-only write. Keep this file
43
+ and the durable `tmux-server.initialized` marker with the instance state. A later shell
44
+ with different `TMUX` or `TMUX_TMPDIR` does not redirect an established isolated
45
+ instance. An invalid or unreadable isolation record is reported rather than overwritten.
46
+ If the record disappears while isolation is selected, startup and `destroy --all` stop before
47
+ touching sessions. Restore the record from an instance backup, or inspect the
48
+ running daemon's `rig terminal status --json` to recover its effective selection.
49
+ An ordinary inherited instance may record its socket for a later migration, but
50
+ missing, invalid or unwritable records do not prevent its normal startup.
51
+ The record's `pinned` flag distinguishes a fixed isolated or migration socket
52
+ from an advisory inherited record. Returning to ordinary inheritance commits
53
+ `pinned: false` and removes the active marker; an interrupted update must not
54
+ leave startup using one server and offline cleanup selecting another. A valid
55
+ unpinned record takes precedence over a leftover marker. Legacy inherited records
56
+ and the old `1` marker do not make ordinary inheritance depend on that file.
57
+
58
+ A newly started server loads tmux's normal system and user configuration,
59
+ including `~/.tmux.conf`; OpenRig does not substitute an empty configuration.
60
+ Existing OpenRig session options, such as `terminal.status_bar`, still apply.
61
+ An existing server does not reread its configuration merely because the daemon
62
+ restarts. Settings and sessions in a separate personal server are left alone.
63
+
64
+ ## Existing teams and deferred migration
65
+
66
+ At startup, the daemon checks the previously selected server before switching.
67
+ If registered sessions still exist there, it keeps that server and reports a
68
+ pending migration. Explicit `OPENRIG_HOME` ownership markers distinguish another
69
+ instance's namesakes; unmarked legacy sessions are retained conservatively. If
70
+ the old server cannot be inspected, the daemon also keeps it and reports why.
71
+
72
+ Stop the listed sessions deliberately, then restart the daemon again to apply the
73
+ new selection. Merely editing the setting or waiting for the last seat to stop
74
+ does not switch a running daemon. The same rule applies when returning to
75
+ `inherit` from isolation. A normal inherited start continues to follow its launching
76
+ environment, as before. No
77
+ live pane is moved, restarted or killed by server selection. Old viewing windows
78
+ can be closed separately after their conversations have stopped.
79
+
80
+ Bring a stopped team back with `rig up <name> --existing`. Its normal restoration
81
+ rules still apply: a seat without usable provider history requires an explicit
82
+ fresh-start choice before it launches.
83
+
84
+ On the first upgrade from a version without a socket record, the old-server
85
+ candidate comes from the launching environment. If live seats use a non-default
86
+ server, start the upgraded daemon from that original server to establish its
87
+ record, or stop those seats before changing servers. Earlier versions did not
88
+ persist enough information to find an arbitrary old socket from a different shell.
89
+
90
+ ## Attachments, discovery and cleanup
91
+
92
+ `rig capture`, managed launch/stop/recovery, terminal previews and desktop viewers
93
+ use the effective server. `rig ps --nodes --json` includes `tmuxServerArgs` and a
94
+ matching `tmuxAttachCommand` for bound tmux seats. `rig tui --shared` uses that
95
+ metadata. To attach a terminal directly, use the canonical session name:
96
+
97
+ ```sh
98
+ rig terminal attach '<session>'
99
+ rig terminal attach --read-only -- '<session>'
100
+ ```
101
+
102
+ These commands attach on the daemon's machine. They do not create a seat or
103
+ switch somebody else's tmux client. A local CLI pointed at an HTTP remote daemon
104
+ cannot attach a same-named local session. For an effectively isolated server,
105
+ terminal attachment, shared TUI and desktop windows also compare the daemon's
106
+ instance identity with the local durable identity before using local terminal
107
+ tools. A loopback URL through a port forward does not bypass this isolation check;
108
+ use the matching `OPENRIG_HOME` on the daemon's machine. Inherited servers retain
109
+ the existing local-host checks without requiring a matching durable identity.
110
+ SSH view tiles follow the viewing instance's effective mode. In `inherit`, they
111
+ use remote tmux through `ssh -t`, including `-r` for read-only views, and keep the
112
+ bounded, identity-checked reattachment when a seat's session is replaced. The
113
+ remote host needs only tmux and a POSIX shell, not OpenRig. Copyable recovery
114
+ commands remain plain `ssh -t ... tmux attach`. In `isolated`, tiles run
115
+ `rig terminal attach` on the remote host,
116
+ using that host's local instance and socket; both the remote CLI and daemon must
117
+ support this command. The remote shell must select the right `OPENRIG_HOME` when
118
+ using a custom home. Local socket paths are never sent to it, and an isolated
119
+ attachment failure does not fall back to a same-named default-server session.
120
+ An inherited view does not discover an isolated remote instance's socket; use
121
+ the remote instance's `rig terminal attach` directly for that mixed setup.
122
+
123
+ Discovery and adoption see the selected server. Existing sessions on another
124
+ server are not imported automatically. `rig attach --self` reports its current
125
+ socket and, for an isolated instance, rejects a different server before binding
126
+ or adding a node; an older
127
+ CLI without socket metadata must be updated to self-attach to an isolated
128
+ instance. A shell outside tmux can still attach as `external_cli`.
129
+
130
+ `rig destroy --all` reads the recorded effective server before stopping the daemon
131
+ or removing its state when isolation or a deferred migration pins it. Ordinary
132
+ `inherit` cleanup uses the invoking environment's normal tmux selection, as before;
133
+ an old advisory socket is not used to redirect it. Cleanup kills only registered
134
+ session names on the selected server.
135
+
136
+ Dedicated selection requires POSIX tmux. On Windows, psmux retains its existing
137
+ server behavior; requesting `isolated` produces a status note and a pending choice.
138
+
139
+ ## Two instances on one machine
140
+
141
+ Isolation selects only a tmux server. Give each daemon its own OpenRig home,
142
+ database and port as well. For example, from a directory where you want to keep
143
+ the two instances:
144
+
145
+ ```sh
146
+ mkdir -p .openrig-a .openrig-b
147
+ env OPENRIG_HOME="$PWD/.openrig-a" OPENRIG_DB="$PWD/.openrig-a/rig.db" \
148
+ OPENRIG_PORT=5311 OPENRIG_TMUX_SERVER=isolated rig daemon start
149
+ env OPENRIG_HOME="$PWD/.openrig-b" OPENRIG_DB="$PWD/.openrig-b/rig.db" \
150
+ OPENRIG_PORT=5312 OPENRIG_TMUX_SERVER=isolated rig daemon start
151
+ ```
152
+
153
+ Use the same instance-specific environment for every subsequent command, including
154
+ `rig up`, `rig terminal status --json`, attachment and `rig daemon stop`. Do not
155
+ reuse a database between these homes. Other inherited `OPENRIG_*` variables still
156
+ apply; start from a shell without selectors for another running instance.
157
+
158
+ The operating-system home, provider credentials and provider conversation history
159
+ remain shared unless configured separately. This setting does not isolate the
160
+ filesystem or network. Both inherited and isolated servers support the opt-in
161
+ `OPENRIG_TMUX_CONTROL=1` execution path; its control client connects to the same
162
+ server as the daemon's other tmux commands. On servers older than tmux 3.7c, or
163
+ whose version cannot be recognized as a fixed release, OpenRig uses spawned
164
+ clients instead: starting a control client while another session is created can
165
+ crash those servers (#2304). This avoids creating OpenRig's own control client;
166
+ it cannot protect the server from other tools' control clients.
@@ -1,22 +1,126 @@
1
- # What changed in OpenRig 0.7.7
1
+ # What changed in OpenRig 0.7.8
2
2
 
3
- This note is for an agent on an install that was just upgraded to 0.7.7. OpenRig
4
- 0.7.7 is 0.7.6 with three reliability fixes for managed Claude seats. If you
5
- upgraded from 0.7.5 or earlier, also read "What changed in OpenRig 0.7.6" below.
6
- For the full capability map, read
7
- `rig context get onboarding-width/public-what-you-can-do.md`. After the upgraded
8
- daemon starts, `rig context get reference/whats-new.md` describes this version.
9
- Without a running daemon, read the packaged `daemon/docs/reference/whats-new.md`;
10
- `$OPENRIG_HOME/reference/whats-new.md` can still be the previous copy until startup.
3
+ This note is for an agent on an install that was just upgraded to 0.7.8. OpenRig
4
+ 0.7.8 lets a community harness's runner have its agent's permission requests
5
+ answered by a person, adds a maintained OpenShell path for Claude workers, and
6
+ includes 0.7.7's three reliability fixes. If you upgraded from 0.7.5 or earlier,
7
+ also read "What changed in OpenRig 0.7.6" below. For the full capability map,
8
+ read `rig context get onboarding-width/public-what-you-can-do.md`. After the
9
+ upgraded daemon starts, `rig context get reference/whats-new.md` describes this
10
+ version. Without a running daemon, read the packaged
11
+ `daemon/docs/reference/whats-new.md`; `$OPENRIG_HOME/reference/whats-new.md` can
12
+ still be the previous copy until startup.
11
13
 
12
14
  ## After the upgrade
13
15
 
14
- - Restart the daemon (`rig daemon stop`, then `rig daemon start`) to load the new
15
- code. There are no database migrations.
16
- - The bundled openrig-core plugin stays at 0.1.23 with unchanged files, so there
17
- is no managed plugin refresh.
16
+ - **Restart the daemon** to load the new code: `rig daemon stop`, then
17
+ `rig daemon start`.
18
+ - **Migrations 142 to 145** store a Claude seat's MCP opt-out, seat activity
19
+ grants, OpenShell environment bindings and a seat's chosen permission person.
20
+ - **The bundled openrig-core plugin goes from 0.1.23 to 0.1.24.** One skill line
21
+ changed. Managed refresh preserves replaced files under
22
+ `$OPENRIG_HOME/backups/managed-refresh/<id>/`; reapply local edits you still
23
+ need from the preserved copy.
24
+
25
+ ## Runner seats: a person answers permission requests
26
+
27
+ Section 7 of `docs/reference/harness-runner-contract.md` is the rule. Read it
28
+ before writing or changing a runner.
29
+ - **Who is asked:**
30
+ - **the default person** (`rig gateway default`, or the only registered
31
+ person) gets an ordinary ask in the Feed and on Slack;
32
+ - **a chosen person,** after
33
+ `rig seat set-permissions-to <seat> --to <person> --reason "…"`. `--clear`
34
+ returns to the default;
35
+ - **no one:** when no one can be asked, the request is "Permitted at once,
36
+ with the agent's own allow option";
37
+ - **refusal** is opt-in, with `--deny`. `rig seat status` shows the choice.
38
+ - **What a person's answer does:** a click gives that option, a plain yes gives
39
+ the allow, and a plain no gives the reject. "A person's no is never a grant."
40
+ An unanswered request stays pending until the agent's turn ends.
41
+ - **The runner's protocol:**
42
+ - `POST /api/activity/permission-requests` submits the request;
43
+ - `GET …/<askId>?waitSeconds=25` reads the answer (25 at most);
44
+ - `POST …/<askId>/withdraw` withdraws it at the turn's end.
45
+
46
+ Deliver an answer once, only to the live request.
47
+ - **Check a runner** with
48
+ `node daemon/docs/reference/runner-conformance/check-runner.mjs --runner '<command with {agent}>' --name <harness>`
49
+ from the installed package. It needs Node and tmux, and no daemon, model or
50
+ network.
51
+ - **The worked example** is the dsh runner under
52
+ `daemon/docs/reference/community-harness-examples/dsh/`.
53
+ - **A seat activity grant** lets a runner outside the host's hook setup report
54
+ activity for one seat and launch, without the install-wide hook token.
55
+
56
+ ## OpenShell workers
18
57
 
19
- ## The fixes
58
+ `rig environment setup` installs a reference that binds a seat to one NVIDIA
59
+ OpenShell sandbox. Then use `rig environment create` (or `attach`), `rig up`, and
60
+ `rig environment export` for verified JSON results. Stopping the agent, stopping
61
+ compute and deleting an owned sandbox are separate actions. A recreated sandbox
62
+ can resume the same conversation from a checkpoint. Follow
63
+ `daemon/assets/openshell/README.md` in the installed package.
64
+
65
+ **What it needs:**
66
+ - NVIDIA OpenShell 0.1.6;
67
+ - a Linux image;
68
+ - an API-backed provider using `ANTHROPIC_API_KEY`. Subscription or OAuth
69
+ credentials aren't supported.
70
+
71
+ "Provider registration and image construction can incur costs", so name them to
72
+ the person before you start. "Never grant the guest access to the daemon's main
73
+ API port (normally 7433)."
74
+
75
+ ## Other changes to act on
76
+
77
+ - **Mission following:** `rig terminal open mission:<id> --follow --provider herdr`
78
+ follows a mission's current owners, with the same Herdr path as slices.
79
+ - **Launch choices:**
80
+ - `claude_mcp: none` on a Claude member launches it without MCP servers;
81
+ - `rig config set terminal.tmux_server isolated` gives this OpenRig home its
82
+ own persistent tmux server.
83
+ - **Hosts:** `rig host edit` and `rig host remove` correct or retire a host
84
+ entry. Use them instead of editing `hosts.yaml` by hand.
85
+ - **Another user's daemon:** when `rig doctor` warns that the port is held by
86
+ another OS user's daemon, follow its fix (`rig config set daemon.port <free-port>`),
87
+ or set `OPENRIG_URL` to share that daemon on purpose.
88
+ - **tmux control mode:** with `OPENRIG_TMUX_CONTROL=1`, OpenRig starts a control
89
+ client only on tmux 3.7c or newer, and uses spawned clients otherwise.
90
+ - **Read-only tmux clients:** a submit key refused because of one goes through
91
+ the paste route.
92
+ - **Slack:** a typed reply to a decision parked on its person is recorded as the
93
+ answer. Read the person's words; don't treat the close as approval.
94
+ - **The TUI:** agent pages now show health findings and recently finished items,
95
+ and an agent spec's "not loaded in this view" means it wasn't read, not that
96
+ nothing runs it.
97
+
98
+ ## Limits to keep in view
99
+
100
+ - **No harness has run end to end under the runner contract yet.** The dsh
101
+ example and the conformance check were checked against stand-ins.
102
+ - **The answer owner is a registered person,** and a colleague's answer is
103
+ followed on this host only. A request handed to another host waits as needs
104
+ input until the turn ends.
105
+ - **Permits and answers aren't recorded** beyond the runner's pane and the ask.
106
+ If the agent offers only `allow_always`, a permit makes its harness remember a
107
+ permission nobody chose.
108
+ - **Coming as follow-ups:** recording permits made when no one can be asked, and
109
+ passing typed words that aren't a plain yes or no to the agent.
110
+ - **The dsh example keeps one hold per seat:** two asks in one turn can leave one
111
+ waiting after the hold is released.
112
+ - **An OpenShell worker's activity reads unknown,** sampled from the pane, never
113
+ idle.
114
+ - **The 0.7.7 and 0.7.6 limits below still apply.**
115
+
116
+ ---
117
+
118
+ ## What changed in OpenRig 0.7.7
119
+
120
+ The changes from 0.7.6 to 0.7.7, a reliability patch for 0.7.6 that isn't
121
+ published yet. All three fixes are in 0.7.8.
122
+
123
+ ### The fixes
20
124
 
21
125
  - A Claude seat at an empty prompt reads idle again when Claude prints
22
126
  "✔ Update installed · /restart to apply" (or "Restart to apply") below its mode
@@ -39,7 +143,7 @@ Without a running daemon, read the packaged `daemon/docs/reference/whats-new.md`
39
143
  the seat's resume target on the new, unprimed conversation.
40
144
  ([#2341](https://github.com/mvschwarz/openrig/issues/2341), [#2354](https://github.com/mvschwarz/openrig/pull/2354))
41
145
 
42
- ## Limits to keep in view
146
+ ### Limits to keep in view
43
147
 
44
148
  - Other reasons managed compaction can wait are unchanged.
45
149
  - The input-box check is a read just before the paste, not a lock: typing that
@@ -1 +1 @@
1
- {"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../src/acp/connector.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../src/acp/connector.ts"],"names":[],"mappings":"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"}
@@ -136,7 +136,12 @@ export async function runAcpAssignment(queue, options) {
136
136
  return;
137
137
  cancelRequestedAt = new Date().toISOString();
138
138
  peer.notify("session/cancel", { sessionId });
139
- await queue.update(row.qitemId, { note: `ACP run ${options.runId}: cancel requested at ${cancelRequestedAt}; upstream inference and spend are unknown unless the provider shows them` });
139
+ try {
140
+ await queue.update(row.qitemId, { note: `ACP run ${options.runId}: cancel requested at ${cancelRequestedAt}; upstream inference and spend are unknown unless the provider shows them` });
141
+ }
142
+ catch (error) {
143
+ console.error(`[rig acp] could not record the cancel request: ${String(error)}`);
144
+ }
140
145
  });
141
146
  // A detach settles the turn here even when the agent keeps its stdout open after stdin closes.
142
147
  const detached = new Promise((_, reject) => {