@openrig/cli 0.2.0 → 0.3.1

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 (635) hide show
  1. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +15 -0
  2. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +24 -0
  3. package/daemon/assets/plugins/openrig-core/LICENSE +200 -0
  4. package/daemon/assets/plugins/openrig-core/README.md +42 -0
  5. package/daemon/assets/plugins/openrig-core/hooks/claude.json +78 -0
  6. package/daemon/assets/plugins/openrig-core/hooks/codex.json +37 -0
  7. package/daemon/assets/{openrig-activity-hook-relay.cjs → plugins/openrig-core/hooks/scripts/activity-relay.cjs} +12 -0
  8. package/daemon/assets/plugins/openrig-core/hooks/scripts/compaction-restore-bridge.cjs +172 -0
  9. package/daemon/assets/plugins/openrig-core/skills/agent-startup-and-context-ingestion/SKILL.md +104 -0
  10. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +131 -0
  11. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +174 -0
  12. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +433 -0
  13. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/templates/compact-instruction.md +1 -0
  14. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/templates/post-compact-restore-instruction.md +1 -0
  15. package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +305 -0
  16. package/daemon/{specs/agents/shared/skills/rig-architect → assets/plugins/openrig-core/skills/openrig-architect}/SKILL.md +38 -19
  17. package/daemon/assets/plugins/openrig-core/skills/openrig-operator/SKILL.md +222 -0
  18. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +597 -0
  19. package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +122 -0
  20. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +137 -0
  21. package/daemon/assets/vm-preview-fixtures/README.md +48 -0
  22. package/daemon/assets/vm-preview-fixtures/workflows/sample-basic-loop.yaml +79 -0
  23. package/daemon/dist/adapters/claude-code-adapter.d.ts +11 -3
  24. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  25. package/daemon/dist/adapters/claude-code-adapter.js +58 -60
  26. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  27. package/daemon/dist/adapters/cmux-transport.d.ts.map +1 -1
  28. package/daemon/dist/adapters/cmux-transport.js +81 -2
  29. package/daemon/dist/adapters/cmux-transport.js.map +1 -1
  30. package/daemon/dist/adapters/cmux.d.ts +4 -0
  31. package/daemon/dist/adapters/cmux.d.ts.map +1 -1
  32. package/daemon/dist/adapters/cmux.js +87 -0
  33. package/daemon/dist/adapters/cmux.js.map +1 -1
  34. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +14 -3
  35. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  36. package/daemon/dist/adapters/codex-runtime-adapter.js +43 -57
  37. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  38. package/daemon/dist/builtins/workflow-specs/basic-loop.yaml +76 -0
  39. package/daemon/dist/builtins/workflow-specs/conveyor.yaml +80 -0
  40. package/daemon/dist/db/migrations/026_inbox_entries.d.ts +1 -1
  41. package/daemon/dist/db/migrations/026_inbox_entries.js +1 -1
  42. package/daemon/dist/db/migrations/029_classifier_leases.d.ts +1 -1
  43. package/daemon/dist/db/migrations/029_classifier_leases.js +1 -1
  44. package/daemon/dist/db/migrations/037_mission_control_actions.d.ts +51 -0
  45. package/daemon/dist/db/migrations/037_mission_control_actions.d.ts.map +1 -0
  46. package/daemon/dist/db/migrations/037_mission_control_actions.js +74 -0
  47. package/daemon/dist/db/migrations/037_mission_control_actions.js.map +1 -0
  48. package/daemon/dist/db/migrations/038_workspace_primitive.d.ts +16 -0
  49. package/daemon/dist/db/migrations/038_workspace_primitive.d.ts.map +1 -0
  50. package/daemon/dist/db/migrations/038_workspace_primitive.js +20 -0
  51. package/daemon/dist/db/migrations/038_workspace_primitive.js.map +1 -0
  52. package/daemon/dist/db/migrations/039_queue_target_repo.d.ts +16 -0
  53. package/daemon/dist/db/migrations/039_queue_target_repo.d.ts.map +1 -0
  54. package/daemon/dist/db/migrations/039_queue_target_repo.js +21 -0
  55. package/daemon/dist/db/migrations/039_queue_target_repo.js.map +1 -0
  56. package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.d.ts +32 -0
  57. package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.d.ts.map +1 -0
  58. package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.js +37 -0
  59. package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.js.map +1 -0
  60. package/daemon/dist/domain/active-lens-store.d.ts +23 -0
  61. package/daemon/dist/domain/active-lens-store.d.ts.map +1 -0
  62. package/daemon/dist/domain/active-lens-store.js +87 -0
  63. package/daemon/dist/domain/active-lens-store.js.map +1 -0
  64. package/daemon/dist/domain/agent-images/agent-image-library-service.d.ts +68 -0
  65. package/daemon/dist/domain/agent-images/agent-image-library-service.d.ts.map +1 -0
  66. package/daemon/dist/domain/agent-images/agent-image-library-service.js +339 -0
  67. package/daemon/dist/domain/agent-images/agent-image-library-service.js.map +1 -0
  68. package/daemon/dist/domain/agent-images/agent-image-types.d.ts +113 -0
  69. package/daemon/dist/domain/agent-images/agent-image-types.d.ts.map +1 -0
  70. package/daemon/dist/domain/agent-images/agent-image-types.js +24 -0
  71. package/daemon/dist/domain/agent-images/agent-image-types.js.map +1 -0
  72. package/daemon/dist/domain/agent-images/evidence-guard.d.ts +26 -0
  73. package/daemon/dist/domain/agent-images/evidence-guard.d.ts.map +1 -0
  74. package/daemon/dist/domain/agent-images/evidence-guard.js +185 -0
  75. package/daemon/dist/domain/agent-images/evidence-guard.js.map +1 -0
  76. package/daemon/dist/domain/agent-images/manifest-parser.d.ts +3 -0
  77. package/daemon/dist/domain/agent-images/manifest-parser.d.ts.map +1 -0
  78. package/daemon/dist/domain/agent-images/manifest-parser.js +114 -0
  79. package/daemon/dist/domain/agent-images/manifest-parser.js.map +1 -0
  80. package/daemon/dist/domain/agent-images/resume-token-discovery.d.ts +28 -0
  81. package/daemon/dist/domain/agent-images/resume-token-discovery.d.ts.map +1 -0
  82. package/daemon/dist/domain/agent-images/resume-token-discovery.js +83 -0
  83. package/daemon/dist/domain/agent-images/resume-token-discovery.js.map +1 -0
  84. package/daemon/dist/domain/agent-images/snapshot-capturer.d.ts +36 -0
  85. package/daemon/dist/domain/agent-images/snapshot-capturer.d.ts.map +1 -0
  86. package/daemon/dist/domain/agent-images/snapshot-capturer.js +58 -0
  87. package/daemon/dist/domain/agent-images/snapshot-capturer.js.map +1 -0
  88. package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
  89. package/daemon/dist/domain/agent-manifest.js +116 -37
  90. package/daemon/dist/domain/agent-manifest.js.map +1 -1
  91. package/daemon/dist/domain/agent-resolver.js +1 -1
  92. package/daemon/dist/domain/agent-resolver.js.map +1 -1
  93. package/daemon/dist/domain/agent-starter-resolver.d.ts +10 -16
  94. package/daemon/dist/domain/agent-starter-resolver.d.ts.map +1 -1
  95. package/daemon/dist/domain/agent-starter-resolver.js +11 -13
  96. package/daemon/dist/domain/agent-starter-resolver.js.map +1 -1
  97. package/daemon/dist/domain/classifier-lease-manager.d.ts +1 -1
  98. package/daemon/dist/domain/classifier-lease-manager.js +1 -1
  99. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +81 -0
  100. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -0
  101. package/daemon/dist/domain/claude-compaction-enforcer.js +242 -0
  102. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -0
  103. package/daemon/dist/domain/cmux-layout-service.d.ts +41 -0
  104. package/daemon/dist/domain/cmux-layout-service.d.ts.map +1 -0
  105. package/daemon/dist/domain/cmux-layout-service.js +184 -0
  106. package/daemon/dist/domain/cmux-layout-service.js.map +1 -0
  107. package/daemon/dist/domain/conflict-detector.d.ts.map +1 -1
  108. package/daemon/dist/domain/conflict-detector.js +6 -3
  109. package/daemon/dist/domain/conflict-detector.js.map +1 -1
  110. package/daemon/dist/domain/context-monitor.d.ts +20 -5
  111. package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
  112. package/daemon/dist/domain/context-monitor.js +63 -13
  113. package/daemon/dist/domain/context-monitor.js.map +1 -1
  114. package/daemon/dist/domain/context-packs/bundle-assembler.d.ts +49 -0
  115. package/daemon/dist/domain/context-packs/bundle-assembler.d.ts.map +1 -0
  116. package/daemon/dist/domain/context-packs/bundle-assembler.js +81 -0
  117. package/daemon/dist/domain/context-packs/bundle-assembler.js.map +1 -0
  118. package/daemon/dist/domain/context-packs/context-pack-library-service.d.ts +41 -0
  119. package/daemon/dist/domain/context-packs/context-pack-library-service.d.ts.map +1 -0
  120. package/daemon/dist/domain/context-packs/context-pack-library-service.js +148 -0
  121. package/daemon/dist/domain/context-packs/context-pack-library-service.js.map +1 -0
  122. package/daemon/dist/domain/context-packs/context-pack-types.d.ts +64 -0
  123. package/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -0
  124. package/daemon/dist/domain/context-packs/context-pack-types.js +22 -0
  125. package/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -0
  126. package/daemon/dist/domain/context-packs/manifest-parser.d.ts +3 -0
  127. package/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -0
  128. package/daemon/dist/domain/context-packs/manifest-parser.js +74 -0
  129. package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -0
  130. package/daemon/dist/domain/context-usage-store.d.ts +14 -1
  131. package/daemon/dist/domain/context-usage-store.d.ts.map +1 -1
  132. package/daemon/dist/domain/context-usage-store.js +156 -1
  133. package/daemon/dist/domain/context-usage-store.js.map +1 -1
  134. package/daemon/dist/domain/files/file-write-service.d.ts +61 -0
  135. package/daemon/dist/domain/files/file-write-service.d.ts.map +1 -0
  136. package/daemon/dist/domain/files/file-write-service.js +180 -0
  137. package/daemon/dist/domain/files/file-write-service.js.map +1 -0
  138. package/daemon/dist/domain/files/path-safety.d.ts +47 -0
  139. package/daemon/dist/domain/files/path-safety.d.ts.map +1 -0
  140. package/daemon/dist/domain/files/path-safety.js +176 -0
  141. package/daemon/dist/domain/files/path-safety.js.map +1 -0
  142. package/daemon/dist/domain/graph-projection.d.ts +14 -1
  143. package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
  144. package/daemon/dist/domain/graph-projection.js +8 -0
  145. package/daemon/dist/domain/graph-projection.js.map +1 -1
  146. package/daemon/dist/domain/install-engine.d.ts.map +1 -1
  147. package/daemon/dist/domain/install-engine.js +22 -6
  148. package/daemon/dist/domain/install-engine.js.map +1 -1
  149. package/daemon/dist/domain/install-verifier.d.ts.map +1 -1
  150. package/daemon/dist/domain/install-verifier.js +10 -5
  151. package/daemon/dist/domain/install-verifier.js.map +1 -1
  152. package/daemon/dist/domain/kernel-boot-tracker.d.ts +74 -0
  153. package/daemon/dist/domain/kernel-boot-tracker.d.ts.map +1 -0
  154. package/daemon/dist/domain/kernel-boot-tracker.js +213 -0
  155. package/daemon/dist/domain/kernel-boot-tracker.js.map +1 -0
  156. package/daemon/dist/domain/kernel-boot.d.ts +50 -0
  157. package/daemon/dist/domain/kernel-boot.d.ts.map +1 -0
  158. package/daemon/dist/domain/kernel-boot.js +147 -0
  159. package/daemon/dist/domain/kernel-boot.js.map +1 -0
  160. package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
  161. package/daemon/dist/domain/managed-blocks.js +22 -3
  162. package/daemon/dist/domain/managed-blocks.js.map +1 -1
  163. package/daemon/dist/domain/mission-control/audit-browse.d.ts +26 -0
  164. package/daemon/dist/domain/mission-control/audit-browse.d.ts.map +1 -0
  165. package/daemon/dist/domain/mission-control/audit-browse.js +101 -0
  166. package/daemon/dist/domain/mission-control/audit-browse.js.map +1 -0
  167. package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts +51 -0
  168. package/daemon/dist/domain/mission-control/mission-control-action-log.d.ts.map +1 -0
  169. package/daemon/dist/domain/mission-control/mission-control-action-log.js +124 -0
  170. package/daemon/dist/domain/mission-control/mission-control-action-log.js.map +1 -0
  171. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts +131 -0
  172. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.d.ts.map +1 -0
  173. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js +232 -0
  174. package/daemon/dist/domain/mission-control/mission-control-fleet-cli-capability.js.map +1 -0
  175. package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts +90 -0
  176. package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts.map +1 -0
  177. package/daemon/dist/domain/mission-control/mission-control-read-layer.js +279 -0
  178. package/daemon/dist/domain/mission-control/mission-control-read-layer.js.map +1 -0
  179. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts +69 -0
  180. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -0
  181. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +302 -0
  182. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -0
  183. package/daemon/dist/domain/mission-control/notification-adapter-ntfy.d.ts +18 -0
  184. package/daemon/dist/domain/mission-control/notification-adapter-ntfy.d.ts.map +1 -0
  185. package/daemon/dist/domain/mission-control/notification-adapter-ntfy.js +48 -0
  186. package/daemon/dist/domain/mission-control/notification-adapter-ntfy.js.map +1 -0
  187. package/daemon/dist/domain/mission-control/notification-adapter-types.d.ts +25 -0
  188. package/daemon/dist/domain/mission-control/notification-adapter-types.d.ts.map +1 -0
  189. package/daemon/dist/domain/mission-control/notification-adapter-types.js +7 -0
  190. package/daemon/dist/domain/mission-control/notification-adapter-types.js.map +1 -0
  191. package/daemon/dist/domain/mission-control/notification-adapter-webhook.d.ts +27 -0
  192. package/daemon/dist/domain/mission-control/notification-adapter-webhook.d.ts.map +1 -0
  193. package/daemon/dist/domain/mission-control/notification-adapter-webhook.js +47 -0
  194. package/daemon/dist/domain/mission-control/notification-adapter-webhook.js.map +1 -0
  195. package/daemon/dist/domain/mission-control/notification-dispatcher.d.ts +53 -0
  196. package/daemon/dist/domain/mission-control/notification-dispatcher.d.ts.map +1 -0
  197. package/daemon/dist/domain/mission-control/notification-dispatcher.js +181 -0
  198. package/daemon/dist/domain/mission-control/notification-dispatcher.js.map +1 -0
  199. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  200. package/daemon/dist/domain/node-inventory.js +24 -0
  201. package/daemon/dist/domain/node-inventory.js.map +1 -1
  202. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  203. package/daemon/dist/domain/node-launcher.js +7 -5
  204. package/daemon/dist/domain/node-launcher.js.map +1 -1
  205. package/daemon/dist/domain/plugin-discovery-service.d.ts +150 -0
  206. package/daemon/dist/domain/plugin-discovery-service.d.ts.map +1 -0
  207. package/daemon/dist/domain/plugin-discovery-service.js +468 -0
  208. package/daemon/dist/domain/plugin-discovery-service.js.map +1 -0
  209. package/daemon/dist/domain/plugin-vendor-service.d.ts +54 -0
  210. package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -0
  211. package/daemon/dist/domain/plugin-vendor-service.js +111 -0
  212. package/daemon/dist/domain/plugin-vendor-service.js.map +1 -0
  213. package/daemon/dist/domain/preview/preview-rate-limiter.d.ts +20 -0
  214. package/daemon/dist/domain/preview/preview-rate-limiter.d.ts.map +1 -0
  215. package/daemon/dist/domain/preview/preview-rate-limiter.js +46 -0
  216. package/daemon/dist/domain/preview/preview-rate-limiter.js.map +1 -0
  217. package/daemon/dist/domain/profile-resolver.d.ts +8 -3
  218. package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  219. package/daemon/dist/domain/profile-resolver.js +69 -15
  220. package/daemon/dist/domain/profile-resolver.js.map +1 -1
  221. package/daemon/dist/domain/progress/progress-indexer.d.ts +73 -0
  222. package/daemon/dist/domain/progress/progress-indexer.d.ts.map +1 -0
  223. package/daemon/dist/domain/progress/progress-indexer.js +210 -0
  224. package/daemon/dist/domain/progress/progress-indexer.js.map +1 -0
  225. package/daemon/dist/domain/project-classifier.d.ts +1 -1
  226. package/daemon/dist/domain/projection-planner.d.ts +7 -1
  227. package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
  228. package/daemon/dist/domain/projection-planner.js +44 -4
  229. package/daemon/dist/domain/projection-planner.js.map +1 -1
  230. package/daemon/dist/domain/queue-repository.d.ts +30 -5
  231. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  232. package/daemon/dist/domain/queue-repository.js +94 -27
  233. package/daemon/dist/domain/queue-repository.js.map +1 -1
  234. package/daemon/dist/domain/rehydrate-eligibility.d.ts +16 -0
  235. package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -0
  236. package/daemon/dist/domain/rehydrate-eligibility.js +43 -0
  237. package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -0
  238. package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
  239. package/daemon/dist/domain/restore-check-service.js +19 -6
  240. package/daemon/dist/domain/restore-check-service.js.map +1 -1
  241. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  242. package/daemon/dist/domain/restore-orchestrator.js +4 -2
  243. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  244. package/daemon/dist/domain/rig-repository.d.ts +14 -0
  245. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  246. package/daemon/dist/domain/rig-repository.js +41 -0
  247. package/daemon/dist/domain/rig-repository.js.map +1 -1
  248. package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
  249. package/daemon/dist/domain/rig-teardown.js +5 -0
  250. package/daemon/dist/domain/rig-teardown.js.map +1 -1
  251. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  252. package/daemon/dist/domain/rigspec-codec.js +15 -0
  253. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  254. package/daemon/dist/domain/rigspec-instantiator.d.ts +29 -0
  255. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  256. package/daemon/dist/domain/rigspec-instantiator.js +136 -4
  257. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  258. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  259. package/daemon/dist/domain/rigspec-schema.js +157 -4
  260. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  261. package/daemon/dist/domain/runtime-adapter.d.ts +11 -0
  262. package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
  263. package/daemon/dist/domain/runtime-adapter.js.map +1 -1
  264. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  265. package/daemon/dist/domain/session-transport.js +33 -0
  266. package/daemon/dist/domain/session-transport.js.map +1 -1
  267. package/daemon/dist/domain/skill-discovery.d.ts +51 -0
  268. package/daemon/dist/domain/skill-discovery.d.ts.map +1 -0
  269. package/daemon/dist/domain/skill-discovery.js +144 -0
  270. package/daemon/dist/domain/skill-discovery.js.map +1 -0
  271. package/daemon/dist/domain/skill-library-discovery.d.ts +68 -0
  272. package/daemon/dist/domain/skill-library-discovery.d.ts.map +1 -0
  273. package/daemon/dist/domain/skill-library-discovery.js +144 -0
  274. package/daemon/dist/domain/skill-library-discovery.js.map +1 -0
  275. package/daemon/dist/domain/slices/slice-detail-projector.d.ts +182 -0
  276. package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -0
  277. package/daemon/dist/domain/slices/slice-detail-projector.js +508 -0
  278. package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -0
  279. package/daemon/dist/domain/slices/slice-indexer.d.ts +137 -0
  280. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -0
  281. package/daemon/dist/domain/slices/slice-indexer.js +585 -0
  282. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -0
  283. package/daemon/dist/domain/spec-library-service.d.ts +23 -2
  284. package/daemon/dist/domain/spec-library-service.d.ts.map +1 -1
  285. package/daemon/dist/domain/spec-library-service.js +31 -1
  286. package/daemon/dist/domain/spec-library-service.js.map +1 -1
  287. package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +124 -0
  288. package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -0
  289. package/daemon/dist/domain/spec-library-workflow-scanner.js +325 -0
  290. package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -0
  291. package/daemon/dist/domain/spec-review-service.d.ts +1 -1
  292. package/daemon/dist/domain/spec-review-service.d.ts.map +1 -1
  293. package/daemon/dist/domain/spec-review-service.js +14 -1
  294. package/daemon/dist/domain/spec-review-service.js.map +1 -1
  295. package/daemon/dist/domain/startup-validation.d.ts.map +1 -1
  296. package/daemon/dist/domain/startup-validation.js +57 -11
  297. package/daemon/dist/domain/startup-validation.js.map +1 -1
  298. package/daemon/dist/domain/steering/health-summary.d.ts +39 -0
  299. package/daemon/dist/domain/steering/health-summary.d.ts.map +1 -0
  300. package/daemon/dist/domain/steering/health-summary.js +100 -0
  301. package/daemon/dist/domain/steering/health-summary.js.map +1 -0
  302. package/daemon/dist/domain/steering/steering-composer.d.ts +102 -0
  303. package/daemon/dist/domain/steering/steering-composer.d.ts.map +1 -0
  304. package/daemon/dist/domain/steering/steering-composer.js +263 -0
  305. package/daemon/dist/domain/steering/steering-composer.js.map +1 -0
  306. package/daemon/dist/domain/transcript-capture.d.ts.map +1 -1
  307. package/daemon/dist/domain/transcript-capture.js +7 -4
  308. package/daemon/dist/domain/transcript-capture.js.map +1 -1
  309. package/daemon/dist/domain/transcript-rotation.d.ts +29 -0
  310. package/daemon/dist/domain/transcript-rotation.d.ts.map +1 -0
  311. package/daemon/dist/domain/transcript-rotation.js +109 -0
  312. package/daemon/dist/domain/transcript-rotation.js.map +1 -0
  313. package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  314. package/daemon/dist/domain/transcript-store.js +7 -1
  315. package/daemon/dist/domain/transcript-store.js.map +1 -1
  316. package/daemon/dist/domain/types.d.ts +128 -9
  317. package/daemon/dist/domain/types.d.ts.map +1 -1
  318. package/daemon/dist/domain/types.js +8 -1
  319. package/daemon/dist/domain/types.js.map +1 -1
  320. package/daemon/dist/domain/user-settings/settings-store.d.ts +66 -0
  321. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -0
  322. package/daemon/dist/domain/user-settings/settings-store.js +546 -0
  323. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -0
  324. package/daemon/dist/domain/view-event-bridge.d.ts.map +1 -1
  325. package/daemon/dist/domain/view-event-bridge.js +2 -3
  326. package/daemon/dist/domain/view-event-bridge.js.map +1 -1
  327. package/daemon/dist/domain/whoami-service.d.ts +29 -0
  328. package/daemon/dist/domain/whoami-service.d.ts.map +1 -1
  329. package/daemon/dist/domain/whoami-service.js +68 -0
  330. package/daemon/dist/domain/whoami-service.js.map +1 -1
  331. package/daemon/dist/domain/workflow/slice-workflow-binding.d.ts +21 -0
  332. package/daemon/dist/domain/workflow/slice-workflow-binding.d.ts.map +1 -0
  333. package/daemon/dist/domain/workflow/slice-workflow-binding.js +103 -0
  334. package/daemon/dist/domain/workflow/slice-workflow-binding.js.map +1 -0
  335. package/daemon/dist/domain/workflow/slice-workflow-projection.d.ts +81 -0
  336. package/daemon/dist/domain/workflow/slice-workflow-projection.d.ts.map +1 -0
  337. package/daemon/dist/domain/workflow/slice-workflow-projection.js +127 -0
  338. package/daemon/dist/domain/workflow/slice-workflow-projection.js.map +1 -0
  339. package/daemon/dist/domain/workflow/starter-spec-loader.d.ts +51 -0
  340. package/daemon/dist/domain/workflow/starter-spec-loader.d.ts.map +1 -0
  341. package/daemon/dist/domain/workflow/starter-spec-loader.js +140 -0
  342. package/daemon/dist/domain/workflow/starter-spec-loader.js.map +1 -0
  343. package/daemon/dist/domain/workflow-projector.js +11 -3
  344. package/daemon/dist/domain/workflow-projector.js.map +1 -1
  345. package/daemon/dist/domain/workflow-spec-cache.d.ts +34 -0
  346. package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
  347. package/daemon/dist/domain/workflow-spec-cache.js +121 -15
  348. package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
  349. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts +6 -0
  350. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -0
  351. package/daemon/dist/domain/workspace/default-workspace-scaffold.js +252 -0
  352. package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -0
  353. package/daemon/dist/domain/workspace/frontmatter-validator.d.ts +40 -0
  354. package/daemon/dist/domain/workspace/frontmatter-validator.d.ts.map +1 -0
  355. package/daemon/dist/domain/workspace/frontmatter-validator.js +185 -0
  356. package/daemon/dist/domain/workspace/frontmatter-validator.js.map +1 -0
  357. package/daemon/dist/domain/workspace/getting-started-narrative.d.ts +15 -0
  358. package/daemon/dist/domain/workspace/getting-started-narrative.d.ts.map +1 -0
  359. package/daemon/dist/domain/workspace/getting-started-narrative.js +237 -0
  360. package/daemon/dist/domain/workspace/getting-started-narrative.js.map +1 -0
  361. package/daemon/dist/domain/workspace/workspace-resolver.d.ts +25 -0
  362. package/daemon/dist/domain/workspace/workspace-resolver.d.ts.map +1 -0
  363. package/daemon/dist/domain/workspace/workspace-resolver.js +86 -0
  364. package/daemon/dist/domain/workspace/workspace-resolver.js.map +1 -0
  365. package/daemon/dist/index.d.ts +2 -1
  366. package/daemon/dist/index.d.ts.map +1 -1
  367. package/daemon/dist/index.js +56 -12
  368. package/daemon/dist/index.js.map +1 -1
  369. package/daemon/dist/lib/pane-envelope.d.ts +7 -0
  370. package/daemon/dist/lib/pane-envelope.d.ts.map +1 -0
  371. package/daemon/dist/lib/pane-envelope.js +38 -0
  372. package/daemon/dist/lib/pane-envelope.js.map +1 -0
  373. package/daemon/dist/middleware/auth-bearer-token.d.ts +91 -0
  374. package/daemon/dist/middleware/auth-bearer-token.d.ts.map +1 -0
  375. package/daemon/dist/middleware/auth-bearer-token.js +236 -0
  376. package/daemon/dist/middleware/auth-bearer-token.js.map +1 -0
  377. package/daemon/dist/openrig-compat.d.ts +1 -1
  378. package/daemon/dist/openrig-compat.d.ts.map +1 -1
  379. package/daemon/dist/openrig-compat.js +6 -4
  380. package/daemon/dist/openrig-compat.js.map +1 -1
  381. package/daemon/dist/routes/agent-images.d.ts +8 -0
  382. package/daemon/dist/routes/agent-images.d.ts.map +1 -0
  383. package/daemon/dist/routes/agent-images.js +253 -0
  384. package/daemon/dist/routes/agent-images.js.map +1 -0
  385. package/daemon/dist/routes/config.d.ts +3 -0
  386. package/daemon/dist/routes/config.d.ts.map +1 -0
  387. package/daemon/dist/routes/config.js +109 -0
  388. package/daemon/dist/routes/config.js.map +1 -0
  389. package/daemon/dist/routes/context-packs.d.ts +3 -0
  390. package/daemon/dist/routes/context-packs.d.ts.map +1 -0
  391. package/daemon/dist/routes/context-packs.js +129 -0
  392. package/daemon/dist/routes/context-packs.js.map +1 -0
  393. package/daemon/dist/routes/files.d.ts +17 -0
  394. package/daemon/dist/routes/files.d.ts.map +1 -0
  395. package/daemon/dist/routes/files.js +262 -0
  396. package/daemon/dist/routes/files.js.map +1 -0
  397. package/daemon/dist/routes/health-summary.d.ts +9 -0
  398. package/daemon/dist/routes/health-summary.d.ts.map +1 -0
  399. package/daemon/dist/routes/health-summary.js +33 -0
  400. package/daemon/dist/routes/health-summary.js.map +1 -0
  401. package/daemon/dist/routes/kernel-status.d.ts +3 -0
  402. package/daemon/dist/routes/kernel-status.d.ts.map +1 -0
  403. package/daemon/dist/routes/kernel-status.js +40 -0
  404. package/daemon/dist/routes/kernel-status.js.map +1 -0
  405. package/daemon/dist/routes/mission-control.d.ts +37 -0
  406. package/daemon/dist/routes/mission-control.d.ts.map +1 -0
  407. package/daemon/dist/routes/mission-control.js +306 -0
  408. package/daemon/dist/routes/mission-control.js.map +1 -0
  409. package/daemon/dist/routes/missions.d.ts +3 -0
  410. package/daemon/dist/routes/missions.d.ts.map +1 -0
  411. package/daemon/dist/routes/missions.js +195 -0
  412. package/daemon/dist/routes/missions.js.map +1 -0
  413. package/daemon/dist/routes/plugins.d.ts +3 -0
  414. package/daemon/dist/routes/plugins.d.ts.map +1 -0
  415. package/daemon/dist/routes/plugins.js +223 -0
  416. package/daemon/dist/routes/plugins.js.map +1 -0
  417. package/daemon/dist/routes/progress.d.ts +7 -0
  418. package/daemon/dist/routes/progress.d.ts.map +1 -0
  419. package/daemon/dist/routes/progress.js +33 -0
  420. package/daemon/dist/routes/progress.js.map +1 -0
  421. package/daemon/dist/routes/queue.d.ts.map +1 -1
  422. package/daemon/dist/routes/queue.js +52 -1
  423. package/daemon/dist/routes/queue.js.map +1 -1
  424. package/daemon/dist/routes/rig-cmux.d.ts +3 -0
  425. package/daemon/dist/routes/rig-cmux.d.ts.map +1 -0
  426. package/daemon/dist/routes/rig-cmux.js +121 -0
  427. package/daemon/dist/routes/rig-cmux.js.map +1 -0
  428. package/daemon/dist/routes/rigs.d.ts +3 -0
  429. package/daemon/dist/routes/rigs.d.ts.map +1 -1
  430. package/daemon/dist/routes/rigs.js +73 -7
  431. package/daemon/dist/routes/rigs.js.map +1 -1
  432. package/daemon/dist/routes/rigspec.js +6 -3
  433. package/daemon/dist/routes/rigspec.js.map +1 -1
  434. package/daemon/dist/routes/sessions.d.ts.map +1 -1
  435. package/daemon/dist/routes/sessions.js +119 -0
  436. package/daemon/dist/routes/sessions.js.map +1 -1
  437. package/daemon/dist/routes/skills.d.ts +3 -0
  438. package/daemon/dist/routes/skills.d.ts.map +1 -0
  439. package/daemon/dist/routes/skills.js +147 -0
  440. package/daemon/dist/routes/skills.js.map +1 -0
  441. package/daemon/dist/routes/slices.d.ts +9 -0
  442. package/daemon/dist/routes/slices.d.ts.map +1 -0
  443. package/daemon/dist/routes/slices.js +207 -0
  444. package/daemon/dist/routes/slices.js.map +1 -0
  445. package/daemon/dist/routes/spec-library.d.ts.map +1 -1
  446. package/daemon/dist/routes/spec-library.js +87 -5
  447. package/daemon/dist/routes/spec-library.js.map +1 -1
  448. package/daemon/dist/routes/steering.d.ts +7 -0
  449. package/daemon/dist/routes/steering.d.ts.map +1 -0
  450. package/daemon/dist/routes/steering.js +27 -0
  451. package/daemon/dist/routes/steering.js.map +1 -0
  452. package/daemon/dist/routes/up.d.ts.map +1 -1
  453. package/daemon/dist/routes/up.js +21 -3
  454. package/daemon/dist/routes/up.js.map +1 -1
  455. package/daemon/dist/routes/whoami.d.ts.map +1 -1
  456. package/daemon/dist/routes/whoami.js +6 -1
  457. package/daemon/dist/routes/whoami.js.map +1 -1
  458. package/daemon/dist/routes/workflow.d.ts.map +1 -1
  459. package/daemon/dist/routes/workflow.js +43 -0
  460. package/daemon/dist/routes/workflow.js.map +1 -1
  461. package/daemon/dist/routes/workspace.d.ts +3 -0
  462. package/daemon/dist/routes/workspace.d.ts.map +1 -0
  463. package/daemon/dist/routes/workspace.js +53 -0
  464. package/daemon/dist/routes/workspace.js.map +1 -0
  465. package/daemon/dist/server.d.ts +82 -0
  466. package/daemon/dist/server.d.ts.map +1 -1
  467. package/daemon/dist/server.js +82 -1
  468. package/daemon/dist/server.js.map +1 -1
  469. package/daemon/dist/startup.d.ts +9 -0
  470. package/daemon/dist/startup.d.ts.map +1 -1
  471. package/daemon/dist/startup.js +577 -5
  472. package/daemon/dist/startup.js.map +1 -1
  473. package/daemon/docs/reference/agent-spec.md +7 -7
  474. package/daemon/docs/reference/agent-startup-guide.md +2 -2
  475. package/daemon/docs/reference/project-workspace.md +102 -0
  476. package/daemon/specs/agents/apps/vault-specialist/agent.yaml +1 -2
  477. package/daemon/specs/agents/apps/vault-specialist/guidance/role.md +0 -1
  478. package/daemon/specs/agents/conveyor/builder/agent.yaml +34 -0
  479. package/daemon/specs/agents/conveyor/builder/guidance/role.md +31 -0
  480. package/daemon/specs/agents/conveyor/builder/startup/context.md +9 -0
  481. package/daemon/specs/agents/conveyor/lead/agent.yaml +34 -0
  482. package/daemon/specs/agents/conveyor/lead/guidance/role.md +34 -0
  483. package/daemon/specs/agents/conveyor/lead/startup/context.md +15 -0
  484. package/daemon/specs/agents/conveyor/planner/agent.yaml +34 -0
  485. package/daemon/specs/agents/conveyor/planner/guidance/role.md +29 -0
  486. package/daemon/specs/agents/conveyor/planner/startup/context.md +12 -0
  487. package/daemon/specs/agents/conveyor/reviewer/agent.yaml +34 -0
  488. package/daemon/specs/agents/conveyor/reviewer/guidance/role.md +29 -0
  489. package/daemon/specs/agents/conveyor/reviewer/startup/context.md +10 -0
  490. package/daemon/specs/agents/design/product-designer/agent.yaml +0 -1
  491. package/daemon/specs/agents/development/implementer/agent.yaml +1 -2
  492. package/daemon/specs/agents/development/implementer/guidance/role.md +0 -1
  493. package/daemon/specs/agents/development/qa/agent.yaml +0 -1
  494. package/daemon/specs/agents/development/qa/guidance/role.md +0 -2
  495. package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +1 -2
  496. package/daemon/specs/agents/orchestration/orchestrator/guidance/role.md +2 -3
  497. package/daemon/specs/agents/research/analyst/agent.yaml +0 -1
  498. package/daemon/specs/agents/research/synthesizer/agent.yaml +0 -1
  499. package/daemon/specs/agents/review/independent-reviewer/agent.yaml +0 -1
  500. package/daemon/specs/agents/shared/agent.yaml +6 -8
  501. package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +361 -0
  502. package/daemon/specs/agents/shared/skills/core/openrig-installer/SKILL.md +142 -0
  503. package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +30 -0
  504. package/daemon/specs/agents/shared/skills/core/openrig-user-settings/SKILL.md +153 -0
  505. package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +116 -0
  506. package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +0 -1
  507. package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +2 -2
  508. package/daemon/specs/agents/shared/skills/process/agent-browser/LOCAL-INSIGHTS.md +6 -6
  509. package/daemon/specs/agents/shared/skills/process/agent-browser/OPENRIG.md +40 -0
  510. package/daemon/specs/agents/shared/skills/process/agent-browser/SKILL.md +10 -0
  511. package/daemon/specs/agents/shared/skills/process/brainstorming/OPENRIG.md +48 -0
  512. package/daemon/specs/agents/shared/skills/process/brainstorming/SKILL.md +11 -0
  513. package/daemon/specs/agents/shared/skills/process/dogfood/SKILL.md +5 -0
  514. package/daemon/specs/agents/shared/skills/process/executing-plans/OPENRIG.md +56 -0
  515. package/daemon/specs/agents/shared/skills/process/executing-plans/SKILL.md +10 -0
  516. package/daemon/specs/agents/shared/skills/process/frontend-design/SKILL.md +5 -0
  517. package/daemon/specs/agents/shared/skills/process/systematic-debugging/SKILL.md +5 -0
  518. package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +5 -0
  519. package/daemon/specs/agents/shared/skills/process/using-superpowers/OPENRIG.md +48 -0
  520. package/daemon/specs/agents/shared/skills/process/using-superpowers/SKILL.md +11 -0
  521. package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +5 -0
  522. package/daemon/specs/agents/shared/skills/process/writing-plans/OPENRIG.md +52 -0
  523. package/daemon/specs/agents/shared/skills/process/writing-plans/SKILL.md +12 -2
  524. package/daemon/specs/rigs/launch/conveyor/CULTURE.md +34 -0
  525. package/daemon/specs/rigs/launch/conveyor/README.md +33 -0
  526. package/daemon/specs/rigs/launch/conveyor/rig.yaml +72 -0
  527. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +35 -0
  528. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +50 -0
  529. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/startup/context.md +37 -0
  530. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/agent.yaml +35 -0
  531. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +49 -0
  532. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +63 -0
  533. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/agent.yaml +35 -0
  534. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +33 -0
  535. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/startup/context.md +30 -0
  536. package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +69 -0
  537. package/daemon/specs/rigs/launch/kernel/rig-claude-only.yaml +59 -0
  538. package/daemon/specs/rigs/launch/kernel/rig-codex-only.yaml +59 -0
  539. package/daemon/specs/rigs/launch/kernel/rig.yaml +69 -0
  540. package/daemon/specs/rigs/preview/product-team/CULTURE.md +2 -2
  541. package/daemon/specs/rigs/preview/product-team/rig.yaml +3 -4
  542. package/dist/commands/agent-image.d.ts +4 -0
  543. package/dist/commands/agent-image.d.ts.map +1 -0
  544. package/dist/commands/agent-image.js +352 -0
  545. package/dist/commands/agent-image.js.map +1 -0
  546. package/dist/commands/config-init-workspace.d.ts +35 -0
  547. package/dist/commands/config-init-workspace.d.ts.map +1 -0
  548. package/dist/commands/config-init-workspace.js +553 -0
  549. package/dist/commands/config-init-workspace.js.map +1 -0
  550. package/dist/commands/config.d.ts.map +1 -1
  551. package/dist/commands/config.js +86 -18
  552. package/dist/commands/config.js.map +1 -1
  553. package/dist/commands/context-pack.d.ts +4 -0
  554. package/dist/commands/context-pack.d.ts.map +1 -0
  555. package/dist/commands/context-pack.js +357 -0
  556. package/dist/commands/context-pack.js.map +1 -0
  557. package/dist/commands/daemon.d.ts.map +1 -1
  558. package/dist/commands/daemon.js +61 -1
  559. package/dist/commands/daemon.js.map +1 -1
  560. package/dist/commands/heartbeat.d.ts.map +1 -1
  561. package/dist/commands/heartbeat.js +0 -5
  562. package/dist/commands/heartbeat.js.map +1 -1
  563. package/dist/commands/import.d.ts.map +1 -1
  564. package/dist/commands/import.js +7 -2
  565. package/dist/commands/import.js.map +1 -1
  566. package/dist/commands/plugin.d.ts +4 -0
  567. package/dist/commands/plugin.d.ts.map +1 -0
  568. package/dist/commands/plugin.js +395 -0
  569. package/dist/commands/plugin.js.map +1 -0
  570. package/dist/commands/ps.d.ts.map +1 -1
  571. package/dist/commands/ps.js +173 -14
  572. package/dist/commands/ps.js.map +1 -1
  573. package/dist/commands/queue.d.ts.map +1 -1
  574. package/dist/commands/queue.js +9 -0
  575. package/dist/commands/queue.js.map +1 -1
  576. package/dist/commands/send.d.ts +15 -0
  577. package/dist/commands/send.d.ts.map +1 -1
  578. package/dist/commands/send.js +32 -1
  579. package/dist/commands/send.js.map +1 -1
  580. package/dist/commands/specs.d.ts +4 -2
  581. package/dist/commands/specs.d.ts.map +1 -1
  582. package/dist/commands/specs.js +12 -8
  583. package/dist/commands/specs.js.map +1 -1
  584. package/dist/commands/up.d.ts.map +1 -1
  585. package/dist/commands/up.js +30 -4
  586. package/dist/commands/up.js.map +1 -1
  587. package/dist/commands/whoami.d.ts.map +1 -1
  588. package/dist/commands/whoami.js +9 -4
  589. package/dist/commands/whoami.js.map +1 -1
  590. package/dist/commands/workflow.d.ts.map +1 -1
  591. package/dist/commands/workflow.js +37 -0
  592. package/dist/commands/workflow.js.map +1 -1
  593. package/dist/commands/workspace.d.ts +6 -0
  594. package/dist/commands/workspace.d.ts.map +1 -0
  595. package/dist/commands/workspace.js +83 -0
  596. package/dist/commands/workspace.js.map +1 -0
  597. package/dist/config-store.d.ts +90 -1
  598. package/dist/config-store.d.ts.map +1 -1
  599. package/dist/config-store.js +477 -42
  600. package/dist/config-store.js.map +1 -1
  601. package/dist/daemon-lifecycle.d.ts +42 -1
  602. package/dist/daemon-lifecycle.d.ts.map +1 -1
  603. package/dist/daemon-lifecycle.js +98 -7
  604. package/dist/daemon-lifecycle.js.map +1 -1
  605. package/dist/host-registry.d.ts +1 -1
  606. package/dist/host-registry.js +1 -1
  607. package/dist/index.d.ts +5 -0
  608. package/dist/index.d.ts.map +1 -1
  609. package/dist/index.js +8 -0
  610. package/dist/index.js.map +1 -1
  611. package/dist/openrig-compat.d.ts +1 -1
  612. package/dist/openrig-compat.d.ts.map +1 -1
  613. package/dist/openrig-compat.js +6 -4
  614. package/dist/openrig-compat.js.map +1 -1
  615. package/dist/restore-packet/claude-transcript-parser.js +1 -1
  616. package/dist/restore-packet/claude-transcript-parser.js.map +1 -1
  617. package/dist/restore-packet/codex-jsonl-parser.js +1 -1
  618. package/dist/restore-packet/codex-jsonl-parser.js.map +1 -1
  619. package/package.json +2 -2
  620. package/ui/dist/assets/index-C_Q5FczU.css +1 -0
  621. package/ui/dist/assets/index-Rl3ZBrUg.js +547 -0
  622. package/ui/dist/graphics/operator-climber-monochrome.png +0 -0
  623. package/ui/dist/index.html +3 -2
  624. package/daemon/specs/agents/shared/skills/claude-compact-in-place/SKILL.md +0 -100
  625. package/daemon/specs/agents/shared/skills/mental-model-ha/SKILL.md +0 -956
  626. package/daemon/specs/agents/shared/skills/process/containerized-e2e/SKILL.md +0 -256
  627. package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/Dockerfile +0 -39
  628. package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/build-e2e-image.sh +0 -37
  629. package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/control-plane-test.yaml +0 -40
  630. package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/e2e-report-template.md +0 -94
  631. package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/expansion-collision-fragment.yaml +0 -13
  632. package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/expansion-pod-fragment.yaml +0 -14
  633. package/ui/dist/assets/index-B09doO8H.js +0 -139
  634. package/ui/dist/assets/index-Dec25siz.css +0 -1
  635. package/ui/dist/assets/index-GNYaWmBj.js +0 -225
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: queue-handoff
3
+ description: Use when ending a turn, finishing a slice, blocked on another agent's work, or escalating to a human — durable work handoff via queue items so the system keeps moving across compactions, missed messages, and interruptions. Covers the hot-potato terminal-turn-rule (active work ends by passing the ball, not by going idle), default-nudge semantics, and when --no-nudge or --notify is required.
4
+ metadata:
5
+ openrig:
6
+ stage: factory-approved
7
+ last_verified: "2026-05-04"
8
+ distribution_scope: product-bound
9
+ source_evidence: |
10
+ Daemon-backed `rig queue` shipped in v0.2.0 (PL-004 Phase A) with handed-off-to / handed-off-from / state field shape. `rig queue` is canonical for new work; `rigx queue` is recovery-only fallback. The daemon enforces hot-potato strict-rejection at the API.
11
+ sibling_skills: []
12
+ transfer_test: pending
13
+ ---
14
+
15
+ # Queue Handoff
16
+
17
+ > **CANONICAL SURFACE NOTE (2026-05-11)** — `rig queue` (daemon-backed SQLite) is the
18
+ > canonical surface for all substantive work routing. `rigx queue` (filesystem v0
19
+ > prototype) is **recovery-only fallback**; qitems written via `rigx queue` are
20
+ > invisible to daemon-backed reads and break fleet-wide routing discipline.
21
+
22
+ Durable work handoff via queue items. Lets the system keep moving
23
+ through compactions, missed messages, and interruptions by passing the
24
+ ball forward instead of leaving work suspended in chat or in-flight
25
+ without an owner.
26
+
27
+ ## Use this when
28
+
29
+ - **Ending a turn on substantive work.** Active work should end by
30
+ passing the ball to an owner or to the human — never by going idle
31
+ with the rig appearing dormant.
32
+ - **Finishing a slice that has a clear next step.** Default-nudge:
33
+ receiver gets a wake-ping plus the durable queue item.
34
+ - **Blocked on another agent's work.** Park the qitem with
35
+ `closure_reason: blocked_on` and the blocker qitem id.
36
+ - **Escalating to the human.** Make the escalation a durable attention
37
+ item, not just a chat message.
38
+
39
+ ## Don't use this when
40
+
41
+ - The work is genuinely complete and there's no follow-on owner. Use
42
+ `closure_reason: no-follow-on` (terminal completion) or
43
+ `canceled`/`denied` as appropriate.
44
+ - The handoff would be too small and turn work into bureaucracy. Bundle
45
+ the work into a coherent slice instead of decomposing every step.
46
+ - The handoff would be too broad and lose ownership/proof/closure
47
+ criteria. Shape the qitem so the receiver knows the expected next
48
+ action and closure evidence.
49
+
50
+ ## The hot-potato terminal-turn-rule
51
+
52
+ Active work ends by passing the ball to a named next owner or to the
53
+ human. The qitem state machine enforces this:
54
+
55
+ `pending → in-progress → done` requires `closure_reason` from one of:
56
+
57
+ - `handed_off_to` — work continues at a different seat (target = new owner)
58
+ - `blocked_on` — parked pending another qitem (target = blocker qitem id)
59
+ - `denied` — receiver rejected the work
60
+ - `canceled` — sender or receiver withdrew
61
+ - `no-follow-on` — terminal completion, nothing else needed
62
+ - `escalation` — kicked up to a higher tier (target = escalation target)
63
+
64
+ Three of those (`handed_off_to`, `blocked_on`, `escalation`) additionally
65
+ require `closure_target`. The daemon enforces this at the domain layer;
66
+ every surface (CLI, MCP, future UI) inherits the same guarantee.
67
+
68
+ ## Default-nudge semantics (the syntax footgun)
69
+
70
+ | Command | Nudges by default? | When to use |
71
+ |---|---|---|
72
+ | `rig queue create` | yes | New qitem created from scratch |
73
+ | `rig queue handoff` | yes | Transactional close-as-handed-off + create-new |
74
+ | `rig queue handoff-and-complete` | **no — requires `--notify`** | Inside a self-driving loop where motion matters |
75
+ | `rigx queue handoff` (filesystem v0 prototype; **recovery-only fallback since 2026-05-11**) | yes | Legacy artifact; qitems invisible to daemon-backed reads. Use `rig queue handoff` for all new substantive work. |
76
+
77
+ **Footgun**: `handoff-and-complete` is cold unless `--notify` is passed.
78
+ In a self-driving loop, an agent that closes with
79
+ `handoff-and-complete` (no `--notify`) writes a durable qitem but does
80
+ NOT wake the next owner — the rig stalls silently while the qitem sits
81
+ in inbox.
82
+
83
+ **Rule**: in a live loop, use `handoff-and-complete --notify` OR send
84
+ a separate verified manual nudge. `--no-nudge` exists but should be
85
+ used intentionally (e.g., explicit park or human-gate signal), not as
86
+ an accidental stall.
87
+
88
+ ## Failure modes (5; verbatim)
89
+
90
+ 1. Agent ends a turn without a handoff, so the rig appears idle.
91
+ 2. Agent creates a queue item but suppresses or forgets the nudge when immediate motion was intended. This includes `handoff-and-complete` without `--notify` inside a live loop.
92
+ 3. Queue item is too small and turns work into bureaucracy.
93
+ 4. Queue item is too broad and loses ownership, proof, or closure criteria.
94
+ 5. Human escalation happens in chat but not as a durable attention item.
95
+
96
+ ## Durable handoff field shape
97
+
98
+ Every qitem carries:
99
+
100
+ - `handed_off_to` — destination session (qualified `pod-member@rig` form)
101
+ - `handed_off_from` — source session
102
+ - `state` — one of: `pending | in-progress | done | blocked | failed | denied | canceled | handed-off`
103
+ - `closure_reason` + `closure_target` — set on terminal closure per hot-potato rule
104
+
105
+ The same field shape exists in legacy `rigx queue` artifacts and the daemon-shipped
106
+ `rig queue` surface, but new queue reads and writes should use `rig queue`. Watchdog
107
+ policies and workflow runtime project new owners off these fields.
108
+
109
+ ## Two surfaces (same shape)
110
+
111
+ | Surface | Status | When to use |
112
+ |---|---|---|
113
+ | `rig queue ...` (daemon-shipped, v0.2.0) | Active host coordination surface | Daemon-backed PL-004 work; SQLite-canonical |
114
+ | `rigx queue ...` (filesystem v0 prototype) | Recovery-only fallback | Legacy recovery for artifacts that have not migrated; not for new substantive work because daemon-backed reads cannot see those qitems |
115
+
116
+ Default posture: prefer daemon `rig queue` for new work. If a
117
+ daemon-backed coordination command fails, debug the command/runtime/schema
118
+ edge directly — don't fall back to stale pre-upgrade assumptions.
119
+
120
+ ## See also
121
+
122
+ - `rig queue --help` — full CLI surface for queue items, handoffs, and closure-reason discipline
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: seat-continuity-and-handover
3
+ description: Use when replacing a seat's occupant (rebuild/handover/swap), reasoning about stable-seat-identity vs fluid-occupant-identity, choosing an old-occupant disposition (retire/advise/shadow), or recording provenance for an occupant change. Two independent outcomes (continuityOutcome + seatBindingOutcome) and the 5 failure modes that prevent silent dishonesty.
4
+ metadata:
5
+ openrig:
6
+ stage: factory-approved
7
+ last_verified: "2026-05-04"
8
+ distribution_scope: product-bound
9
+ source_evidence: |
10
+ Option A rebuild MVP shipped 2026-04-30. Option B (full code-direct
11
+ seat handover via SeatHandoverService daemon module) is a future
12
+ follow-on.
13
+ sibling_skills:
14
+ - claude-compaction-restore
15
+ - agent-startup-and-context-ingestion
16
+ transfer_test: pending
17
+ ---
18
+
19
+ # Seat Continuity and Handover
20
+
21
+ A pair of primitive families that separate *who is sitting in a seat* from
22
+ *what the seat itself is*:
23
+
24
+ 1. **Occupant-creation primitives** — `resume`, `fork`, `rebuild`, `fresh` — produce a candidate new occupant. Answer: "where did the new occupant come from?"
25
+ 2. **Seat-binding primitives** — `seat handover`, later `seat transfer` / `seat retire` / `seat swap` — bind a candidate occupant into the topology. Answer: "what happened to the stable seat identity?"
26
+
27
+ Core architectural decision: **stable seat identity, fluid occupant
28
+ identity, explicit provenance.** Today's `lead2`/`lead3`/`lead4`/`lead5`
29
+ pattern encodes successor lineage into seat names — that's the wrong
30
+ shape. Stable seat name + separately-recorded provenance trail is the
31
+ right shape.
32
+
33
+ ## Use this when
34
+
35
+ - Replacing a seat's occupant via rebuild, fork, fresh, or future seat-handover
36
+ - Choosing old-occupant disposition: retire / advise / shadow
37
+ - Reasoning about whether a seat's lineage is stable or has drifted
38
+ - Reading or writing the provenance record for a seat
39
+ - Designing or auditing topology stability across an occupant change
40
+
41
+ ## Don't use this when
42
+
43
+ - The seat is freshly created (no occupant to replace) — use `rig launch` / `rig expand` directly
44
+ - The intent is to change topology shape (add/remove seats), not replace an occupant — use topology-mutation primitives
45
+
46
+ ## The two-outcome honesty model
47
+
48
+ Every seat-binding operation produces two **independent** outcomes:
49
+
50
+ ```yaml
51
+ continuityOutcome: rebuilt | resumed | forked | fresh | failed
52
+ seatBindingOutcome: handed_over | partial | failed | unchanged
53
+ ```
54
+
55
+ These can disagree honestly. Examples:
56
+
57
+ - `continuityOutcome: failed` + `seatBindingOutcome: unchanged` — new occupant didn't materialize; seat correctly retains old occupant.
58
+ - `continuityOutcome: rebuilt` + `seatBindingOutcome: failed` — candidate created OK; bind failed mid-flight; provenance records the gap.
59
+
60
+ **Don't collapse these into one outcome.** The system can describe what
61
+ actually happened only if the two are recorded independently.
62
+
63
+ ## Provenance record (durable, queryable)
64
+
65
+ Every handover writes:
66
+
67
+ - seat id
68
+ - old occupant id
69
+ - new occupant id
70
+ - creation mode (`resume`/`fork`/`rebuild`/`fresh`)
71
+ - source artifacts used
72
+ - whether old occupant remains alive as advisor/shadow
73
+ - operator or loop that initiated the motion
74
+ - timestamp
75
+ - result (`handed_over` / `partial` / `failed`)
76
+
77
+ This is the system's truth-source for "how did the current occupant get
78
+ there." Without it, the control plane shows the current occupant but
79
+ not the legitimacy of the transition.
80
+
81
+ ## State models — independent
82
+
83
+ ### Occupant-creation state (per candidate)
84
+
85
+ 1. **Requested** — input to rebuild/fork/fresh/resume
86
+ 2. **Realized** — runtime/artifact path produced an occupant with managed-seat shape
87
+ 3. **Failed** — candidate didn't materialize; `continuityOutcome: failed`
88
+
89
+ ### Seat-binding state (per seat)
90
+
91
+ 1. **Stable** — current occupant attached, no in-flight binding
92
+ 2. **Binding** — handover in progress
93
+ 3. **Bound** — handover succeeded; provenance record written
94
+ 4. **Unchanged** — bind failed before completion; seat retains old occupant
95
+
96
+ A seat stays `Stable` even if multiple candidate-occupants were produced and discarded.
97
+
98
+ ## Failure modes (5)
99
+
100
+ 1. **Candidate creation failed** — `rebuild` couldn't synthesize from artifacts; `fork` couldn't resolve `session_source`; `fresh` couldn't launch. **Action**: bind operation does not begin; seat unchanged; provenance records the failed candidate-creation step.
101
+ 2. **Old occupant cannot be detached cleanly** — runtime hung, tmux locked, etc. **Action**: bind halts mid-flight; seat enters `Binding` state with explicit "halted" sub-status; operator alerted. **Do NOT auto-rollback by reattaching old-occupant if detach didn't complete cleanly.**
102
+ 3. **Bind succeeded but provenance write failed** — disk/db error. **Action**: not durable until provenance writes; treat as `Binding` halted, not `Bound`.
103
+ 4. **Old occupant disposition unfulfillable** — operator requested `advise` (keep alive as advisor) but runtime can't keep old alive. **Action**: degrade to `retire` with explicit notification, OR fail if operator passed strict-disposition flag.
104
+ 5. **Concurrent handover attempts** — two operations target the same seat. **Action**: serialize by seat-id lock; second attempt refuses with clear error.
105
+
106
+ ## Hard boundaries (do-not list; verbatim)
107
+
108
+ - **Do NOT collapse `rebuild` and `seat handover` into one primitive.** The design specifically separates them so the system can describe what actually happened.
109
+ - **Do NOT introduce successor-suffix seat names** (`lead2`/`lead3`). Stable seat identity is the architectural goal.
110
+ - **Do NOT report `seatBindingOutcome: handed_over`** if the provenance record didn't write durably.
111
+ - **Do NOT auto-rollback a half-completed handover** by re-attaching the old occupant unless detach completed cleanly first.
112
+
113
+ ## Composition: seat handover over fork
114
+
115
+ Once `session_source` fork v1 lands (already shipped at openrig
116
+ `c7b6df1`), the next composition is **seat handover over fork**:
117
+ candidate occupant created via fork, bound into the existing seat via
118
+ handover. Continuity outcome is `forked`; binding outcome is independent.
119
+
120
+ ## Currently shipped vs deferred
121
+
122
+ - **Option A (rebuild) shipped** at openrig `578bd5c` (2026-04-30): `session_source.mode: rebuild` with `ref.kind: artifact_set`; identity-honesty bedrock at 4 layers (schema dispatch, orchestrator threading, SQLite read-back, negative-grep on resolver output). 26/26 Tier 1 cases green; full daemon regression 2146/2146 PASS.
123
+ - **Option B partially shipped, partially deferred to Mode 3**: the `rig seat handover` CLI exists as a planning/observability surface — `status <seat>` reads the seat-handover observability tables (migration `021`); `handover <seat>` plans a safe two-phase handover sequence with actual execution flowing through existing seat-launch surfaces under operator gating. Full code-direct `SeatHandoverService` daemon module + `seat-binding-outcome` provenance record + nodes-table provenance migration remain deferred to Mode 3. MVP composition `seat handover over fork` is highest-leverage v1.
124
+
125
+ ## Why load-bearing for RSI
126
+
127
+ Any recursive seat-refresh loop must be able to replace an occupant
128
+ while keeping topology stable. Without these primitives, RSI loops will
129
+ either accumulate suffixed seat names (lineage leaking into identity) or
130
+ destabilize topology references on each cycle. Provenance must be
131
+ durable AND queryable so RSI loops can decide whether a seat is fresh
132
+ enough to receive new work or needs re-handover.
133
+
134
+ ## See also
135
+
136
+ - `claude-compaction-restore` skill — packet-driven restore after Claude compaction
137
+ - `agent-startup-and-context-ingestion` skill — ingestion path for restore packets at agent boot
@@ -0,0 +1,48 @@
1
+ # VM Preview Fixtures
2
+
3
+ Sample data the Tart preview VM uses to populate the "populated" daemon with
4
+ a representative "lived-in" environment. See
5
+ `<substrate-shared-docs>/openrig-work/conventions/vm-preview/README.md` for the
6
+ operator workflow and the rationale behind the two-daemon model.
7
+
8
+ ## Contents
9
+
10
+ - `workflows/` — workflow_spec YAML files. The operator copies these into the
11
+ populated daemon's `<workspace.specs_root>/workflows/` directory; slice 11's
12
+ folder-discovery scanner auto-discovers them on the next
13
+ `GET /api/specs/library` call.
14
+
15
+ - `queue-items/` — placeholder for future qitem fixture content (TODO; slice
16
+ follow-up will add).
17
+
18
+ - `rigs/` — placeholder for future rig-instance fixtures (TODO; slice
19
+ follow-up will add). For v0, the operator manually instantiates a sample
20
+ rig via `rig up product-team` against the populated daemon (see bootstrap
21
+ script).
22
+
23
+ ## Conventions
24
+
25
+ Fixture YAML files use the canonical placeholder paths per banked
26
+ `feedback_test_fixture_example_path_placeholder.md`:
27
+
28
+ - Username-bearing paths: `/Users/example/...` (never a real contributor
29
+ username)
30
+ - Substrate-relative refs: `<substrate-shared-docs>/...`
31
+
32
+ ## v0 scope
33
+
34
+ Slice 22 (release-0.3.1) ships the INFRASTRUCTURE for the two-daemon model:
35
+
36
+ - **Process-env pattern**: `OPENRIG_HOME=<dir> rig daemon start ...` — each
37
+ `rig` invocation gets its own state directory at process import time.
38
+ No CLI flag (an earlier attempt at `--openrig-home` was dropped because
39
+ it only threaded into the spawned child, not the parent-side lifecycle
40
+ bookkeeping; see substrate convention doc for the architecture note).
41
+ - Bootstrap script (`scripts/vm-bootstrap/two-daemon-start.sh`)
42
+ - This fixtures directory + a sample workflow YAML
43
+ - Convention doc in substrate
44
+
45
+ Authoring rich populated content (~13-node openrig-velocity rig + 20 qitems
46
+ + getting-started mission narrative) is deferred to follow-up content slices
47
+ that have clearer ownership (slice 21 onboarding-conveyor will likely
48
+ contribute getting-started mission content).
@@ -0,0 +1,79 @@
1
+ # VM-preview fixture for slice 22 founder-walk-vm-populated-env.
2
+ # Derived from the 0.3.0 basic-loop starter; renamed to avoid colliding
3
+ # with the built-in spec when this fixture file is dropped into a
4
+ # populated daemon's workspace.specs_root/workflows/ directory.
5
+ # Slice 11's folder-discovery scanner auto-discovers it on next list.
6
+ workflow:
7
+ id: vm-preview-basic-loop
8
+ version: 1
9
+ objective: >
10
+ Walk one work packet through the conveyor rig slowly enough for a new user
11
+ to inspect each handoff.
12
+ target:
13
+ rig: conveyor
14
+ entry:
15
+ role: intake
16
+ coordination_terminal_turn_rule: hot_potato
17
+ roles:
18
+ intake:
19
+ skill_refs: [openrig-user, backlog-capture]
20
+ preferred_targets: [intake-lead@conveyor]
21
+ planner:
22
+ skill_refs: [openrig-user, writing-plans]
23
+ preferred_targets: [plan-planner@conveyor]
24
+ builder:
25
+ skill_refs: [openrig-user, executing-plans]
26
+ preferred_targets: [build-builder@conveyor]
27
+ reviewer:
28
+ skill_refs: [openrig-user, review-team]
29
+ preferred_targets: [review-reviewer@conveyor]
30
+ closer:
31
+ skill_refs: [openrig-user, verification-before-completion]
32
+ preferred_targets: [intake-lead@conveyor]
33
+ steps:
34
+ - id: intake
35
+ actor_role: intake
36
+ objective: Restate the objective and hand off one packet.
37
+ allowed_exits: [handoff, waiting, failed]
38
+ next_hop:
39
+ mode: require
40
+ suggested_roles: [planner]
41
+ - id: plan
42
+ actor_role: planner
43
+ objective: Produce a short plan for one build turn.
44
+ allowed_exits: [handoff, waiting, failed]
45
+ next_hop:
46
+ mode: require
47
+ suggested_roles: [builder]
48
+ - id: build
49
+ actor_role: builder
50
+ objective: Build or draft the planned output.
51
+ allowed_exits: [handoff, waiting, failed]
52
+ next_hop:
53
+ mode: require
54
+ suggested_roles: [reviewer]
55
+ - id: review
56
+ actor_role: reviewer
57
+ objective: Check the output and clear it for close.
58
+ allowed_exits: [handoff, waiting, failed]
59
+ next_hop:
60
+ mode: require
61
+ suggested_roles: [closer]
62
+ - id: close
63
+ actor_role: closer
64
+ objective: Close the walkthrough packet.
65
+ allowed_exits: [done, failed]
66
+ next_hop:
67
+ mode: forbid
68
+ invariants:
69
+ continuation_required: true
70
+ preserve_lineage: true
71
+ closure_required: true
72
+ allowed_exits: [handoff, waiting, done, failed]
73
+ loop_guards:
74
+ max_hops: 10
75
+ spawn_budget: 0
76
+ closure:
77
+ success: Walkthrough packet closed.
78
+ degraded: Walkthrough stopped with a named blocker.
79
+ failed: Walkthrough failed with evidence.
@@ -25,7 +25,7 @@ export declare class ClaudeCodeAdapter implements RuntimeAdapter {
25
25
  private sleep;
26
26
  private stateDir;
27
27
  private collectorAssetPath;
28
- private activityHookRelayAssetPath;
28
+ private autoDriveProviderPrompts;
29
29
  constructor(deps: {
30
30
  tmux: TmuxAdapter;
31
31
  fsOps: ClaudeAdapterFsOps;
@@ -33,7 +33,7 @@ export declare class ClaudeCodeAdapter implements RuntimeAdapter {
33
33
  sleep?: (ms: number) => Promise<void>;
34
34
  stateDir?: string;
35
35
  collectorAssetPath?: string;
36
- activityHookRelayAssetPath?: string;
36
+ autoDriveProviderPrompts?: boolean;
37
37
  });
38
38
  listInstalled(binding: NodeBinding): Promise<InstalledResource[]>;
39
39
  project(plan: ProjectionPlan, binding: NodeBinding): Promise<ProjectionResult>;
@@ -56,6 +56,7 @@ export declare class ClaudeCodeAdapter implements RuntimeAdapter {
56
56
  }): void;
57
57
  private verifyResumeLaunch;
58
58
  private projectEntry;
59
+ private pluginAppliesToClaude;
59
60
  private resolveTargetDir;
60
61
  private applyRuntimeResource;
61
62
  private mergeJsonFragment;
@@ -72,6 +73,14 @@ export declare class ClaudeCodeAdapter implements RuntimeAdapter {
72
73
  * Finds the session file whose name matches the expected session name.
73
74
  * Returns the sessionId if found, undefined otherwise.
74
75
  */
76
+ /**
77
+ * PL-016 hardening v0+1 — poll captureResumeToken on the
78
+ * verifyResumeLaunch cadence. Returns the token as soon as the
79
+ * session file appears, or undefined after attempts × delayMs ceiling.
80
+ * Used by the fork branch where the new session-name file appears
81
+ * 1-3s after the Enter key is sent (cold-start fork-file write).
82
+ */
83
+ private pollForResumeToken;
75
84
  private captureResumeToken;
76
85
  private detectDeliveryHint;
77
86
  private provisionManagedBootstrap;
@@ -96,6 +105,5 @@ export declare class ClaudeCodeAdapter implements RuntimeAdapter {
96
105
  * Idempotent: safe to call multiple times (merge preserves existing settings).
97
106
  */
98
107
  private provisionContextCollector;
99
- private provisionActivityHooks;
100
108
  }
101
109
  //# sourceMappingURL=claude-code-adapter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude-code-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/claude-code-adapter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EACV,cAAc,EAAE,WAAW,EAAE,mBAAmB,EAChD,iBAAiB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,eAAe,EAC3E,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAmB,MAAM,iCAAiC,CAAC;AAIvF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,SAAS,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACtC,6DAA6D;IAC7D,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACpC,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,cAAc;IACtD,QAAQ,CAAC,OAAO,iBAAiB;IACjC,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,EAAE,CAAqB;IAC/B,OAAO,CAAC,gBAAgB,CAAe;IACvC,OAAO,C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B,OAAO,CAAC,wBAAwB;IAUhC,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,eAAe;IAIvB;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;CAyBlC"}
@@ -5,6 +5,12 @@ import { resolveConcreteHint } from "../domain/runtime-adapter.js";
5
5
  import { assessNativeResumeProbe } from "../domain/native-resume-probe.js";
6
6
  import { mergeManagedBlock } from "../domain/managed-blocks.js";
7
7
  const SHELL_COMMANDS = new Set(["bash", "fish", "nu", "sh", "tmux", "zsh"]);
8
+ // Real Claude Code binary needs 1-3s to write the new fork session-name
9
+ // file under ~/.claude/sessions/. Poll instead of single-shot lookup.
10
+ // 12 × 500ms = 6s ceiling — comfortably above the observed cold-start
11
+ // fork-file write window without making a bad-token error feel slow.
12
+ const FORK_POLL_ATTEMPTS = 12;
13
+ const FORK_POLL_DELAY_MS = 500;
8
14
  /**
9
15
  * Claude Code runtime adapter. Projects resources to .claude/ targets
10
16
  * and delivers startup files via guidance merge, skill install, or tmux send-text.
@@ -17,7 +23,7 @@ export class ClaudeCodeAdapter {
17
23
  sleep;
18
24
  stateDir;
19
25
  collectorAssetPath;
20
- activityHookRelayAssetPath;
26
+ autoDriveProviderPrompts;
21
27
  constructor(deps) {
22
28
  this.tmux = deps.tmux;
23
29
  this.fs = deps.fsOps;
@@ -25,7 +31,7 @@ export class ClaudeCodeAdapter {
25
31
  this.sleep = deps.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
26
32
  this.stateDir = deps.stateDir ?? null;
27
33
  this.collectorAssetPath = deps.collectorAssetPath ?? null;
28
- this.activityHookRelayAssetPath = deps.activityHookRelayAssetPath ?? null;
34
+ this.autoDriveProviderPrompts = deps.autoDriveProviderPrompts ?? false;
29
35
  }
30
36
  async listInstalled(binding) {
31
37
  const results = [];
@@ -76,14 +82,6 @@ export class ClaudeCodeAdapter {
76
82
  // Log but don't fail — collector provisioning is best-effort
77
83
  console.error(`[openrig] context collector provisioning warning: ${err.message}`);
78
84
  }
79
- // Best-effort: provision project-local activity hooks. The hook token is
80
- // supplied through tmux session env, never written to provider settings.
81
- try {
82
- this.provisionActivityHooks(binding);
83
- }
84
- catch (err) {
85
- console.error(`[openrig] claude activity hook provisioning warning: ${err.message}`);
86
- }
87
85
  let delivered = 0;
88
86
  const failed = [];
89
87
  for (const file of files) {
@@ -158,12 +156,16 @@ export class ClaudeCodeAdapter {
158
156
  if (!enterResult.ok) {
159
157
  return { ok: false, error: `Failed to send Enter: ${enterResult.message}` };
160
158
  }
161
- // Capture the NEW session id post-fork. Parent id is NOT persisted.
162
- const newToken = this.captureResumeToken(opts.name);
159
+ // claude needs 1-3s to write the new fork session-name file under
160
+ // ~/.claude/sessions/. The original implementation captured the
161
+ // token IMMEDIATELY after Enter, which always returned undefined
162
+ // against a real binary. Poll on the
163
+ // verifyResumeLaunch cadence (12 × 500ms = 6s ceiling).
164
+ const newToken = await this.pollForResumeToken(opts.name, FORK_POLL_ATTEMPTS, FORK_POLL_DELAY_MS);
163
165
  if (!newToken) {
164
166
  return {
165
167
  ok: false,
166
- error: "claude-code fork: could not capture new post-fork session id from claude session storage",
168
+ error: `claude-code fork: could not capture new post-fork session id from claude session storage after ${FORK_POLL_ATTEMPTS} polls (${(FORK_POLL_ATTEMPTS * FORK_POLL_DELAY_MS) / 1000}s ceiling)`,
167
169
  };
168
170
  }
169
171
  return { ok: true, resumeToken: newToken, resumeType: "claude_id" };
@@ -240,6 +242,14 @@ export class ClaudeCodeAdapter {
240
242
  if (probe.status === "resumed") {
241
243
  return { ok: true };
242
244
  }
245
+ if (this.autoDriveProviderPrompts && probe.code === "trust_gate") {
246
+ const enterResult = await this.tmux.sendKeys(tmuxSession, ["Enter"]);
247
+ if (!enterResult.ok) {
248
+ return { ok: false, error: `Claude trust prompt auto-drive failed: ${enterResult.message}` };
249
+ }
250
+ await this.sleep(200);
251
+ continue;
252
+ }
243
253
  if (attempt < attempts - 1) {
244
254
  await this.sleep(200);
245
255
  }
@@ -272,6 +282,13 @@ export class ClaudeCodeAdapter {
272
282
  const content = this.fs.readFile(entry.absolutePath);
273
283
  return this.mergeGuidance(targetPath, entry.effectiveId, content);
274
284
  }
285
+ // HG-1.3 plugin runtime applicability filter (per DESIGN.md §5.1):
286
+ // explicit pluginType="codex" → skip Claude projection;
287
+ // pluginType="auto" (or unset) + no .claude-plugin/ manifest dir → skip;
288
+ // explicit pluginType="claude" → project regardless of manifest presence.
289
+ if (entry.category === "plugin" && !this.pluginAppliesToClaude(entry)) {
290
+ return false;
291
+ }
275
292
  const targetDir = this.resolveTargetDir(entry, cwd);
276
293
  if (!targetDir)
277
294
  return true;
@@ -299,12 +316,21 @@ export class ClaudeCodeAdapter {
299
316
  }
300
317
  return true;
301
318
  }
319
+ pluginAppliesToClaude(entry) {
320
+ const explicit = entry.pluginType ?? "auto";
321
+ if (explicit === "claude")
322
+ return true;
323
+ if (explicit === "codex")
324
+ return false;
325
+ // auto: detect via .claude-plugin/plugin.json presence in the source tree
326
+ return this.fs.exists(nodePath.join(entry.absolutePath, ".claude-plugin", "plugin.json"));
327
+ }
302
328
  resolveTargetDir(entry, cwd) {
303
329
  switch (entry.category) {
304
330
  case "skill": return nodePath.join(cwd, ".claude", "skills", entry.effectiveId);
305
331
  case "guidance": return null; // handled via merge
306
332
  case "subagent": return nodePath.join(cwd, ".claude", "agents");
307
- case "hook": return nodePath.join(cwd, ".claude", "hooks");
333
+ case "plugin": return nodePath.join(cwd, ".claude", "plugins", entry.effectiveId);
308
334
  case "runtime_resource": return nodePath.join(cwd, ".claude", "extensions", entry.effectiveId);
309
335
  default: return null;
310
336
  }
@@ -356,6 +382,24 @@ export class ClaudeCodeAdapter {
356
382
  * Finds the session file whose name matches the expected session name.
357
383
  * Returns the sessionId if found, undefined otherwise.
358
384
  */
385
+ /**
386
+ * PL-016 hardening v0+1 — poll captureResumeToken on the
387
+ * verifyResumeLaunch cadence. Returns the token as soon as the
388
+ * session file appears, or undefined after attempts × delayMs ceiling.
389
+ * Used by the fork branch where the new session-name file appears
390
+ * 1-3s after the Enter key is sent (cold-start fork-file write).
391
+ */
392
+ async pollForResumeToken(expectedName, attempts, delayMs) {
393
+ for (let attempt = 0; attempt < attempts; attempt++) {
394
+ const token = this.captureResumeToken(expectedName);
395
+ if (token)
396
+ return token;
397
+ if (attempt < attempts - 1) {
398
+ await this.sleep(delayMs);
399
+ }
400
+ }
401
+ return undefined;
402
+ }
359
403
  captureResumeToken(expectedName) {
360
404
  try {
361
405
  const home = this.fs.homedir ?? (typeof process !== "undefined" ? process.env.HOME : undefined);
@@ -520,23 +564,6 @@ export class ClaudeCodeAdapter {
520
564
  };
521
565
  this.fs.writeFile(settingsPath, JSON.stringify(existing, null, 2));
522
566
  }
523
- provisionActivityHooks(binding) {
524
- if (!binding.cwd || !this.activityHookRelayAssetPath)
525
- return;
526
- const relayDest = nodePath.join(binding.cwd, ".openrig", "activity-hook-relay.cjs");
527
- this.fs.mkdirp(nodePath.dirname(relayDest));
528
- this.fs.writeFile(relayDest, this.fs.readFile(this.activityHookRelayAssetPath));
529
- const settingsPath = nodePath.join(binding.cwd, ".claude", "settings.local.json");
530
- this.fs.mkdirp(nodePath.dirname(settingsPath));
531
- const settings = this.readJsonObject(settingsPath);
532
- const hooks = this.readJsonObjectField(settings, "hooks");
533
- const command = `node ${shellQuote(relayDest)}`;
534
- for (const event of ["SessionStart", "UserPromptSubmit", "Stop", "Notification"]) {
535
- upsertCommandHook(hooks, event, command);
536
- }
537
- settings["hooks"] = hooks;
538
- this.fs.writeFile(settingsPath, JSON.stringify(settings, null, 2));
539
- }
540
567
  }
541
568
  function hashContent(content) {
542
569
  return createHash("sha256").update(content).digest("hex");
@@ -581,33 +608,4 @@ function stableJsonKey(value) {
581
608
  }
582
609
  return JSON.stringify(sorted);
583
610
  }
584
- /** Shell-quote a string using single quotes (POSIX-safe). */
585
- function shellQuote(s) {
586
- return "'" + s.replace(/'/g, "'\"'\"'") + "'";
587
- }
588
- function upsertCommandHook(hooks, event, command) {
589
- const eventEntries = Array.isArray(hooks[event]) ? hooks[event] : [];
590
- if (eventEntries.some((entry) => hookEntryContainsCommand(entry, command))) {
591
- hooks[event] = eventEntries;
592
- return;
593
- }
594
- eventEntries.push({
595
- hooks: [
596
- { type: "command", command, timeout: 5 },
597
- ],
598
- });
599
- hooks[event] = eventEntries;
600
- }
601
- function hookEntryContainsCommand(entry, command) {
602
- if (typeof entry !== "object" || entry === null || Array.isArray(entry))
603
- return false;
604
- const hooks = entry["hooks"];
605
- if (!Array.isArray(hooks))
606
- return false;
607
- return hooks.some((hook) => typeof hook === "object" &&
608
- hook !== null &&
609
- !Array.isArray(hook) &&
610
- hook["type"] === "command" &&
611
- hook["command"] === command);
612
- }
613
611
  //# sourceMappingURL=claude-code-adapter.js.map