@openrig/cli 0.4.4 → 0.4.7

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 (678) hide show
  1. package/daemon/assets/guidance/CULTURE-default.md +19 -0
  2. package/daemon/assets/guidance/openrig-start.md +20 -5
  3. package/daemon/assets/plugins/openrig-core/README.md +1 -1
  4. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +9 -6
  5. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +11 -72
  6. package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +34 -22
  7. package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +108 -0
  8. package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +11 -16
  9. package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +95 -0
  10. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +819 -101
  11. package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +26 -9
  12. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +11 -9
  13. package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +162 -0
  14. package/daemon/assets/plugins/openrig-core/skills/software-for-agents/SKILL.md +165 -0
  15. package/daemon/dist/adapters/cmux-transport.d.ts.map +1 -1
  16. package/daemon/dist/adapters/cmux-transport.js +8 -1
  17. package/daemon/dist/adapters/cmux-transport.js.map +1 -1
  18. package/daemon/dist/adapters/cmux.d.ts +9 -0
  19. package/daemon/dist/adapters/cmux.d.ts.map +1 -1
  20. package/daemon/dist/adapters/cmux.js +21 -0
  21. package/daemon/dist/adapters/cmux.js.map +1 -1
  22. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +3 -0
  23. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  24. package/daemon/dist/adapters/codex-runtime-adapter.js +32 -12
  25. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  26. package/daemon/dist/adapters/pi-resume.d.ts +32 -0
  27. package/daemon/dist/adapters/pi-resume.d.ts.map +1 -0
  28. package/daemon/dist/adapters/pi-resume.js +125 -0
  29. package/daemon/dist/adapters/pi-resume.js.map +1 -0
  30. package/daemon/dist/adapters/pi-runner-protocol.d.ts +88 -0
  31. package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -0
  32. package/daemon/dist/adapters/pi-runner-protocol.js +153 -0
  33. package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -0
  34. package/daemon/dist/adapters/pi-runner.d.ts +99 -0
  35. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -0
  36. package/daemon/dist/adapters/pi-runner.js +519 -0
  37. package/daemon/dist/adapters/pi-runner.js.map +1 -0
  38. package/daemon/dist/adapters/pi-runtime-adapter.d.ts +61 -0
  39. package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -0
  40. package/daemon/dist/adapters/pi-runtime-adapter.js +356 -0
  41. package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -0
  42. package/daemon/dist/adapters/tmux.d.ts +22 -1
  43. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  44. package/daemon/dist/adapters/tmux.js +40 -1
  45. package/daemon/dist/adapters/tmux.js.map +1 -1
  46. package/daemon/dist/build-info.js +3 -3
  47. package/daemon/dist/builtins/workflow-specs/branched-remediation.yaml +31 -0
  48. package/daemon/dist/builtins/workflow-specs/factory-rsi.yaml +152 -0
  49. package/daemon/dist/builtins/workflow-specs/gated-release.yaml +26 -0
  50. package/daemon/dist/builtins/workflow-specs/linear-build.yaml +21 -0
  51. package/daemon/dist/db/migrations/049_workflow_instance_version.d.ts +20 -0
  52. package/daemon/dist/db/migrations/049_workflow_instance_version.d.ts.map +1 -0
  53. package/daemon/dist/db/migrations/049_workflow_instance_version.js +24 -0
  54. package/daemon/dist/db/migrations/049_workflow_instance_version.js.map +1 -0
  55. package/daemon/dist/db/migrations/050_workflow_spec_json.d.ts +22 -0
  56. package/daemon/dist/db/migrations/050_workflow_spec_json.d.ts.map +1 -0
  57. package/daemon/dist/db/migrations/050_workflow_spec_json.js +26 -0
  58. package/daemon/dist/db/migrations/050_workflow_spec_json.js.map +1 -0
  59. package/daemon/dist/db/migrations/051_workflow_resume.d.ts +22 -0
  60. package/daemon/dist/db/migrations/051_workflow_resume.d.ts.map +1 -0
  61. package/daemon/dist/db/migrations/051_workflow_resume.js +27 -0
  62. package/daemon/dist/db/migrations/051_workflow_resume.js.map +1 -0
  63. package/daemon/dist/db/migrations/052_workflow_instance_bound_rig.d.ts +26 -0
  64. package/daemon/dist/db/migrations/052_workflow_instance_bound_rig.d.ts.map +1 -0
  65. package/daemon/dist/db/migrations/052_workflow_instance_bound_rig.js +30 -0
  66. package/daemon/dist/db/migrations/052_workflow_instance_bound_rig.js.map +1 -0
  67. package/daemon/dist/db/migrations/053_sessions_node_id_index.d.ts +48 -0
  68. package/daemon/dist/db/migrations/053_sessions_node_id_index.d.ts.map +1 -0
  69. package/daemon/dist/db/migrations/053_sessions_node_id_index.js +53 -0
  70. package/daemon/dist/db/migrations/053_sessions_node_id_index.js.map +1 -0
  71. package/daemon/dist/db/migrations/054_queue_transitions_archive.d.ts +34 -0
  72. package/daemon/dist/db/migrations/054_queue_transitions_archive.d.ts.map +1 -0
  73. package/daemon/dist/db/migrations/054_queue_transitions_archive.js +49 -0
  74. package/daemon/dist/db/migrations/054_queue_transitions_archive.js.map +1 -0
  75. package/daemon/dist/domain/claim-service.d.ts +11 -0
  76. package/daemon/dist/domain/claim-service.d.ts.map +1 -1
  77. package/daemon/dist/domain/claim-service.js +3 -1
  78. package/daemon/dist/domain/claim-service.js.map +1 -1
  79. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +3 -0
  80. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  81. package/daemon/dist/domain/claude-compaction-enforcer.js +19 -3
  82. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  83. package/daemon/dist/domain/cmux-layout-service.d.ts +36 -0
  84. package/daemon/dist/domain/cmux-layout-service.d.ts.map +1 -1
  85. package/daemon/dist/domain/cmux-layout-service.js +100 -28
  86. package/daemon/dist/domain/cmux-layout-service.js.map +1 -1
  87. package/daemon/dist/domain/context-monitor.d.ts +2 -0
  88. package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
  89. package/daemon/dist/domain/context-monitor.js +14 -0
  90. package/daemon/dist/domain/context-monitor.js.map +1 -1
  91. package/daemon/dist/domain/discovery-types.d.ts +1 -1
  92. package/daemon/dist/domain/discovery-types.d.ts.map +1 -1
  93. package/daemon/dist/domain/feed/attention-aggregator.js +1 -1
  94. package/daemon/dist/domain/feed/attention-aggregator.js.map +1 -1
  95. package/daemon/dist/domain/hosts/hosts-registry-reader.d.ts +1 -0
  96. package/daemon/dist/domain/hosts/hosts-registry-reader.d.ts.map +1 -1
  97. package/daemon/dist/domain/hosts/hosts-registry-reader.js +31 -10
  98. package/daemon/dist/domain/hosts/hosts-registry-reader.js.map +1 -1
  99. package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts +11 -0
  100. package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts.map +1 -0
  101. package/daemon/dist/domain/hosts/hosts-registry-writer.js +55 -0
  102. package/daemon/dist/domain/hosts/hosts-registry-writer.js.map +1 -0
  103. package/daemon/dist/domain/hosts/read-through.d.ts +28 -0
  104. package/daemon/dist/domain/hosts/read-through.d.ts.map +1 -0
  105. package/daemon/dist/domain/hosts/read-through.js +139 -0
  106. package/daemon/dist/domain/hosts/read-through.js.map +1 -0
  107. package/daemon/dist/domain/hosts/remote-daemon-http.d.ts +21 -0
  108. package/daemon/dist/domain/hosts/remote-daemon-http.d.ts.map +1 -1
  109. package/daemon/dist/domain/hosts/remote-daemon-http.js +56 -4
  110. package/daemon/dist/domain/hosts/remote-daemon-http.js.map +1 -1
  111. package/daemon/dist/domain/node-inventory.d.ts +10 -1
  112. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  113. package/daemon/dist/domain/node-inventory.js +250 -97
  114. package/daemon/dist/domain/node-inventory.js.map +1 -1
  115. package/daemon/dist/domain/node-launcher.d.ts +11 -0
  116. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  117. package/daemon/dist/domain/node-launcher.js +10 -0
  118. package/daemon/dist/domain/node-launcher.js.map +1 -1
  119. package/daemon/dist/domain/plugin-vendor-service.d.ts +2 -0
  120. package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
  121. package/daemon/dist/domain/plugin-vendor-service.js +23 -0
  122. package/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
  123. package/daemon/dist/domain/policies/workflow-keepalive.d.ts +7 -0
  124. package/daemon/dist/domain/policies/workflow-keepalive.d.ts.map +1 -1
  125. package/daemon/dist/domain/policies/workflow-keepalive.js +93 -13
  126. package/daemon/dist/domain/policies/workflow-keepalive.js.map +1 -1
  127. package/daemon/dist/domain/projection-lane.d.ts +7 -0
  128. package/daemon/dist/domain/projection-lane.d.ts.map +1 -0
  129. package/daemon/dist/domain/projection-lane.js +28 -0
  130. package/daemon/dist/domain/projection-lane.js.map +1 -0
  131. package/daemon/dist/domain/ps-projection.d.ts +19 -0
  132. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  133. package/daemon/dist/domain/ps-projection.js +81 -30
  134. package/daemon/dist/domain/ps-projection.js.map +1 -1
  135. package/daemon/dist/domain/queue-repository.d.ts +116 -7
  136. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  137. package/daemon/dist/domain/queue-repository.js +226 -16
  138. package/daemon/dist/domain/queue-repository.js.map +1 -1
  139. package/daemon/dist/domain/queue-retention.d.ts +130 -0
  140. package/daemon/dist/domain/queue-retention.d.ts.map +1 -0
  141. package/daemon/dist/domain/queue-retention.js +224 -0
  142. package/daemon/dist/domain/queue-retention.js.map +1 -0
  143. package/daemon/dist/domain/restore-orchestrator.d.ts +5 -0
  144. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  145. package/daemon/dist/domain/restore-orchestrator.js +29 -2
  146. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  147. package/daemon/dist/domain/resume-token-capture.d.ts +13 -0
  148. package/daemon/dist/domain/resume-token-capture.d.ts.map +1 -1
  149. package/daemon/dist/domain/resume-token-capture.js +14 -1
  150. package/daemon/dist/domain/resume-token-capture.js.map +1 -1
  151. package/daemon/dist/domain/resume-token-validation.d.ts +1 -1
  152. package/daemon/dist/domain/resume-token-validation.d.ts.map +1 -1
  153. package/daemon/dist/domain/resume-token-validation.js +58 -10
  154. package/daemon/dist/domain/resume-token-validation.js.map +1 -1
  155. package/daemon/dist/domain/review/compose.d.ts +127 -5
  156. package/daemon/dist/domain/review/compose.d.ts.map +1 -1
  157. package/daemon/dist/domain/review/compose.js +244 -19
  158. package/daemon/dist/domain/review/compose.js.map +1 -1
  159. package/daemon/dist/domain/review/fleet-compose.d.ts +52 -0
  160. package/daemon/dist/domain/review/fleet-compose.d.ts.map +1 -0
  161. package/daemon/dist/domain/review/fleet-compose.js +294 -0
  162. package/daemon/dist/domain/review/fleet-compose.js.map +1 -0
  163. package/daemon/dist/domain/review/gather.d.ts +17 -2
  164. package/daemon/dist/domain/review/gather.d.ts.map +1 -1
  165. package/daemon/dist/domain/review/gather.js +269 -108
  166. package/daemon/dist/domain/review/gather.js.map +1 -1
  167. package/daemon/dist/domain/review/proof-io.d.ts +2 -0
  168. package/daemon/dist/domain/review/proof-io.d.ts.map +1 -0
  169. package/daemon/dist/domain/review/proof-io.js +38 -0
  170. package/daemon/dist/domain/review/proof-io.js.map +1 -0
  171. package/daemon/dist/domain/review/types.d.ts +104 -1
  172. package/daemon/dist/domain/review/types.d.ts.map +1 -1
  173. package/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
  174. package/daemon/dist/domain/rig-expansion-service.js +3 -0
  175. package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
  176. package/daemon/dist/domain/rig-repository.d.ts +7 -6
  177. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  178. package/daemon/dist/domain/rig-repository.js +33 -11
  179. package/daemon/dist/domain/rig-repository.js.map +1 -1
  180. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  181. package/daemon/dist/domain/rigspec-codec.js +3 -0
  182. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  183. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  184. package/daemon/dist/domain/rigspec-exporter.js +4 -0
  185. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  186. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  187. package/daemon/dist/domain/rigspec-instantiator.js +26 -2
  188. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  189. package/daemon/dist/domain/rigspec-preflight.d.ts +6 -0
  190. package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
  191. package/daemon/dist/domain/rigspec-preflight.js +26 -1
  192. package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
  193. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  194. package/daemon/dist/domain/rigspec-schema.js +20 -1
  195. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  196. package/daemon/dist/domain/runtime-verifier.d.ts +7 -1
  197. package/daemon/dist/domain/runtime-verifier.d.ts.map +1 -1
  198. package/daemon/dist/domain/runtime-verifier.js +39 -1
  199. package/daemon/dist/domain/runtime-verifier.js.map +1 -1
  200. package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +8 -0
  201. package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -0
  202. package/daemon/dist/domain/scope/plan-lock-artifacts.js +57 -0
  203. package/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -0
  204. package/daemon/dist/domain/scope/scaffold-placeholder.d.ts +38 -0
  205. package/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -0
  206. package/daemon/dist/domain/scope/scaffold-placeholder.js +98 -0
  207. package/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -0
  208. package/daemon/dist/domain/scope/scope-approve.d.ts.map +1 -1
  209. package/daemon/dist/domain/scope/scope-approve.js +22 -1
  210. package/daemon/dist/domain/scope/scope-approve.js.map +1 -1
  211. package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
  212. package/daemon/dist/domain/scope/scope-audit.js +57 -20
  213. package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
  214. package/daemon/dist/domain/seat-handover-service.d.ts +9 -0
  215. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  216. package/daemon/dist/domain/seat-handover-service.js +2 -0
  217. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  218. package/daemon/dist/domain/seat-identity-store.d.ts +7 -0
  219. package/daemon/dist/domain/seat-identity-store.d.ts.map +1 -1
  220. package/daemon/dist/domain/seat-identity-store.js +27 -0
  221. package/daemon/dist/domain/seat-identity-store.js.map +1 -1
  222. package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
  223. package/daemon/dist/domain/seat-status-service.js +6 -4
  224. package/daemon/dist/domain/seat-status-service.js.map +1 -1
  225. package/daemon/dist/domain/session-name.d.ts +22 -0
  226. package/daemon/dist/domain/session-name.d.ts.map +1 -1
  227. package/daemon/dist/domain/session-name.js +29 -0
  228. package/daemon/dist/domain/session-name.js.map +1 -1
  229. package/daemon/dist/domain/session-transport.d.ts +17 -0
  230. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  231. package/daemon/dist/domain/session-transport.js +44 -0
  232. package/daemon/dist/domain/session-transport.js.map +1 -1
  233. package/daemon/dist/domain/slices/qitem-membership.d.ts +17 -0
  234. package/daemon/dist/domain/slices/qitem-membership.d.ts.map +1 -0
  235. package/daemon/dist/domain/slices/qitem-membership.js +60 -0
  236. package/daemon/dist/domain/slices/qitem-membership.js.map +1 -0
  237. package/daemon/dist/domain/slices/slice-detail-projector.d.ts +5 -0
  238. package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
  239. package/daemon/dist/domain/slices/slice-detail-projector.js +161 -16
  240. package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
  241. package/daemon/dist/domain/slices/slice-indexer.d.ts +86 -0
  242. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  243. package/daemon/dist/domain/slices/slice-indexer.js +422 -45
  244. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  245. package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +18 -2
  246. package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
  247. package/daemon/dist/domain/spec-library-workflow-scanner.js +23 -1
  248. package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
  249. package/daemon/dist/domain/startup-orchestrator.d.ts +9 -0
  250. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  251. package/daemon/dist/domain/startup-orchestrator.js +71 -3
  252. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  253. package/daemon/dist/domain/startup-proof.d.ts +10 -6
  254. package/daemon/dist/domain/startup-proof.d.ts.map +1 -1
  255. package/daemon/dist/domain/startup-proof.js +35 -7
  256. package/daemon/dist/domain/startup-proof.js.map +1 -1
  257. package/daemon/dist/domain/successor-session-launcher.d.ts +16 -0
  258. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  259. package/daemon/dist/domain/successor-session-launcher.js +13 -0
  260. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  261. package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts +28 -0
  262. package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts.map +1 -0
  263. package/daemon/dist/domain/terminal/cmux-provider-adapter.js +100 -0
  264. package/daemon/dist/domain/terminal/cmux-provider-adapter.js.map +1 -0
  265. package/daemon/dist/domain/terminal/herdr-adapter.d.ts +94 -0
  266. package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -0
  267. package/daemon/dist/domain/terminal/herdr-adapter.js +307 -0
  268. package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -0
  269. package/daemon/dist/domain/terminal/herdr-transport.d.ts +50 -0
  270. package/daemon/dist/domain/terminal/herdr-transport.d.ts.map +1 -0
  271. package/daemon/dist/domain/terminal/herdr-transport.js +145 -0
  272. package/daemon/dist/domain/terminal/herdr-transport.js.map +1 -0
  273. package/daemon/dist/domain/terminal/terminal-provider.d.ts +88 -0
  274. package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -0
  275. package/daemon/dist/domain/terminal/terminal-provider.js +17 -0
  276. package/daemon/dist/domain/terminal/terminal-provider.js.map +1 -0
  277. package/daemon/dist/domain/terminal/terminal-service.d.ts +60 -0
  278. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -0
  279. package/daemon/dist/domain/terminal/terminal-service.js +174 -0
  280. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -0
  281. package/daemon/dist/domain/terminal/terminal-views-store.d.ts +77 -0
  282. package/daemon/dist/domain/terminal/terminal-views-store.d.ts.map +1 -0
  283. package/daemon/dist/domain/terminal/terminal-views-store.js +146 -0
  284. package/daemon/dist/domain/terminal/terminal-views-store.js.map +1 -0
  285. package/daemon/dist/domain/terminal/view-composer.d.ts +42 -0
  286. package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -0
  287. package/daemon/dist/domain/terminal/view-composer.js +137 -0
  288. package/daemon/dist/domain/terminal/view-composer.js.map +1 -0
  289. package/daemon/dist/domain/tmux-option-defaults.d.ts +89 -0
  290. package/daemon/dist/domain/tmux-option-defaults.d.ts.map +1 -0
  291. package/daemon/dist/domain/tmux-option-defaults.js +132 -0
  292. package/daemon/dist/domain/tmux-option-defaults.js.map +1 -0
  293. package/daemon/dist/domain/transcript-capture.d.ts +3 -0
  294. package/daemon/dist/domain/transcript-capture.d.ts.map +1 -1
  295. package/daemon/dist/domain/transcript-capture.js +28 -0
  296. package/daemon/dist/domain/transcript-capture.js.map +1 -1
  297. package/daemon/dist/domain/transcript-store.d.ts +10 -0
  298. package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  299. package/daemon/dist/domain/transcript-store.js +26 -0
  300. package/daemon/dist/domain/transcript-store.js.map +1 -1
  301. package/daemon/dist/domain/types.d.ts +38 -1
  302. package/daemon/dist/domain/types.d.ts.map +1 -1
  303. package/daemon/dist/domain/types.js.map +1 -1
  304. package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
  305. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  306. package/daemon/dist/domain/user-settings/settings-store.js +92 -0
  307. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  308. package/daemon/dist/domain/workflow/slice-workflow-projection.d.ts.map +1 -1
  309. package/daemon/dist/domain/workflow/slice-workflow-projection.js +6 -2
  310. package/daemon/dist/domain/workflow/slice-workflow-projection.js.map +1 -1
  311. package/daemon/dist/domain/workflow-boot-sweep.d.ts +28 -0
  312. package/daemon/dist/domain/workflow-boot-sweep.d.ts.map +1 -0
  313. package/daemon/dist/domain/workflow-boot-sweep.js +102 -0
  314. package/daemon/dist/domain/workflow-boot-sweep.js.map +1 -0
  315. package/daemon/dist/domain/workflow-deadline.d.ts +74 -0
  316. package/daemon/dist/domain/workflow-deadline.d.ts.map +1 -0
  317. package/daemon/dist/domain/workflow-deadline.js +165 -0
  318. package/daemon/dist/domain/workflow-deadline.js.map +1 -0
  319. package/daemon/dist/domain/workflow-exception-escalation.d.ts +33 -0
  320. package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -0
  321. package/daemon/dist/domain/workflow-exception-escalation.js +104 -0
  322. package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -0
  323. package/daemon/dist/domain/workflow-exception-router.d.ts +33 -0
  324. package/daemon/dist/domain/workflow-exception-router.d.ts.map +1 -0
  325. package/daemon/dist/domain/workflow-exception-router.js +96 -0
  326. package/daemon/dist/domain/workflow-exception-router.js.map +1 -0
  327. package/daemon/dist/domain/workflow-exception.d.ts +90 -0
  328. package/daemon/dist/domain/workflow-exception.d.ts.map +1 -0
  329. package/daemon/dist/domain/workflow-exception.js +122 -0
  330. package/daemon/dist/domain/workflow-exception.js.map +1 -0
  331. package/daemon/dist/domain/workflow-frontier-guard.d.ts +24 -0
  332. package/daemon/dist/domain/workflow-frontier-guard.d.ts.map +1 -0
  333. package/daemon/dist/domain/workflow-frontier-guard.js +30 -0
  334. package/daemon/dist/domain/workflow-frontier-guard.js.map +1 -0
  335. package/daemon/dist/domain/workflow-instance-store.d.ts +28 -0
  336. package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -1
  337. package/daemon/dist/domain/workflow-instance-store.js +66 -10
  338. package/daemon/dist/domain/workflow-instance-store.js.map +1 -1
  339. package/daemon/dist/domain/workflow-keepalive-arming.d.ts +35 -0
  340. package/daemon/dist/domain/workflow-keepalive-arming.d.ts.map +1 -0
  341. package/daemon/dist/domain/workflow-keepalive-arming.js +87 -0
  342. package/daemon/dist/domain/workflow-keepalive-arming.js.map +1 -0
  343. package/daemon/dist/domain/workflow-projector.d.ts +117 -2
  344. package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
  345. package/daemon/dist/domain/workflow-projector.js +672 -41
  346. package/daemon/dist/domain/workflow-projector.js.map +1 -1
  347. package/daemon/dist/domain/workflow-role-context.d.ts +57 -0
  348. package/daemon/dist/domain/workflow-role-context.d.ts.map +1 -0
  349. package/daemon/dist/domain/workflow-role-context.js +120 -0
  350. package/daemon/dist/domain/workflow-role-context.js.map +1 -0
  351. package/daemon/dist/domain/workflow-role-resolver.d.ts +65 -0
  352. package/daemon/dist/domain/workflow-role-resolver.d.ts.map +1 -0
  353. package/daemon/dist/domain/workflow-role-resolver.js +108 -0
  354. package/daemon/dist/domain/workflow-role-resolver.js.map +1 -0
  355. package/daemon/dist/domain/workflow-runtime.d.ts +157 -1
  356. package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -1
  357. package/daemon/dist/domain/workflow-runtime.js +718 -11
  358. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  359. package/daemon/dist/domain/workflow-spec-cache.d.ts +26 -1
  360. package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
  361. package/daemon/dist/domain/workflow-spec-cache.js +327 -13
  362. package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
  363. package/daemon/dist/domain/workflow-types.d.ts +143 -8
  364. package/daemon/dist/domain/workflow-types.d.ts.map +1 -1
  365. package/daemon/dist/domain/workflow-types.js +14 -1
  366. package/daemon/dist/domain/workflow-types.js.map +1 -1
  367. package/daemon/dist/domain/workflow-validator.d.ts +11 -1
  368. package/daemon/dist/domain/workflow-validator.d.ts.map +1 -1
  369. package/daemon/dist/domain/workflow-validator.js +246 -1
  370. package/daemon/dist/domain/workflow-validator.js.map +1 -1
  371. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
  372. package/daemon/dist/domain/workspace/default-workspace-scaffold.js +9 -4
  373. package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
  374. package/daemon/dist/domain/workspace/workspace-doctor.js +1 -1
  375. package/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -1
  376. package/daemon/dist/index.d.ts +17 -0
  377. package/daemon/dist/index.d.ts.map +1 -1
  378. package/daemon/dist/index.js +44 -0
  379. package/daemon/dist/index.js.map +1 -1
  380. package/daemon/dist/routes/activity.js +22 -0
  381. package/daemon/dist/routes/activity.js.map +1 -1
  382. package/daemon/dist/routes/hosts.d.ts +5 -0
  383. package/daemon/dist/routes/hosts.d.ts.map +1 -0
  384. package/daemon/dist/routes/hosts.js +346 -0
  385. package/daemon/dist/routes/hosts.js.map +1 -0
  386. package/daemon/dist/routes/mission-control.js +1 -1
  387. package/daemon/dist/routes/mission-control.js.map +1 -1
  388. package/daemon/dist/routes/missions.d.ts +7 -0
  389. package/daemon/dist/routes/missions.d.ts.map +1 -1
  390. package/daemon/dist/routes/missions.js +6 -1
  391. package/daemon/dist/routes/missions.js.map +1 -1
  392. package/daemon/dist/routes/ps.d.ts.map +1 -1
  393. package/daemon/dist/routes/ps.js +5 -1
  394. package/daemon/dist/routes/ps.js.map +1 -1
  395. package/daemon/dist/routes/queue.d.ts +2 -7
  396. package/daemon/dist/routes/queue.d.ts.map +1 -1
  397. package/daemon/dist/routes/queue.js +272 -10
  398. package/daemon/dist/routes/queue.js.map +1 -1
  399. package/daemon/dist/routes/review.d.ts.map +1 -1
  400. package/daemon/dist/routes/review.js +26 -0
  401. package/daemon/dist/routes/review.js.map +1 -1
  402. package/daemon/dist/routes/rigs.d.ts.map +1 -1
  403. package/daemon/dist/routes/rigs.js +21 -10
  404. package/daemon/dist/routes/rigs.js.map +1 -1
  405. package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
  406. package/daemon/dist/routes/scope-audit.js +141 -135
  407. package/daemon/dist/routes/scope-audit.js.map +1 -1
  408. package/daemon/dist/routes/seat.js +13 -0
  409. package/daemon/dist/routes/seat.js.map +1 -1
  410. package/daemon/dist/routes/sessions.js +2 -1
  411. package/daemon/dist/routes/sessions.js.map +1 -1
  412. package/daemon/dist/routes/slices.d.ts.map +1 -1
  413. package/daemon/dist/routes/slices.js +48 -38
  414. package/daemon/dist/routes/slices.js.map +1 -1
  415. package/daemon/dist/routes/terminal.d.ts +11 -0
  416. package/daemon/dist/routes/terminal.d.ts.map +1 -0
  417. package/daemon/dist/routes/terminal.js +104 -0
  418. package/daemon/dist/routes/terminal.js.map +1 -0
  419. package/daemon/dist/routes/transcripts.d.ts.map +1 -1
  420. package/daemon/dist/routes/transcripts.js +62 -33
  421. package/daemon/dist/routes/transcripts.js.map +1 -1
  422. package/daemon/dist/routes/workflow.d.ts.map +1 -1
  423. package/daemon/dist/routes/workflow.js +102 -10
  424. package/daemon/dist/routes/workflow.js.map +1 -1
  425. package/daemon/dist/server.d.ts +5 -0
  426. package/daemon/dist/server.d.ts.map +1 -1
  427. package/daemon/dist/server.js +22 -0
  428. package/daemon/dist/server.js.map +1 -1
  429. package/daemon/dist/startup.d.ts.map +1 -1
  430. package/daemon/dist/startup.js +235 -12
  431. package/daemon/dist/startup.js.map +1 -1
  432. package/daemon/docs/reference/agent-startup-guide.md +1 -0
  433. package/daemon/specs/agents/apps/vault-specialist/agent.yaml +2 -1
  434. package/daemon/specs/agents/conveyor/builder/agent.yaml +2 -1
  435. package/daemon/specs/agents/conveyor/lead/agent.yaml +2 -1
  436. package/daemon/specs/agents/conveyor/planner/agent.yaml +2 -1
  437. package/daemon/specs/agents/conveyor/reviewer/agent.yaml +2 -1
  438. package/daemon/specs/agents/design/product-designer/agent.yaml +12 -2
  439. package/daemon/specs/agents/development/implementer/agent.yaml +12 -2
  440. package/daemon/specs/agents/development/qa/agent.yaml +12 -2
  441. package/daemon/specs/agents/development/qa/guidance/role.md +1 -0
  442. package/daemon/specs/agents/factory-rsi/dogfood/agent.yaml +30 -0
  443. package/daemon/specs/agents/factory-rsi/dogfood/guidance/role.md +37 -0
  444. package/daemon/specs/agents/factory-rsi/release-manager/agent.yaml +30 -0
  445. package/daemon/specs/agents/factory-rsi/release-manager/guidance/role.md +40 -0
  446. package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +12 -2
  447. package/daemon/specs/agents/product-management/pm/agent.yaml +1 -2
  448. package/daemon/specs/agents/research/analyst/agent.yaml +2 -1
  449. package/daemon/specs/agents/research/synthesizer/agent.yaml +2 -1
  450. package/daemon/specs/agents/review/independent-reviewer/agent.yaml +12 -2
  451. package/daemon/specs/agents/shared/agent.yaml +5 -8
  452. package/daemon/specs/agents/shared/runtime/claude-settings.fragment.json +13 -1
  453. package/daemon/specs/agents/shared/skills/core/agent-starters/SKILL.md +132 -0
  454. package/daemon/{assets/plugins/openrig-core/skills → specs/agents/shared/skills/core}/agent-startup-and-context-ingestion/SKILL.md +27 -19
  455. package/daemon/specs/agents/shared/skills/core/attention-queue/SKILL.md +264 -0
  456. package/daemon/specs/agents/shared/skills/core/cross-host-rig-commands/SKILL.md +190 -0
  457. package/daemon/specs/agents/shared/skills/core/human-in-the-loop/SKILL.md +104 -0
  458. package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +25 -8
  459. package/daemon/specs/agents/shared/skills/core/openrig-cmux/SKILL.md +81 -0
  460. package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +153 -0
  461. package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +460 -0
  462. package/daemon/specs/agents/shared/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +101 -0
  463. package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +22 -11
  464. package/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md +160 -0
  465. package/daemon/specs/agents/shared/skills/core/specification-system/SKILL.md +103 -0
  466. package/daemon/specs/agents/shared/skills/core/topology-mutation-and-seat-management/SKILL.md +118 -0
  467. package/daemon/specs/agents/shared/skills/core/watchdog/SKILL.md +125 -0
  468. package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +4 -4
  469. package/daemon/specs/agents/shared/skills/pods/review-team/SKILL.md +3 -0
  470. package/daemon/specs/agents/shared/skills/process/brainstorming/OPENRIG.md +3 -3
  471. package/daemon/specs/agents/shared/skills/process/executing-plans/OPENRIG.md +1 -1
  472. package/daemon/specs/agents/shared/skills/process/frontend-design/SKILL.md +6 -3
  473. package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +1 -1
  474. package/daemon/specs/agents/shared/skills/process/using-superpowers/OPENRIG.md +1 -1
  475. package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +12 -2
  476. package/daemon/specs/agents/shared/skills/process/writing-plans/OPENRIG.md +1 -1
  477. package/daemon/specs/rigs/focused/pm-team/CULTURE.md +1 -1
  478. package/daemon/specs/rigs/launch/factory-rsi/CULTURE.md +47 -0
  479. package/daemon/specs/rigs/launch/factory-rsi/rig.yaml +115 -0
  480. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +2 -2
  481. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +5 -4
  482. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/agent.yaml +2 -2
  483. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +3 -5
  484. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/agent.yaml +2 -2
  485. package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +3 -4
  486. package/daemon/specs/rigs/preview/product-team/CULTURE.md +1 -1
  487. package/dist/bin-wrapper.d.ts.map +1 -1
  488. package/dist/bin-wrapper.js +3 -1
  489. package/dist/bin-wrapper.js.map +1 -1
  490. package/dist/build-info.js +3 -3
  491. package/dist/cli-error.d.ts +33 -0
  492. package/dist/cli-error.d.ts.map +1 -0
  493. package/dist/cli-error.js +94 -0
  494. package/dist/cli-error.js.map +1 -0
  495. package/dist/commands/broadcast.d.ts +6 -1
  496. package/dist/commands/broadcast.d.ts.map +1 -1
  497. package/dist/commands/broadcast.js +101 -15
  498. package/dist/commands/broadcast.js.map +1 -1
  499. package/dist/commands/capture.d.ts.map +1 -1
  500. package/dist/commands/capture.js +99 -8
  501. package/dist/commands/capture.js.map +1 -1
  502. package/dist/commands/config-init-workspace.js +1 -1
  503. package/dist/commands/config.d.ts.map +1 -1
  504. package/dist/commands/config.js +4 -0
  505. package/dist/commands/config.js.map +1 -1
  506. package/dist/commands/doctor.d.ts +1 -1
  507. package/dist/commands/doctor.d.ts.map +1 -1
  508. package/dist/commands/doctor.js +17 -11
  509. package/dist/commands/doctor.js.map +1 -1
  510. package/dist/commands/down.d.ts.map +1 -1
  511. package/dist/commands/down.js +5 -0
  512. package/dist/commands/down.js.map +1 -1
  513. package/dist/commands/host.d.ts +14 -0
  514. package/dist/commands/host.d.ts.map +1 -1
  515. package/dist/commands/host.js +361 -23
  516. package/dist/commands/host.js.map +1 -1
  517. package/dist/commands/launch.d.ts.map +1 -1
  518. package/dist/commands/launch.js +5 -0
  519. package/dist/commands/launch.js.map +1 -1
  520. package/dist/commands/proof.js +1 -1
  521. package/dist/commands/proof.js.map +1 -1
  522. package/dist/commands/ps.d.ts.map +1 -1
  523. package/dist/commands/ps.js +26 -6
  524. package/dist/commands/ps.js.map +1 -1
  525. package/dist/commands/queue.d.ts +36 -0
  526. package/dist/commands/queue.d.ts.map +1 -1
  527. package/dist/commands/queue.js +176 -31
  528. package/dist/commands/queue.js.map +1 -1
  529. package/dist/commands/restore-packet.d.ts.map +1 -1
  530. package/dist/commands/restore-packet.js +13 -2
  531. package/dist/commands/restore-packet.js.map +1 -1
  532. package/dist/commands/rig.d.ts.map +1 -1
  533. package/dist/commands/rig.js +122 -0
  534. package/dist/commands/rig.js.map +1 -1
  535. package/dist/commands/scope.js +2 -2
  536. package/dist/commands/scope.js.map +1 -1
  537. package/dist/commands/send.d.ts.map +1 -1
  538. package/dist/commands/send.js +229 -30
  539. package/dist/commands/send.js.map +1 -1
  540. package/dist/commands/slack.d.ts +37 -0
  541. package/dist/commands/slack.d.ts.map +1 -0
  542. package/dist/commands/slack.js +274 -0
  543. package/dist/commands/slack.js.map +1 -0
  544. package/dist/commands/terminal.d.ts +6 -0
  545. package/dist/commands/terminal.d.ts.map +1 -0
  546. package/dist/commands/terminal.js +116 -0
  547. package/dist/commands/terminal.js.map +1 -0
  548. package/dist/commands/transcript.d.ts +6 -1
  549. package/dist/commands/transcript.d.ts.map +1 -1
  550. package/dist/commands/transcript.js +113 -30
  551. package/dist/commands/transcript.js.map +1 -1
  552. package/dist/commands/ui.d.ts +1 -0
  553. package/dist/commands/ui.d.ts.map +1 -1
  554. package/dist/commands/ui.js +2 -0
  555. package/dist/commands/ui.js.map +1 -1
  556. package/dist/commands/up.d.ts.map +1 -1
  557. package/dist/commands/up.js +10 -1
  558. package/dist/commands/up.js.map +1 -1
  559. package/dist/commands/whoami.d.ts.map +1 -1
  560. package/dist/commands/whoami.js +14 -3
  561. package/dist/commands/whoami.js.map +1 -1
  562. package/dist/commands/workflow-errors.d.ts +23 -0
  563. package/dist/commands/workflow-errors.d.ts.map +1 -0
  564. package/dist/commands/workflow-errors.js +100 -0
  565. package/dist/commands/workflow-errors.js.map +1 -0
  566. package/dist/commands/workflow-follow.d.ts +71 -0
  567. package/dist/commands/workflow-follow.d.ts.map +1 -0
  568. package/dist/commands/workflow-follow.js +259 -0
  569. package/dist/commands/workflow-follow.js.map +1 -0
  570. package/dist/commands/workflow-render.d.ts +114 -0
  571. package/dist/commands/workflow-render.d.ts.map +1 -0
  572. package/dist/commands/workflow-render.js +223 -0
  573. package/dist/commands/workflow-render.js.map +1 -0
  574. package/dist/commands/workflow.d.ts +1 -0
  575. package/dist/commands/workflow.d.ts.map +1 -1
  576. package/dist/commands/workflow.js +278 -14
  577. package/dist/commands/workflow.js.map +1 -1
  578. package/dist/config-store.d.ts +15 -1
  579. package/dist/config-store.d.ts.map +1 -1
  580. package/dist/config-store.js +103 -0
  581. package/dist/config-store.js.map +1 -1
  582. package/dist/cross-host-cli-helpers.d.ts +13 -0
  583. package/dist/cross-host-cli-helpers.d.ts.map +1 -1
  584. package/dist/cross-host-cli-helpers.js +27 -0
  585. package/dist/cross-host-cli-helpers.js.map +1 -1
  586. package/dist/cross-host-target.d.ts +49 -0
  587. package/dist/cross-host-target.d.ts.map +1 -0
  588. package/dist/cross-host-target.js +35 -0
  589. package/dist/cross-host-target.js.map +1 -0
  590. package/dist/daemon-lifecycle.d.ts.map +1 -1
  591. package/dist/daemon-lifecycle.js +45 -14
  592. package/dist/daemon-lifecycle.js.map +1 -1
  593. package/dist/host-registry.d.ts +14 -1
  594. package/dist/host-registry.d.ts.map +1 -1
  595. package/dist/host-registry.js +47 -6
  596. package/dist/host-registry.js.map +1 -1
  597. package/dist/host-selection.d.ts +13 -0
  598. package/dist/host-selection.d.ts.map +1 -0
  599. package/dist/host-selection.js +54 -0
  600. package/dist/host-selection.js.map +1 -0
  601. package/dist/index.d.ts +5 -0
  602. package/dist/index.d.ts.map +1 -1
  603. package/dist/index.js +8 -1
  604. package/dist/index.js.map +1 -1
  605. package/dist/lib/scope/scaffold-placeholder.d.ts +38 -0
  606. package/dist/lib/scope/scaffold-placeholder.d.ts.map +1 -0
  607. package/dist/lib/scope/scaffold-placeholder.js +98 -0
  608. package/dist/lib/scope/scaffold-placeholder.js.map +1 -0
  609. package/dist/lib/scope/scope-audit.d.ts.map +1 -1
  610. package/dist/lib/scope/scope-audit.js +57 -20
  611. package/dist/lib/scope/scope-audit.js.map +1 -1
  612. package/dist/lib/scope-templates/backlog-deprecation.md +1 -1
  613. package/dist/lib/scope-templates/backlog-tech-debt.md +1 -1
  614. package/dist/lib/scope-templates/bug-fix.md +1 -1
  615. package/dist/lib/scope-templates/implementation-prd.md +1 -1
  616. package/dist/lib/scope-templates/mission-notes.md +7 -2
  617. package/dist/lib/scope-templates/mission-placeholder.md +1 -1
  618. package/dist/lib/scope-templates/mission-progress.md +1 -1
  619. package/dist/lib/scope-templates/mission-release.md +1 -1
  620. package/dist/lib/scope-templates/placeholder.md +1 -1
  621. package/dist/lib/scope-templates/proof.md +1 -1
  622. package/dist/lib/scope-templates/release-feature.md +1 -1
  623. package/dist/lib/scope-templates/research.md +1 -1
  624. package/dist/lib/scope-templates/slice-progress.md +1 -1
  625. package/dist/remote-host-ops.d.ts +1 -0
  626. package/dist/remote-host-ops.d.ts.map +1 -1
  627. package/dist/remote-host-ops.js +13 -6
  628. package/dist/remote-host-ops.js.map +1 -1
  629. package/dist/session-name.d.ts +23 -0
  630. package/dist/session-name.d.ts.map +1 -0
  631. package/dist/session-name.js +61 -0
  632. package/dist/session-name.js.map +1 -0
  633. package/dist/slack/config.d.ts +41 -0
  634. package/dist/slack/config.d.ts.map +1 -0
  635. package/dist/slack/config.js +60 -0
  636. package/dist/slack/config.js.map +1 -0
  637. package/dist/slack/inbound.d.ts +75 -0
  638. package/dist/slack/inbound.d.ts.map +1 -0
  639. package/dist/slack/inbound.js +133 -0
  640. package/dist/slack/inbound.js.map +1 -0
  641. package/dist/slack/message.d.ts +26 -0
  642. package/dist/slack/message.d.ts.map +1 -0
  643. package/dist/slack/message.js +60 -0
  644. package/dist/slack/message.js.map +1 -0
  645. package/dist/slack/outbound.d.ts +39 -0
  646. package/dist/slack/outbound.d.ts.map +1 -0
  647. package/dist/slack/outbound.js +52 -0
  648. package/dist/slack/outbound.js.map +1 -0
  649. package/dist/slack/queue-bridge.d.ts +56 -0
  650. package/dist/slack/queue-bridge.d.ts.map +1 -0
  651. package/dist/slack/queue-bridge.js +114 -0
  652. package/dist/slack/queue-bridge.js.map +1 -0
  653. package/dist/slack/secrets.d.ts +21 -0
  654. package/dist/slack/secrets.d.ts.map +1 -0
  655. package/dist/slack/secrets.js +73 -0
  656. package/dist/slack/secrets.js.map +1 -0
  657. package/dist/slack/slack-api.d.ts +49 -0
  658. package/dist/slack/slack-api.d.ts.map +1 -0
  659. package/dist/slack/slack-api.js +110 -0
  660. package/dist/slack/slack-api.js.map +1 -0
  661. package/dist/slack/state-store.d.ts +62 -0
  662. package/dist/slack/state-store.d.ts.map +1 -0
  663. package/dist/slack/state-store.js +132 -0
  664. package/dist/slack/state-store.js.map +1 -0
  665. package/package.json +1 -1
  666. package/ui/dist/assets/index-DkNi0RT8.js +623 -0
  667. package/ui/dist/assets/index-N-SdPj-I.css +32 -0
  668. package/ui/dist/index.html +2 -2
  669. package/daemon/assets/plugins/openrig-core/skills/openrig-architect/SKILL.md +0 -361
  670. package/daemon/assets/plugins/openrig-core/skills/openrig-operator/SKILL.md +0 -222
  671. package/daemon/docs/reference/product-factory-vps-runbook.md +0 -132
  672. package/daemon/specs/agents/shared/skills/core/mission-slice-sop/SKILL.md +0 -115
  673. package/daemon/specs/agents/shared/skills/core/openrig-installer/SKILL.md +0 -142
  674. package/daemon/specs/agents/shared/skills/core/openrig-operator/SKILL.md +0 -110
  675. package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +0 -1245
  676. package/daemon/specs/agents/shared/skills/core/openrig-user-settings/SKILL.md +0 -153
  677. package/ui/dist/assets/index-D69ZhNIr.js +0 -598
  678. package/ui/dist/assets/index-DJYun-8d.css +0 -32
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-name.js","sourceRoot":"","sources":["../src/session-name.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,wEAAwE;AACxE,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,iEAAiE;AACjE,8CAA8C;AAC9C,yEAAyE;AACzE,yEAAyE;AACzE,wEAAwE;AACxE,+BAA+B;AAC/B,EAAE;AACF,wEAAwE;AACxE,2EAA2E;AAC3E,sEAAsE;AACtE,wEAAwE;AACxE,2DAA2D;AAC3D,yEAAyE;AACzE,sDAAsD;AACtD,0EAA0E;AAC1E,2EAA2E;AAC3E,mCAAmC;AACnC,2EAA2E;AAC3E,+BAA+B;AAC/B,wEAAwE;AACxE,6BAA6B;AAC7B,2EAA2E;AAC3E,uEAAuE;AACvE,2EAA2E;AAC3E,qBAAqB;AACrB,+EAA+E;AAO/E,MAAM,8BAA8B,GAAG,4CAA4C,CAAC;AACpF,MAAM,2BAA2B,GAAG,aAAa,CAAC;AAElD;8EAC8E;AAC9E,MAAM,UAAU,qBAAqB,CAAC,UAAkB;IACtD,OAAO,8BAA8B,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;IACjF,CAAC;IACD,IAAI,EAAE,KAAK,CAAC,CAAC,IAAI,2BAA2B,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACvD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IACvC,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,wBAAwB,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AAC5E,CAAC;AAED;;mCAEmC;AACnC,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,41 @@
1
+ export interface SlackConnectorConfig {
2
+ enabled: boolean;
3
+ /** Inbound: human Slack messages land here. First-class + overridable (T1075). */
4
+ inboundDestination: string;
5
+ /** Outbound: qitems with this tag destined to a human seat alert to Slack. */
6
+ alertTag: string;
7
+ /** Optional explicit human-seat allow-list for outbound (empty = any human-seat/human-gate). */
8
+ outboundDestinations: string[];
9
+ /** Where the queue lives, shown in the posted message footer (never hardcoded). */
10
+ sourceLabel: string;
11
+ /** Slack channel the connector app must be a member of (verified live, item 5). */
12
+ channel: string | null;
13
+ /** Bot scopes the connector requires; verified against GRANTED header, not config (item 5). */
14
+ requiredScopes: string[];
15
+ /** Path to the 0600 env file holding secrets (webhook URL, bot/app tokens). */
16
+ secretsEnvFile: string | null;
17
+ /**
18
+ * Optional explicit queue-daemon URL (OPENRIG_URL) for a REMOTE queue when the
19
+ * connector host differs from the queue/alert host (item 10). Unlike `--host`
20
+ * (which `queue list`/`show` reject), OPENRIG_URL targets ALL queue verbs.
21
+ * Null = use the connector's ambient OPENRIG_URL / local daemon.
22
+ */
23
+ queueUrl: string | null;
24
+ }
25
+ export declare const DEFAULT_CONFIG: SlackConnectorConfig;
26
+ export declare function configPathFor(home?: string): string;
27
+ export declare function loadConfig(home?: string): SlackConnectorConfig;
28
+ export declare function saveConfig(cfg: SlackConnectorConfig, home?: string): string;
29
+ export declare function configFileExists(home?: string): boolean;
30
+ export interface ReadinessItem {
31
+ ok: boolean;
32
+ label: string;
33
+ detail: string;
34
+ }
35
+ /**
36
+ * HONEST unconfigured state (item 5): a static (no-network) readiness checklist
37
+ * from config + secret RESOLVABILITY (not values). Live scope/membership checks
38
+ * are `rig slack verify`. Never throws; reports what's missing.
39
+ */
40
+ export declare function staticReadiness(cfg: SlackConnectorConfig, hasWebhook: boolean, hasBotToken: boolean, hasAppToken: boolean): ReadinessItem[];
41
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/slack/config.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,kFAAkF;IAClF,kBAAkB,EAAE,MAAM,CAAC;IAC3B,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,gGAAgG;IAChG,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,mFAAmF;IACnF,WAAW,EAAE,MAAM,CAAC;IACpB,mFAAmF;IACnF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,+FAA+F;IAC/F,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,+EAA+E;IAC/E,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,eAAO,MAAM,cAAc,EAAE,oBAU5B,CAAC;AAEF,wBAAgB,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,oBAAoB,CAQ9D;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,oBAAoB,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAK3E;AAED,wBAAgB,gBAAgB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,oBAAoB,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,GAAG,aAAa,EAAE,CAU3I"}
@@ -0,0 +1,60 @@
1
+ // Slice-11 slack-connector — first-class connector config (item 5 + T1075).
2
+ //
3
+ // Config is a first-class JSON file (NOT env-only): inbound destination,
4
+ // watched channel, alert tag, source label, required scopes, and POINTERS to
5
+ // secrets (never secret VALUES — those live in the 0600 env file / env vars).
6
+ // An unset/partial config yields an HONEST unconfigured state (no throw, no
7
+ // silent nothing) so `rig slack status` can tell the operator exactly what's left.
8
+ import fs from "node:fs";
9
+ import path from "node:path";
10
+ import { getOpenRigHome } from "../openrig-compat.js";
11
+ export const DEFAULT_CONFIG = {
12
+ enabled: false,
13
+ inboundDestination: "operator-agent@kernel",
14
+ alertTag: "founder-alert",
15
+ outboundDestinations: [],
16
+ sourceLabel: "openrig",
17
+ channel: null,
18
+ requiredScopes: ["chat:write", "channels:history", "channels:read"],
19
+ secretsEnvFile: null,
20
+ queueUrl: null,
21
+ };
22
+ export function configPathFor(home) {
23
+ return path.join(home ?? getOpenRigHome(), "slack-connector.json");
24
+ }
25
+ export function loadConfig(home) {
26
+ const p = configPathFor(home);
27
+ try {
28
+ const raw = JSON.parse(fs.readFileSync(p, "utf8"));
29
+ return { ...DEFAULT_CONFIG, ...raw };
30
+ }
31
+ catch {
32
+ return { ...DEFAULT_CONFIG };
33
+ }
34
+ }
35
+ export function saveConfig(cfg, home) {
36
+ const p = configPathFor(home);
37
+ fs.mkdirSync(path.dirname(p), { recursive: true });
38
+ fs.writeFileSync(p, JSON.stringify(cfg, null, 2) + "\n");
39
+ return p;
40
+ }
41
+ export function configFileExists(home) {
42
+ return fs.existsSync(configPathFor(home));
43
+ }
44
+ /**
45
+ * HONEST unconfigured state (item 5): a static (no-network) readiness checklist
46
+ * from config + secret RESOLVABILITY (not values). Live scope/membership checks
47
+ * are `rig slack verify`. Never throws; reports what's missing.
48
+ */
49
+ export function staticReadiness(cfg, hasWebhook, hasBotToken, hasAppToken) {
50
+ return [
51
+ { ok: cfg.secretsEnvFile !== null || hasWebhook || hasBotToken, label: "secrets-source", detail: cfg.secretsEnvFile ? `env file ${cfg.secretsEnvFile}` : "env vars only" },
52
+ { ok: hasWebhook, label: "outbound-webhook", detail: hasWebhook ? "resolved" : "unset (outbound alerts cannot post)" },
53
+ { ok: hasBotToken, label: "bot-token", detail: hasBotToken ? "resolved" : "unset (scope/membership verify unavailable)" },
54
+ { ok: hasAppToken, label: "app-token (Socket Mode)", detail: hasAppToken ? "resolved" : "unset (inbound cannot connect)" },
55
+ { ok: cfg.channel !== null, label: "channel", detail: cfg.channel ?? "unset" },
56
+ { ok: Boolean(cfg.inboundDestination), label: "inbound-destination", detail: cfg.inboundDestination },
57
+ { ok: cfg.enabled, label: "enabled", detail: cfg.enabled ? "yes" : "no (run `rig slack enable`)" },
58
+ ];
59
+ }
60
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/slack/config.ts"],"names":[],"mappings":"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kBAAkB,CAAC,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAE,GAAG,CAAC,kBAAkB,EAAE;QACrG,EAAE,EAAE,EAAE,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,6BAA6B,EAAE;KACnG,CAAC;AACJ,CAAC"}
@@ -0,0 +1,75 @@
1
+ import type { SeenStore, DeadLetterStore } from "./state-store.js";
2
+ import type { QueueRunner } from "./queue-bridge.js";
3
+ export interface SlackEvent {
4
+ type?: string;
5
+ subtype?: string;
6
+ user?: string;
7
+ bot_id?: string;
8
+ text?: string;
9
+ ts?: string;
10
+ channel?: string;
11
+ files?: unknown[];
12
+ }
13
+ /**
14
+ * Loop-safety + non-text ignore. Ingest ONLY genuine human text messages:
15
+ * reject bot posts (our own loop), message subtypes (edits/joins/file_share),
16
+ * and — T1076 — anything carrying files/images. v1 ignores non-text CLEANLY:
17
+ * a false return is a clean skip, never a crash or partial ingestion.
18
+ */
19
+ export declare function shouldIngest(ev: SlackEvent): boolean;
20
+ export interface InboundDeps {
21
+ runner: QueueRunner;
22
+ seen: SeenStore;
23
+ deadLetter: DeadLetterStore<SlackEvent>;
24
+ destination: string;
25
+ sourceLabel?: string;
26
+ log?: (msg: string) => void;
27
+ }
28
+ export declare class InboundRouter {
29
+ private readonly deps;
30
+ private readonly inflight;
31
+ constructor(deps: InboundDeps);
32
+ private summaryOf;
33
+ /**
34
+ * Core landing attempt — NO dead-letter side effect. Dedup by ts (in-flight +
35
+ * durable seen). `reason` distinguishes a dedup skip from a genuine create
36
+ * failure so callers dead-letter ONLY real failures. On success, marks seen
37
+ * (durable qitem exists → safe).
38
+ */
39
+ private attemptLand;
40
+ /**
41
+ * LIVE path: attempt to land; on a genuine create failure, dead-letter the
42
+ * event (attempt-counted) BEFORE returning — NOT marked seen (item 8).
43
+ */
44
+ route(ev: SlackEvent, attempts?: number): Promise<{
45
+ landed: boolean;
46
+ qitemId?: string;
47
+ }>;
48
+ /**
49
+ * INTERRUPTION-SAFE retry (item 8): read the durable set NON-destructively,
50
+ * attempt each, then ATOMICALLY replace the file with only the still-failing
51
+ * entries. The original file stays intact until the atomic replace, so a crash
52
+ * at any point loses nothing (a since-landed event is skipped via the seen-set).
53
+ * Does NOT go through route() (which would double-append) — uses attemptLand.
54
+ */
55
+ retryDeadLetters(): Promise<{
56
+ retried: number;
57
+ landed: number;
58
+ }>;
59
+ }
60
+ export interface SocketEnvelope {
61
+ envelope_id?: string;
62
+ type?: string;
63
+ reason?: string;
64
+ payload?: {
65
+ event?: SlackEvent;
66
+ };
67
+ }
68
+ /**
69
+ * Handle one Socket Mode envelope. FAST-ACK first, ALWAYS (item 8: Socket Mode
70
+ * punishes slow acks; transport redelivery is not the safety net). Then filter
71
+ * and route. Ack happens even if routing later fails — the dead-letter, not
72
+ * transport redelivery, is the zero-drop net.
73
+ */
74
+ export declare function handleEnvelope(env: SocketEnvelope, ack: () => void, router: InboundRouter, log?: (m: string) => void): Promise<void>;
75
+ //# sourceMappingURL=inbound.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inbound.d.ts","sourceRoot":"","sources":["../../src/slack/inbound.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAmB,MAAM,kBAAkB,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO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AG,OAAO,CAAC,IAAI,CAAC,CAU1I"}
@@ -0,0 +1,133 @@
1
+ import { createQitem } from "./queue-bridge.js";
2
+ /**
3
+ * Loop-safety + non-text ignore. Ingest ONLY genuine human text messages:
4
+ * reject bot posts (our own loop), message subtypes (edits/joins/file_share),
5
+ * and — T1076 — anything carrying files/images. v1 ignores non-text CLEANLY:
6
+ * a false return is a clean skip, never a crash or partial ingestion.
7
+ */
8
+ export function shouldIngest(ev) {
9
+ if (ev.type !== "message" && ev.type !== "app_mention")
10
+ return false;
11
+ if (ev.bot_id)
12
+ return false; // never ingest our own / any bot post
13
+ if (ev.subtype)
14
+ return false; // edits, joins, file_share, etc.
15
+ if (ev.files && ev.files.length > 0)
16
+ return false; // T1076: image/file events ignored cleanly (Slice-12)
17
+ if (!ev.user || !ev.text || !ev.text.trim())
18
+ return false;
19
+ return true;
20
+ }
21
+ export class InboundRouter {
22
+ deps;
23
+ inflight = new Set(); // same-ts double-dispatch guard (item 8)
24
+ constructor(deps) {
25
+ this.deps = deps;
26
+ }
27
+ summaryOf(ev) {
28
+ const text = String(ev.text ?? "").slice(0, 1800);
29
+ const meta = `slack channel=${ev.channel} user=${ev.user} ts=${ev.ts}`;
30
+ return {
31
+ summary: `Founder via Slack: ${text.slice(0, 90)}`,
32
+ body: `${text}\n\n---\nSource: ${meta}\nRouted by openrig slack-inbound. Default destination per config; re-route via queue as needed.`,
33
+ };
34
+ }
35
+ /**
36
+ * Core landing attempt — NO dead-letter side effect. Dedup by ts (in-flight +
37
+ * durable seen). `reason` distinguishes a dedup skip from a genuine create
38
+ * failure so callers dead-letter ONLY real failures. On success, marks seen
39
+ * (durable qitem exists → safe).
40
+ */
41
+ async attemptLand(ev) {
42
+ const ts = ev.ts ?? "";
43
+ if (!ts || this.inflight.has(ts) || this.deps.seen.load().has(ts))
44
+ return { landed: false, reason: "dup" };
45
+ this.inflight.add(ts);
46
+ try {
47
+ const { summary, body } = this.summaryOf(ev);
48
+ let qitemId;
49
+ try {
50
+ qitemId = await createQitem(this.deps.runner, {
51
+ source: `human-${ev.user}@kernel`, // provenance classifies as human (name convention)
52
+ destination: this.deps.destination,
53
+ priority: "routine",
54
+ tags: ["founder-slack", "inbound"],
55
+ summary,
56
+ body,
57
+ });
58
+ }
59
+ catch (e) {
60
+ this.deps.log?.(`qitem create failed ts=${ts}: ${e.message}`);
61
+ return { landed: false, reason: "create_failed" };
62
+ }
63
+ this.deps.seen.mark(ts, "landed"); // durable qitem exists → safe to mark
64
+ this.deps.log?.(`qitem ${qitemId} -> ${this.deps.destination} (ts=${ts})`);
65
+ return { landed: true, qitemId };
66
+ }
67
+ finally {
68
+ this.inflight.delete(ts);
69
+ }
70
+ }
71
+ /**
72
+ * LIVE path: attempt to land; on a genuine create failure, dead-letter the
73
+ * event (attempt-counted) BEFORE returning — NOT marked seen (item 8).
74
+ */
75
+ async route(ev, attempts = 0) {
76
+ const r = await this.attemptLand(ev);
77
+ if (!r.landed && r.reason === "create_failed") {
78
+ this.deps.deadLetter.append(ev, attempts + 1);
79
+ this.deps.log?.(`dead-lettered ts=${ev.ts} (attempt ${attempts + 1})`);
80
+ }
81
+ return { landed: r.landed, qitemId: r.qitemId };
82
+ }
83
+ /**
84
+ * INTERRUPTION-SAFE retry (item 8): read the durable set NON-destructively,
85
+ * attempt each, then ATOMICALLY replace the file with only the still-failing
86
+ * entries. The original file stays intact until the atomic replace, so a crash
87
+ * at any point loses nothing (a since-landed event is skipped via the seen-set).
88
+ * Does NOT go through route() (which would double-append) — uses attemptLand.
89
+ */
90
+ async retryDeadLetters() {
91
+ const entries = this.deps.deadLetter.readAll();
92
+ if (entries.length === 0)
93
+ return { retried: 0, landed: 0 };
94
+ this.deps.log?.(`retrying ${entries.length} dead-letter(s)`);
95
+ const stillFailing = [];
96
+ let landed = 0;
97
+ const seen = this.deps.seen.load();
98
+ for (const e of entries) {
99
+ if (e.ev.ts && seen.has(e.ev.ts))
100
+ continue; // already landed → recovered, drop from set
101
+ const r = await this.attemptLand(e.ev);
102
+ if (r.landed)
103
+ landed++;
104
+ else if (r.reason === "create_failed")
105
+ stillFailing.push({ ev: e.ev, at: e.at, attempts: e.attempts + 1 });
106
+ // reason === "dup" (in-flight) → drop; a concurrent path owns it
107
+ }
108
+ this.deps.deadLetter.replaceAll(stillFailing); // atomic; original intact until here
109
+ return { retried: entries.length, landed };
110
+ }
111
+ }
112
+ /**
113
+ * Handle one Socket Mode envelope. FAST-ACK first, ALWAYS (item 8: Socket Mode
114
+ * punishes slow acks; transport redelivery is not the safety net). Then filter
115
+ * and route. Ack happens even if routing later fails — the dead-letter, not
116
+ * transport redelivery, is the zero-drop net.
117
+ */
118
+ export async function handleEnvelope(env, ack, router, log) {
119
+ if (env.envelope_id)
120
+ ack(); // fast-ack, unconditional, first
121
+ if (env.type === "disconnect")
122
+ return;
123
+ if (env.type !== "events_api")
124
+ return;
125
+ const ev = env.payload?.event ?? {};
126
+ if (!shouldIngest(ev)) {
127
+ if (ev.type)
128
+ log?.(`ignored non-ingestible event type=${ev.type} subtype=${ev.subtype ?? "-"} files=${ev.files?.length ?? 0}`);
129
+ return;
130
+ }
131
+ await router.route(ev);
132
+ }
133
+ //# sourceMappingURL=inbound.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inbound.js","sourceRoot":"","sources":["../../src/slack/inbound.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAahD;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,EAAc;IACzC,IAAI,EAAE,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,CAAC,IAAI,KAAK,aAAa;QAAE,OAAO,KAAK,CAAC;IACrE,IAAI,EAAE,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC,CAAC,sCAAsC;IACnE,IAAI,EAAE,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC,CAAC,iCAAiC;IAC/D,IAAI,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC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AAC,MAAM,KAAK,eAAe;gBAAE,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC,CAAC;YAC3G,iEAAiE;QACnE,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,qCAAqC;QACpF,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAC7C,CAAC;CACF;AASD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,GAAmB,EAAE,GAAe,EAAE,MAAqB,EAAE,GAAyB;IACzH,IAAI,GAAG,CAAC,WAAW;QAAE,GAAG,EAAE,CAAC,CAAC,iCAAiC;IAC7D,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY;QAAE,OAAO;IACtC,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY;QAAE,OAAO;IACtC,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC;IACpC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC;QACtB,IAAI,EAAE,CAAC,IAAI;YAAE,GAAG,EAAE,CAAC,qCAAqC,EAAE,CAAC,IAAI,YAAY,EAAE,CAAC,OAAO,IAAI,GAAG,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,EAAE,CAAC,CAAC;QAC/H,OAAO;IACT,CAAC;IACD,MAAM,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,26 @@
1
+ export declare const SLACK_TEXT_CAP = 3900;
2
+ export declare const DEFAULT_BODY_EXCERPT = 800;
3
+ export interface QitemLike {
4
+ qitemId: string;
5
+ summary?: string | null;
6
+ body?: string | null;
7
+ destinationSession?: string | null;
8
+ }
9
+ export interface OutboundMessageOpts {
10
+ sourceLabel: string;
11
+ bodyExcerpt?: number;
12
+ /** T1076 extension point: extra Block Kit blocks (e.g. future media). v1 unused. */
13
+ extraBlocks?: unknown[];
14
+ }
15
+ export declare function containsSecret(text: string): boolean;
16
+ export declare function redactSecrets(text: string): string;
17
+ export interface SlackMessagePayload {
18
+ text: string;
19
+ blocks: unknown[];
20
+ }
21
+ /**
22
+ * Build the Slack payload for a human-destined qitem. Pure + deterministic
23
+ * (no clock, no io) so it is trivially testable and safe to snapshot.
24
+ */
25
+ export declare function buildOutboundMessage(q: QitemLike, opts: OutboundMessageOpts): SlackMessagePayload;
26
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/slack/message.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,cAAc,OAAO,CAAC;AACnC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC;CACzB;AAWD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKpD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMlD;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AAMD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,mBAAmB,GAAG,mBAAmB,CAiBjG"}
@@ -0,0 +1,60 @@
1
+ // Slice-11 slack-connector — outbound message construction.
2
+ //
3
+ // Locked item 7 (content hygiene): a posted message carries summary + qitem id
4
+ // + source + a BOUNDED body excerpt, and NEVER a token/secret/secret-bearing
5
+ // path. We never add our own credentials (we only render qitem fields), and as
6
+ // defense-in-depth we redact anything that looks like a Slack/bearer secret
7
+ // leaking through a qitem body before it goes out.
8
+ //
9
+ // T1076 (don't preclude Slice-12): construction is BLOCKS/ATTACHMENTS-capable —
10
+ // we always emit Block Kit `blocks` PLUS a plain-text fallback, and accept
11
+ // optional extra blocks / media refs so image relay can extend this later
12
+ // WITHOUT redefining the shape here. v1 ships text only.
13
+ export const SLACK_TEXT_CAP = 3900; // Slack hard-limits ~4000; stay under.
14
+ export const DEFAULT_BODY_EXCERPT = 800;
15
+ // Secret-looking patterns we refuse to forward (item 7 defense-in-depth).
16
+ const SECRET_PATTERNS = [
17
+ /xox[baprs]-[A-Za-z0-9-]+/g, // Slack bot/user/app/refresh tokens
18
+ /xapp-[A-Za-z0-9-]+/g, // Slack app-level (Socket Mode) token
19
+ /https:\/\/hooks\.slack\.com\/services\/[A-Za-z0-9/_-]+/g, // incoming webhook URL
20
+ /\bBearer\s+[A-Za-z0-9._-]{12,}/gi, // bearer tokens
21
+ /xoxe\.xox[bp]-[A-Za-z0-9-]+/g, // rotation tokens
22
+ ];
23
+ export function containsSecret(text) {
24
+ return SECRET_PATTERNS.some((p) => {
25
+ p.lastIndex = 0;
26
+ return p.test(text);
27
+ });
28
+ }
29
+ export function redactSecrets(text) {
30
+ let out = text;
31
+ for (const p of SECRET_PATTERNS) {
32
+ out = out.replace(p, "[redacted-secret]");
33
+ }
34
+ return out;
35
+ }
36
+ function clamp(s, max) {
37
+ return s.length > max ? s.slice(0, max) : s;
38
+ }
39
+ /**
40
+ * Build the Slack payload for a human-destined qitem. Pure + deterministic
41
+ * (no clock, no io) so it is trivially testable and safe to snapshot.
42
+ */
43
+ export function buildOutboundMessage(q, opts) {
44
+ const summary = redactSecrets(String(q.summary || "(no summary)"));
45
+ const bodyRaw = redactSecrets(String(q.body || ""));
46
+ const body = clamp(bodyRaw, opts.bodyExcerpt ?? DEFAULT_BODY_EXCERPT);
47
+ const dest = q.destinationSession || "(unknown destination)";
48
+ const footer = `qitem ${q.qitemId} → ${dest} on ${opts.sourceLabel}`;
49
+ const text = clamp(`:rotating_light: *${summary}*\n${body}\n_${footer}_`, SLACK_TEXT_CAP);
50
+ const blocks = [
51
+ { type: "section", text: { type: "mrkdwn", text: clamp(`:rotating_light: *${summary}*`, 3000) } },
52
+ ];
53
+ if (body.trim())
54
+ blocks.push({ type: "section", text: { type: "mrkdwn", text: clamp(body, 3000) } });
55
+ blocks.push({ type: "context", elements: [{ type: "mrkdwn", text: footer }] });
56
+ if (opts.extraBlocks?.length)
57
+ blocks.push(...opts.extraBlocks);
58
+ return { text, blocks };
59
+ }
60
+ //# sourceMappingURL=message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/slack/message.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAC/E,4EAA4E;AAC5E,mDAAmD;AACnD,EAAE;AACF,gFAAgF;AAChF,2EAA2E;AAC3E,0EAA0E;AAC1E,yDAAyD;AAEzD,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,CAAC,uCAAuC;AAC3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAgBxC,0EAA0E;AAC1E,MAAM,eAAe,GAAa;IAChC,2BAA2B,EAAE,oCAAoC;IACjE,qBAAqB,EAAE,sCAAsC;IAC7D,yDAAyD,EAAE,uBAAuB;IAClF,kCAAkC,EAAE,gBAAgB;IACpD,8BAA8B,EAAE,kBAAkB;CACnD,CAAC;AAEF,M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M,MAAM,GAAG,EAAE,cAAc,CAAC,CAAC;IAE1F,MAAM,MAAM,GAAc;QACxB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,qBAAqB,OAAO,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE;KAClG,CAAC;IACF,IAAI,IAAI,CAAC,IAAI,EAAE;QAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IACrG,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IAC/E,IAAI,IAAI,CAAC,WAAW,EAAE,MAAM;QAAE,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;IAE/D,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { SeenStore } from "./state-store.js";
2
+ import type { QueueRunner, AlertFilterOpts } from "./queue-bridge.js";
3
+ import { type FetchImpl } from "./slack-api.js";
4
+ export interface OutboundDeps {
5
+ runner: QueueRunner;
6
+ seen: SeenStore;
7
+ webhookUrl: string;
8
+ fetchImpl?: FetchImpl;
9
+ sourceLabel: string;
10
+ filter: AlertFilterOpts;
11
+ bodyExcerpt?: number;
12
+ log?: (msg: string) => void;
13
+ }
14
+ export interface OutboundResult {
15
+ freshCount: number;
16
+ posted: string[];
17
+ failed: {
18
+ id: string;
19
+ error: string;
20
+ }[];
21
+ }
22
+ /**
23
+ * One outbound sweep. Posts every FRESH human alert, marking it seen ONLY after
24
+ * a 200. A failed post is logged loudly and left UNSEEN so the next sweep
25
+ * retries it — never a silent drop. Returns failures so the caller exits
26
+ * non-zero (fail-visible).
27
+ */
28
+ export declare function runOutboundOnce(deps: OutboundDeps): Promise<OutboundResult>;
29
+ export interface SeedResult {
30
+ seeded: number;
31
+ onlineStatus: string;
32
+ }
33
+ /**
34
+ * Item 9: on ENABLE, seed all currently-active human alerts as history/seen
35
+ * WITHOUT posting, so turning the connector on never replays the backlog.
36
+ * Returns an honest online-status line marking the transition.
37
+ */
38
+ export declare function seedBacklogOnEnable(deps: Pick<OutboundDeps, "runner" | "seen" | "filter" | "log">): Promise<SeedResult>;
39
+ //# sourceMappingURL=outbound.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outbound.d.ts","sourceRoot":"","sources":["../../src/slack/outbound.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG7D,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACzC;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,CA6BjF;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAQ7H"}
@@ -0,0 +1,52 @@
1
+ import { listHumanAlerts, showFull } from "./queue-bridge.js";
2
+ import { postWebhook } from "./slack-api.js";
3
+ import { buildOutboundMessage } from "./message.js";
4
+ /**
5
+ * One outbound sweep. Posts every FRESH human alert, marking it seen ONLY after
6
+ * a 200. A failed post is logged loudly and left UNSEEN so the next sweep
7
+ * retries it — never a silent drop. Returns failures so the caller exits
8
+ * non-zero (fail-visible).
9
+ */
10
+ export async function runOutboundOnce(deps) {
11
+ const log = deps.log ?? (() => { });
12
+ const alerts = await listHumanAlerts(deps.runner, deps.filter);
13
+ const seen = deps.seen.load();
14
+ const fresh = alerts.filter((q) => !seen.has(q.qitemId));
15
+ log(`alerts=${alerts.length} fresh=${fresh.length}`);
16
+ const posted = [];
17
+ const failed = [];
18
+ for (const a of fresh) {
19
+ // list bounds bodies (item 9 N+1) — pull the full item for summary+body.
20
+ const full = (await showFull(deps.runner, a.qitemId)) ?? a;
21
+ const payload = buildOutboundMessage({ qitemId: a.qitemId, summary: full.summary ?? a.summary, body: full.body, destinationSession: a.destinationSession }, { sourceLabel: deps.sourceLabel, bodyExcerpt: deps.bodyExcerpt });
22
+ const res = await postWebhook(deps.webhookUrl, payload, deps.fetchImpl);
23
+ if (res.ok) {
24
+ deps.seen.mark(a.qitemId, "posted"); // …seen ONLY after success (item 2)
25
+ posted.push(a.qitemId);
26
+ log(`posted ${a.qitemId}`);
27
+ }
28
+ else {
29
+ // fail-VISIBLE (item 3): loud, NOT marked seen → retried next sweep (no drop).
30
+ log(`ERROR posting ${a.qitemId}: ${res.error}`);
31
+ failed.push({ id: a.qitemId, error: res.error ?? "unknown" });
32
+ }
33
+ }
34
+ if (fresh.length === 0)
35
+ log("nothing new");
36
+ return { freshCount: fresh.length, posted, failed };
37
+ }
38
+ /**
39
+ * Item 9: on ENABLE, seed all currently-active human alerts as history/seen
40
+ * WITHOUT posting, so turning the connector on never replays the backlog.
41
+ * Returns an honest online-status line marking the transition.
42
+ */
43
+ export async function seedBacklogOnEnable(deps) {
44
+ const alerts = await listHumanAlerts(deps.runner, deps.filter);
45
+ const already = deps.seen.load();
46
+ const toSeed = alerts.map((a) => a.qitemId).filter((id) => !already.has(id));
47
+ const seeded = deps.seen.seed(toSeed, "seeded-at-enable");
48
+ const onlineStatus = `slack outbound ENABLED at enable-time: ${seeded} pre-existing alert(s) seeded as history (not reposted); only alerts created after this point will deliver.`;
49
+ deps.log?.(onlineStatus);
50
+ return { seeded, onlineStatus };
51
+ }
52
+ //# sourceMappingURL=outbound.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outbound.js","sourceRoot":"","sources":["../../src/slack/outbound.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAkB,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAmBpD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAkB;IACtD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/D,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAA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CAAC,iBAAiB,CAAC,CAAC,OAAO,KAAK,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;YAChD,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,IAAI,SAAS,EAAE,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,GAAG,CAAC,aAAa,CAAC,CAAC;IAC3C,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AACtD,CAAC;AAOD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,IAA8D;IACtG,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/D,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACjC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7E,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC1D,MAAM,YAAY,GAAG,0CAA0C,MAAM,6GAA6G,CAAC;IACnL,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC;IACzB,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;AAClC,CAAC"}
@@ -0,0 +1,56 @@
1
+ export interface RunResult {
2
+ ok: boolean;
3
+ stdout: string;
4
+ stderr: string;
5
+ code: number;
6
+ }
7
+ /** Injectable: run `rig queue <args>` and return the result. */
8
+ export type QueueRunner = (args: string[]) => Promise<RunResult>;
9
+ /**
10
+ * Default runner: spawn the configured `rig` binary. `env` carries OPENRIG_URL
11
+ * (or nothing, letting rig resolve the local daemon); `baseArgs` can inject
12
+ * `--host <id>` for a registered remote queue. No shell — argv only.
13
+ */
14
+ export declare function makeExecRunner(opts: {
15
+ rigBin: string;
16
+ baseArgs?: string[];
17
+ env?: NodeJS.ProcessEnv;
18
+ timeoutMs?: number;
19
+ }): QueueRunner;
20
+ export interface QueueItem {
21
+ qitemId: string;
22
+ destinationSession?: string | null;
23
+ sourceSession?: string | null;
24
+ tags?: string[] | null;
25
+ state?: string | null;
26
+ tier?: string | null;
27
+ summary?: string | null;
28
+ body?: string | null;
29
+ }
30
+ export interface AlertFilterOpts {
31
+ alertTag: string;
32
+ /** Optional explicit human-seat allow-list; when empty, any human-seat destination or human-gate tier matches. */
33
+ destinations?: string[];
34
+ }
35
+ /**
36
+ * PURE: select the qitems that should alert a human. A qitem alerts iff it is
37
+ * active, carries the alert tag, AND targets a human — either an explicit
38
+ * configured destination, a human-seat session name, or tier `human-gate`.
39
+ */
40
+ export declare function filterHumanAlerts(items: QueueItem[], opts: AlertFilterOpts): QueueItem[];
41
+ export declare const QUEUE_LIST_LIMIT = 100000;
42
+ /** Read active human alerts across ALL rigs (the -A scope fix) with a full-backlog limit. */
43
+ export declare function listHumanAlerts(runner: QueueRunner, opts: AlertFilterOpts): Promise<QueueItem[]>;
44
+ /** Full single-item read (list omits/bounds body — item 9 N+1). */
45
+ export declare function showFull(runner: QueueRunner, qitemId: string): Promise<QueueItem | null>;
46
+ export interface CreateQitemInput {
47
+ source: string;
48
+ destination: string;
49
+ summary: string;
50
+ body: string;
51
+ priority?: string;
52
+ tags?: string[];
53
+ }
54
+ /** Create a qitem (inbound landing). Returns the created qitem id, or throws. */
55
+ export declare function createQitem(runner: QueueRunner, input: CreateQitemInput): Promise<string>;
56
+ //# sourceMappingURL=queue-bridge.d.ts.map
@@ -0,0 +1 @@
1
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