@openrig/cli 0.7.6 → 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 +162 -10
  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 +36 -11
  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 +51 -2
  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 +12 -0
  348. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  349. package/daemon/dist/domain/session-transport.js +127 -11
  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 +275 -18
  413. package/daemon/dist/routes/activity.js.map +1 -1
  414. package/daemon/dist/routes/compaction.js +8 -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 +162 -10
  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
@@ -1,7 +1,7 @@
1
- # Harness and runner contract (DRAFT for 0.7.6)
1
+ # Harness and runner contract (DRAFT, published with 0.7.6)
2
2
 
3
3
  > **Status.** This is a draft for contributors.
4
- > - **In the 0.7.6 candidate, not yet released:** the `runner` field and OpenRig's side of declaration, identity and activity
4
+ > - **Released in 0.7.6:** the `runner` field and OpenRig's side of declaration, identity and activity
5
5
  > (sections 2-4).
6
6
  > - **Proposed runner-author behavior:** the input, cancellation and permission recipe in sections 5-7, and the
7
7
  > runner-side shutdown obligation in section 9. A dsh port implementing this recipe is not qualified.
@@ -11,7 +11,7 @@
11
11
  >
12
12
  > No harness has been run end to end under this contract yet. The first candidate is dsh over ACP.
13
13
  >
14
- > Candidate scope and pinned references are in the [joined author guide](author-contracts.md). The
14
+ > Release status and pinned references are in the [joined author guide](author-contracts.md). The
15
15
  > [community presets reference](https://github.com/mvschwarz/openrig/blob/b6bd4633fbd94634a2b4bdef2574a6880f97be63/docs/reference/community-harness-presets.md)
16
16
  > describes the implemented fields at that base; this chapter also labels proposed author behavior.
17
17
 
@@ -32,7 +32,7 @@ the same harness can run in many places, and one place can host many harnesses.
32
32
  honestly.** A runner that guesses is worse than a quiet screen read as unknown.
33
33
 
34
34
  **Vocabulary.** "Preset", "runner preset", `launch_result`, `resume`, `first_input` and `passes_model` are existing
35
- terms at the candidate base. Broader names you may see in design discussion, such as *HarnessSpec*, are **proposals**, not file
35
+ terms in 0.7.6. Broader names you may see in design discussion, such as *HarnessSpec*, are **proposals**, not file
36
36
  formats or loaders that exist.
37
37
 
38
38
  ## 2. Declare it: what the preset says, fixed at launch
@@ -43,11 +43,11 @@ format: 1
43
43
  name: dsh
44
44
  command: dsh-seat # your runner; it starts the agent itself
45
45
  maintainer: <you>
46
- runner: true # in the 0.7.6 candidate
46
+ runner: true # since 0.7.6
47
47
  launch_result: true # required with runner
48
48
  resume: true # only after you've checked a real reopen and a refused missing one
49
49
  limits:
50
- - permission requests are refused (first version)
50
+ - permission requests go to a person through OpenRig (section 7), and are permitted when no one can be asked
51
51
  - a prompt whose whole text is /abort can't be sent
52
52
  - fork unsupported
53
53
  ```
@@ -122,6 +122,22 @@ Post each event to `POST <base>/api/activity/hooks` with `Authorization: Bearer
122
122
  - **The generation attributes a post; it isn't authentication.**
123
123
  - A post carrying an earlier occupant's generation never counts for the live seat.
124
124
  - The hook token is one local token, so any process holding it can post for any seat.
125
+ - **A seat activity grant** is what a runner in another environment, such as a sandbox guest, receives instead of the
126
+ local token. It arrives in the same `OPENRIG_ACTIVITY_HOOK_TOKEN`, with an `OPENRIG_URL` the guest can reach, and it
127
+ speaks only for its own seat and launch generation:
128
+ - with a grant, the generation is authenticated, and you may leave out `nodeId` and `generation`;
129
+ - a post for another seat is refused with `403 activity_grant_wrong_seat`;
130
+ - a post claiming another generation, or from an occupant that has since been replaced, is refused with
131
+ `409 activity_grant_stale`;
132
+ - a post before the launch has registered its occupant is refused with `409 activity_grant_pending`;
133
+ - a post with a revoked grant is refused with `401 activity_grant_revoked`, including a post whose grant was revoked
134
+ while its body was arriving.
135
+
136
+ A refused post records nothing, so the seat's activity stays as it was, or unknown.
137
+
138
+ **The guest's boundary is its listener, not the grant.** A guest reaches OpenRig only through a guest-only listener that
139
+ serves this one route and accepts only a grant. It must never reach the daemon's main port. The grant scopes activity
140
+ posts only, and the main port's other routes don't check it.
125
141
 
126
142
  ## 5. Input: one submitted message is one prompt
127
143
 
@@ -150,7 +166,9 @@ existing built-in runtimes or require every possible runner protocol to use ACP.
150
166
  Then post `Stop` / `cancelled`.
151
167
  - **Whether the provider stopped work or spend is unknown.** Don't claim it.
152
168
 
153
- ## 7. Permissions: refuse every request (first version)
169
+ ## 7. Permissions: a person answers, and the default is permit
170
+
171
+ ### The first version: refuse every request (history; still what `--deny` does)
154
172
 
155
173
  - **Refuse at once:** answer every permission request immediately with a refusal (for ACP,
156
174
  `{"outcome": {"outcome": "cancelled"}}`).
@@ -160,14 +178,123 @@ existing built-in runtimes or require every possible runner protocol to use ACP.
160
178
  - **It clears** when your next prompt is accepted, or when an operator clears it
161
179
  (`rig seat clear-attention <session> --reason "…"`).
162
180
  - **Never leave a request pending.**
163
- - **Not in the first version:**
164
- - answering from the seat's permission setting;
165
- - answers typed into the pane;
166
- - routing an approval to another seat.
167
- - So a job that needs an edit or a command approved can't finish under this version. Agents that can run without
168
- asking are the best first case.
181
+ - **What it couldn't do:**
182
+ - answer from the seat's permission setting;
183
+ - take answers typed into the pane;
184
+ - route an approval to another seat.
185
+
186
+ So a job that needed an edit or a command approved couldn't finish. The answered path below, added in 0.7.8,
187
+ replaces this as the default.
169
188
  - **Unknown requests from the agent:** answer with JSON-RPC `-32601` and carry on.
170
189
 
190
+ ### The answered path (0.7.8)
191
+
192
+ **Only requests the agent actually makes reach anyone.** The harness's own permission mode decides that, and a harness
193
+ that runs without asking gains no approval step. Ordinary conversation and `rig send` are unchanged.
194
+
195
+ **What happens to a request, in the person's terms:**
196
+
197
+ | Situation | What happens |
198
+ |---|---|
199
+ | **There's a default person** (chosen with `rig gateway default`, or the only registered person), and no override | They get an ordinary ask in the Feed and on Slack. No setup is needed. |
200
+ | **The seat's operator chose someone** (`rig seat set-permissions-to <seat> --to <person> --reason "…"`) | That person gets the ask instead. |
201
+ | **No one can be asked** | **Permitted at once**, with the agent's own allow option. No ask is opened. That covers: no registered person; several and none the default; the chosen person no longer registered; the people unreadable; or options a person can't be shown (bad ids, or not 2-4). The agent's `allow_once` is used, else its `allow_always`. If the agent offers only `allow_always`, the harness then remembers a permission nobody chose. |
202
+ | **The seat's operator opted in to refusal** (`rig seat set-permissions-to <seat> --deny --reason "…"`) | Refused at once and held as needs input, as in the first version. |
203
+
204
+ **What the ask shows:**
205
+ - the seat and the conversation;
206
+ - the tool call, as the agent described it;
207
+ - why this person was asked;
208
+ - every option the agent offered, each with its native meaning. `allow_always` means the agent's harness remembers
209
+ the choice and allows similar requests without asking. OpenRig doesn't record or revoke that.
210
+
211
+ **How a person answers, and what the agent gets:**
212
+
213
+ | The person… | The agent gets |
214
+ |---|---|
215
+ | clicks an option: the asked person, any other registered person, or the primary user in the TUI | that option |
216
+ | replies with just a yes ("yes", "ok", "allow", "go ahead" …) | the agent's allow (`allow_once`, else `allow_always`) |
217
+ | 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 |
218
+ | 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 |
219
+ | 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 |
220
+ | closes it without choosing: drop, approve, or other typed words | no answer, so the default applies: **permitted** with the agent's allow |
221
+ | 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. |
222
+
223
+ - **An answer reaches only the live request it was asked for,** once. A request from an earlier occupant reads
224
+ `stale`, and one withdrawn at the turn's end reads `withdrawn`. Neither can take a later answer.
225
+ - **Text typed into the runner's pane, an agent's own text, and `rig send` are never an answer.** While a request waits
226
+ on a person, the seat reads needs input, and sends are normally refused. A send that does get through reaches the
227
+ agent as a prompt.
228
+
229
+ **The runner's protocol:**
230
+ 1. **Submit** the agent's live request to `POST <base>/api/activity/permission-requests`, with the same token or seat
231
+ grant as section 4:
232
+
233
+ ```json
234
+ {"sessionName": "dev-builder@my-rig", "nodeId": "<node id>", "generation": "<OPENRIG_OCCUPANT_GENERATION>",
235
+ "nativeRef": "<the conversation>", "turnId": "7", "requestId": "<the agent's JSON-RPC id>",
236
+ "toolCall": {"title": "Edit src/app.ts", "kind": "edit"},
237
+ "options": [{"optionId": "allow", "name": "Allow", "kind": "allow_once"},
238
+ {"optionId": "reject", "name": "Reject", "kind": "reject_once"}],
239
+ "occurredAt": "2026-10-30T12:00:00Z"}
240
+ ```
241
+
242
+ - **A person is asked:** the reply is `{"ok": true, "askId": "…", "created": true}`. OpenRig records the seat's
243
+ `permission_prompt`, so it reads needs input. Don't post it yourself.
244
+ - **No one can be asked:** the reply is `{"ok": true, "state": "permitted", "optionId": "…", "reason": "…"}`.
245
+ Deliver that option.
246
+ - **`requestId` and `turnId`** may be strings or numbers. Pass the agent's id unchanged: a number is read as its
247
+ decimal string, so `7` and `"7"` are the same request.
248
+ - **Resubmitting** the same generation, conversation and request id returns the same `askId`.
249
+ 2. **Read** the answer with `GET <base>/api/activity/permission-requests/<askId>?waitSeconds=25` (25 at most), and read
250
+ again until the agent's turn ends.
251
+ - **The `state`** is `pending` (read again, don't cancel), `answered` or `permitted` (each with `optionId`),
252
+ `refused` (with `reason`: `said_no` when the person said no and the agent offered no reject option, or
253
+ `no_allow_offered` when it was closed without a choice and the agent offered no allow option), `withdrawn` or
254
+ `stale`.
255
+ - **A seat grant reads and withdraws only its own launch's requests.** Once its occupant is replaced, the grant is
256
+ refused (`409 activity_grant_stale`), even during a read's wait.
257
+ 3. **Deliver** `{"outcome": {"outcome": "selected", "optionId": "<optionId>"}}` to the agent once, and only while that
258
+ request is still its live one. For `refused`, `withdrawn` or `stale`, answer `cancelled` and hold no attention: no
259
+ person is still waiting. A refusal of the read itself follows the refusals below.
260
+ 4. **Withdraw** when the turn is cancelled or ends, or the agent exits:
261
+ `POST <base>/api/activity/permission-requests/<askId>/withdraw` with
262
+ `{"reason": "turn_cancelled" | "turn_ended" | "exited"}`.
263
+ - A later answer isn't sent.
264
+ - A relaunch makes the earlier occupant's open requests stale on its own.
265
+
266
+ **Refusals, at submit or while reading.** One rule covers both. Cancel only a request that certainly isn't the current
267
+ occupant's live one, and hold no attention. Anything that may still be a live request permits, as when OpenRig can't
268
+ answer. Only the seat's opt-in refuses and holds attention.
269
+
270
+ | Code | Status | Meaning | The runner |
271
+ |---|---|---|---|
272
+ | `denied_by_seat` | 409 | The seat's operator opted in to refusal (`--deny`). | refuses and holds attention |
273
+ | `options_unsupported` | 422 | No one can be asked, and the agent offered no allow option to permit. | refuses and holds attention |
274
+ | `stale_generation` | 409 | With the activity token: the post isn't from the seat's current occupant. | answers `cancelled` |
275
+ | `activity_grant_wrong_seat` | 403 | The grant speaks for another seat. | answers `cancelled` |
276
+ | `activity_grant_stale` | 409 | The grant's launch generation no longer occupies the seat. | answers `cancelled` |
277
+ | `activity_grant_revoked` | 401 | The grant was revoked while its launch generation still occupies the seat, or before it has registered, so this may still be the live request; a replaced occupant's grant reads `activity_grant_stale` instead, even once revoked. | permits |
278
+ | `activity_grant_pending` | 409 | The grant's launch hasn't registered its occupant yet. | permits |
279
+ | `duplicate_request` | 409 | This request id was already submitted in another turn; an agent may reuse an id. | permits |
280
+
281
+ **When the runner can't get an answer from OpenRig,** nobody can be asked, so it permits with the agent's own allow
282
+ option: `allow_once` when offered, else `allow_always`. Prefer `allow_once`, so the harness doesn't remember a
283
+ permission nobody chose. That covers:
284
+ - an OpenRig without this path, which answers 404;
285
+ - an OpenRig the runner can't reach, at submit or while reading (a runner may retry a read that got no answer a few
286
+ times first);
287
+ - a refusal the table marks "permits", and any status or code this section doesn't list.
288
+
289
+ **Limits in 0.7.8:**
290
+ - **The answer owner is a registered person.** Choosing a seat (another agent) to answer is a later change.
291
+ - **A colleague's answer is followed on this host.** If the ask is handed to another host, the request waits, shown as
292
+ needs input, until the agent's turn ends.
293
+ - **An override or `--deny` is set with the command above, never in a rig spec.** A spec field is a possible later
294
+ change.
295
+ - **Permits and answers aren't recorded beyond the runner's pane and the ask itself.** A permit with no one to ask
296
+ opens no ask.
297
+
171
298
  ## 8. Resume: exactly the same conversation, or say honestly that you couldn't
172
299
 
173
300
  - On a resume, OpenRig passes the conversation to reopen in `OPENRIG_RESUME_REF`. Use the method your agent
@@ -203,7 +330,9 @@ existing built-in runtimes or require every possible runner protocol to use ACP.
203
330
  that `--verify` recognises it.
204
331
  - **A turn ending isn't the work being done.** Task completion is whatever the work's own record says: a queue task
205
332
  marked done, or an artifact written.
206
- - **Your own tests** should run against a fake agent that covers each section above.
333
+ - **Your own tests** should run against a fake agent that covers each section above. The
334
+ [runner conformance check](runner-conformance/README.md) does that for you: point it at your runner, and it reports
335
+ which promises your runner keeps.
207
336
  - **The useful real check** for a maintainer:
208
337
  - a seat starts and reads ready only after the handshake;
209
338
  - one multi-line message becomes one prompt;
@@ -223,7 +352,12 @@ existing built-in runtimes or require every possible runner protocol to use ACP.
223
352
  `subtype`. They're sent in order and never block the agent.
224
353
  - [ ] One submitted message becomes exactly one prompt. Only a bare `/abort` block, or Ctrl-C outside a paste, is control.
225
354
  - [ ] Cancel records "requested" when sent, and "cancelled" only on the agent's own stop reason.
226
- - [ ] Every permission request is refused at once, shown, and held as needs input until the next accepted prompt.
355
+ - [ ] Every permission request goes to OpenRig's answered path, and the runner delivers the option that comes back: the
356
+ person's, or OpenRig's permit. When OpenRig can't answer (404, unreachable, or a refusal section 7's table marks
357
+ "permits"), the runner permits with the agent's `allow_once`, else `allow_always`. A refusal that says the request
358
+ isn't the current occupant's, or a `refused` answer, means answer `cancelled` and hold nothing. Only
359
+ `denied_by_seat`, or no allow option to permit, means refuse at once, show it, and hold needs input until the next
360
+ accepted prompt.
227
361
  - [ ] An agent exit posts `Stop` / `<preset name>_exited`, never a plain idle.
228
362
  - [ ] A resume reopens the exact conversation. It reports `missing` only on the agent's word, and otherwise leaves it
229
363
  unconfirmed.
@@ -237,6 +371,7 @@ existing built-in runtimes or require every possible runner protocol to use ACP.
237
371
  2. **For the dsh maintainer:** can dsh's ACP profile run with tools off? A first journey that needs no permission
238
372
  answers is the simplest to check.
239
373
  3. **For OpenRig:** should a later version route permission requests to a chosen seat, as `rig acp run` already does
240
- with queue tasks, instead of refusing them?
374
+ with queue tasks? 0.7.8 routes them to the default person, or to a person chosen for the seat (section 7). A chosen
375
+ seat is still open.
241
376
  4. **For OpenRig:** once a second ACP harness exists, should one shared ACP runner live in OpenRig rather than one per
242
377
  harness?
@@ -0,0 +1,83 @@
1
+ # Pi tool-selection recovery
2
+
3
+ Use this when a live Pi conversation has fewer active tools than its operator
4
+ currently intends. This does not establish why the selection changed or that
5
+ stock Pi/OpenRig lost tools. The motivating report used a customized Pi 1.4.0
6
+ deployment; it is not a stock cross-platform reproduction.
7
+
8
+ ## Diagnose before changing the selection
9
+
10
+ Confirm the exact seat, occupant and conversation, then use an idle boundary.
11
+ Preserve pending work and reconcile unknown writes before any replacement.
12
+ Keep four things separate:
13
+
14
+ - **Configured:** the effective merged `defaultTools` setting. Do not infer it
15
+ from one settings file; retain any unresolved patterns or modifiers as such.
16
+ - **Currently intended:** the tools the operator wants enabled now, including
17
+ deliberate exclusions. Configuration alone does not establish that intention.
18
+ - **Registered:** names the current Pi runtime knows about.
19
+ - **Active:** names returned by `getActiveTools`, which can differ from both.
20
+
21
+ A live RPC connection does not prove the tools are usable. Record observation
22
+ time and conversation binding; an unavailable query stays unknown. Reloading
23
+ unchanged settings can retain session-disabled tools by design, so a reload
24
+ that restores nothing is not itself evidence of accidental loss.
25
+
26
+ ## Choose the interface the seat actually has
27
+
28
+ Pi 1.4.0 includes an opt-in selector at `examples/extensions/tools.ts`. Its
29
+ `/tools` command remembers selection per branch and needs Pi's own TUI. Use it
30
+ where that extension and native TUI are available. **Do not send `/tools` to an
31
+ agent OpenRig drives over RPC**: that interface cannot operate the selector.
32
+
33
+ For RPC seats, an optional [community-maintained helper][helper] provides
34
+ read-only status and an explicit command that adds only named intended tools.
35
+ It is maintained outside OpenRig, is not bundled, and this link is not a support
36
+ claim. Loading it also registers the agent-callable `openrig_runtime_status` and
37
+ `openrig_slots` tools; the latter reads a snapshot of the bound rig's agents and
38
+ active queue items. It can add a prompt section when a guidance file is set.
39
+ Review its [shared implementation][runtime] and
40
+ [setup/capability limits][setup] before opting in through Pi's per-seat extension
41
+ configuration. Keep the two helper files together; do not install the separate
42
+ RepoStew application just to use the neutral bridge. Verify what the target
43
+ session actually loaded after the supported activation path.
44
+
45
+ With that helper already loaded, these are **Pi extension commands**, not new
46
+ `rig` commands:
47
+
48
+ ```text
49
+ /openrig-status
50
+ /openrig-restore-tools read
51
+ ```
52
+
53
+ For an agent OpenRig drives over RPC, send each extension command with
54
+ `rig send <agent> --raw "<command>"` so it arrives without a messaging envelope;
55
+ the usual interactive-prompt guard still applies.
56
+
57
+ The second command means that `read` is intended now. It does not restore every
58
+ configured default. If `bash` was deliberately disabled, leave it disabled
59
+ unless the operator explicitly intends to add it too. With no names, this helper
60
+ refuses to change the selection.
61
+
62
+ ## Verify the recovery
63
+
64
+ 1. Establish the explicit current intended names. Reject unregistered or hidden
65
+ requested tools before changing anything; do not infer replacement names.
66
+ 2. Preserve current active extras: `setActiveTools` **replaces** the selection,
67
+ so pass the union of current active names and only the requested names. It can
68
+ ignore names it cannot activate; sending the command is not proof of recovery.
69
+ 3. Read `getActiveTools` back. Retain a before/after receipt with the intended
70
+ names and any missing names, then make a harmless actual call to a recovered
71
+ tool within the existing task authority. Listed-active is not proof of usable
72
+ permissions or working execution.
73
+
74
+ This changes tool selection, not permission policy, task authority or conversation
75
+ identity. It does not automatically persist a new branch selection; verify again
76
+ after branch navigation or reload. If the runtime cannot support or verify this
77
+ in place, report that capability gap and follow its supported replacement path
78
+ with retained work. Do not manufacture a fresh conversation or claim that another
79
+ harness has Pi's capabilities.
80
+
81
+ [helper]: https://github.com/dajiaohuang/repostew/blob/adf9f36c23e27cf40cf8dd2dae887972a0dc776b/skill/integrations/pi-openrig.js
82
+ [runtime]: https://github.com/dajiaohuang/repostew/blob/adf9f36c23e27cf40cf8dd2dae887972a0dc776b/skill/integrations/pi-runtime.js
83
+ [setup]: https://github.com/dajiaohuang/repostew/blob/adf9f36c23e27cf40cf8dd2dae887972a0dc776b/skill/references/harnesses/pi.md
@@ -17,7 +17,7 @@ npx skills add https://github.com/mvschwarz/openrig/tree/<release-tag>/skills/ri
17
17
  npx skills add https://github.com/mvschwarz/openrig/tree/<release-tag>/skills/rigs --skill rigs --agent codex
18
18
  ```
19
19
 
20
- For a new install, use the latest release's tag, for example `v0.7.6`. If OpenRig is already installed, use the tag
20
+ For a new install, use the latest release's tag, for example `v0.7.8`. If OpenRig is already installed, use the tag
21
21
  that matches `rig --version`, or upgrade first. If the command fails with `npx: command not found`, Node.js isn't
22
22
  installed or isn't on your PATH yet (see [What you need](#what-you-need)). Then type `/rigs` in Claude Code, or `$rigs` in Codex, and say what
23
23
  you want built.
@@ -635,8 +635,15 @@ Use `env:` for settings only. Credentials belong in the provider's own login or
635
635
 
636
636
  ### Switching credentials while keeping the conversation
637
637
 
638
- `rig provider switch` resumes a running seat in its existing home and pane. For Claude Code,
639
- select an API-key file, a subscription-token file, or the home's stored login:
638
+ `rig provider switch` resumes a running seat in its existing home and pane. A stopped Claude Code
639
+ seat isn't relaunched: the switch saves the new reference for its next launch, but only when the
640
+ launch it predicts resumes the seat's conversation. That prediction covers the snapshot that
641
+ launch would use and restore's automatic periodic carry. It then prints the launch that resumes:
642
+ `rig launch <rig> <seat> --snapshot-id <id>` for a saved conversation, or a plain
643
+ `rig launch <rig> <seat>` when the resume comes through the periodic carry, which naming a
644
+ snapshot would turn off. Otherwise it refuses and changes nothing. `rig provider precheck` gives
645
+ the same answer.
646
+ For Claude Code, select an API-key file, a subscription-token file, or the home's stored login:
640
647
 
641
648
  ```sh
642
649
  rig provider precheck --seat dev-a@my-rig --to-account api-budget --api-key-file /secure/claude-api-key
@@ -742,6 +749,7 @@ directory's `CLAUDE.md`, including blocks written by other rigs.
742
749
  | `model` | string | no | — | Model override. Runtime-specific (e.g., `claude-opus-4-6` for Claude Code). |
743
750
  | `effort` | string | no | — | Reasoning effort override, trimmed. Claude gets `--effort`, Codex `-c model_reasoning_effort=…`, Pi `--thinking` (see "Pi" below). A non-string value is ignored with an advisory. |
744
751
  | `advisor` | string | no | — | Claude-only Advisor model for this seat. Overrides the AgentSpec profile/default; blank or non-string values are ignored with an advisory. |
752
+ | `claude_mcp` | `none` | no | normal loading | Claude members only. Disable MCP server loading for this agent on every launch and resume. Omit the field to keep Claude's normal configuration; see [Claude MCP loading](#claude-mcp-loading-runtime-claude-code). |
745
753
  | `permission_policy` | string | no | — | Member-level permission policy; overrides the rig's. Not valid on terminal members. |
746
754
  | `env` | map | no | — | Launch environment for this seat, laid over the rig's `env`. Same rules as the rig-level field. Valid on terminal members too. See "Launch environment" below. |
747
755
  | `agent_file` | string | no | — | Claude members only. A Claude agent definition (a `.md` file with `name` in its frontmatter) for this seat. It's copied into the seat's own storage and launched as `--agent openrig:<name>`. A path beside the spec: no `..`, not absolute. |
@@ -755,6 +763,53 @@ directory's `CLAUDE.md`, including blocks written by other rigs.
755
763
  | `starter_ref` | object | no | — | `{ name }` of an agent starter (`^[a-zA-Z0-9][a-zA-Z0-9_-]*$`) whose files lead the seat's startup. Not valid on terminal members or with a fork. |
756
764
  | `startup` | StartupBlock | no | — | Member-level startup files and actions. Applied only to this member. |
757
765
 
766
+ ### Claude MCP loading (`runtime: claude-code`)
767
+
768
+ Set `claude_mcp: none` on an individual member to launch it without MCP servers:
769
+
770
+ ```yaml
771
+ members:
772
+ - id: reviewer
773
+ agent_ref: local:agents/reviewer
774
+ profile: default
775
+ runtime: claude-code
776
+ cwd: .
777
+ claude_mcp: none
778
+ ```
779
+
780
+ OpenRig passes `--strict-mcp-config --mcp-config '{"mcpServers":{}}'` to
781
+ Claude for this seat. Strict mode selects only the supplied empty server set,
782
+ excluding servers from user, project, team and plugin configuration. It does
783
+ not disable plugin skills or change the seat's permission mode. The choice is
784
+ saved on the seat and carried through fresh starts, forks, resumes (including
785
+ saved startup context) and handover successors. Export and bundle round trips
786
+ preserve it. The same field is supported on legacy `nodes` declarations.
787
+
788
+ Other agents in the same directory keep their own choices; OpenRig does not
789
+ rewrite shared MCP configuration files. Omit the field for Claude's normal
790
+ loading. A later launch from an authored spec without the field clears the
791
+ seat's saved opt-out once the launch is accepted for startup; a rejected
792
+ launch leaves the choice unchanged. Restarting from saved context keeps it.
793
+ Only `none` is accepted, and the field is invalid on other runtimes. If the
794
+ seat switches to another runtime, the Claude choice stays dormant and applies
795
+ again if it switches back. A currently running Claude process is unaffected.
796
+ Export describes the current runtime and omits a dormant Claude choice. YAML
797
+ exports name each affected agent in a `# Not carried:` comment, which `rig export`
798
+ also prints after writing the file; JSON exports keep their existing shape. If
799
+ you rebuild from that export and switch back to Claude, restore `claude_mcp: none`
800
+ in the Claude declaration. Re-check this setting after downgrading
801
+ OpenRig too: older versions can ignore it.
802
+
803
+ Shutdown resume probes and the displayed native recovery commands (including
804
+ the conversation picker) also carry the saved MCP choice. If shutdown cannot
805
+ read that choice, it skips the probe and retains the token; shutdown proceeds.
806
+
807
+ This opt-out is incompatible with an active enterprise `managed-mcp.json`:
808
+ [Claude rejects strict overrides of that managed server set](https://code.claude.com/docs/en/managed-mcp#servers-passed-with---mcp-config-or---strict-mcp-config).
809
+ OpenRig keeps the requested opt-out flags, so startup and resume remain subject
810
+ to that native refusal; it does not fall back to loading servers. Use a host
811
+ without that managed configuration, or omit the opt-out to use the managed set.
812
+
758
813
  ### Claude Advisor (`runtime: claude-code`)
759
814
 
760
815
  Set `advisor` independently of the primary `model`:
@@ -944,19 +999,21 @@ the modified topology, run `rig snapshot <rig-id>` and use its returned ID with
944
999
 
945
1000
  Startup blocks can appear at three levels: rig, pod, and member. They are merged additively via the startup layering model (see [the layering model](agent-startup-guide.md#the-layering-model)). The rig's `culture_file` joins as a required file with the `auto` hint in the culture layer, on both fresh start and restore.
946
1001
 
947
- `rig export` includes the rig's saved culture file and startup block, and now also
948
- writes each pod's saved startup files under that pod. The file order, delivery
949
- hints, required flags, orientation and `applies_on` selections are retained.
950
- Previously the saved pod file lists were omitted. Pods without a recorded file
951
- list, including older rigs, keep their existing export behavior; the exporter
952
- does not reconstruct declarations from a member's combined startup context.
1002
+ For member `startup:`, export uses that seat's retained launch recipe (or its pre-launch materialization) rather than guessing from projected files. If that source is unavailable or a member's files came from a different rig root, the YAML names the member's omitted startup; JSON export names omissions in the `X-OpenRig-Export-Warnings` response header. An older seat without a recipe may have had no member startup or an unretained one: inspect its source before re-importing. When member startup files are present in the export, `rig export` checks required paths against the output folder and warns for missing files. The export does not copy member startup files.
1003
+
1004
+ `rig export` includes the rig's saved culture file and startup block, and writes
1005
+ saved pod startup files and actions under their pod. The file and action order,
1006
+ delivery hints, required flags, orientation and `applies_on` selections are retained.
1007
+ Pod actions are saved for export when a new rig is created; older rigs and pods
1008
+ added from a separate expansion may not have those declarations recorded. Export
1009
+ does not reconstruct them from a member's combined startup context; keep the source
1010
+ spec when those declarations are needed. This does not change which startup actions
1011
+ are inherited when a seat is added later.
953
1012
 
954
1013
  File paths remain relative to the exported spec's folder. When exporting to a
955
1014
  different folder, supply the referenced startup files there or import with the
956
- original `--rig-root`. The CLI warns once per missing required rig or pod file;
957
- missing optional files do not trigger that warning. Pod startup actions and
958
- member startup blocks remain outside this export; keep the source spec when you
959
- need those declarations.
1015
+ original `--rig-root`. The CLI warns once per missing required rig, pod or member
1016
+ file; missing optional files do not trigger that warning.
960
1017
 
961
1018
  ### Files
962
1019
 
@@ -0,0 +1,75 @@
1
+ # Runner conformance check
2
+
3
+ A runnable check for runner authors. Point it at your runner and it reports which promises of the
4
+ [harness and runner contract](../harness-runner-contract.md) your runner keeps. It needs Node and tmux, and no OpenRig
5
+ daemon, model, credentials or network.
6
+
7
+ ```sh
8
+ node check-runner.mjs --runner 'my-runner --agent-command {agent}' --name my-harness --resume --first-input
9
+ ```
10
+
11
+ - **`{agent}`** is replaced with the path of the fake ACP agent beside this file. Your runner starts it where it would
12
+ start your real agent. It accepts any arguments your runner adds.
13
+ - **`--name`** is your preset's name, which your posts carry as `runtime`.
14
+ - **`--resume` and `--first-input`** say your preset declares `resume: true` and `first_input: true`. Without them,
15
+ those cases are skipped, because OpenRig wouldn't pass that input.
16
+ - **`--cases 2,4`** runs only some cases. `--json` prints a machine-readable report. `--keep` keeps each launch's
17
+ folder: the agent's message log, the launch record and the scenario.
18
+ - **`--wait-ms 20000`** waits longer for each step (default 8000), for a runner whose agent takes a while to start. The check's shorter settling times, and the fake agent's own delays and holds, grow in proportion.
19
+ - **`--pass-env NAME`** passes one more variable through. Otherwise the runner gets only `PATH`, `HOME`, `USER`,
20
+ `SHELL`, `LANG` and `TMPDIR`, plus the OpenRig variables.
21
+ - **The exit status** is 0 when nothing fails, 1 when a case fails, and 2 for a usage or setup problem. An advisory result (7c) never changes it.
22
+
23
+ In an installed OpenRig, the check is at `$(npm root -g)/@openrig/cli/daemon/docs/reference/runner-conformance/`.
24
+
25
+ ## How it runs
26
+
27
+ - **Your runner** starts in a private tmux server, with the environment a runner-preset launch gives it:
28
+ `OPENRIG_URL`, `OPENRIG_ACTIVITY_HOOK_TOKEN`, `OPENRIG_SESSION_NAME`, `OPENRIG_NODE_ID`, `OPENRIG_RUNTIME`,
29
+ `OPENRIG_OCCUPANT_GENERATION`, `OPENRIG_LAUNCH_RESULT` and `OPENRIG_LAUNCH_ATTEMPT`, plus `OPENRIG_RESUME_REF` or
30
+ `OPENRIG_FIRST_INPUT` when a case needs them. `OPENRIG_HOME` is an empty folder, so nothing reaches a real OpenRig.
31
+ - **The fake agent** speaks ACP v1 over stdio. Each case gives it a scenario, such as a slow handshake, a permission
32
+ request, a turn that ends cancelled, or an exit mid-turn. It logs every message in both directions. Its own request
33
+ ids are numbers, as JSON-RPC agents commonly use, so a runner passes them on unchanged.
34
+ - **A local endpoint** stands in for `POST /api/activity/hooks`. It records each post, and refuses one without the
35
+ launch's bearer token, as OpenRig does.
36
+ - **In cases 4 and 4b,** it also stands in for the answered path's three routes: submit, read with `waitSeconds`, and
37
+ withdraw. It checks a submit the way OpenRig does: the seat and generation, `nativeRef` as a non-empty string, `turnId`
38
+ and `requestId` as a string or a number (a number reads as its decimal string). Options a person can't be shown (not
39
+ 2-4 of them, ids that repeat or use other characters, or other kinds) are permitted with the agent's allow option, as OpenRig does. Each launch scripts the answer,
40
+ the permit or the refusal it gives, or closes the connection unanswered.
41
+ - **Where a launch scripts none of that,** those routes answer 404, as an OpenRig without the answered path does, so
42
+ the runner permits.
43
+ - **Input arrives the way `rig send` delivers it:** the text is pasted as one bracketed paste with raw newlines, then
44
+ Enter is pressed. Ordinary messages carry a From/To envelope.
45
+
46
+ ## The cases
47
+
48
+ | Case | Contract section | What it checks |
49
+ |---|---|---|
50
+ | 1 | 3 | No launch record until `session/new` is answered. Then a record holding format 1, this attempt, the preset's name, the agent's conversation id and a `producer` |
51
+ | 1b | 3, 4 | A handshake that fails at `initialize` or `session/new` (an error or an exit) writes no conversation in a launch record, and posts no accepted prompt or idle report |
52
+ | 2 | 5, 6 | One pasted block becomes exactly one `session/prompt`, byte for byte. A line reading `/abort` inside a block isn't control. A block sent mid-turn waits for the next turn. A block that is exactly `/abort`, or Ctrl-C outside a paste, sends one `session/cancel`. `Stop/cancelled` is posted only when the agent itself returns `cancelled` |
53
+ | 3 | 4 | `UserPromptSubmit/accepted` with a `turnId`, then `Stop/end_turn`. Every post carries the contract's fields, the hook token, this seat's identity and a rising `sequence`. `livenessSeconds`, when given, is from 1 to 3600 |
54
+ | 4 | 7 | When no one can be asked, the request is permitted: an OpenRig without the answered path (404) at once, and one the runner can't reach, each get the agent's `allow_once` option, never its `allow_always` while `allow_once` is offered. The turn then reports as usual, with no `permission_prompt`. Only `denied_by_seat`, or a request with no allow option, is answered at once with a refusal, never an allow option. `Notification/permission_prompt` is then posted, and for `denied_by_seat` the pane shows what was asked (the tool call's title). No idle `Stop` or beat is posted while that attention is held, even when `/abort` then cancels the turn. The next prompt is accepted as usual |
55
+ | 4b | 7 | The live request is submitted with the hook token, its `requestId` as the agent's JSON-RPC id, passed unchanged, the accepted prompt's `turnId`, this conversation and generation, and the agent's options as offered. The runner doesn't post `permission_prompt` itself for a created ask, and each read waits at most 25 s. The chosen option, allow or deny, reaches the agent once, and the turn then reports as usual. OpenRig's `permitted`, at submit or at a read, reaches the agent the same way. A refusal is read by its code, never its status: one section 7's table marks "permits" (`duplicate_request`, `activity_grant_pending`, `activity_grant_revoked`), a read that gets no answer, and a status or read state the section doesn't list (500, `deferred`) each give the agent its `allow_once` option. A refusal saying the request isn't the current occupant's (`stale_generation` at submit, `activity_grant_stale` on a read), and a `refused` (`said_no`), stale or withdrawn read, give the agent `cancelled`, and the turn then ends as usual, with nothing held. With no answer, the request stays pending with no idle report, and a pasted message isn't an answer. `/abort` withdraws it with `turn_cancelled`, and an answer after that isn't delivered. A turn's end or the agent's exit while it waits withdraws it with `turn_ended` or `exited`. Once the ask is withdrawn no person is still waiting, so the turn's end is reported as usual. An ask the runner permitted after a read got no answer, or an unlisted one, may still be open, so it's withdrawn at the turn's end too |
56
+ | 5 | 4 | Every post carries `OPENRIG_OCCUPANT_GENERATION` |
57
+ | 6 | 8 | A resume asks the agent to reopen `OPENRIG_RESUME_REF` in the launch's working folder, and records that conversation. The agent's own not-found becomes `error: "missing"`. Any other failure is neither missing nor resumed. No case starts a new conversation |
58
+ | 7 | 4 | An agent that dies mid-turn gets `Stop/<preset>_exited`, and no idle report after it |
59
+ | 7b | 4 | A failed `session/prompt` posts `Notification/runtime_error`, not a permission request |
60
+ | 7c | 9 | **Advisory.** Closing the pane ends the agent process. Section 9 marks this duty as proposed, and lets a runner list in `limits` what may keep running, so this result is shown as met or not met and never counts as a pass or a fail, or toward the exit status. The fake agent outlives a hangup here, so the runner has to end it |
61
+ | 8 | 7 | An unknown request from the agent gets JSON-RPC `-32601`, and the next prompt still goes through |
62
+ | 9 | 9 | `OPENRIG_FIRST_INPUT`'s exact bytes, newlines and spaces included, are the first prompt |
63
+
64
+ ## What it doesn't check
65
+
66
+ - **How OpenRig reads your posts:** working, idle, needs input, unknown after an exit, a send refused while a
67
+ permission waits, and an earlier generation not counting. That's OpenRig's side of the contract, and its own tests
68
+ cover it.
69
+ - **Your real agent:** a passing check isn't a run with your agent. Section 10's real check, with your agent under a
70
+ runner preset, is still the useful evidence. Passing this is evidence for the versions you ran, not certification.
71
+ - **The model handoff:** `OPENRIG_MODEL` is mapped to your harness's own setting, with no wire this check can see.
72
+ - **A resume for a preset without `resume`:** OpenRig doesn't pass `OPENRIG_RESUME_REF` to it.
73
+ - **Restarting the agent after a failed handshake:** the contract doesn't rule on that.
74
+ - **The chosen person's side of an ask:** who may answer, the Feed and Slack are OpenRig's side, and its own tests
75
+ cover them. Routing an ask to a seat is a later change.