@openrig/cli 0.6.6 → 0.6.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 (637) hide show
  1. package/README.md +97 -28
  2. package/daemon/assets/claude-team-permissions.cjs +262 -0
  3. package/daemon/assets/onboarding/02-self-and-competent-action.md +20 -13
  4. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  5. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  6. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus-health.cjs +41 -0
  7. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +69 -12
  8. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +13 -2
  9. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +4 -0
  10. package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +6 -0
  11. package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +1 -1
  12. package/daemon/assets/plugins/openrig-core/skills/refocusing/SKILL.md +31 -4
  13. package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +24 -13
  14. package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +3 -0
  15. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +42 -0
  16. package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +6 -0
  17. package/daemon/assets/skills/rigs/SKILL.md +133 -0
  18. package/daemon/context-packs/help/help.md +48 -19
  19. package/daemon/context-packs/help/manifest.yaml +1 -1
  20. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  21. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +239 -43
  22. package/daemon/context-packs/reference/getting-started.md +356 -212
  23. package/daemon/context-packs/reference/instance-layout.md +5 -0
  24. package/daemon/context-packs/reference/manifest.yaml +4 -1
  25. package/daemon/context-packs/reference/rig-spec.md +48 -20
  26. package/daemon/context-packs/reference/whats-new.md +96 -0
  27. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  28. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  29. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  30. package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +13 -2
  31. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  32. package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +4 -0
  33. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  34. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  35. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  36. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  37. package/daemon/context-packs/skills/core/messaging-the-human/SKILL.md +6 -0
  38. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/core/openrig-architect/SKILL.md +3 -0
  40. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  41. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  43. package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +1 -1
  44. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/core/openrig-software-factory/SKILL.md +19 -12
  46. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +17 -16
  48. package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +2 -0
  49. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  51. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  52. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  54. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  59. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  60. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  66. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  68. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  74. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  76. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  77. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  78. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  79. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  80. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  81. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  82. package/daemon/context-packs/skills/refocusing/SKILL.md +31 -4
  83. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  84. package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +24 -13
  85. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/SKILL.md +3 -0
  86. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  87. package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +42 -0
  88. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  89. package/daemon/context-packs/skills/session-compaction-and-restore/SKILL.md +6 -0
  90. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  91. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  92. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  93. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  94. package/daemon/dist/adapters/claude-code-adapter.d.ts +1 -1
  95. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  96. package/daemon/dist/adapters/claude-code-adapter.js +23 -13
  97. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  98. package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
  99. package/daemon/dist/adapters/codex-resume.js +17 -0
  100. package/daemon/dist/adapters/codex-resume.js.map +1 -1
  101. package/daemon/dist/adapters/codex-runtime-adapter.js +2 -2
  102. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  103. package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -1
  104. package/daemon/dist/adapters/kernel-authority.js +29 -11
  105. package/daemon/dist/adapters/kernel-authority.js.map +1 -1
  106. package/daemon/dist/adapters/pi-readiness.d.ts +15 -0
  107. package/daemon/dist/adapters/pi-readiness.d.ts.map +1 -0
  108. package/daemon/dist/adapters/pi-readiness.js +90 -0
  109. package/daemon/dist/adapters/pi-readiness.js.map +1 -0
  110. package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
  111. package/daemon/dist/adapters/pi-runner-protocol.js +1 -0
  112. package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
  113. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
  114. package/daemon/dist/adapters/pi-runner.js +13 -2
  115. package/daemon/dist/adapters/pi-runner.js.map +1 -1
  116. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  117. package/daemon/dist/adapters/tmux.js +9 -6
  118. package/daemon/dist/adapters/tmux.js.map +1 -1
  119. package/daemon/dist/build-info.js +3 -3
  120. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  121. package/daemon/dist/db/all-migrations.js +4 -0
  122. package/daemon/dist/db/all-migrations.js.map +1 -1
  123. package/daemon/dist/db/migrations/096_rig_install_root.d.ts +3 -0
  124. package/daemon/dist/db/migrations/096_rig_install_root.d.ts.map +1 -0
  125. package/daemon/dist/db/migrations/096_rig_install_root.js +5 -0
  126. package/daemon/dist/db/migrations/096_rig_install_root.js.map +1 -0
  127. package/daemon/dist/db/migrations/097_thread_part_map.d.ts +3 -0
  128. package/daemon/dist/db/migrations/097_thread_part_map.d.ts.map +1 -0
  129. package/daemon/dist/db/migrations/097_thread_part_map.js +20 -0
  130. package/daemon/dist/db/migrations/097_thread_part_map.js.map +1 -0
  131. package/daemon/dist/domain/activity-taxonomy.d.ts +7 -0
  132. package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
  133. package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
  134. package/daemon/dist/domain/agent-activity-store.d.ts +12 -0
  135. package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
  136. package/daemon/dist/domain/agent-activity-store.js +55 -30
  137. package/daemon/dist/domain/agent-activity-store.js.map +1 -1
  138. package/daemon/dist/domain/agent-images/agent-image-types.d.ts +1 -1
  139. package/daemon/dist/domain/agent-images/agent-image-types.d.ts.map +1 -1
  140. package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
  141. package/daemon/dist/domain/bootstrap-orchestrator.js +6 -4
  142. package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
  143. package/daemon/dist/domain/bundle-install-context.d.ts +2 -2
  144. package/daemon/dist/domain/bundle-install-context.d.ts.map +1 -1
  145. package/daemon/dist/domain/bundle-install-context.js +16 -3
  146. package/daemon/dist/domain/bundle-install-context.js.map +1 -1
  147. package/daemon/dist/domain/bundle-types.d.ts +1 -1
  148. package/daemon/dist/domain/bundle-types.d.ts.map +1 -1
  149. package/daemon/dist/domain/chat-repository.d.ts +5 -0
  150. package/daemon/dist/domain/chat-repository.d.ts.map +1 -1
  151. package/daemon/dist/domain/chat-repository.js +8 -0
  152. package/daemon/dist/domain/chat-repository.js.map +1 -1
  153. package/daemon/dist/domain/claim-service.d.ts.map +1 -1
  154. package/daemon/dist/domain/claim-service.js +5 -4
  155. package/daemon/dist/domain/claim-service.js.map +1 -1
  156. package/daemon/dist/domain/claude-activity-hooks.d.ts +3 -0
  157. package/daemon/dist/domain/claude-activity-hooks.d.ts.map +1 -1
  158. package/daemon/dist/domain/claude-activity-hooks.js +8 -1
  159. package/daemon/dist/domain/claude-activity-hooks.js.map +1 -1
  160. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +34 -2
  161. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  162. package/daemon/dist/domain/claude-compaction-enforcer.js +195 -107
  163. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  164. package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
  165. package/daemon/dist/domain/codex-thread-id.js +4 -2
  166. package/daemon/dist/domain/codex-thread-id.js.map +1 -1
  167. package/daemon/dist/domain/context-monitor.d.ts +5 -0
  168. package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
  169. package/daemon/dist/domain/context-monitor.js +23 -6
  170. package/daemon/dist/domain/context-monitor.js.map +1 -1
  171. package/daemon/dist/domain/execution-view.d.ts.map +1 -1
  172. package/daemon/dist/domain/execution-view.js +57 -11
  173. package/daemon/dist/domain/execution-view.js.map +1 -1
  174. package/daemon/dist/domain/gateway/connections-projection.d.ts +4 -0
  175. package/daemon/dist/domain/gateway/connections-projection.d.ts.map +1 -1
  176. package/daemon/dist/domain/gateway/connections-projection.js +2 -0
  177. package/daemon/dist/domain/gateway/connections-projection.js.map +1 -1
  178. package/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -1
  179. package/daemon/dist/domain/gateway/destination-resolver.js +7 -4
  180. package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
  181. package/daemon/dist/domain/gateway/human-readiness.d.ts.map +1 -1
  182. package/daemon/dist/domain/gateway/human-readiness.js +23 -6
  183. package/daemon/dist/domain/gateway/human-readiness.js.map +1 -1
  184. package/daemon/dist/domain/gateway/human-registry.d.ts +2 -2
  185. package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
  186. package/daemon/dist/domain/gateway/human-registry.js +2 -2
  187. package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
  188. package/daemon/dist/domain/gateway/slack/capabilities.d.ts.map +1 -1
  189. package/daemon/dist/domain/gateway/slack/capabilities.js +3 -1
  190. package/daemon/dist/domain/gateway/slack/capabilities.js.map +1 -1
  191. package/daemon/dist/domain/gateway/slack/channel-map.d.ts +39 -0
  192. package/daemon/dist/domain/gateway/slack/channel-map.d.ts.map +1 -0
  193. package/daemon/dist/domain/gateway/slack/channel-map.js +114 -0
  194. package/daemon/dist/domain/gateway/slack/channel-map.js.map +1 -0
  195. package/daemon/dist/domain/gateway/slack/config.d.ts +7 -0
  196. package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
  197. package/daemon/dist/domain/gateway/slack/config.js +19 -2
  198. package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
  199. package/daemon/dist/domain/gateway/slack/inbound.d.ts +24 -1
  200. package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
  201. package/daemon/dist/domain/gateway/slack/inbound.js +105 -3
  202. package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
  203. package/daemon/dist/domain/gateway/slack/message.d.ts +7 -0
  204. package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
  205. package/daemon/dist/domain/gateway/slack/message.js +36 -0
  206. package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
  207. package/daemon/dist/domain/gateway/slack/queue-access.d.ts +2 -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 +1 -0
  210. package/daemon/dist/domain/gateway/slack/queue-access.js.map +1 -1
  211. package/daemon/dist/domain/gateway/slack/slack-api.d.ts +7 -2
  212. package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
  213. package/daemon/dist/domain/gateway/slack/slack-api.js +35 -3
  214. package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
  215. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +34 -7
  216. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
  217. package/daemon/dist/domain/gateway/slack/slack-delivery.js +268 -51
  218. package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
  219. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts +17 -0
  220. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
  221. package/daemon/dist/domain/gateway/slack/slack-subsystem.js +107 -24
  222. package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
  223. package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts +2 -0
  224. package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts.map +1 -1
  225. package/daemon/dist/domain/gateway/slack/socket-inbound.js +40 -0
  226. package/daemon/dist/domain/gateway/slack/socket-inbound.js.map +1 -1
  227. package/daemon/dist/domain/gateway/slack/thread-routing.d.ts.map +1 -1
  228. package/daemon/dist/domain/gateway/slack/thread-routing.js +22 -2
  229. package/daemon/dist/domain/gateway/slack/thread-routing.js.map +1 -1
  230. package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts +14 -0
  231. package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts.map +1 -1
  232. package/daemon/dist/domain/gateway/slack/thread-seat-map.js +27 -0
  233. package/daemon/dist/domain/gateway/slack/thread-seat-map.js.map +1 -1
  234. package/daemon/dist/domain/generated-file-hygiene.d.ts.map +1 -1
  235. package/daemon/dist/domain/generated-file-hygiene.js +7 -4
  236. package/daemon/dist/domain/generated-file-hygiene.js.map +1 -1
  237. package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
  238. package/daemon/dist/domain/managed-blocks.js +5 -2
  239. package/daemon/dist/domain/managed-blocks.js.map +1 -1
  240. package/daemon/dist/domain/markdown-address.d.ts.map +1 -1
  241. package/daemon/dist/domain/markdown-address.js +23 -6
  242. package/daemon/dist/domain/markdown-address.js.map +1 -1
  243. package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
  244. package/daemon/dist/domain/native-process-lineage.js +50 -3
  245. package/daemon/dist/domain/native-process-lineage.js.map +1 -1
  246. package/daemon/dist/domain/node-inventory.d.ts +2 -2
  247. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  248. package/daemon/dist/domain/node-inventory.js +30 -4
  249. package/daemon/dist/domain/node-inventory.js.map +1 -1
  250. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  251. package/daemon/dist/domain/node-launcher.js +1 -0
  252. package/daemon/dist/domain/node-launcher.js.map +1 -1
  253. package/daemon/dist/domain/pane-binding-observation.d.ts +1 -0
  254. package/daemon/dist/domain/pane-binding-observation.d.ts.map +1 -1
  255. package/daemon/dist/domain/pane-binding-observation.js +3 -1
  256. package/daemon/dist/domain/pane-binding-observation.js.map +1 -1
  257. package/daemon/dist/domain/plugin-vendor-service.d.ts +6 -0
  258. package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
  259. package/daemon/dist/domain/plugin-vendor-service.js +12 -0
  260. package/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
  261. package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  262. package/daemon/dist/domain/profile-resolver.js +54 -15
  263. package/daemon/dist/domain/profile-resolver.js.map +1 -1
  264. package/daemon/dist/domain/ps-projection.d.ts +11 -9
  265. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  266. package/daemon/dist/domain/ps-projection.js +15 -12
  267. package/daemon/dist/domain/ps-projection.js.map +1 -1
  268. package/daemon/dist/domain/queue-nudge-text.d.ts +4 -0
  269. package/daemon/dist/domain/queue-nudge-text.d.ts.map +1 -0
  270. package/daemon/dist/domain/queue-nudge-text.js +35 -0
  271. package/daemon/dist/domain/queue-nudge-text.js.map +1 -0
  272. package/daemon/dist/domain/queue-repository.d.ts +7 -0
  273. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  274. package/daemon/dist/domain/queue-repository.js +50 -20
  275. package/daemon/dist/domain/queue-repository.js.map +1 -1
  276. package/daemon/dist/domain/queue-retention.d.ts +2 -2
  277. package/daemon/dist/domain/queue-retention.js +4 -4
  278. package/daemon/dist/domain/queue-wait-backoff.d.ts.map +1 -1
  279. package/daemon/dist/domain/queue-wait-backoff.js +6 -2
  280. package/daemon/dist/domain/queue-wait-backoff.js.map +1 -1
  281. package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
  282. package/daemon/dist/domain/queue-waiting.js +7 -2
  283. package/daemon/dist/domain/queue-waiting.js.map +1 -1
  284. package/daemon/dist/domain/queue-wake-ladder.d.ts +15 -2
  285. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  286. package/daemon/dist/domain/queue-wake-ladder.js +29 -6
  287. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  288. package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
  289. package/daemon/dist/domain/rehydrate-eligibility.js +5 -2
  290. package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
  291. package/daemon/dist/domain/reply-to-choice.d.ts +6 -2
  292. package/daemon/dist/domain/reply-to-choice.d.ts.map +1 -1
  293. package/daemon/dist/domain/reply-to-choice.js +9 -6
  294. package/daemon/dist/domain/reply-to-choice.js.map +1 -1
  295. package/daemon/dist/domain/restore-check-service.d.ts +5 -1
  296. package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
  297. package/daemon/dist/domain/restore-check-service.js +17 -3
  298. package/daemon/dist/domain/restore-check-service.js.map +1 -1
  299. package/daemon/dist/domain/restore-orchestrator.d.ts +1 -0
  300. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  301. package/daemon/dist/domain/restore-orchestrator.js +17 -11
  302. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  303. package/daemon/dist/domain/rig-repository.d.ts +3 -1
  304. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  305. package/daemon/dist/domain/rig-repository.js +13 -4
  306. package/daemon/dist/domain/rig-repository.js.map +1 -1
  307. package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
  308. package/daemon/dist/domain/rig-teardown.js +6 -0
  309. package/daemon/dist/domain/rig-teardown.js.map +1 -1
  310. package/daemon/dist/domain/rigspec-instantiator.d.ts +1 -0
  311. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  312. package/daemon/dist/domain/rigspec-instantiator.js +1 -1
  313. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  314. package/daemon/dist/domain/rigspec-preflight.d.ts +1 -1
  315. package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
  316. package/daemon/dist/domain/rigspec-preflight.js +8 -4
  317. package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
  318. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  319. package/daemon/dist/domain/rigspec-schema.js +19 -4
  320. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  321. package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
  322. package/daemon/dist/domain/seat-activity-service.js +16 -6
  323. package/daemon/dist/domain/seat-activity-service.js.map +1 -1
  324. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  325. package/daemon/dist/domain/seat-handover-service.js +9 -1
  326. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  327. package/daemon/dist/domain/session-jsonl.d.ts.map +1 -1
  328. package/daemon/dist/domain/session-jsonl.js +10 -4
  329. package/daemon/dist/domain/session-jsonl.js.map +1 -1
  330. package/daemon/dist/domain/session-transport.d.ts +16 -21
  331. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  332. package/daemon/dist/domain/session-transport.js +70 -37
  333. package/daemon/dist/domain/session-transport.js.map +1 -1
  334. package/daemon/dist/domain/skill-audit.d.ts +19 -0
  335. package/daemon/dist/domain/skill-audit.d.ts.map +1 -1
  336. package/daemon/dist/domain/skill-audit.js +97 -5
  337. package/daemon/dist/domain/skill-audit.js.map +1 -1
  338. package/daemon/dist/domain/skill-catalog.d.ts +11 -0
  339. package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
  340. package/daemon/dist/domain/skill-catalog.js +145 -12
  341. package/daemon/dist/domain/skill-catalog.js.map +1 -1
  342. package/daemon/dist/domain/skill-mirror-drift.d.ts +6 -1
  343. package/daemon/dist/domain/skill-mirror-drift.d.ts.map +1 -1
  344. package/daemon/dist/domain/skill-mirror-drift.js +23 -12
  345. package/daemon/dist/domain/skill-mirror-drift.js.map +1 -1
  346. package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
  347. package/daemon/dist/domain/snapshot-repository.js +12 -32
  348. package/daemon/dist/domain/snapshot-repository.js.map +1 -1
  349. package/daemon/dist/domain/terminal/herdr-adapter.d.ts +4 -1
  350. package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
  351. package/daemon/dist/domain/terminal/herdr-adapter.js +14 -7
  352. package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
  353. package/daemon/dist/domain/terminal/terminal-provider.d.ts +9 -0
  354. package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
  355. package/daemon/dist/domain/terminal/terminal-service.d.ts +4 -0
  356. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  357. package/daemon/dist/domain/terminal/terminal-service.js +23 -11
  358. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  359. package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  360. package/daemon/dist/domain/transcript-store.js +21 -9
  361. package/daemon/dist/domain/transcript-store.js.map +1 -1
  362. package/daemon/dist/domain/types.d.ts +2 -0
  363. package/daemon/dist/domain/types.d.ts.map +1 -1
  364. package/daemon/dist/domain/types.js.map +1 -1
  365. package/daemon/dist/domain/usage-samples-store.js +2 -2
  366. package/daemon/dist/domain/usage-samples-store.js.map +1 -1
  367. package/daemon/dist/domain/usage-series.d.ts.map +1 -1
  368. package/daemon/dist/domain/usage-series.js +42 -10
  369. package/daemon/dist/domain/usage-series.js.map +1 -1
  370. package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
  371. package/daemon/dist/domain/user-settings/settings-browser.js +2 -0
  372. package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
  373. package/daemon/dist/domain/user-settings/settings-store.js +1 -1
  374. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  375. package/daemon/dist/domain/watchdog-due.d.ts +17 -0
  376. package/daemon/dist/domain/watchdog-due.d.ts.map +1 -0
  377. package/daemon/dist/domain/watchdog-due.js +45 -0
  378. package/daemon/dist/domain/watchdog-due.js.map +1 -0
  379. package/daemon/dist/domain/watchdog-scheduler.d.ts.map +1 -1
  380. package/daemon/dist/domain/watchdog-scheduler.js +3 -7
  381. package/daemon/dist/domain/watchdog-scheduler.js.map +1 -1
  382. package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
  383. package/daemon/dist/domain/workflow-projector.js +15 -5
  384. package/daemon/dist/domain/workflow-projector.js.map +1 -1
  385. package/daemon/dist/domain/workflow-runtime.js +1 -1
  386. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  387. package/daemon/dist/domain/workflow-step-trail-log.d.ts +6 -0
  388. package/daemon/dist/domain/workflow-step-trail-log.d.ts.map +1 -1
  389. package/daemon/dist/domain/workflow-step-trail-log.js +11 -0
  390. package/daemon/dist/domain/workflow-step-trail-log.js.map +1 -1
  391. package/daemon/dist/domain/workflow-validator.d.ts.map +1 -1
  392. package/daemon/dist/domain/workflow-validator.js +22 -1
  393. package/daemon/dist/domain/workflow-validator.js.map +1 -1
  394. package/daemon/dist/domain/workspace/project-catalog.js +1 -1
  395. package/daemon/dist/domain/workspace/project-catalog.js.map +1 -1
  396. package/daemon/dist/gateway-slack-surface.d.ts +1 -0
  397. package/daemon/dist/gateway-slack-surface.d.ts.map +1 -1
  398. package/daemon/dist/gateway-slack-surface.js +2 -1
  399. package/daemon/dist/gateway-slack-surface.js.map +1 -1
  400. package/daemon/dist/index.d.ts +1 -0
  401. package/daemon/dist/index.d.ts.map +1 -1
  402. package/daemon/dist/index.js +7 -7
  403. package/daemon/dist/index.js.map +1 -1
  404. package/daemon/dist/routes/agent-images.js +5 -5
  405. package/daemon/dist/routes/agent-images.js.map +1 -1
  406. package/daemon/dist/routes/bootstrap-failure-response.d.ts +13 -0
  407. package/daemon/dist/routes/bootstrap-failure-response.d.ts.map +1 -0
  408. package/daemon/dist/routes/bootstrap-failure-response.js +52 -0
  409. package/daemon/dist/routes/bootstrap-failure-response.js.map +1 -0
  410. package/daemon/dist/routes/bundles.d.ts.map +1 -1
  411. package/daemon/dist/routes/bundles.js +23 -36
  412. package/daemon/dist/routes/bundles.js.map +1 -1
  413. package/daemon/dist/routes/chat.d.ts.map +1 -1
  414. package/daemon/dist/routes/chat.js +16 -1
  415. package/daemon/dist/routes/chat.js.map +1 -1
  416. package/daemon/dist/routes/restore-check.d.ts.map +1 -1
  417. package/daemon/dist/routes/restore-check.js +2 -0
  418. package/daemon/dist/routes/restore-check.js.map +1 -1
  419. package/daemon/dist/routes/rigs.js +2 -2
  420. package/daemon/dist/routes/rigs.js.map +1 -1
  421. package/daemon/dist/routes/seat.js +13 -13
  422. package/daemon/dist/routes/seat.js.map +1 -1
  423. package/daemon/dist/routes/sessions.js +11 -11
  424. package/daemon/dist/routes/sessions.js.map +1 -1
  425. package/daemon/dist/routes/skills.d.ts.map +1 -1
  426. package/daemon/dist/routes/skills.js +15 -7
  427. package/daemon/dist/routes/skills.js.map +1 -1
  428. package/daemon/dist/routes/terminal-ws.js +15 -2
  429. package/daemon/dist/routes/terminal-ws.js.map +1 -1
  430. package/daemon/dist/routes/terminal.d.ts.map +1 -1
  431. package/daemon/dist/routes/terminal.js +6 -4
  432. package/daemon/dist/routes/terminal.js.map +1 -1
  433. package/daemon/dist/routes/up.d.ts.map +1 -1
  434. package/daemon/dist/routes/up.js +5 -56
  435. package/daemon/dist/routes/up.js.map +1 -1
  436. package/daemon/dist/startup.d.ts.map +1 -1
  437. package/daemon/dist/startup.js +32 -7
  438. package/daemon/dist/startup.js.map +1 -1
  439. package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
  440. package/daemon/dist/terminal/TerminalSessionBroker.js +9 -1
  441. package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
  442. package/daemon/docs/reference/agent-spec.md +10 -10
  443. package/daemon/docs/reference/agent-startup-guide.md +7 -2
  444. package/daemon/docs/reference/bundle-formats.md +6 -4
  445. package/daemon/docs/reference/chain-file-convention.md +2 -2
  446. package/daemon/docs/reference/developing.md +1 -1
  447. package/daemon/docs/reference/edge-types.md +1 -1
  448. package/daemon/docs/reference/getting-started.md +356 -212
  449. package/daemon/docs/reference/help.md +48 -19
  450. package/daemon/docs/reference/instance-layout.md +5 -0
  451. package/daemon/docs/reference/non-interruptive-mode.md +7 -4
  452. package/daemon/docs/reference/project-workspace.md +2 -2
  453. package/daemon/docs/reference/publishing-a-rig-bundle.md +15 -10
  454. package/daemon/docs/reference/refocus-channel.md +14 -2
  455. package/daemon/docs/reference/rig-bundle.md +39 -19
  456. package/daemon/docs/reference/rig-spec.md +48 -20
  457. package/daemon/docs/reference/rosters.md +2 -1
  458. package/daemon/docs/reference/schemas/registry-entry.v1.schema.json +1 -1
  459. package/daemon/docs/reference/sdlc-conventions.md +4 -2
  460. package/daemon/docs/reference/slack-app-setup.md +69 -9
  461. package/daemon/docs/reference/topology-naming.md +74 -0
  462. package/daemon/docs/reference/whats-new.md +96 -0
  463. package/daemon/specs/agents/shared/skills/core/messaging-the-human/SKILL.md +6 -0
  464. package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +3 -0
  465. package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +1 -1
  466. package/daemon/specs/agents/shared/skills/core/openrig-software-factory/SKILL.md +19 -12
  467. package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +17 -16
  468. package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +2 -0
  469. package/daemon/specs/rigs/launch/factory/guidance/lead-first-move.md +60 -0
  470. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +105 -19
  471. package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +5 -2
  472. package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +44 -0
  473. package/dist/build-info.js +3 -3
  474. package/dist/cli-error.d.ts.map +1 -1
  475. package/dist/cli-error.js +11 -3
  476. package/dist/cli-error.js.map +1 -1
  477. package/dist/client.d.ts +2 -0
  478. package/dist/client.d.ts.map +1 -1
  479. package/dist/client.js +2 -0
  480. package/dist/client.js.map +1 -1
  481. package/dist/commands/agent-image.js +2 -2
  482. package/dist/commands/agent-image.js.map +1 -1
  483. package/dist/commands/bundle.d.ts.map +1 -1
  484. package/dist/commands/bundle.js +5 -4
  485. package/dist/commands/bundle.js.map +1 -1
  486. package/dist/commands/chatroom.d.ts.map +1 -1
  487. package/dist/commands/chatroom.js +21 -1
  488. package/dist/commands/chatroom.js.map +1 -1
  489. package/dist/commands/context.d.ts.map +1 -1
  490. package/dist/commands/context.js +12 -2
  491. package/dist/commands/context.js.map +1 -1
  492. package/dist/commands/doctor.d.ts +3 -1
  493. package/dist/commands/doctor.d.ts.map +1 -1
  494. package/dist/commands/doctor.js +14 -7
  495. package/dist/commands/doctor.js.map +1 -1
  496. package/dist/commands/down.d.ts.map +1 -1
  497. package/dist/commands/down.js +42 -0
  498. package/dist/commands/down.js.map +1 -1
  499. package/dist/commands/gateway.d.ts.map +1 -1
  500. package/dist/commands/gateway.js +4 -3
  501. package/dist/commands/gateway.js.map +1 -1
  502. package/dist/commands/launch.d.ts.map +1 -1
  503. package/dist/commands/launch.js +114 -8
  504. package/dist/commands/launch.js.map +1 -1
  505. package/dist/commands/package.d.ts.map +1 -1
  506. package/dist/commands/package.js +6 -3
  507. package/dist/commands/package.js.map +1 -1
  508. package/dist/commands/policy.d.ts.map +1 -1
  509. package/dist/commands/policy.js +6 -5
  510. package/dist/commands/policy.js.map +1 -1
  511. package/dist/commands/proof.js +1 -1
  512. package/dist/commands/proof.js.map +1 -1
  513. package/dist/commands/queue.d.ts.map +1 -1
  514. package/dist/commands/queue.js +6 -3
  515. package/dist/commands/queue.js.map +1 -1
  516. package/dist/commands/restore-packet.d.ts.map +1 -1
  517. package/dist/commands/restore-packet.js +6 -4
  518. package/dist/commands/restore-packet.js.map +1 -1
  519. package/dist/commands/scope.js +6 -6
  520. package/dist/commands/scope.js.map +1 -1
  521. package/dist/commands/setup.d.ts +6 -15
  522. package/dist/commands/setup.d.ts.map +1 -1
  523. package/dist/commands/setup.js +121 -332
  524. package/dist/commands/setup.js.map +1 -1
  525. package/dist/commands/skill.d.ts.map +1 -1
  526. package/dist/commands/skill.js +12 -1
  527. package/dist/commands/skill.js.map +1 -1
  528. package/dist/commands/slack.d.ts +5 -1
  529. package/dist/commands/slack.d.ts.map +1 -1
  530. package/dist/commands/slack.js +143 -6
  531. package/dist/commands/slack.js.map +1 -1
  532. package/dist/commands/stream.js +1 -1
  533. package/dist/commands/stream.js.map +1 -1
  534. package/dist/commands/terminal.d.ts +33 -0
  535. package/dist/commands/terminal.d.ts.map +1 -1
  536. package/dist/commands/terminal.js +30 -12
  537. package/dist/commands/terminal.js.map +1 -1
  538. package/dist/commands/tui.js +4 -4
  539. package/dist/commands/tui.js.map +1 -1
  540. package/dist/commands/workflow-follow.d.ts +1 -1
  541. package/dist/commands/workflow-follow.d.ts.map +1 -1
  542. package/dist/commands/workflow-follow.js +4 -3
  543. package/dist/commands/workflow-follow.js.map +1 -1
  544. package/dist/commands/workflow.d.ts.map +1 -1
  545. package/dist/commands/workflow.js +30 -18
  546. package/dist/commands/workflow.js.map +1 -1
  547. package/dist/config-store.js +1 -1
  548. package/dist/config-store.js.map +1 -1
  549. package/dist/front-door.d.ts.map +1 -1
  550. package/dist/front-door.js +4 -2
  551. package/dist/front-door.js.map +1 -1
  552. package/dist/herdr-launch-config.d.ts +3 -0
  553. package/dist/herdr-launch-config.d.ts.map +1 -0
  554. package/dist/herdr-launch-config.js +37 -0
  555. package/dist/herdr-launch-config.js.map +1 -0
  556. package/dist/index.d.ts.map +1 -1
  557. package/dist/index.js +2 -1
  558. package/dist/index.js.map +1 -1
  559. package/dist/launch-plan-guard.d.ts +27 -0
  560. package/dist/launch-plan-guard.d.ts.map +1 -0
  561. package/dist/launch-plan-guard.js +73 -0
  562. package/dist/launch-plan-guard.js.map +1 -0
  563. package/dist/lib/bundle-source.d.ts +2 -0
  564. package/dist/lib/bundle-source.d.ts.map +1 -1
  565. package/dist/lib/bundle-source.js +12 -1
  566. package/dist/lib/bundle-source.js.map +1 -1
  567. package/dist/lib/context-git.d.ts +2 -0
  568. package/dist/lib/context-git.d.ts.map +1 -1
  569. package/dist/lib/context-git.js +55 -5
  570. package/dist/lib/context-git.js.map +1 -1
  571. package/dist/lib/scope/scope-fs.d.ts +3 -2
  572. package/dist/lib/scope/scope-fs.d.ts.map +1 -1
  573. package/dist/lib/scope/scope-fs.js +97 -9
  574. package/dist/lib/scope/scope-fs.js.map +1 -1
  575. package/dist/lib/scope/templates.d.ts.map +1 -1
  576. package/dist/lib/scope/templates.js +28 -24
  577. package/dist/lib/scope/templates.js.map +1 -1
  578. package/dist/provider-auth.d.ts +32 -0
  579. package/dist/provider-auth.d.ts.map +1 -0
  580. package/dist/provider-auth.js +128 -0
  581. package/dist/provider-auth.js.map +1 -0
  582. package/dist/terminal-window.d.ts +19 -0
  583. package/dist/terminal-window.d.ts.map +1 -0
  584. package/dist/terminal-window.js +513 -0
  585. package/dist/terminal-window.js.map +1 -0
  586. package/package.json +2 -2
  587. package/tui/dist/commands/registry.js +2 -2
  588. package/tui/dist/commands/registry.js.map +1 -1
  589. package/tui/dist/config/config-model.d.ts.map +1 -1
  590. package/tui/dist/config/config-model.js +1 -0
  591. package/tui/dist/config/config-model.js.map +1 -1
  592. package/tui/dist/connections/connections-model.d.ts +5 -0
  593. package/tui/dist/connections/connections-model.d.ts.map +1 -1
  594. package/tui/dist/connections/connections-model.js +1 -1
  595. package/tui/dist/connections/connections-model.js.map +1 -1
  596. package/tui/dist/daemon-client.d.ts +5 -0
  597. package/tui/dist/daemon-client.d.ts.map +1 -1
  598. package/tui/dist/daemon-client.js.map +1 -1
  599. package/tui/dist/execution/workflow-model.d.ts.map +1 -1
  600. package/tui/dist/execution/workflow-model.js +3 -1
  601. package/tui/dist/execution/workflow-model.js.map +1 -1
  602. package/tui/dist/hydrate.d.ts +1 -1
  603. package/tui/dist/hydrate.d.ts.map +1 -1
  604. package/tui/dist/hydrate.js +3 -1
  605. package/tui/dist/hydrate.js.map +1 -1
  606. package/tui/dist/main.js +39 -15
  607. package/tui/dist/main.js.map +1 -1
  608. package/tui/dist/page-read.js +1 -1
  609. package/tui/dist/page-read.js.map +1 -1
  610. package/tui/dist/pending-address.d.ts +7 -0
  611. package/tui/dist/pending-address.d.ts.map +1 -0
  612. package/tui/dist/pending-address.js +11 -0
  613. package/tui/dist/pending-address.js.map +1 -0
  614. package/tui/dist/render.d.ts.map +1 -1
  615. package/tui/dist/render.js +10 -6
  616. package/tui/dist/render.js.map +1 -1
  617. package/tui/dist/scopes/scopes-model.js +4 -4
  618. package/tui/dist/socket-server.d.ts +3 -1
  619. package/tui/dist/socket-server.d.ts.map +1 -1
  620. package/tui/dist/socket-server.js +6 -0
  621. package/tui/dist/socket-server.js.map +1 -1
  622. package/tui/dist/state.d.ts.map +1 -1
  623. package/tui/dist/state.js +40 -13
  624. package/tui/dist/state.js.map +1 -1
  625. package/tui/dist/stylize.js +1 -1
  626. package/tui/dist/stylize.js.map +1 -1
  627. package/tui/dist/terminals/open-window.d.ts +5 -0
  628. package/tui/dist/terminals/open-window.d.ts.map +1 -0
  629. package/tui/dist/terminals/open-window.js +55 -0
  630. package/tui/dist/terminals/open-window.js.map +1 -0
  631. package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
  632. package/tui/dist/terminals/terminal-model.js +16 -17
  633. package/tui/dist/terminals/terminal-model.js.map +1 -1
  634. package/tui/dist/types.d.ts +16 -1
  635. package/tui/dist/types.d.ts.map +1 -1
  636. package/ui/dist/assets/{index-HHSvwF97.js → index-D5n8EwkG.js} +1 -1
  637. package/ui/dist/index.html +1 -1
package/README.md CHANGED
@@ -14,13 +14,24 @@ It's the open-source system behind my AI civilization experiments.
14
14
 
15
15
  ![The OpenRig TUI: the build rig as a graph, then as a table of seats with runtime, model, context and state, then one seat in detail (real recording, 10 seconds)](assets/readme/openrig-agents-working.gif)
16
16
 
17
- **Start here:** [the guided first-use path](docs/reference/getting-started.md): install, launch a two-agent team in your repository, and get one reviewed change.
17
+ **Start here:** [the guided first-use path](docs/reference/getting-started.md): install, talk to the kernel operator, then choose a team for your first useful change.
18
18
 
19
19
  Not setting this up today? Get the next walkthrough and occasional OpenRig updates → https://openrig.dev/follow
20
20
 
21
21
  ## Install and first run
22
22
 
23
- Requires Node.js 22 or 24 and tmux, on macOS or Linux. On Linux, the distribution's own Node.js can be older (Ubuntu 24.04's is 18); install a supported version with [nvm](https://github.com/nvm-sh/nvm) (`nvm install 22`) or NodeSource. On a Mac with Apple silicon, use Node.js 22 ([compatibility history](docs/releases/v0.5.15.md#known-compatibility-limitation)). Native Windows is not supported yet, and WSL2 has not been tested. Launching a rig writes provider hooks and workspace trust settings. Before running the commands below, read [what OpenRig changes on your machine](#what-openrig-changes-on-your-machine) and back up the relevant files.
23
+ Requires Node.js 22 or 24 and tmux, on macOS or Linux. On Linux, the distribution's own Node.js can be older (Ubuntu 24.04's is 18); install a supported version with [nvm](https://github.com/nvm-sh/nvm) (`nvm install 22`) or NodeSource. On a Mac with Apple silicon, use Node.js 22 ([compatibility history](docs/releases/v0.5.15.md#known-compatibility-limitation)). On Windows, use WSL2, the Windows route OpenRig supports; native Windows isn't supported. OpenRig's automated tests don't run on WSL2 yet; see [one user's working setup](docs/reference/getting-started.md#wsl2-a-reported-working-setup). Launching a rig writes provider hooks and workspace trust settings. Before running the commands below, read [what OpenRig changes on your machine](#what-openrig-changes-on-your-machine) and back up the relevant files.
24
+
25
+ **One command.** This runs OpenRig's install script from the `v0.6.8` release. It checks Node.js and npm, installs the latest published `@openrig/cli` with `npm install -g`, runs the Node.js and SQLite check, then runs `rig setup --dry-run` and `rig setup`. The first line prints that plan and changes nothing:
26
+
27
+ ```bash
28
+ curl -fsSL https://raw.githubusercontent.com/mvschwarz/openrig/v0.6.8/scripts/install.sh | sh -s -- --dry-run
29
+ curl -fsSL https://raw.githubusercontent.com/mvschwarz/openrig/v0.6.8/scripts/install.sh | sh
30
+ ```
31
+
32
+ If a provider isn't signed in yet, the last step reports `FAILED [4/4]`, and `rig setup` lists the sign-in under "Some steps need attention". If the only remaining failures are provider sign-ins, the install steps finished; sign in to each selected provider as below and continue.
33
+
34
+ **Or step by step:**
24
35
 
25
36
  ```bash
26
37
  npm install -g @openrig/cli
@@ -31,32 +42,83 @@ To install with Bun instead, run `bun add -g @openrig/cli`. OpenRig still runs o
31
42
 
32
43
  npm 11 and later can skip that postinstall script and print `npm warn install-scripts` naming `@openrig/cli`. That's expected: the CLI still works, and only the Node.js and SQLite check was skipped. To run it yourself, use `node "$(npm root -g)/@openrig/cli/scripts/check-abi.mjs"`; `rig doctor` checks the Node.js version only.
33
44
 
34
- Choose the working account you already have: **Claude Code, Codex, or both**. Reuse an explicit choice; no second subscription is required. `rig setup --dry-run` previews the broader setup, but applying `rig setup` checks both harnesses and installs a missing one, and on macOS cmux too. It is optional for the [selected-provider path](docs/reference/getting-started.md#choose-your-providers).
45
+ Choose the working account you already have: **Claude Code, Codex, or both**. Reuse an explicit choice; no second subscription is required. `rig setup --dry-run` previews the broader setup; applying `rig setup` checks both harnesses and installs a missing one, plus Herdr unless declined with `--no-herdr`. On macOS, the installing agent offers Ghostty once. Setup leaves an existing cmux installation alone. It is optional for the [selected-provider path](docs/reference/getting-started.md#choose-your-providers).
46
+
47
+ A team seat with no permission policy, per-seat choice or (for Codex) named profile launches with OpenRig's [team default](docs/reference/rig-spec.md#team-launch-defaults): Claude runs ordinary `rig` commands, project reads and common tests without prompting, while lifecycle commands such as `rig up` and `rig down` still ask; Codex also gets the OpenRig workspace and its pod's state directory as writable directories. Before launching, your agent recommends keeping that default, and offers to remember selected OpenRig commands in your native settings only if you want that, at personal project scope unless you explicitly choose user-wide sessions. It is not global YOLO or permission to invent work. On Yes, the agent [adds and verifies native rules](docs/reference/getting-started.md#have-your-agent-configure-permissions); No or no answer keeps the team default and leaves settings unchanged. An existing explicit choice is reused. Say “Undo the OpenRig command allowances added by this setup” to remove only its additions.
35
48
 
36
- Before launching, your agent asks once: **“Allow your agents to run OpenRig commands without repeated permission prompts?” Yes — recommended / No — keep prompts.** This covers every `rig` command, including starting/stopping agents and configuration, at personal project scope unless you explicitly choose user-wide sessions. It is not global YOLO or permission to invent work. On Yes, the agent [adds and verifies native rules](docs/reference/getting-started.md#have-your-agent-configure-permissions); No or no answer leaves settings unchanged. An existing explicit choice is reused. Say “Undo the OpenRig command allowances added by this setup” to remove only its additions.
49
+ If permission prompts are slowing you down, consider the
50
+ [workshop bundle](https://openrig.dev/rigs/workshop). It ships with broad access
51
+ and [non-interruptive mode](docs/reference/non-interruptive-mode.md): its agents
52
+ bypass permission prompts and supported harness warning dialogs. The listing
53
+ and before-install view explain that access before you choose it.
37
54
 
38
55
  Check `tmux -V` and only your selected CLI/login: `claude --version` plus
39
56
  `claude auth status`, or `codex --version` plus `codex login status`. If needed,
40
57
  sign in once with `claude auth login` or `codex login`; do not install or log in
41
58
  to an unused provider.
42
59
 
60
+ ### Your agent opens OpenRig for you
61
+
62
+ After installing, your agent opens the OpenRig TUI and the operator for you. To get back to them later, ask your
63
+ agent for OpenRig or your agents in any words. After checking the selected login, it runs:
64
+
65
+ ```sh
66
+ rig daemon start # if stopped
67
+ rig terminal open saved:kernel --window
68
+ ```
69
+
70
+ `--window` opens a new terminal tab or window itself, or a space in your current
71
+ Herdr session. Below 120 measured columns,
72
+ the **operator** fills the first page; from 120, the dashboard and operator share
73
+ it equally. The advisor has a separate tab or tmux window.
74
+ An installing agent can run it from its shell on the daemon's
75
+ desktop; the person copies nothing. It uses Herdr when installed, otherwise
76
+ the same layout in plain tmux, and preserves existing conversations. `rig tui`
77
+ is the team dashboard. Installation is finished when you are talking to the
78
+ operator; if you choose to talk later, that handoff remains pending.
79
+
80
+ If setup stops, read the named step: missing tools and selected-provider logins
81
+ need their specific setup action. A harness permission rule, sandbox or automatic
82
+ permission decision can also block the installing agent's command. The agent
83
+ should name the command and reported reason, then help you resolve that specific
84
+ step within your chosen permissions. A permission refusal is not an OpenRig
85
+ installation result.
86
+
87
+ The desktop may need an Automation approval; SSH/headless sessions may have no
88
+ display. Herdr can show first-run panels, and an 80×24 window can cramp the view.
89
+ Follow [the OpenRig view checks and next steps](docs/reference/getting-started.md#what-can-interrupt-installation-and-the-openrig-view).
90
+ Herdr is visible only inside a terminal you can see. Changing the shared TUI to
91
+ `:terminals` does not open that terminal. The agent checks the visible window when
92
+ it has desktop access and says what it could not verify otherwise. Over headless
93
+ SSH, it asks you to open a new terminal window or tab and gives the exact connection
94
+ and attachment command for the current view. If you choose a manual attachment
95
+ after a failure,
96
+ ask the installing agent for the exact command using your current operator
97
+ session; run that in a new terminal window.
98
+
43
99
  The kernel's operator helps you pick a first team. It asks what you want to build,
44
100
  recommends one of three, and fits it to the providers you have.
45
101
 
46
- | Team | Agents | For |
102
+ | Team | Talk to | Agents and purpose |
47
103
  | --- | --- | --- |
48
- | `starter` | A builder (`dev-build`, Claude Code) and a reviewer (`dev-review`, Codex) | One bounded change |
49
- | `workshop` | A lead, a builder, QA and a reviewer | Ongoing work in one repository; a rig bundle the operator installs from its pinned listing |
50
- | `factory` | Seven: a lead, an advisor, build, QA, design and two independent reviewers | Sustained product work |
104
+ | `starter` | `dev-build@starter` | A Claude Code builder and Codex reviewer for one bounded change |
105
+ | `workshop` | `orch-lead@workshop` | A lead, builder, QA and reviewer for ongoing work in one repository; a rig bundle the operator installs from its pinned listing |
106
+ | `factory` | `orch-lead@factory` | Seven: a lead, advisor, build, QA, design and two independent reviewers for sustained product work |
51
107
 
52
108
  As shipped, `starter` uses both Claude Code and Codex. With only one of them, ask
53
109
  the kernel operator to adapt it: it writes a copy of the team for your providers
54
- under the same name. `first-project` is starter's old name and still starts it.
110
+ under the same name. [The naming guide](docs/reference/topology-naming.md) explains
111
+ how their pods and roles grow and how to name your own team. `first-project` is
112
+ starter's old name and still starts it,
113
+ unless you already have a rig named `first-project` or `starter`: then it refuses
114
+ and names the `rig up <name> --existing` command that brings that rig back.
55
115
  Show the selected runtime, configured model and command before launch; confirm the
56
116
  account supports the model instead of silently falling back. The kernel starts
57
117
  automatically and selects from available authenticated providers independently of
58
118
  these teams. A missing unused provider is not a setup requirement.
59
119
 
120
+ To launch the starter yourself instead (the manual path, without the operator):
121
+
60
122
  ```bash
61
123
  cd /path/to/your/repository
62
124
  rig specs preview starter --kind rig
@@ -64,9 +126,7 @@ rig up starter --cwd . --plan
64
126
  rig up starter --cwd .
65
127
  ```
66
128
 
67
- After installation, your agent should [open a **new kernel conversation space**](docs/reference/getting-started.md#open-the-kernel-conversations): `rig terminal open saved:kernel --provider herdr`, then cmux or a plain terminal if unavailable. The default view needs no YAML edit. The agent tells you before opening it and keeps its own terminal and your existing spaces intact. The guide also gives the manual and SSH commands.
68
-
69
- The kernel provides separate operational support and the shared dashboard. To detach without stopping the dashboard, press Ctrl-b then d; `rig tui --shared` returns to that view. Plain `rig tui` opens an independent view. Closing a viewing terminal does not mean you should relaunch the team.
129
+ To see your agents, use `rig terminal open saved:kernel --window`. If that window cannot open, `rig tui --shared` is the named dashboard-only fallback; it does not show the operator conversation. The installing agent should resolve or explain the window failure, not finish by suggesting a command for you to type. Closing a viewing terminal does not mean you should relaunch the team.
70
130
 
71
131
  Check project-seat readiness with `rig ps --nodes --rig starter` and resolve any authentication, trust or permission prompt before assigning work. If a seat stopped at such a prompt before its startup context arrived, `rig ps` shows the `rig seat continue <seat>` command that delivers it once the prompt is answered. Then give the builder one bounded outcome from your repository:
72
132
 
@@ -99,11 +159,11 @@ using a published package, since repository guidance can be ahead of npm.
99
159
  | When | What changes and why |
100
160
  | --- | --- |
101
161
  | **npm installation** | Installs the CLI (`rig` and `openrig-tui`), bundled components and dependencies under your npm prefix (with Bun, under Bun's global directory). OpenRig's postinstall checks the Node.js version and that the SQLite module loads; Bun may block this script. It does not run daemon or provider setup. |
102
- | **`rig setup`** | Attempts missing tools and writes an OpenRig block in `~/.tmux.conf` for mouse support and scrollback. On macOS it can install cmux and enable its automation socket control in `~/.config/cmux/settings.json`; cmux defaults `automation.socketControlMode` to `cmuxOnly`, which only accepts processes started inside cmux and so blocks OpenRig's control, so setup switches it to `automation`. `--full` adds workstation tools. `--dry-run` shows setup's plan without applying it. |
103
- | **Daemon startup** | Creates/updates instance state under `OPENRIG_HOME` (normally `~/.openrig`), including its database and managed plugin resources. Seeds the `openrig-skills` discovery skill in `~/.claude/skills` and `~/.agents/skills`, subject to existing version ownership. With `runtime.codex.hooks_enabled` enabled (the default), writes Codex hook configuration and trust records as described below—even before a rig launches. |
104
- | **Rig/seat launch and attachment** | Creates tmux sessions, supplies seat identity and daemon connection environment, and projects selected guidance, skills, plugins and runtime resources into the workspace. Managed startup pre-trusts the workspace. Claude context collection can also be provisioned for attached sessions and refreshed during monitoring. In a Git repository, newly created files under `.codex/plugins/openrig-core/` are added to the repository's Git `info/exclude` inside an `# BEGIN OpenRig generated files` block; new `AGENTS.md`, `CLAUDE.md` and `CLAUDE.local.md` files stay visible with a warning. |
162
+ | **`rig setup`** | Attempts missing tools and writes an OpenRig block in `~/.tmux.conf` for mouse support and scrollback. Installs herdr by default on macOS and Linux unless declined with `--no-herdr`; an unavailable herdr install is a warning. On macOS the installing agent offers Ghostty, and `--ghostty` attempts it after acceptance. Existing cmux settings are left unchanged. `--full` adds workstation tools. `--dry-run` shows setup's plan without applying it. |
163
+ | **Daemon startup** | Creates/updates instance state under `OPENRIG_HOME` (normally `~/.openrig`), including its database and managed plugin resources. Seeds the `openrig-skills` discovery skill, the `refocusing` skill and the person-facing `rigs` skill in `~/.claude/skills` and `~/.agents/skills`, subject to existing version ownership. With `runtime.codex.hooks_enabled` enabled (the default), writes Codex hook configuration and trust records as described below—even before a rig launches. |
164
+ | **Rig/seat launch and attachment** | Creates tmux sessions, supplies seat identity and daemon connection environment, and projects selected guidance, skills, plugins and runtime resources into the workspace. Managed startup pre-trusts the workspace. Claude context collection can also be provisioned for attached sessions and refreshed during monitoring. In a Git repository, newly created files under `.codex/plugins/shared:openrig-core/` (or the unqualified `.codex/plugins/openrig-core/`) are added to the repository's Git `info/exclude` inside an `# BEGIN OpenRig generated files` block; new `AGENTS.md`, `CLAUDE.md` and `CLAUDE.local.md` files stay visible with a warning. |
105
165
  | **Bundle install** (`rig bundle install`, or `rig up` with a `.rigbundle` or GitHub link) | Writes the bundle's files into the install target: `--target`, or the current directory for `rig up` and for a GitHub link. `rig bundle install` with a local archive needs `--target`. Routes its declared skills, plugins and context packs into your libraries. A GitHub link's archive is kept under `OPENRIG_HOME/bundle-imports/`, and installs are recorded in `OPENRIG_HOME/bundle-audit.jsonl`. A bundle that carries a project creates it under `workspace.projects_root` and records it, with the rig's association, in the workspace catalog. |
106
- | **Explicit permission configuration** | The built-in bootstrap does **not** add `rig` command allow rules. Agent-guided setup recommends Yes and requires your actual answer before the agent [adds rules at your chosen scope](docs/reference/getting-started.md#have-your-agent-configure-permissions). No/no answer preserves settings; existing choices and stricter rules remain relevant. Broader access is separate. |
166
+ | **Explicit permission configuration** | The built-in bootstrap does **not** add `rig` command allow rules to your settings files; a team seat with no permission policy, per-seat choice or (for Codex) named profile gets the per-launch [team default](docs/reference/rig-spec.md#team-launch-defaults) instead. Agent-guided setup recommends keeping it and requires your actual answer before the agent [adds remembered rules at your chosen scope](docs/reference/getting-started.md#have-your-agent-configure-permissions). No/no answer keeps the team default and preserves settings; existing choices and stricter rules remain relevant. Broader access is separate. |
107
167
 
108
168
  The provider files are separate from instance state. Here `~` means the daemon
109
169
  user's home; changing `OPENRIG_HOME` alone does not isolate provider configuration.
@@ -114,7 +174,8 @@ user's home; changing `OPENRIG_HOME` alone does not isolate provider configurati
114
174
  writes `HOME/.claude.json`, and also `<CLAUDE_CONFIG_DIR>/.claude.json` when the
115
175
  daemon has that variable set. In the workspace, `.claude/settings.local.json` receives
116
176
  the context collector's `statusLine` command and selected activity hooks;
117
- helper scripts live under `.openrig/`. Selected settings/MCP resources can also
177
+ the collector script lives under `.openrig/`, and the activity-hook relay under
178
+ the instance's `state/claude-activity-hooks/`. Selected settings/MCP resources can also
118
179
  change that settings file and `.mcp.json`. The shared settings resource sets
119
180
  `permissions.defaultMode` to `acceptEdits` and enables Exa/Context7 MCP entries;
120
181
  selected MCP resources configure those external services. Built-in bootstrap
@@ -124,8 +185,9 @@ user's home; changing `OPENRIG_HOME` alone does not isolate provider configurati
124
185
  `~/.codex/config.toml`). Startup enables hooks, adds the OpenRig activity relay
125
186
  commands and pre-writes trust hashes for those commands. Seat startup adds
126
187
  `trust_level = "trusted"` for the workspace; selected config resources can
127
- add MCP settings. Recognized update notices can be skipped during launch,
128
- recording the skipped version in Codex's cache; this is not an update install.
188
+ add MCP settings. Managed launches pass `-c check_for_update_on_startup=false`,
189
+ which writes no config; a recognized update notice that still appears can be
190
+ skipped, recording the skipped version in Codex's cache; this is not an update install.
129
191
 
130
192
  Activity relays send event type/subtype, seat/runtime identity, timestamps and
131
193
  native session identity to the configured OpenRig daemon's `/api/activity/hooks`
@@ -148,11 +210,16 @@ answer in time, the launch is left unchanged.
148
210
  Fresh Codex launches also add writable access to the workspace's `.git` and the
149
211
  pod's shared queue-state directory with `--add-dir`; the shared root comes from
150
212
  `OPENRIG_SHARED_DOCS_ROOT` or `~/.openrig/shared-docs`.
213
+ A team seat with no permission policy, per-seat choice or (for Codex) named
214
+ profile also gets the per-launch team default: Claude gets `--settings` allowing
215
+ ordinary `rig` commands, project reads and common tests, with a session-only
216
+ PreToolUse hook that asks before lifecycle commands, and Codex also gets the
217
+ OpenRig workspace root as a writable directory. Neither writes a permission file.
151
218
  Seats of the rig named `kernel` launch with an operational default instead,
152
219
  unless a permission policy, a per-seat choice or (for Codex) a named profile
153
- applies: Claude in `acceptEdits` with a per-launch allow list for its file tools
154
- and operational commands (including reads under your home folder), and Codex with
155
- `-s danger-full-access -a never`. Neither writes a permission file.
220
+ applies: Claude in `acceptEdits` with a per-launch allow list for its file tools,
221
+ web fetches and operational commands (including reads under your home folder),
222
+ and Codex with `-s danger-full-access -a never`. Neither writes a permission file.
156
223
  YOLO is **off by default**. An explicitly selected full-bypass policy selects
157
224
  Claude's `--dangerously-skip-permissions` or Codex's
158
225
  `-s danger-full-access -a never`. The legacy environment-only `OPENRIG_YOLO=1`
@@ -261,7 +328,7 @@ With herdr installed and connected, open the starter's terminals together:
261
328
  rig terminal open starter --provider herdr
262
329
  ```
263
330
 
264
- For cmux, use `--provider cmux`. In the TUI, a rig's detail view has a `term ▸ rig <name>` link that opens every running seat of that rig in the default terminal provider; with herdr that is up to 16 seats per tab, in a workspace named after the rig. The underlying sessions remain accessible through tmux. See the [terminal workspace guide](docs/reference/getting-started.md#share-the-dashboard-and-return-to-it) for setup and returning to an existing view.
331
+ For cmux, use `--provider cmux`. In the TUI, a rig's detail view has an `Open terminals ▸ rig <name>` link that opens a terminal view of the running seats of that rig (in a new window or tab, or the current Herdr session), laid out with herdr when installed, otherwise plain tmux; with herdr that is up to 16 seats per tab, in a workspace named after the rig. A seat it can't attach is reported as absent or degraded. The underlying sessions remain accessible through tmux. See the [terminal workspace guide](docs/reference/getting-started.md#share-the-dashboard-and-return-to-it) for setup and returning to an existing view.
265
332
 
266
333
  ## Key Concepts
267
334
 
@@ -360,7 +427,9 @@ seat, plugin, and release lifecycle actions remain agent-owned.
360
427
  longer supported. Node 26 and other versions are untested. On a Mac with Apple
361
428
  silicon, use Node.js 22: see the [compatibility history](docs/releases/v0.5.15.md#known-compatibility-limitation).
362
429
  - tmux
363
- - macOS or Linux. Native Windows is not supported yet, and WSL2 has not been tested
430
+ - macOS or Linux. On Windows, use WSL2, the Windows route OpenRig supports; native
431
+ Windows isn't supported. OpenRig's automated tests don't run on WSL2 yet; one user's
432
+ working setup is in the [getting-started guide](docs/reference/getting-started.md#wsl2-a-reported-working-setup)
364
433
 
365
434
  Optional:
366
435
  - herdr or cmux for terminal workspaces showing the agents together
@@ -368,9 +437,9 @@ Optional:
368
437
 
369
438
  ## Setup and Troubleshooting
370
439
 
371
- - `rig setup` attempts core machine preparation: tmux, Claude Code, Codex and tmux defaults, plus cmux on macOS. cmux is optional and macOS-only; elsewhere setup skips it and `rig doctor` only warns that it's missing. It reports what it tried and what actually succeeded. If something fails, it gives the local agent enough context to finish the job.
372
- - `rig setup --full` attempts a broader operator workstation setup (jq, gh) on top of core.
373
- - `rig doctor` inspects current system health and helps diagnose problems after setup. Use it when something stops working or after machine changes.
440
+ - `rig setup` attempts core machine preparation: it installs a missing Claude Code or Codex and writes tmux defaults. It installs Herdr by default on macOS and Linux; use `--no-herdr` if you decline it. On macOS it also installs a missing tmux with an existing Homebrew; elsewhere install tmux yourself (setup only checks it). On a Mac, the installing agent offers Ghostty once; accepting uses `rig setup --ghostty`, and declining leaves Terminal.app available. Existing cmux settings are preserved. It reports what it tried and what actually succeeded. If something fails, it gives the local agent enough context to finish the job.
441
+ - `rig setup --full` attempts a broader operator workstation setup (jq, gh, via Homebrew, so macOS only) on top of core.
442
+ - `rig doctor` inspects current system health and helps diagnose problems after setup. Use it when something stops working or after machine changes. It shares setup's local provider login checks. These do not prove provider acceptance or a working agent; also inspect `rig ps --nodes --rig <rig>`.
374
443
 
375
444
  Both commands support `--json` for agent-driven workflows.
376
445
 
@@ -378,7 +447,7 @@ Before setup or managed launch, review [what OpenRig changes on your machine](#w
378
447
 
379
448
  Already-running adopted sessions may need restart before they pick up newly written runtime config.
380
449
 
381
- **For agents:** First ask which available provider(s) the user wants, reusing an explicit choice. Recommend the working account they already have and follow the selected-provider guide above. Offer core setup (`rig setup`) or the fuller workstation path (`rig setup --full`) only when they want those additional tools. Inspect the result with `--json` and use `rig doctor` to finish any remaining machine-specific issues. When OpenRig itself misbehaves, read [docs/reference/help.md](docs/reference/help.md) (installed agents can run `rig context get help`; the same text is at [openrig.dev/help/agents](https://www.openrig.dev/help/agents)): it covers the next step, known problems, and how to reach the team if you're still stuck.
450
+ **For agents:** First ask which available provider(s) the user wants, reusing an explicit choice. Recommend the working account they already have and follow the selected-provider guide above. Offer core setup (`rig setup`) or the fuller workstation path (`rig setup --full`) only when they want those additional tools. Inspect the result with `--json` and use `rig doctor` to finish any remaining machine-specific issues. Then start the daemon if it is stopped, open the OpenRig TUI and operator for them (say so, then run `rig terminal open saved:kernel --window --json`; no commands for the person to copy), and hand the person's goal and project folder to the kernel operator ([installing-agent handoff](docs/reference/getting-started.md#installing-agent-handoff)). Installation is finished when the person is talking to the operator; don't implement the project yourself. When OpenRig itself misbehaves, read [docs/reference/help.md](docs/reference/help.md) (installed agents can run `rig context get help`; the same text is at [openrig.dev/help/agents](https://www.openrig.dev/help/agents)): it covers the next step, known problems, and how to reach the team if you're still stuck.
382
451
 
383
452
  ## Comparison with Claude Managed Agents
384
453
 
@@ -0,0 +1,262 @@
1
+ "use strict";
2
+
3
+ // Session-only Claude PreToolUse helper. The launcher supplies the kernel or team
4
+ // lists; this file never reads or writes a person's permission settings.
5
+ // This is command convenience, not containment (test runners can execute code).
6
+ const { basename, isAbsolute } = require("node:path");
7
+
8
+ function scanQuotes(text, keepDouble = false, initial = "", arithmetic = 0) {
9
+ let out = "", state = initial, start = 0, arithmeticStart = 0, wordStarted = Boolean(initial);
10
+ const spans = [];
11
+ for (let i = 0; i < text.length; i++) {
12
+ const c = text[i];
13
+ if (state === "'") { if (c === "'") { state = ""; spans.push([start, i]); out += "'"; } continue; }
14
+ if (state === '"') {
15
+ if (c === "\\") { if (keepDouble) out += c + (text[i + 1] || ""); i++; continue; }
16
+ if (c === '"') { state = ""; spans.push([start, i]); out += '"'; continue; }
17
+ if (keepDouble) out += c;
18
+ continue;
19
+ }
20
+ if (c === "\\") { out += c + (text[i + 1] || ""); i++; wordStarted = true; continue; }
21
+ if (c === "'" || c === '"') { state = c; start = i; out += c; wordStarted = true; continue; }
22
+ if (arithmetic) {
23
+ if (c === "(") arithmetic++;
24
+ if (c === ")" && --arithmetic === 0) spans.push([arithmeticStart, i]);
25
+ out += c;
26
+ continue;
27
+ }
28
+ if (c === "#" && !wordStarted) {
29
+ const end = text.indexOf("\n", i);
30
+ spans.push([i, end === -1 ? text.length : end]);
31
+ i = end === -1 ? text.length : end - 1;
32
+ continue;
33
+ }
34
+ if (c === "(" && text[i + 1] === "(") {
35
+ arithmetic = 2; arithmeticStart = i; out += "(("; i++; continue;
36
+ }
37
+ wordStarted = !/[\s;&|()<>]/.test(c);
38
+ out += c;
39
+ }
40
+ if (state) spans.push([start, text.length]);
41
+ if (arithmetic) spans.push([arithmeticStart, text.length]);
42
+ return { text: out, spans, state, arithmetic };
43
+ }
44
+
45
+ // Split heredoc bodies off the command text. Quoted delimiters ('EOF', "EOF") make a literal body that never runs;
46
+ // an unquoted delimiter's body still expands substitutions, so it is returned for substitution checks only.
47
+ // Only operators outside quotes, comments and arithmetic can start a heredoc.
48
+ // A missing closing delimiter leaves the remaining text in place for conservative ask detection.
49
+ function splitHeredocs(cmd) {
50
+ const lines = cmd.split("\n");
51
+ const main = [];
52
+ const expanding = [];
53
+ // Quote state carries across lines: a double-quoted commit message can span several lines, and a `<<` after its
54
+ // closing quote is still an operator. Heredoc bodies are skipped, so they never change the state.
55
+ let carry = "", arithmetic = 0;
56
+ for (let i = 0; i < lines.length; i++) {
57
+ const line = lines[i];
58
+ main.push(line);
59
+ const scanned = scanQuotes(line, false, carry, arithmetic);
60
+ const { spans } = scanned;
61
+ carry = scanned.state;
62
+ arithmetic = scanned.arithmetic;
63
+ const found = [...line.matchAll(/(?<!<)<<(-?)(?!<)\s*(?:'([^']+)'|"([^"]+)"|\\?([A-Za-z_][A-Za-z0-9_]*))/g)]
64
+ .filter(m => !spans.some(([a, b]) => m.index >= a && m.index <= b));
65
+ let j = i;
66
+ for (const m of found) {
67
+ const delim = m[2] || m[3] || m[4];
68
+ const quoted = Boolean(m[2] || m[3] || m[0].includes("\\"));
69
+ const end = lines.findIndex((l, k) => k > j && (m[1] ? l.replace(/^\t+/, "") : l) === delim);
70
+ if (end === -1) continue;
71
+ const body = lines.slice(j + 1, end).join("\n");
72
+ if (!quoted) expanding.push(body);
73
+ j = end;
74
+ }
75
+ i = j;
76
+ }
77
+ return { main: main.join("\n"), expanding };
78
+ }
79
+
80
+ // Bodies of $( ... ) (balanced) and `...`; the text must already have single-quoted strings removed.
81
+ function substitutions(text) {
82
+ const out = [];
83
+ const t = text.replace(/\\[`$]/g, "");
84
+ for (let i = 0; i < t.length; i++) {
85
+ if (t[i] === "$" && t[i + 1] === "(") {
86
+ let depth = 1, k = i + 2;
87
+ for (; k < t.length && depth; k++) { if (t[k] === "(") depth++; else if (t[k] === ")") depth--; }
88
+ out.push(t.slice(i + 2, depth ? k : k - 1));
89
+ i = k - 1;
90
+ } else if (t[i] === "`") {
91
+ const k = t.indexOf("`", i + 1);
92
+ if (k === -1) { out.push(t.slice(i + 1)); break; }
93
+ out.push(t.slice(i + 1, k));
94
+ i = k;
95
+ }
96
+ }
97
+ return out;
98
+ }
99
+
100
+ // Decode literal shell words without executing anything. Keep command boundaries
101
+ // for lifecycle asks, but never allow an entire compound/expanding command.
102
+ function words(command, comments = true) {
103
+ const commands = [];
104
+ let tokens = [], word = "", started = false, literal = true, quote = "", simple = true, rawWord = "";
105
+ const flush = () => {
106
+ if (started) tokens.push({ value: word, literal, assignment: /^[A-Za-z_][A-Za-z0-9_]*=/.test(rawWord) });
107
+ word = ""; rawWord = ""; started = false; literal = true;
108
+ };
109
+ const boundary = () => { flush(); if (tokens.length) commands.push(tokens); tokens = []; };
110
+ for (let i = 0; i < command.length; i++) {
111
+ const c = command[i];
112
+ if (quote || !/\s/.test(c)) rawWord += c;
113
+ if (quote === "'") {
114
+ if (c === "'") quote = ""; else word += c;
115
+ } else if (c === "\\" && quote !== "'") {
116
+ const next = command[++i];
117
+ if (next === undefined) { simple = false; literal = false; break; }
118
+ if (next !== "\n") word += quote === '"' && !'$`"\\'.includes(next) ? "\\" + next : next;
119
+ started = true;
120
+ } else if (quote === '"') {
121
+ if (c === '"') quote = "";
122
+ else { word += c; if (c === "$" || c === "`") { literal = false; simple = false; } }
123
+ } else if (c === "'" || c === '"') {
124
+ quote = c; started = true;
125
+ } else if (comments && c === "#" && !started) {
126
+ while (i + 1 < command.length && command[i + 1] !== "\n") i++;
127
+ } else if (";&|\n()<>".includes(c)) {
128
+ boundary(); simple = false;
129
+ } else if (/\s/.test(c)) flush();
130
+ else {
131
+ started = true; word += c;
132
+ if ("$`*?[]{}~".includes(c)) { literal = false; simple = false; }
133
+ }
134
+ }
135
+ if (quote) { literal = false; simple = false; }
136
+ boundary();
137
+ return { commands, simple: simple && commands.length === 1 };
138
+ }
139
+
140
+ function normalize(tokens, forAllow = false) {
141
+ const result = [...tokens];
142
+ while (result.length) {
143
+ const first = result[0];
144
+ if (first.assignment) {
145
+ // These can change the executable or inject startup code. Ask detection
146
+ // still looks through them; an allowance leaves them to native checks.
147
+ if (forAllow && /^(?:PATH|LD_[A-Za-z0-9_]*|DYLD_[A-Za-z0-9_]*|NODE_OPTIONS|BASH_ENV|ENV)=/.test(first.value)) return [];
148
+ result.shift();
149
+ }
150
+ else if (first.literal && ["env", "command", "exec"].includes(basename(first.value))) {
151
+ if (forAllow && first.value.includes("/") && !isAbsolute(first.value)) return [];
152
+ // command -v/-V inspects an executable rather than wrapping its execution.
153
+ if (basename(first.value) === "command" && ["-v", "-V"].includes(result[1]?.value)) break;
154
+ result.shift();
155
+ if (result[0]?.value === "--") result.shift();
156
+ // Other wrapper options (including sudo) stay with native checks.
157
+ } else break;
158
+ }
159
+ if (!result[0]?.literal) return [];
160
+ const executable = result[0].value;
161
+ if (forAllow && executable.includes("/") && !isAbsolute(executable)) return [];
162
+ result[0] = { value: basename(executable), literal: true };
163
+ if (/\/(?:node_modules\/\.bin)\/(vitest|jest)$/.test(executable)) {
164
+ result.unshift({ value: "npx", literal: true });
165
+ }
166
+ if (result[0].value === "rig") {
167
+ // Host selection does not change the lifecycle being requested.
168
+ while (result[1]?.literal && /^--host(?:=|$)/.test(result[1].value)) {
169
+ if (result[1].value === "--host") {
170
+ if (!result[2] || (forAllow && !result[2].literal)) return [];
171
+ result.splice(1, 2);
172
+ } else result.splice(1, 1);
173
+ }
174
+ }
175
+ return result;
176
+ }
177
+
178
+ function prefixEnd(tokens, prefix) {
179
+ let i = 0;
180
+ for (const part of prefix) {
181
+ // Commander accepts separators before a subcommand, including at root.
182
+ // A separator AFTER the lifecycle prefix still terminates help options.
183
+ while (prefix[0] === "rig" && i > 0 && tokens[i]?.literal && tokens[i].value === "--") i++;
184
+ if (!tokens[i]?.literal || tokens[i].value !== part) return undefined;
185
+ i++;
186
+ }
187
+ return i;
188
+ }
189
+
190
+ function prefixes(rules) {
191
+ return rules.flatMap(rule => {
192
+ const match = /^Bash\((.+):\*\)$/.exec(rule);
193
+ return match ? [match[1].split(" ")] : [];
194
+ });
195
+ }
196
+
197
+ function helpOnly(tokens, prefixLength) {
198
+ // A separator before a subcommand also makes its remaining words operands.
199
+ // For example, the CLI dispatches `rig -- down --help` on a rig named --help.
200
+ if (tokens.slice(1, prefixLength).some(t => t.value === "--")) return false;
201
+ const args = tokens.slice(prefixLength);
202
+ // A help-looking option value or text after -- is not a help invocation.
203
+ // Commander also accepts help before positional arguments.
204
+ const help = args.findIndex(t => ["--help", "-h"].includes(t.value));
205
+ return help !== -1 && args.every(t => t.literal)
206
+ && args.slice(0, help).every(t => !t.value.startsWith("-"));
207
+ }
208
+
209
+ function decide(command, policy, depth = 0) {
210
+ if (depth > 4) return undefined;
211
+ const { main, expanding } = splitHeredocs(command);
212
+ // Substitutions in double quotes and unquoted heredocs still execute. Literal
213
+ // multiline strings and quoted heredocs are data, not lifecycle invocations.
214
+ for (const source of [scanQuotes(main, true).text, ...expanding]) {
215
+ for (const inner of substitutions(source)) {
216
+ if (decide(inner, policy, depth + 1) === "ask") return "ask";
217
+ }
218
+ }
219
+ const parsed = words(main.trim());
220
+ const asks = prefixes(policy.ask);
221
+ const askExecutables = new Set(asks.map(prefix => prefix[0]));
222
+ // Retain comment text for asks too: a # inside backticks or ${...} must not
223
+ // hide a later command. Keep the comment-aware scan as well, so quotes in a
224
+ // real comment cannot swallow the following line. Allow parsing is unchanged.
225
+ for (const command of [...parsed.commands, ...words(main.trim(), false).commands]) {
226
+ // ponytail: ask conservatively at every word position rather than owning a
227
+ // second shell grammar for wrappers/control flow. Unquoted prose may ask;
228
+ // quoted messages remain single words, and literal heredoc bodies are gone.
229
+ for (let i = 0; i < command.length; i++) {
230
+ if (!command[i].literal || !askExecutables.has(basename(command[i].value))) continue;
231
+ const tokens = normalize(command.slice(i));
232
+ for (const prefix of asks) {
233
+ const end = prefixEnd(tokens, prefix);
234
+ if (end !== undefined && !helpOnly(tokens, end)) return "ask";
235
+ }
236
+ }
237
+ }
238
+ const tokens = normalize(parsed.commands[0] || [], true);
239
+ if (!parsed.simple || tokens.some(t => !t.literal)) return undefined;
240
+ return prefixes(policy.allow).some(prefix => prefixEnd(tokens, prefix) !== undefined) ? "allow" : undefined;
241
+ }
242
+
243
+ module.exports = { decide };
244
+ if (require.main === module) {
245
+ let raw = "";
246
+ process.stdin.setEncoding("utf8");
247
+ process.stdin.on("data", chunk => { raw += chunk; });
248
+ process.stdin.on("end", () => {
249
+ try {
250
+ const input = JSON.parse(raw);
251
+ if (input.tool_name !== "Bash" || typeof input.tool_input?.command !== "string") return;
252
+ const policy = JSON.parse(Buffer.from(process.argv[2], "base64").toString("utf8"));
253
+ const decision = decide(input.tool_input.command, policy);
254
+ if (decision) process.stdout.write(JSON.stringify({ hookSpecificOutput: {
255
+ hookEventName: "PreToolUse", permissionDecision: decision,
256
+ permissionDecisionReason: decision === "ask"
257
+ ? "This rig lifecycle command needs confirmation. Use --help or -h to read its help."
258
+ : "This command matches the OpenRig session launch allowance.",
259
+ } }));
260
+ } catch { /* No decision: retain Claude's own permission handling. */ }
261
+ });
262
+ }
@@ -50,19 +50,26 @@ Keep the kernel for a normal install. `rig daemon start --no-kernel` is for auto
50
50
  omit its startup, including the operator that helps the person start a team.
51
51
  Read `rig status` and `rig ps --nodes --rig kernel`: started is not ready. The view may open
52
52
  while agents finish starting; report their actual state and use the guide's existing recovery routes when needed.
53
- Ask the person: **“Open the OpenRig view now?”** Yes opens a new terminal space using installed herdr, else cmux,
54
- else the guide's exact new-terminal command. No gives the command to open it later. Over SSH, give the exact
55
- connection/attach command. Never attach into your own terminal or take over an existing space; no new provider install.
56
- No, SSH and headless use are valid background outcomes. For herdr, open or attach the actual session and check what
57
- the person sees; creating a workspace or running the CLI in a new OS window is not proof that its view is visible.
58
- Use `rig terminal open saved:kernel --provider herdr` (or `--provider cmux`); the default view needs no YAML edit.
59
- Show TUI | advisor | operator in that order for Claude-only, Codex-only and mixed kernels.
60
- Keep the queue worker off the first view and accessible through the TUI. Reuse the existing conversations and accounts.
61
- `rig tui --shared` is the team dashboard, not the operator's conversation. Without herdr or cmux, find the
62
- `operator.agent` row with `rig ps --nodes --rig kernel --json`. Give the person
63
- `env -u TMUX tmux attach-session -t '=<canonicalSessionName>'`, with that row's actual name filled in, for a new terminal on
64
- the same host and user (over SSH, connect there first). This shows the existing operator conversation and accepts
65
- their answers; Ctrl-b, then d detaches without stopping it. Do not attach in your own terminal.
53
+ Right after OpenRig is installed or started, and whenever the person wants to see their agents or OpenRig again,
54
+ open the OpenRig TUI and operator for them: say so, then run `rig terminal open saved:kernel --window --json` on the
55
+ daemon's desktop. Don't wait for particular words. The command opens a new terminal tab/window using
56
+ installed herdr, otherwise plain tmux; inside Herdr it opens a space there. It preserves existing conversations. The default view
57
+ needs no YAML edit. Below 120 measured columns (or unknown width), show the operator alone first; from 120,
58
+ show dashboard and operator equally side by side. The advisor always has a separate tab or tmux window.
59
+ This applies to Claude-only, Codex-only and mixed kernels.
60
+ Keep the queue worker off the first view and accessible through the TUI. Reuse existing conversations and accounts.
61
+ Inspect the result and visible content using authorized desktop tools, or report that visibility is unconfirmed.
62
+ Herdr is visible only inside a terminal the person can see. Creating a workspace or switching the shared TUI
63
+ to `:terminals` does not open that terminal. A window request or CLI success alone is not visual proof. On a
64
+ desktop, do not finish by showing a table or suggesting a command instead of opening the requested view.
65
+ Only if the window cannot open, `rig tui --shared` is the named dashboard-only fallback, not the operator's
66
+ conversation. Explain the failure and help with the chosen fallback; do not attach in your own terminal.
67
+ Over headless SSH, explain that no visible terminal opened; tell the person to open a new terminal window or
68
+ tab and give one complete connection and attachment command using the current Herdr endpoint, as in the guide.
69
+ No, SSH and headless use are valid background outcomes. If the person chooses a manual operator attachment after
70
+ a failure, find the `operator.agent` row with `rig ps --nodes --rig kernel --json`. Give the exact
71
+ `env -u TMUX tmux attach-session -t '=<canonicalSessionName>'` with the observed name filled in for a new terminal
72
+ on the same host and user (over SSH, connect there first). Ctrl-b, then d detaches without stopping it.
66
73
  Ask the person's goal and project folder, then hand them to the ready operator; do not implement the project yourself.
67
74
  Find the `operator.agent` row with `rig ps --nodes --rig kernel --json` and use its `canonicalSessionName` with
68
75
  `rig send <canonicalSessionName> 'This is the agent that installed OpenRig. The person will answer in your pane. Goal: <goal>. Project folder: <absolute path>.'`,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openrig-core",
3
- "version": "0.1.4",
3
+ "version": "0.1.8",
4
4
  "description": "OpenRig canonical skills and hooks for cross-runtime agent topology coordination, continuity, and operating discipline.",
5
5
  "author": {
6
6
  "name": "Mike Schwarz",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openrig-core",
3
- "version": "0.1.4",
3
+ "version": "0.1.8",
4
4
  "description": "OpenRig canonical skills and hooks for cross-runtime agent topology coordination, continuity, and operating discipline.",
5
5
  "author": {
6
6
  "name": "Mike Schwarz",
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ const fs = require("node:fs");
3
+ const path = require("node:path");
4
+ const crypto = require("node:crypto");
5
+ const { spawnSync } = require("node:child_process");
6
+
7
+ // One issue per failure episode, after three unsuccessful attempts. Retrying an
8
+ // uncertain stream write uses the same id; a successful delivery starts afresh.
9
+ function recordRefocusResult({ home, seat, identity, failed }) {
10
+ if (!seat || !identity) return;
11
+ const key = crypto.createHash("sha256").update(JSON.stringify([seat, identity])).digest("hex");
12
+ const file = path.join(home, "refocus", `${key}.health.json`);
13
+ try {
14
+ let state;
15
+ try { state = JSON.parse(fs.readFileSync(file, "utf8")); } catch { state = {}; }
16
+ if (!failed && !state.failures) return;
17
+ state = failed
18
+ ? { ...state, failures: Number(state.failures || 0) + 1, issueId: state.issueId || `refocus-${crypto.randomUUID()}` }
19
+ : { failures: 0 };
20
+ fs.mkdirSync(path.dirname(file), { recursive: true });
21
+ // Persist the id before contacting the daemon, including timeout/unknown outcomes.
22
+ fs.writeFileSync(file, JSON.stringify(state), { mode: 0o600 });
23
+ if (state.failures < 3 || state.reportedAt) return;
24
+ const result = spawnSync("rig", [
25
+ "stream", "emit", "--source", seat, "--id", state.issueId,
26
+ "--hint-type", "issue", "--hint-tags", "issue,refocus",
27
+ "--body", `Refocus failed on ${state.failures} consecutive attempts for ${seat}. Orientation remains unverified; inspect this seat's refocus hook diagnostics.`,
28
+ "--json",
29
+ ], { encoding: "utf8", timeout: Math.max(1, Math.min(1_500, 4_500 - Math.floor(process.uptime() * 1_000))), maxBuffer: 64 * 1024, env: process.env });
30
+ if (!result.error && result.status === 0) {
31
+ state.reportedAt = new Date().toISOString();
32
+ fs.writeFileSync(file, JSON.stringify(state), { mode: 0o600 });
33
+ } else {
34
+ process.stderr.write("refocus: issue-stream report unconfirmed; retained for the next failed attempt\n");
35
+ }
36
+ } catch (error) {
37
+ process.stderr.write(`refocus: failure accounting unavailable: ${error.message}\n`);
38
+ }
39
+ }
40
+
41
+ module.exports = { recordRefocusResult };