@openrig/cli 0.6.5 → 0.6.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 (1125) hide show
  1. package/README.md +151 -63
  2. package/daemon/assets/claude-team-permissions.cjs +262 -0
  3. package/daemon/assets/onboarding/02-self-and-competent-action.md +46 -2
  4. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  5. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  6. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus-health.cjs +41 -0
  7. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +69 -12
  8. package/daemon/assets/plugins/openrig-core/skills/applying-a-permission-policy/SKILL.md +41 -21
  9. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +24 -7
  10. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +4 -0
  11. package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +1 -1
  12. package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +4 -5
  13. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +9 -4
  14. package/daemon/assets/plugins/openrig-core/skills/refocusing/SKILL.md +31 -4
  15. package/daemon/assets/plugins/openrig-core/skills/refocusing/scripts/trace-to-root.py +24 -13
  16. package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +3 -0
  17. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +42 -0
  18. package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +6 -0
  19. package/daemon/assets/skills/rigs/SKILL.md +133 -0
  20. package/daemon/context-packs/help/help.md +66 -12
  21. package/daemon/context-packs/help/manifest.yaml +1 -1
  22. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  23. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +218 -38
  24. package/daemon/context-packs/reference/getting-started.md +593 -139
  25. package/daemon/context-packs/reference/manifest.yaml +4 -1
  26. package/daemon/context-packs/reference/rig-spec.md +175 -26
  27. package/daemon/context-packs/reference/whats-new.md +134 -0
  28. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  29. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  30. package/daemon/context-packs/skills/applying-a-permission-policy/SKILL.md +41 -21
  31. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  32. package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +24 -7
  33. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  34. package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +4 -0
  35. package/daemon/context-packs/skills/core/agent-starters/SKILL.md +0 -6
  36. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  37. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/SKILL.md +1 -8
  38. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  40. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  41. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/core/openrig-architect/SKILL.md +5 -5
  43. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +3 -3
  44. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  46. package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +4 -5
  47. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  48. package/daemon/context-packs/skills/core/openrig-software-factory/SKILL.md +31 -21
  49. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +31 -31
  51. package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +2 -0
  52. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +0 -1
  54. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/core/session-source-fork/SKILL.md +0 -5
  57. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  59. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  60. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  61. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/forming-an-openrig-mental-model/SKILL.md +1 -1
  63. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  66. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  67. package/daemon/context-packs/skills/openrig-user/SKILL.md +9 -4
  68. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  71. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  74. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  76. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  77. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  78. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  79. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  80. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  81. package/daemon/context-packs/skills/process/agent-browser/OPENRIG.md +1 -1
  82. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  83. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  84. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  85. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  86. package/daemon/context-packs/skills/process/systematic-debugging/SKILL.md +0 -2
  87. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  88. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  89. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  90. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  91. package/daemon/context-packs/skills/refocusing/SKILL.md +31 -4
  92. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  93. package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +24 -13
  94. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/SKILL.md +3 -0
  95. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  96. package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +42 -0
  97. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  98. package/daemon/context-packs/skills/session-compaction-and-restore/SKILL.md +6 -0
  99. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  100. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  101. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  102. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  103. package/daemon/dist/adapters/claude-code-adapter.d.ts +2 -2
  104. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  105. package/daemon/dist/adapters/claude-code-adapter.js +48 -26
  106. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  107. package/daemon/dist/adapters/claude-resume.d.ts +1 -1
  108. package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
  109. package/daemon/dist/adapters/claude-resume.js +7 -4
  110. package/daemon/dist/adapters/claude-resume.js.map +1 -1
  111. package/daemon/dist/adapters/codex-resume.d.ts +3 -1
  112. package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
  113. package/daemon/dist/adapters/codex-resume.js +27 -4
  114. package/daemon/dist/adapters/codex-resume.js.map +1 -1
  115. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +3 -0
  116. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  117. package/daemon/dist/adapters/codex-runtime-adapter.js +61 -63
  118. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  119. package/daemon/dist/adapters/compose-services-adapter.js +1 -1
  120. package/daemon/dist/adapters/compose-services-adapter.js.map +1 -1
  121. package/daemon/dist/adapters/kernel-authority.d.ts +10 -0
  122. package/daemon/dist/adapters/kernel-authority.d.ts.map +1 -0
  123. package/daemon/dist/adapters/kernel-authority.js +71 -0
  124. package/daemon/dist/adapters/kernel-authority.js.map +1 -0
  125. package/daemon/dist/adapters/non-interruptive.d.ts +14 -0
  126. package/daemon/dist/adapters/non-interruptive.d.ts.map +1 -0
  127. package/daemon/dist/adapters/non-interruptive.js +38 -0
  128. package/daemon/dist/adapters/non-interruptive.js.map +1 -0
  129. package/daemon/dist/adapters/pi-readiness.d.ts +15 -0
  130. package/daemon/dist/adapters/pi-readiness.d.ts.map +1 -0
  131. package/daemon/dist/adapters/pi-readiness.js +90 -0
  132. package/daemon/dist/adapters/pi-readiness.js.map +1 -0
  133. package/daemon/dist/adapters/pi-resume.d.ts +3 -1
  134. package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
  135. package/daemon/dist/adapters/pi-resume.js +8 -1
  136. package/daemon/dist/adapters/pi-resume.js.map +1 -1
  137. package/daemon/dist/adapters/pi-runner-protocol.d.ts +15 -0
  138. package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
  139. package/daemon/dist/adapters/pi-runner-protocol.js +28 -0
  140. package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
  141. package/daemon/dist/adapters/pi-runner.d.ts +3 -0
  142. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
  143. package/daemon/dist/adapters/pi-runner.js +92 -15
  144. package/daemon/dist/adapters/pi-runner.js.map +1 -1
  145. package/daemon/dist/adapters/pi-runtime-adapter.d.ts +8 -0
  146. package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
  147. package/daemon/dist/adapters/pi-runtime-adapter.js +37 -9
  148. package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
  149. package/daemon/dist/adapters/stub-runner-protocol.d.ts +1 -1
  150. package/daemon/dist/adapters/stub-runner-protocol.d.ts.map +1 -1
  151. package/daemon/dist/adapters/stub-runner.d.ts +1 -1
  152. package/daemon/dist/adapters/stub-runner.d.ts.map +1 -1
  153. package/daemon/dist/adapters/stub-runtime-adapter.d.ts.map +1 -1
  154. package/daemon/dist/adapters/stub-runtime-adapter.js +10 -7
  155. package/daemon/dist/adapters/stub-runtime-adapter.js.map +1 -1
  156. package/daemon/dist/adapters/tmux.d.ts +7 -3
  157. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  158. package/daemon/dist/adapters/tmux.js +20 -12
  159. package/daemon/dist/adapters/tmux.js.map +1 -1
  160. package/daemon/dist/adapters/yolo-mode.d.ts +1 -1
  161. package/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
  162. package/daemon/dist/adapters/yolo-mode.js +3 -0
  163. package/daemon/dist/adapters/yolo-mode.js.map +1 -1
  164. package/daemon/dist/build-info.js +3 -3
  165. package/daemon/dist/bundle-behaviour-surface.d.ts +2 -0
  166. package/daemon/dist/bundle-behaviour-surface.d.ts.map +1 -0
  167. package/daemon/dist/bundle-behaviour-surface.js +2 -0
  168. package/daemon/dist/bundle-behaviour-surface.js.map +1 -0
  169. package/daemon/dist/bundle-identity-surface.d.ts +2 -0
  170. package/daemon/dist/bundle-identity-surface.d.ts.map +1 -0
  171. package/daemon/dist/bundle-identity-surface.js +4 -0
  172. package/daemon/dist/bundle-identity-surface.js.map +1 -0
  173. package/daemon/dist/daemon-shutdown.d.ts +1 -1
  174. package/daemon/dist/daemon-shutdown.d.ts.map +1 -1
  175. package/daemon/dist/daemon-shutdown.js +5 -1
  176. package/daemon/dist/daemon-shutdown.js.map +1 -1
  177. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  178. package/daemon/dist/db/all-migrations.js +6 -0
  179. package/daemon/dist/db/all-migrations.js.map +1 -1
  180. package/daemon/dist/db/migrations/095_rig_non_interruptive.d.ts +3 -0
  181. package/daemon/dist/db/migrations/095_rig_non_interruptive.d.ts.map +1 -0
  182. package/daemon/dist/db/migrations/095_rig_non_interruptive.js +5 -0
  183. package/daemon/dist/db/migrations/095_rig_non_interruptive.js.map +1 -0
  184. package/daemon/dist/db/migrations/096_rig_install_root.d.ts +3 -0
  185. package/daemon/dist/db/migrations/096_rig_install_root.d.ts.map +1 -0
  186. package/daemon/dist/db/migrations/096_rig_install_root.js +5 -0
  187. package/daemon/dist/db/migrations/096_rig_install_root.js.map +1 -0
  188. package/daemon/dist/db/migrations/097_thread_part_map.d.ts +3 -0
  189. package/daemon/dist/db/migrations/097_thread_part_map.d.ts.map +1 -0
  190. package/daemon/dist/db/migrations/097_thread_part_map.js +20 -0
  191. package/daemon/dist/db/migrations/097_thread_part_map.js.map +1 -0
  192. package/daemon/dist/domain/activity-taxonomy.d.ts +7 -0
  193. package/daemon/dist/domain/activity-taxonomy.d.ts.map +1 -1
  194. package/daemon/dist/domain/activity-taxonomy.js.map +1 -1
  195. package/daemon/dist/domain/agent-activity-store.d.ts +12 -0
  196. package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
  197. package/daemon/dist/domain/agent-activity-store.js +55 -30
  198. package/daemon/dist/domain/agent-activity-store.js.map +1 -1
  199. package/daemon/dist/domain/agent-images/agent-image-types.d.ts +1 -1
  200. package/daemon/dist/domain/agent-images/agent-image-types.d.ts.map +1 -1
  201. package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
  202. package/daemon/dist/domain/agent-manifest.js +4 -2
  203. package/daemon/dist/domain/agent-manifest.js.map +1 -1
  204. package/daemon/dist/domain/bootstrap-orchestrator.d.ts +10 -0
  205. package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
  206. package/daemon/dist/domain/bootstrap-orchestrator.js +136 -32
  207. package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
  208. package/daemon/dist/domain/builtin-policy-reference.d.ts +1 -1
  209. package/daemon/dist/domain/builtin-policy-reference.d.ts.map +1 -1
  210. package/daemon/dist/domain/builtin-policy-reference.js +2 -2
  211. package/daemon/dist/domain/builtin-policy-reference.js.map +1 -1
  212. package/daemon/dist/domain/bundle-archive.d.ts +24 -0
  213. package/daemon/dist/domain/bundle-archive.d.ts.map +1 -1
  214. package/daemon/dist/domain/bundle-archive.js +52 -27
  215. package/daemon/dist/domain/bundle-archive.js.map +1 -1
  216. package/daemon/dist/domain/bundle-audit.d.ts +5 -0
  217. package/daemon/dist/domain/bundle-audit.d.ts.map +1 -1
  218. package/daemon/dist/domain/bundle-audit.js.map +1 -1
  219. package/daemon/dist/domain/bundle-behaviour-inspect.d.ts +4 -0
  220. package/daemon/dist/domain/bundle-behaviour-inspect.d.ts.map +1 -0
  221. package/daemon/dist/domain/bundle-behaviour-inspect.js +56 -0
  222. package/daemon/dist/domain/bundle-behaviour-inspect.js.map +1 -0
  223. package/daemon/dist/domain/bundle-behaviour.d.ts +118 -0
  224. package/daemon/dist/domain/bundle-behaviour.d.ts.map +1 -0
  225. package/daemon/dist/domain/bundle-behaviour.js +364 -0
  226. package/daemon/dist/domain/bundle-behaviour.js.map +1 -0
  227. package/daemon/dist/domain/bundle-carried-context-pack.d.ts +16 -0
  228. package/daemon/dist/domain/bundle-carried-context-pack.d.ts.map +1 -0
  229. package/daemon/dist/domain/bundle-carried-context-pack.js +67 -0
  230. package/daemon/dist/domain/bundle-carried-context-pack.js.map +1 -0
  231. package/daemon/dist/domain/bundle-carried-project.d.ts +13 -0
  232. package/daemon/dist/domain/bundle-carried-project.d.ts.map +1 -0
  233. package/daemon/dist/domain/bundle-carried-project.js +71 -0
  234. package/daemon/dist/domain/bundle-carried-project.js.map +1 -0
  235. package/daemon/dist/domain/bundle-conflict-detector.js +3 -3
  236. package/daemon/dist/domain/bundle-conflict-detector.js.map +1 -1
  237. package/daemon/dist/domain/bundle-content-routing.d.ts +49 -0
  238. package/daemon/dist/domain/bundle-content-routing.d.ts.map +1 -0
  239. package/daemon/dist/domain/bundle-content-routing.js +246 -0
  240. package/daemon/dist/domain/bundle-content-routing.js.map +1 -0
  241. package/daemon/dist/domain/bundle-context-packs-router.d.ts +7 -2
  242. package/daemon/dist/domain/bundle-context-packs-router.d.ts.map +1 -1
  243. package/daemon/dist/domain/bundle-context-packs-router.js +19 -0
  244. package/daemon/dist/domain/bundle-context-packs-router.js.map +1 -1
  245. package/daemon/dist/domain/bundle-identity.d.ts +27 -0
  246. package/daemon/dist/domain/bundle-identity.d.ts.map +1 -0
  247. package/daemon/dist/domain/bundle-identity.js +34 -0
  248. package/daemon/dist/domain/bundle-identity.js.map +1 -0
  249. package/daemon/dist/domain/bundle-install-context.d.ts +22 -0
  250. package/daemon/dist/domain/bundle-install-context.d.ts.map +1 -0
  251. package/daemon/dist/domain/bundle-install-context.js +64 -0
  252. package/daemon/dist/domain/bundle-install-context.js.map +1 -0
  253. package/daemon/dist/domain/bundle-integrity.d.ts +1 -0
  254. package/daemon/dist/domain/bundle-integrity.d.ts.map +1 -1
  255. package/daemon/dist/domain/bundle-integrity.js +1 -1
  256. package/daemon/dist/domain/bundle-integrity.js.map +1 -1
  257. package/daemon/dist/domain/bundle-source-resolver.d.ts +4 -1
  258. package/daemon/dist/domain/bundle-source-resolver.d.ts.map +1 -1
  259. package/daemon/dist/domain/bundle-source-resolver.js +73 -19
  260. package/daemon/dist/domain/bundle-source-resolver.js.map +1 -1
  261. package/daemon/dist/domain/bundle-types.d.ts +38 -1
  262. package/daemon/dist/domain/bundle-types.d.ts.map +1 -1
  263. package/daemon/dist/domain/bundle-types.js +78 -0
  264. package/daemon/dist/domain/bundle-types.js.map +1 -1
  265. package/daemon/dist/domain/chat-repository.d.ts +5 -0
  266. package/daemon/dist/domain/chat-repository.d.ts.map +1 -1
  267. package/daemon/dist/domain/chat-repository.js +8 -0
  268. package/daemon/dist/domain/chat-repository.js.map +1 -1
  269. package/daemon/dist/domain/claim-service.d.ts.map +1 -1
  270. package/daemon/dist/domain/claim-service.js +5 -4
  271. package/daemon/dist/domain/claim-service.js.map +1 -1
  272. package/daemon/dist/domain/claude-activity-hooks.d.ts +3 -0
  273. package/daemon/dist/domain/claude-activity-hooks.d.ts.map +1 -1
  274. package/daemon/dist/domain/claude-activity-hooks.js +8 -1
  275. package/daemon/dist/domain/claude-activity-hooks.js.map +1 -1
  276. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +15 -1
  277. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  278. package/daemon/dist/domain/claude-compaction-enforcer.js +87 -23
  279. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  280. package/daemon/dist/domain/codex-team-workspace.d.ts +8 -0
  281. package/daemon/dist/domain/codex-team-workspace.d.ts.map +1 -0
  282. package/daemon/dist/domain/codex-team-workspace.js +54 -0
  283. package/daemon/dist/domain/codex-team-workspace.js.map +1 -0
  284. package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
  285. package/daemon/dist/domain/codex-thread-id.js +4 -2
  286. package/daemon/dist/domain/codex-thread-id.js.map +1 -1
  287. package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
  288. package/daemon/dist/domain/context-monitor.js +9 -1
  289. package/daemon/dist/domain/context-monitor.js.map +1 -1
  290. package/daemon/dist/domain/daemon-version.d.ts +3 -1
  291. package/daemon/dist/domain/daemon-version.d.ts.map +1 -1
  292. package/daemon/dist/domain/daemon-version.js +6 -1
  293. package/daemon/dist/domain/daemon-version.js.map +1 -1
  294. package/daemon/dist/domain/event-loop-monitor.d.ts +6 -0
  295. package/daemon/dist/domain/event-loop-monitor.d.ts.map +1 -1
  296. package/daemon/dist/domain/event-loop-monitor.js +13 -0
  297. package/daemon/dist/domain/event-loop-monitor.js.map +1 -1
  298. package/daemon/dist/domain/execution-view.d.ts.map +1 -1
  299. package/daemon/dist/domain/execution-view.js +57 -11
  300. package/daemon/dist/domain/execution-view.js.map +1 -1
  301. package/daemon/dist/domain/finite-telemetry.d.ts +74 -0
  302. package/daemon/dist/domain/finite-telemetry.d.ts.map +1 -0
  303. package/daemon/dist/domain/finite-telemetry.js +236 -0
  304. package/daemon/dist/domain/finite-telemetry.js.map +1 -0
  305. package/daemon/dist/domain/gateway/connections-projection.d.ts +5 -1
  306. package/daemon/dist/domain/gateway/connections-projection.d.ts.map +1 -1
  307. package/daemon/dist/domain/gateway/connections-projection.js +2 -0
  308. package/daemon/dist/domain/gateway/connections-projection.js.map +1 -1
  309. package/daemon/dist/domain/gateway/destination-resolver.d.ts.map +1 -1
  310. package/daemon/dist/domain/gateway/destination-resolver.js +7 -4
  311. package/daemon/dist/domain/gateway/destination-resolver.js.map +1 -1
  312. package/daemon/dist/domain/gateway/gateway-subsystem.d.ts +2 -0
  313. package/daemon/dist/domain/gateway/gateway-subsystem.d.ts.map +1 -1
  314. package/daemon/dist/domain/gateway/gateway-subsystem.js +4 -0
  315. package/daemon/dist/domain/gateway/gateway-subsystem.js.map +1 -1
  316. package/daemon/dist/domain/gateway/human-readiness.d.ts.map +1 -1
  317. package/daemon/dist/domain/gateway/human-readiness.js +23 -6
  318. package/daemon/dist/domain/gateway/human-readiness.js.map +1 -1
  319. package/daemon/dist/domain/gateway/human-registry.d.ts +2 -2
  320. package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
  321. package/daemon/dist/domain/gateway/human-registry.js +2 -2
  322. package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
  323. package/daemon/dist/domain/gateway/slack/capabilities.d.ts.map +1 -1
  324. package/daemon/dist/domain/gateway/slack/capabilities.js +3 -1
  325. package/daemon/dist/domain/gateway/slack/capabilities.js.map +1 -1
  326. package/daemon/dist/domain/gateway/slack/channel-map.d.ts +39 -0
  327. package/daemon/dist/domain/gateway/slack/channel-map.d.ts.map +1 -0
  328. package/daemon/dist/domain/gateway/slack/channel-map.js +114 -0
  329. package/daemon/dist/domain/gateway/slack/channel-map.js.map +1 -0
  330. package/daemon/dist/domain/gateway/slack/channel-recovery.d.ts +45 -0
  331. package/daemon/dist/domain/gateway/slack/channel-recovery.d.ts.map +1 -0
  332. package/daemon/dist/domain/gateway/slack/channel-recovery.js +176 -0
  333. package/daemon/dist/domain/gateway/slack/channel-recovery.js.map +1 -0
  334. package/daemon/dist/domain/gateway/slack/config.d.ts +7 -0
  335. package/daemon/dist/domain/gateway/slack/config.d.ts.map +1 -1
  336. package/daemon/dist/domain/gateway/slack/config.js +19 -2
  337. package/daemon/dist/domain/gateway/slack/config.js.map +1 -1
  338. package/daemon/dist/domain/gateway/slack/inbound.d.ts +27 -2
  339. package/daemon/dist/domain/gateway/slack/inbound.d.ts.map +1 -1
  340. package/daemon/dist/domain/gateway/slack/inbound.js +123 -11
  341. package/daemon/dist/domain/gateway/slack/inbound.js.map +1 -1
  342. package/daemon/dist/domain/gateway/slack/message.d.ts +7 -0
  343. package/daemon/dist/domain/gateway/slack/message.d.ts.map +1 -1
  344. package/daemon/dist/domain/gateway/slack/message.js +36 -0
  345. package/daemon/dist/domain/gateway/slack/message.js.map +1 -1
  346. package/daemon/dist/domain/gateway/slack/slack-api.d.ts +1 -0
  347. package/daemon/dist/domain/gateway/slack/slack-api.d.ts.map +1 -1
  348. package/daemon/dist/domain/gateway/slack/slack-api.js +3 -1
  349. package/daemon/dist/domain/gateway/slack/slack-api.js.map +1 -1
  350. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts +30 -7
  351. package/daemon/dist/domain/gateway/slack/slack-delivery.d.ts.map +1 -1
  352. package/daemon/dist/domain/gateway/slack/slack-delivery.js +253 -51
  353. package/daemon/dist/domain/gateway/slack/slack-delivery.js.map +1 -1
  354. package/daemon/dist/domain/gateway/slack/slack-subsystem.d.ts.map +1 -1
  355. package/daemon/dist/domain/gateway/slack/slack-subsystem.js +97 -11
  356. package/daemon/dist/domain/gateway/slack/slack-subsystem.js.map +1 -1
  357. package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts +6 -0
  358. package/daemon/dist/domain/gateway/slack/socket-inbound.d.ts.map +1 -1
  359. package/daemon/dist/domain/gateway/slack/socket-inbound.js +51 -1
  360. package/daemon/dist/domain/gateway/slack/socket-inbound.js.map +1 -1
  361. package/daemon/dist/domain/gateway/slack/state-store.d.ts +24 -0
  362. package/daemon/dist/domain/gateway/slack/state-store.d.ts.map +1 -1
  363. package/daemon/dist/domain/gateway/slack/state-store.js +84 -1
  364. package/daemon/dist/domain/gateway/slack/state-store.js.map +1 -1
  365. package/daemon/dist/domain/gateway/slack/thread-routing.d.ts.map +1 -1
  366. package/daemon/dist/domain/gateway/slack/thread-routing.js +22 -2
  367. package/daemon/dist/domain/gateway/slack/thread-routing.js.map +1 -1
  368. package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts +14 -0
  369. package/daemon/dist/domain/gateway/slack/thread-seat-map.d.ts.map +1 -1
  370. package/daemon/dist/domain/gateway/slack/thread-seat-map.js +27 -0
  371. package/daemon/dist/domain/gateway/slack/thread-seat-map.js.map +1 -1
  372. package/daemon/dist/domain/generated-file-hygiene.d.ts +3 -0
  373. package/daemon/dist/domain/generated-file-hygiene.d.ts.map +1 -0
  374. package/daemon/dist/domain/generated-file-hygiene.js +145 -0
  375. package/daemon/dist/domain/generated-file-hygiene.js.map +1 -0
  376. package/daemon/dist/domain/install-planner.d.ts.map +1 -1
  377. package/daemon/dist/domain/install-planner.js +17 -0
  378. package/daemon/dist/domain/install-planner.js.map +1 -1
  379. package/daemon/dist/domain/managed-blocks.d.ts +1 -0
  380. package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
  381. package/daemon/dist/domain/managed-blocks.js +8 -2
  382. package/daemon/dist/domain/managed-blocks.js.map +1 -1
  383. package/daemon/dist/domain/markdown-address.d.ts.map +1 -1
  384. package/daemon/dist/domain/markdown-address.js +23 -6
  385. package/daemon/dist/domain/markdown-address.js.map +1 -1
  386. package/daemon/dist/domain/native-permission-store.d.ts +14 -0
  387. package/daemon/dist/domain/native-permission-store.d.ts.map +1 -1
  388. package/daemon/dist/domain/native-permission-store.js +168 -4
  389. package/daemon/dist/domain/native-permission-store.js.map +1 -1
  390. package/daemon/dist/domain/native-process-executable.d.ts +4 -0
  391. package/daemon/dist/domain/native-process-executable.d.ts.map +1 -0
  392. package/daemon/dist/domain/native-process-executable.js +53 -0
  393. package/daemon/dist/domain/native-process-executable.js.map +1 -0
  394. package/daemon/dist/domain/native-process-lineage.d.ts +2 -0
  395. package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
  396. package/daemon/dist/domain/native-process-lineage.js +70 -8
  397. package/daemon/dist/domain/native-process-lineage.js.map +1 -1
  398. package/daemon/dist/domain/native-resume-probe.d.ts +3 -1
  399. package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
  400. package/daemon/dist/domain/native-resume-probe.js +38 -7
  401. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  402. package/daemon/dist/domain/node-inventory.d.ts +2 -2
  403. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  404. package/daemon/dist/domain/node-inventory.js +30 -4
  405. package/daemon/dist/domain/node-inventory.js.map +1 -1
  406. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  407. package/daemon/dist/domain/node-launcher.js +1 -0
  408. package/daemon/dist/domain/node-launcher.js.map +1 -1
  409. package/daemon/dist/domain/pane-binding-observation.d.ts +1 -0
  410. package/daemon/dist/domain/pane-binding-observation.d.ts.map +1 -1
  411. package/daemon/dist/domain/pane-binding-observation.js +3 -1
  412. package/daemon/dist/domain/pane-binding-observation.js.map +1 -1
  413. package/daemon/dist/domain/permission-policy/policy-ref.d.ts +6 -1
  414. package/daemon/dist/domain/permission-policy/policy-ref.d.ts.map +1 -1
  415. package/daemon/dist/domain/permission-policy/policy-ref.js +16 -4
  416. package/daemon/dist/domain/permission-policy/policy-ref.js.map +1 -1
  417. package/daemon/dist/domain/permission-policy/policy-spec.d.ts +1 -1
  418. package/daemon/dist/domain/permission-policy/policy-spec.d.ts.map +1 -1
  419. package/daemon/dist/domain/permission-policy/policy-spec.js +2 -2
  420. package/daemon/dist/domain/permission-policy/policy-spec.js.map +1 -1
  421. package/daemon/dist/domain/plugin-vendor-service.d.ts +6 -0
  422. package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
  423. package/daemon/dist/domain/plugin-vendor-service.js +12 -0
  424. package/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
  425. package/daemon/dist/domain/profile-resolver.d.ts +3 -2
  426. package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  427. package/daemon/dist/domain/profile-resolver.js +71 -9
  428. package/daemon/dist/domain/profile-resolver.js.map +1 -1
  429. package/daemon/dist/domain/projection-planner.d.ts +11 -0
  430. package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
  431. package/daemon/dist/domain/projection-planner.js +1 -1
  432. package/daemon/dist/domain/projection-planner.js.map +1 -1
  433. package/daemon/dist/domain/ps-projection.d.ts +11 -9
  434. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  435. package/daemon/dist/domain/ps-projection.js +15 -12
  436. package/daemon/dist/domain/ps-projection.js.map +1 -1
  437. package/daemon/dist/domain/queue-repository.d.ts +2 -0
  438. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  439. package/daemon/dist/domain/queue-repository.js +75 -24
  440. package/daemon/dist/domain/queue-repository.js.map +1 -1
  441. package/daemon/dist/domain/queue-retention.d.ts +2 -2
  442. package/daemon/dist/domain/queue-retention.js +4 -4
  443. package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -1
  444. package/daemon/dist/domain/queue-transition-log.js +12 -10
  445. package/daemon/dist/domain/queue-transition-log.js.map +1 -1
  446. package/daemon/dist/domain/queue-wait-backoff.d.ts.map +1 -1
  447. package/daemon/dist/domain/queue-wait-backoff.js +6 -2
  448. package/daemon/dist/domain/queue-wait-backoff.js.map +1 -1
  449. package/daemon/dist/domain/queue-waiting.d.ts.map +1 -1
  450. package/daemon/dist/domain/queue-waiting.js +7 -2
  451. package/daemon/dist/domain/queue-waiting.js.map +1 -1
  452. package/daemon/dist/domain/queue-wake-ladder.d.ts +15 -2
  453. package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
  454. package/daemon/dist/domain/queue-wake-ladder.js +29 -6
  455. package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
  456. package/daemon/dist/domain/readiness-timeout.d.ts +7 -0
  457. package/daemon/dist/domain/readiness-timeout.d.ts.map +1 -0
  458. package/daemon/dist/domain/readiness-timeout.js +19 -0
  459. package/daemon/dist/domain/readiness-timeout.js.map +1 -0
  460. package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
  461. package/daemon/dist/domain/rehydrate-eligibility.js +5 -2
  462. package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
  463. package/daemon/dist/domain/reply-to-choice.d.ts +6 -2
  464. package/daemon/dist/domain/reply-to-choice.d.ts.map +1 -1
  465. package/daemon/dist/domain/reply-to-choice.js +9 -6
  466. package/daemon/dist/domain/reply-to-choice.js.map +1 -1
  467. package/daemon/dist/domain/request-phase-observer.d.ts +69 -0
  468. package/daemon/dist/domain/request-phase-observer.d.ts.map +1 -0
  469. package/daemon/dist/domain/request-phase-observer.js +206 -0
  470. package/daemon/dist/domain/request-phase-observer.js.map +1 -0
  471. package/daemon/dist/domain/restore-check-service.d.ts +5 -1
  472. package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
  473. package/daemon/dist/domain/restore-check-service.js +17 -3
  474. package/daemon/dist/domain/restore-check-service.js.map +1 -1
  475. package/daemon/dist/domain/restore-orchestrator.d.ts +2 -0
  476. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  477. package/daemon/dist/domain/restore-orchestrator.js +58 -12
  478. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  479. package/daemon/dist/domain/rig-mode/operating-posture.d.ts +17 -1
  480. package/daemon/dist/domain/rig-mode/operating-posture.d.ts.map +1 -1
  481. package/daemon/dist/domain/rig-mode/operating-posture.js +53 -15
  482. package/daemon/dist/domain/rig-mode/operating-posture.js.map +1 -1
  483. package/daemon/dist/domain/rig-repository.d.ts +15 -6
  484. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  485. package/daemon/dist/domain/rig-repository.js +62 -10
  486. package/daemon/dist/domain/rig-repository.js.map +1 -1
  487. package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
  488. package/daemon/dist/domain/rig-teardown.js +12 -3
  489. package/daemon/dist/domain/rig-teardown.js.map +1 -1
  490. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  491. package/daemon/dist/domain/rigspec-codec.js +2 -0
  492. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  493. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  494. package/daemon/dist/domain/rigspec-exporter.js +1 -0
  495. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  496. package/daemon/dist/domain/rigspec-instantiator.d.ts +9 -3
  497. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  498. package/daemon/dist/domain/rigspec-instantiator.js +46 -13
  499. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  500. package/daemon/dist/domain/rigspec-preflight.d.ts +3 -2
  501. package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
  502. package/daemon/dist/domain/rigspec-preflight.js +24 -12
  503. package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
  504. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  505. package/daemon/dist/domain/rigspec-schema.js +24 -5
  506. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  507. package/daemon/dist/domain/route-timing-recorder.d.ts.map +1 -1
  508. package/daemon/dist/domain/route-timing-recorder.js +2 -0
  509. package/daemon/dist/domain/route-timing-recorder.js.map +1 -1
  510. package/daemon/dist/domain/runtime-adapter.d.ts +12 -3
  511. package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
  512. package/daemon/dist/domain/runtime-adapter.js +1 -0
  513. package/daemon/dist/domain/runtime-adapter.js.map +1 -1
  514. package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
  515. package/daemon/dist/domain/seat-activity-service.js +16 -6
  516. package/daemon/dist/domain/seat-activity-service.js.map +1 -1
  517. package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
  518. package/daemon/dist/domain/seat-attention-reconciler.js +10 -4
  519. package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
  520. package/daemon/dist/domain/seat-handover-service.d.ts +2 -0
  521. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  522. package/daemon/dist/domain/seat-handover-service.js +14 -8
  523. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  524. package/daemon/dist/domain/seat-launch-environment.d.ts.map +1 -1
  525. package/daemon/dist/domain/seat-launch-environment.js +4 -0
  526. package/daemon/dist/domain/seat-launch-environment.js.map +1 -1
  527. package/daemon/dist/domain/seat-lifecycle-service.d.ts +4 -0
  528. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  529. package/daemon/dist/domain/seat-lifecycle-service.js +4 -0
  530. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  531. package/daemon/dist/domain/seat-status-service.d.ts +2 -1
  532. package/daemon/dist/domain/seat-status-service.d.ts.map +1 -1
  533. package/daemon/dist/domain/seat-status-service.js +6 -4
  534. package/daemon/dist/domain/seat-status-service.js.map +1 -1
  535. package/daemon/dist/domain/service-orchestrator.d.ts +1 -0
  536. package/daemon/dist/domain/service-orchestrator.d.ts.map +1 -1
  537. package/daemon/dist/domain/service-orchestrator.js +4 -0
  538. package/daemon/dist/domain/service-orchestrator.js.map +1 -1
  539. package/daemon/dist/domain/session-jsonl.d.ts.map +1 -1
  540. package/daemon/dist/domain/session-jsonl.js +10 -4
  541. package/daemon/dist/domain/session-jsonl.js.map +1 -1
  542. package/daemon/dist/domain/session-transport.d.ts +9 -20
  543. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  544. package/daemon/dist/domain/session-transport.js +198 -44
  545. package/daemon/dist/domain/session-transport.js.map +1 -1
  546. package/daemon/dist/domain/skill-audit.d.ts +19 -0
  547. package/daemon/dist/domain/skill-audit.d.ts.map +1 -1
  548. package/daemon/dist/domain/skill-audit.js +97 -5
  549. package/daemon/dist/domain/skill-audit.js.map +1 -1
  550. package/daemon/dist/domain/skill-catalog.d.ts +19 -0
  551. package/daemon/dist/domain/skill-catalog.d.ts.map +1 -1
  552. package/daemon/dist/domain/skill-catalog.js +175 -17
  553. package/daemon/dist/domain/skill-catalog.js.map +1 -1
  554. package/daemon/dist/domain/skill-discovery.d.ts +1 -1
  555. package/daemon/dist/domain/skill-discovery.d.ts.map +1 -1
  556. package/daemon/dist/domain/skill-discovery.js +6 -0
  557. package/daemon/dist/domain/skill-discovery.js.map +1 -1
  558. package/daemon/dist/domain/skill-mirror-drift.d.ts +6 -1
  559. package/daemon/dist/domain/skill-mirror-drift.d.ts.map +1 -1
  560. package/daemon/dist/domain/skill-mirror-drift.js +23 -12
  561. package/daemon/dist/domain/skill-mirror-drift.js.map +1 -1
  562. package/daemon/dist/domain/slow-op-recorder.d.ts +5 -0
  563. package/daemon/dist/domain/slow-op-recorder.d.ts.map +1 -1
  564. package/daemon/dist/domain/slow-op-recorder.js +34 -1
  565. package/daemon/dist/domain/slow-op-recorder.js.map +1 -1
  566. package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
  567. package/daemon/dist/domain/snapshot-repository.js +12 -32
  568. package/daemon/dist/domain/snapshot-repository.js.map +1 -1
  569. package/daemon/dist/domain/startup-orchestrator.d.ts +30 -5
  570. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  571. package/daemon/dist/domain/startup-orchestrator.js +143 -43
  572. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  573. package/daemon/dist/domain/startup-proof.d.ts +7 -0
  574. package/daemon/dist/domain/startup-proof.d.ts.map +1 -1
  575. package/daemon/dist/domain/startup-proof.js +7 -0
  576. package/daemon/dist/domain/startup-proof.js.map +1 -1
  577. package/daemon/dist/domain/startup-submission-evidence.d.ts +5 -1
  578. package/daemon/dist/domain/startup-submission-evidence.d.ts.map +1 -1
  579. package/daemon/dist/domain/startup-submission-evidence.js +19 -2
  580. package/daemon/dist/domain/startup-submission-evidence.js.map +1 -1
  581. package/daemon/dist/domain/successor-session-launcher.d.ts +9 -3
  582. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  583. package/daemon/dist/domain/successor-session-launcher.js +12 -4
  584. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  585. package/daemon/dist/domain/system-world.d.ts +3 -0
  586. package/daemon/dist/domain/system-world.d.ts.map +1 -1
  587. package/daemon/dist/domain/system-world.js +24 -21
  588. package/daemon/dist/domain/system-world.js.map +1 -1
  589. package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts.map +1 -1
  590. package/daemon/dist/domain/terminal/cmux-provider-adapter.js +2 -3
  591. package/daemon/dist/domain/terminal/cmux-provider-adapter.js.map +1 -1
  592. package/daemon/dist/domain/terminal/herdr-adapter.d.ts +23 -5
  593. package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
  594. package/daemon/dist/domain/terminal/herdr-adapter.js +116 -15
  595. package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
  596. package/daemon/dist/domain/terminal/terminal-provider.d.ts +11 -0
  597. package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
  598. package/daemon/dist/domain/terminal/terminal-service.d.ts +14 -0
  599. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  600. package/daemon/dist/domain/terminal/terminal-service.js +91 -10
  601. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  602. package/daemon/dist/domain/terminal/view-composer.d.ts +6 -0
  603. package/daemon/dist/domain/terminal/view-composer.d.ts.map +1 -1
  604. package/daemon/dist/domain/terminal/view-composer.js +4 -2
  605. package/daemon/dist/domain/terminal/view-composer.js.map +1 -1
  606. package/daemon/dist/domain/topology/remote-up-leaf.d.ts +1 -0
  607. package/daemon/dist/domain/topology/remote-up-leaf.d.ts.map +1 -1
  608. package/daemon/dist/domain/topology/remote-up-leaf.js.map +1 -1
  609. package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  610. package/daemon/dist/domain/transcript-store.js +24 -11
  611. package/daemon/dist/domain/transcript-store.js.map +1 -1
  612. package/daemon/dist/domain/types.d.ts +8 -0
  613. package/daemon/dist/domain/types.d.ts.map +1 -1
  614. package/daemon/dist/domain/types.js.map +1 -1
  615. package/daemon/dist/domain/usage-samples-store.js +2 -2
  616. package/daemon/dist/domain/usage-samples-store.js.map +1 -1
  617. package/daemon/dist/domain/usage-series.d.ts.map +1 -1
  618. package/daemon/dist/domain/usage-series.js +42 -10
  619. package/daemon/dist/domain/usage-series.js.map +1 -1
  620. package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
  621. package/daemon/dist/domain/user-settings/settings-browser.js +2 -0
  622. package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
  623. package/daemon/dist/domain/user-settings/settings-store.d.ts +1 -1
  624. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  625. package/daemon/dist/domain/user-settings/settings-store.js +14 -1
  626. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  627. package/daemon/dist/domain/watchdog-due.d.ts +17 -0
  628. package/daemon/dist/domain/watchdog-due.d.ts.map +1 -0
  629. package/daemon/dist/domain/watchdog-due.js +45 -0
  630. package/daemon/dist/domain/watchdog-due.js.map +1 -0
  631. package/daemon/dist/domain/watchdog-scheduler.d.ts.map +1 -1
  632. package/daemon/dist/domain/watchdog-scheduler.js +3 -7
  633. package/daemon/dist/domain/watchdog-scheduler.js.map +1 -1
  634. package/daemon/dist/domain/workflow-projector.d.ts.map +1 -1
  635. package/daemon/dist/domain/workflow-projector.js +15 -5
  636. package/daemon/dist/domain/workflow-projector.js.map +1 -1
  637. package/daemon/dist/domain/workflow-runtime.d.ts +1 -1
  638. package/daemon/dist/domain/workflow-runtime.js +1 -1
  639. package/daemon/dist/domain/workflow-runtime.js.map +1 -1
  640. package/daemon/dist/domain/workflow-step-trail-log.d.ts +6 -0
  641. package/daemon/dist/domain/workflow-step-trail-log.d.ts.map +1 -1
  642. package/daemon/dist/domain/workflow-step-trail-log.js +11 -0
  643. package/daemon/dist/domain/workflow-step-trail-log.js.map +1 -1
  644. package/daemon/dist/domain/workspace/project-catalog.d.ts +20 -0
  645. package/daemon/dist/domain/workspace/project-catalog.d.ts.map +1 -1
  646. package/daemon/dist/domain/workspace/project-catalog.js +92 -0
  647. package/daemon/dist/domain/workspace/project-catalog.js.map +1 -1
  648. package/daemon/dist/domain/workspace/project-registration.d.ts +49 -0
  649. package/daemon/dist/domain/workspace/project-registration.d.ts.map +1 -0
  650. package/daemon/dist/domain/workspace/project-registration.js +251 -0
  651. package/daemon/dist/domain/workspace/project-registration.js.map +1 -0
  652. package/daemon/dist/gateway-slack-surface.d.ts +1 -0
  653. package/daemon/dist/gateway-slack-surface.d.ts.map +1 -1
  654. package/daemon/dist/gateway-slack-surface.js +2 -1
  655. package/daemon/dist/gateway-slack-surface.js.map +1 -1
  656. package/daemon/dist/index.d.ts +1 -0
  657. package/daemon/dist/index.d.ts.map +1 -1
  658. package/daemon/dist/index.js +9 -8
  659. package/daemon/dist/index.js.map +1 -1
  660. package/daemon/dist/project-catalog-surface.d.ts +2 -1
  661. package/daemon/dist/project-catalog-surface.d.ts.map +1 -1
  662. package/daemon/dist/project-catalog-surface.js +1 -1
  663. package/daemon/dist/project-catalog-surface.js.map +1 -1
  664. package/daemon/dist/routes/agent-images.js +5 -5
  665. package/daemon/dist/routes/agent-images.js.map +1 -1
  666. package/daemon/dist/routes/bootstrap-failure-response.d.ts +13 -0
  667. package/daemon/dist/routes/bootstrap-failure-response.d.ts.map +1 -0
  668. package/daemon/dist/routes/bootstrap-failure-response.js +52 -0
  669. package/daemon/dist/routes/bootstrap-failure-response.js.map +1 -0
  670. package/daemon/dist/routes/bundles.d.ts.map +1 -1
  671. package/daemon/dist/routes/bundles.js +197 -449
  672. package/daemon/dist/routes/bundles.js.map +1 -1
  673. package/daemon/dist/routes/chat.d.ts.map +1 -1
  674. package/daemon/dist/routes/chat.js +16 -1
  675. package/daemon/dist/routes/chat.js.map +1 -1
  676. package/daemon/dist/routes/compaction.d.ts.map +1 -1
  677. package/daemon/dist/routes/compaction.js +14 -2
  678. package/daemon/dist/routes/compaction.js.map +1 -1
  679. package/daemon/dist/routes/env.d.ts.map +1 -1
  680. package/daemon/dist/routes/env.js +14 -4
  681. package/daemon/dist/routes/env.js.map +1 -1
  682. package/daemon/dist/routes/gateway.d.ts.map +1 -1
  683. package/daemon/dist/routes/gateway.js +5 -0
  684. package/daemon/dist/routes/gateway.js.map +1 -1
  685. package/daemon/dist/routes/projects.d.ts.map +1 -1
  686. package/daemon/dist/routes/projects.js +4 -2
  687. package/daemon/dist/routes/projects.js.map +1 -1
  688. package/daemon/dist/routes/restore-check.d.ts.map +1 -1
  689. package/daemon/dist/routes/restore-check.js +2 -0
  690. package/daemon/dist/routes/restore-check.js.map +1 -1
  691. package/daemon/dist/routes/rigs.d.ts.map +1 -1
  692. package/daemon/dist/routes/rigs.js +5 -4
  693. package/daemon/dist/routes/rigs.js.map +1 -1
  694. package/daemon/dist/routes/rigspec.js +4 -2
  695. package/daemon/dist/routes/rigspec.js.map +1 -1
  696. package/daemon/dist/routes/seat.js +23 -16
  697. package/daemon/dist/routes/seat.js.map +1 -1
  698. package/daemon/dist/routes/sessions.d.ts.map +1 -1
  699. package/daemon/dist/routes/sessions.js +12 -11
  700. package/daemon/dist/routes/sessions.js.map +1 -1
  701. package/daemon/dist/routes/skills.d.ts.map +1 -1
  702. package/daemon/dist/routes/skills.js +15 -7
  703. package/daemon/dist/routes/skills.js.map +1 -1
  704. package/daemon/dist/routes/telemetry.d.ts +2 -0
  705. package/daemon/dist/routes/telemetry.d.ts.map +1 -1
  706. package/daemon/dist/routes/telemetry.js +16 -0
  707. package/daemon/dist/routes/telemetry.js.map +1 -1
  708. package/daemon/dist/routes/terminal-ws.js +15 -2
  709. package/daemon/dist/routes/terminal-ws.js.map +1 -1
  710. package/daemon/dist/routes/terminal.d.ts.map +1 -1
  711. package/daemon/dist/routes/terminal.js +6 -4
  712. package/daemon/dist/routes/terminal.js.map +1 -1
  713. package/daemon/dist/routes/up.d.ts.map +1 -1
  714. package/daemon/dist/routes/up.js +12 -59
  715. package/daemon/dist/routes/up.js.map +1 -1
  716. package/daemon/dist/server.d.ts +1 -0
  717. package/daemon/dist/server.d.ts.map +1 -1
  718. package/daemon/dist/server.js +4 -1
  719. package/daemon/dist/server.js.map +1 -1
  720. package/daemon/dist/spec-validation-surface.d.ts +2 -0
  721. package/daemon/dist/spec-validation-surface.d.ts.map +1 -1
  722. package/daemon/dist/spec-validation-surface.js +2 -0
  723. package/daemon/dist/spec-validation-surface.js.map +1 -1
  724. package/daemon/dist/startup.d.ts.map +1 -1
  725. package/daemon/dist/startup.js +65 -18
  726. package/daemon/dist/startup.js.map +1 -1
  727. package/daemon/dist/system-world-surface.d.ts +1 -1
  728. package/daemon/dist/system-world-surface.d.ts.map +1 -1
  729. package/daemon/dist/system-world-surface.js +1 -1
  730. package/daemon/dist/system-world-surface.js.map +1 -1
  731. package/daemon/dist/terminal/TerminalSessionBroker.d.ts.map +1 -1
  732. package/daemon/dist/terminal/TerminalSessionBroker.js +9 -1
  733. package/daemon/dist/terminal/TerminalSessionBroker.js.map +1 -1
  734. package/daemon/docs/reference/agent-spec.md +114 -68
  735. package/daemon/docs/reference/agent-startup-guide.md +111 -33
  736. package/daemon/docs/reference/agent-state-taxonomy.md +44 -13
  737. package/daemon/docs/reference/browser-access.md +8 -7
  738. package/daemon/docs/reference/bundle-formats.md +209 -0
  739. package/daemon/docs/reference/chain-file-convention.md +18 -9
  740. package/daemon/docs/reference/developing.md +8 -1
  741. package/daemon/docs/reference/edge-types.md +18 -10
  742. package/daemon/docs/reference/getting-started.md +593 -139
  743. package/daemon/docs/reference/health-diagnosis.md +14 -6
  744. package/daemon/docs/reference/help.md +66 -12
  745. package/daemon/docs/reference/host-resources.md +3 -2
  746. package/daemon/docs/reference/inventory-request-diagnostics.md +75 -0
  747. package/daemon/docs/reference/knowledge-maturity.md +3 -1
  748. package/daemon/docs/reference/legacy-topology-migration.md +4 -2
  749. package/daemon/docs/reference/lore-routing.md +3 -1
  750. package/daemon/docs/reference/mission-install.md +3 -1
  751. package/daemon/docs/reference/non-interruptive-mode.md +63 -0
  752. package/daemon/docs/reference/planning-dial.md +2 -1
  753. package/daemon/docs/reference/product-journey-sdlc.md +11 -6
  754. package/daemon/docs/reference/product-management-pass.md +3 -1
  755. package/daemon/docs/reference/project-workspace.md +81 -4
  756. package/daemon/docs/reference/publishing-a-rig-bundle.md +147 -0
  757. package/daemon/docs/reference/refocus-channel.md +28 -7
  758. package/daemon/docs/reference/release-boundary.md +7 -3
  759. package/daemon/docs/reference/rig-bundle.md +292 -43
  760. package/daemon/docs/reference/rig-spec.md +175 -26
  761. package/daemon/docs/reference/rosters.md +61 -0
  762. package/daemon/docs/reference/schemas/bundle-behaviour.v1.schema.json +546 -0
  763. package/daemon/docs/reference/schemas/bundle-common.v1.schema.json +110 -0
  764. package/daemon/docs/reference/schemas/bundle-configurations.v1.schema.json +67 -0
  765. package/daemon/docs/reference/schemas/bundle-status.v1.schema.json +323 -0
  766. package/daemon/docs/reference/schemas/fixtures/identity-vectors.json +80 -0
  767. package/daemon/docs/reference/schemas/fixtures/invalid/behaviour/not-generated-with-sections.json +60 -0
  768. package/daemon/docs/reference/schemas/fixtures/invalid/configurations/spaced-member.configurations.yaml +6 -0
  769. package/daemon/docs/reference/schemas/fixtures/invalid/registry/listed-with-withdrawn-on.yaml +21 -0
  770. package/daemon/docs/reference/schemas/fixtures/invalid/registry/missing-source.yaml +16 -0
  771. package/daemon/docs/reference/schemas/fixtures/invalid/registry/parent-folder.yaml +20 -0
  772. package/daemon/docs/reference/schemas/fixtures/invalid/registry/short-commit.yaml +20 -0
  773. package/daemon/docs/reference/schemas/fixtures/invalid/registry/withdrawn-without-date.yaml +20 -0
  774. package/daemon/docs/reference/schemas/fixtures/invalid/run-record/harness-check-with-configuration.json +75 -0
  775. package/daemon/docs/reference/schemas/fixtures/invalid/run-record/unlabelable-platform.json +97 -0
  776. package/daemon/docs/reference/schemas/fixtures/invalid/status/hand-edited-notice.json +61 -0
  777. package/daemon/docs/reference/schemas/fixtures/invalid/status/tested-with-assistance.json +62 -0
  778. package/daemon/docs/reference/schemas/fixtures/invalid/status/tested-without-records.json +59 -0
  779. package/daemon/docs/reference/schemas/fixtures/invalid/status/unavailable-harness-with-result.json +61 -0
  780. package/daemon/docs/reference/schemas/fixtures/invalid/status/unavailable-listing-with-label.json +61 -0
  781. package/daemon/docs/reference/schemas/fixtures/valid/behaviour/custom-not-generated.json +22 -0
  782. package/daemon/docs/reference/schemas/fixtures/valid/behaviour/legacy-archive-unknown-identity.json +53 -0
  783. package/daemon/docs/reference/schemas/fixtures/valid/behaviour/mixed-runtimes-default.json +101 -0
  784. package/daemon/docs/reference/schemas/fixtures/valid/behaviour/mixed-runtimes-yolo.json +102 -0
  785. package/daemon/docs/reference/schemas/fixtures/valid/behaviour/openrig-dev.recommended.json +258 -0
  786. package/daemon/docs/reference/schemas/fixtures/valid/configurations/openrig-dev.configurations.yaml +12 -0
  787. package/daemon/docs/reference/schemas/fixtures/valid/registry/openrig-dev.yaml +20 -0
  788. package/daemon/docs/reference/schemas/fixtures/valid/registry/withdrawn.yaml +21 -0
  789. package/daemon/docs/reference/schemas/fixtures/valid/run-record/pi-harness-check-blocked.json +74 -0
  790. package/daemon/docs/reference/schemas/fixtures/valid/run-record/team-assisted-pass.json +97 -0
  791. package/daemon/docs/reference/schemas/fixtures/valid/run-record/team-pass.json +97 -0
  792. package/daemon/docs/reference/schemas/fixtures/valid/run-record/withdraws-earlier.json +99 -0
  793. package/daemon/docs/reference/schemas/fixtures/valid/status/status.json +61 -0
  794. package/daemon/docs/reference/schemas/registry-entry.v1.schema.json +139 -0
  795. package/daemon/docs/reference/schemas/run-record.v1.schema.json +315 -0
  796. package/daemon/docs/reference/scoped-operating-posture.md +17 -9
  797. package/daemon/docs/reference/sdlc-conventions.md +46 -28
  798. package/daemon/docs/reference/slack-app-setup.md +112 -11
  799. package/daemon/docs/reference/stream-classifier-worker.md +21 -8
  800. package/daemon/docs/reference/telemetry.md +114 -0
  801. package/daemon/docs/reference/whats-new.md +134 -0
  802. package/daemon/docs/reference/worktree-builds.md +12 -6
  803. package/daemon/policies/builtin/auto.policy.md +24 -0
  804. package/daemon/specs/agents/development/implementer/agent.yaml +2 -2
  805. package/daemon/specs/agents/development/qa/agent.yaml +1 -1
  806. package/daemon/specs/agents/product-management/pm/agent.yaml +10 -0
  807. package/daemon/specs/agents/shared/skills/core/agent-starters/SKILL.md +0 -6
  808. package/daemon/specs/agents/shared/skills/core/agent-startup-and-context-ingestion/SKILL.md +1 -8
  809. package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +5 -5
  810. package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +4 -5
  811. package/daemon/specs/agents/shared/skills/core/openrig-software-factory/SKILL.md +31 -21
  812. package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +31 -31
  813. package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +2 -0
  814. package/daemon/specs/agents/shared/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +0 -1
  815. package/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md +0 -5
  816. package/daemon/specs/agents/shared/skills/process/agent-browser/OPENRIG.md +1 -1
  817. package/daemon/specs/agents/shared/skills/process/systematic-debugging/SKILL.md +0 -2
  818. package/daemon/specs/rigs/focused/{adversarial-review → code-review}/rig.yaml +1 -1
  819. package/daemon/specs/rigs/focused/pm/CULTURE.md +21 -0
  820. package/daemon/specs/rigs/focused/{pm-team → pm}/rig.yaml +5 -5
  821. package/daemon/specs/rigs/focused/{research-team → research}/rig.yaml +1 -1
  822. package/daemon/specs/rigs/launch/factory/CULTURE.md +96 -0
  823. package/daemon/specs/rigs/launch/factory/guidance/advisor-role.md +10 -0
  824. package/daemon/specs/rigs/launch/factory/guidance/lead-first-move.md +83 -0
  825. package/daemon/specs/rigs/launch/{demo → factory}/rig.yaml +46 -35
  826. package/daemon/specs/rigs/{preview/product-team → launch/factory}/topology/instance/CRAFT.md +1 -1
  827. package/daemon/specs/rigs/{preview/product-team → launch/factory}/topology/rig/CRAFT.md +2 -2
  828. package/daemon/specs/rigs/{preview/product-team → launch/factory}/topology/rig/ORCHESTRATION-CRAFT.md +2 -2
  829. package/daemon/specs/rigs/{preview/product-team/topology/seats/dev1-qa → launch/factory/topology/seats/dev-qa}/CRAFT.md +1 -1
  830. package/daemon/specs/rigs/{preview/product-team/topology/seats/orch1-lead → launch/factory/topology/seats/orch-lead}/CRAFT.md +1 -1
  831. package/daemon/specs/rigs/{preview/product-team/topology/seats/rev1-r1 → launch/factory/topology/seats/review-r1}/CRAFT.md +1 -1
  832. package/daemon/specs/rigs/{preview/product-team/topology/seats/rev1-r2 → launch/factory/topology/seats/review-r2}/CRAFT.md +1 -1
  833. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +37 -0
  834. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/startup/context.md +12 -13
  835. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +258 -9
  836. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +30 -7
  837. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +37 -0
  838. package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +46 -2
  839. package/daemon/specs/rigs/launch/starter/CULTURE.md +39 -0
  840. package/daemon/specs/rigs/launch/starter/guidance/lead-first-move.md +67 -0
  841. package/daemon/specs/rigs/launch/{first-project-mixed → starter}/rig.yaml +11 -8
  842. package/dist/build-info.js +3 -3
  843. package/dist/bundle-behaviour.d.ts +10 -0
  844. package/dist/bundle-behaviour.d.ts.map +1 -0
  845. package/dist/bundle-behaviour.js +72 -0
  846. package/dist/bundle-behaviour.js.map +1 -0
  847. package/dist/cli-error.d.ts.map +1 -1
  848. package/dist/cli-error.js +11 -3
  849. package/dist/cli-error.js.map +1 -1
  850. package/dist/client.d.ts +2 -0
  851. package/dist/client.d.ts.map +1 -1
  852. package/dist/client.js +2 -0
  853. package/dist/client.js.map +1 -1
  854. package/dist/commands/agent-image.js +2 -2
  855. package/dist/commands/agent-image.js.map +1 -1
  856. package/dist/commands/bootstrap.d.ts.map +1 -1
  857. package/dist/commands/bootstrap.js +30 -5
  858. package/dist/commands/bootstrap.js.map +1 -1
  859. package/dist/commands/bundle.d.ts +12 -0
  860. package/dist/commands/bundle.d.ts.map +1 -1
  861. package/dist/commands/bundle.js +288 -22
  862. package/dist/commands/bundle.js.map +1 -1
  863. package/dist/commands/capture.js +4 -4
  864. package/dist/commands/capture.js.map +1 -1
  865. package/dist/commands/chatroom.d.ts.map +1 -1
  866. package/dist/commands/chatroom.js +21 -1
  867. package/dist/commands/chatroom.js.map +1 -1
  868. package/dist/commands/compact-plan.js +2 -2
  869. package/dist/commands/compact-plan.js.map +1 -1
  870. package/dist/commands/config.d.ts.map +1 -1
  871. package/dist/commands/config.js +3 -0
  872. package/dist/commands/config.js.map +1 -1
  873. package/dist/commands/context.d.ts +3 -1
  874. package/dist/commands/context.d.ts.map +1 -1
  875. package/dist/commands/context.js +70 -20
  876. package/dist/commands/context.js.map +1 -1
  877. package/dist/commands/daemon.js +1 -1
  878. package/dist/commands/daemon.js.map +1 -1
  879. package/dist/commands/doctor.d.ts +3 -1
  880. package/dist/commands/doctor.d.ts.map +1 -1
  881. package/dist/commands/doctor.js +17 -5
  882. package/dist/commands/doctor.js.map +1 -1
  883. package/dist/commands/down.d.ts.map +1 -1
  884. package/dist/commands/down.js +49 -1
  885. package/dist/commands/down.js.map +1 -1
  886. package/dist/commands/env.js +1 -1
  887. package/dist/commands/env.js.map +1 -1
  888. package/dist/commands/gateway.d.ts.map +1 -1
  889. package/dist/commands/gateway.js +4 -3
  890. package/dist/commands/gateway.js.map +1 -1
  891. package/dist/commands/health.d.ts.map +1 -1
  892. package/dist/commands/health.js +4 -1
  893. package/dist/commands/health.js.map +1 -1
  894. package/dist/commands/host.d.ts +11 -0
  895. package/dist/commands/host.d.ts.map +1 -1
  896. package/dist/commands/host.js +25 -1
  897. package/dist/commands/host.js.map +1 -1
  898. package/dist/commands/import.d.ts.map +1 -1
  899. package/dist/commands/import.js +2 -0
  900. package/dist/commands/import.js.map +1 -1
  901. package/dist/commands/mcp.d.ts.map +1 -1
  902. package/dist/commands/mcp.js +25 -12
  903. package/dist/commands/mcp.js.map +1 -1
  904. package/dist/commands/package.d.ts.map +1 -1
  905. package/dist/commands/package.js +6 -3
  906. package/dist/commands/package.js.map +1 -1
  907. package/dist/commands/policy.d.ts.map +1 -1
  908. package/dist/commands/policy.js +9 -7
  909. package/dist/commands/policy.js.map +1 -1
  910. package/dist/commands/project-jev.js +1 -1
  911. package/dist/commands/project-jev.js.map +1 -1
  912. package/dist/commands/project.d.ts.map +1 -1
  913. package/dist/commands/project.js +5 -3
  914. package/dist/commands/project.js.map +1 -1
  915. package/dist/commands/ps.d.ts +1 -0
  916. package/dist/commands/ps.d.ts.map +1 -1
  917. package/dist/commands/ps.js +12 -2
  918. package/dist/commands/ps.js.map +1 -1
  919. package/dist/commands/queue.d.ts.map +1 -1
  920. package/dist/commands/queue.js +10 -5
  921. package/dist/commands/queue.js.map +1 -1
  922. package/dist/commands/restore-packet.d.ts.map +1 -1
  923. package/dist/commands/restore-packet.js +6 -4
  924. package/dist/commands/restore-packet.js.map +1 -1
  925. package/dist/commands/restore.d.ts.map +1 -1
  926. package/dist/commands/restore.js +5 -0
  927. package/dist/commands/restore.js.map +1 -1
  928. package/dist/commands/roster.d.ts +63 -0
  929. package/dist/commands/roster.d.ts.map +1 -0
  930. package/dist/commands/roster.js +169 -0
  931. package/dist/commands/roster.js.map +1 -0
  932. package/dist/commands/scope.js +5 -5
  933. package/dist/commands/scope.js.map +1 -1
  934. package/dist/commands/seat.d.ts.map +1 -1
  935. package/dist/commands/seat.js +57 -8
  936. package/dist/commands/seat.js.map +1 -1
  937. package/dist/commands/send.d.ts.map +1 -1
  938. package/dist/commands/send.js +20 -6
  939. package/dist/commands/send.js.map +1 -1
  940. package/dist/commands/setup.d.ts +7 -16
  941. package/dist/commands/setup.d.ts.map +1 -1
  942. package/dist/commands/setup.js +174 -338
  943. package/dist/commands/setup.js.map +1 -1
  944. package/dist/commands/skill.d.ts.map +1 -1
  945. package/dist/commands/skill.js +6 -1
  946. package/dist/commands/skill.js.map +1 -1
  947. package/dist/commands/slack.d.ts +6 -2
  948. package/dist/commands/slack.d.ts.map +1 -1
  949. package/dist/commands/slack.js +192 -10
  950. package/dist/commands/slack.js.map +1 -1
  951. package/dist/commands/specs.d.ts.map +1 -1
  952. package/dist/commands/specs.js +19 -2
  953. package/dist/commands/specs.js.map +1 -1
  954. package/dist/commands/start.js +1 -1
  955. package/dist/commands/start.js.map +1 -1
  956. package/dist/commands/stream.js +1 -1
  957. package/dist/commands/stream.js.map +1 -1
  958. package/dist/commands/telemetry.d.ts +5 -0
  959. package/dist/commands/telemetry.d.ts.map +1 -0
  960. package/dist/commands/telemetry.js +58 -0
  961. package/dist/commands/telemetry.js.map +1 -0
  962. package/dist/commands/terminal.d.ts +33 -0
  963. package/dist/commands/terminal.d.ts.map +1 -1
  964. package/dist/commands/terminal.js +30 -12
  965. package/dist/commands/terminal.js.map +1 -1
  966. package/dist/commands/tui.js +4 -4
  967. package/dist/commands/tui.js.map +1 -1
  968. package/dist/commands/up.d.ts.map +1 -1
  969. package/dist/commands/up.js +115 -68
  970. package/dist/commands/up.js.map +1 -1
  971. package/dist/commands/whoami.d.ts +3 -0
  972. package/dist/commands/whoami.d.ts.map +1 -1
  973. package/dist/commands/whoami.js +29 -2
  974. package/dist/commands/whoami.js.map +1 -1
  975. package/dist/commands/workflow-follow.d.ts +1 -1
  976. package/dist/commands/workflow-follow.d.ts.map +1 -1
  977. package/dist/commands/workflow-follow.js +4 -3
  978. package/dist/commands/workflow-follow.js.map +1 -1
  979. package/dist/commands/workflow.d.ts.map +1 -1
  980. package/dist/commands/workflow.js +30 -18
  981. package/dist/commands/workflow.js.map +1 -1
  982. package/dist/config-store.d.ts +5 -1
  983. package/dist/config-store.d.ts.map +1 -1
  984. package/dist/config-store.js +17 -2
  985. package/dist/config-store.js.map +1 -1
  986. package/dist/daemon-auto-start.d.ts +8 -0
  987. package/dist/daemon-auto-start.d.ts.map +1 -0
  988. package/dist/daemon-auto-start.js +39 -0
  989. package/dist/daemon-auto-start.js.map +1 -0
  990. package/dist/front-door.d.ts.map +1 -1
  991. package/dist/front-door.js +5 -2
  992. package/dist/front-door.js.map +1 -1
  993. package/dist/herdr-launch-config.d.ts +3 -0
  994. package/dist/herdr-launch-config.d.ts.map +1 -0
  995. package/dist/herdr-launch-config.js +37 -0
  996. package/dist/herdr-launch-config.js.map +1 -0
  997. package/dist/index.d.ts +1 -0
  998. package/dist/index.d.ts.map +1 -1
  999. package/dist/index.js +6 -1
  1000. package/dist/index.js.map +1 -1
  1001. package/dist/lib/bundle-check.d.ts +13 -0
  1002. package/dist/lib/bundle-check.d.ts.map +1 -0
  1003. package/dist/lib/bundle-check.js +191 -0
  1004. package/dist/lib/bundle-check.js.map +1 -0
  1005. package/dist/lib/bundle-configuration.d.ts +60 -0
  1006. package/dist/lib/bundle-configuration.d.ts.map +1 -0
  1007. package/dist/lib/bundle-configuration.js +198 -0
  1008. package/dist/lib/bundle-configuration.js.map +1 -0
  1009. package/dist/lib/bundle-source.d.ts +59 -0
  1010. package/dist/lib/bundle-source.d.ts.map +1 -0
  1011. package/dist/lib/bundle-source.js +366 -0
  1012. package/dist/lib/bundle-source.js.map +1 -0
  1013. package/dist/lib/context-git.d.ts +2 -0
  1014. package/dist/lib/context-git.d.ts.map +1 -1
  1015. package/dist/lib/context-git.js +55 -5
  1016. package/dist/lib/context-git.js.map +1 -1
  1017. package/dist/lib/context-install.d.ts.map +1 -1
  1018. package/dist/lib/context-install.js +2 -3
  1019. package/dist/lib/context-install.js.map +1 -1
  1020. package/dist/lib/permission-policy/policy-ref.d.ts +6 -1
  1021. package/dist/lib/permission-policy/policy-ref.d.ts.map +1 -1
  1022. package/dist/lib/permission-policy/policy-ref.js +16 -4
  1023. package/dist/lib/permission-policy/policy-ref.js.map +1 -1
  1024. package/dist/lib/permission-policy/policy-spec.d.ts +1 -1
  1025. package/dist/lib/permission-policy/policy-spec.d.ts.map +1 -1
  1026. package/dist/lib/permission-policy/policy-spec.js +2 -2
  1027. package/dist/lib/permission-policy/policy-spec.js.map +1 -1
  1028. package/dist/lib/scope/scope-fs.d.ts +3 -2
  1029. package/dist/lib/scope/scope-fs.d.ts.map +1 -1
  1030. package/dist/lib/scope/scope-fs.js +97 -9
  1031. package/dist/lib/scope/scope-fs.js.map +1 -1
  1032. package/dist/lib/scope/templates.d.ts.map +1 -1
  1033. package/dist/lib/scope/templates.js +28 -23
  1034. package/dist/lib/scope/templates.js.map +1 -1
  1035. package/dist/lib/scope-templates/notes.md +1 -1
  1036. package/dist/lib/work-install.d.ts +12 -0
  1037. package/dist/lib/work-install.d.ts.map +1 -1
  1038. package/dist/lib/work-install.js +55 -4
  1039. package/dist/lib/work-install.js.map +1 -1
  1040. package/dist/provider-auth.d.ts +32 -0
  1041. package/dist/provider-auth.d.ts.map +1 -0
  1042. package/dist/provider-auth.js +128 -0
  1043. package/dist/provider-auth.js.map +1 -0
  1044. package/dist/terminal-window.d.ts +19 -0
  1045. package/dist/terminal-window.d.ts.map +1 -0
  1046. package/dist/terminal-window.js +513 -0
  1047. package/dist/terminal-window.js.map +1 -0
  1048. package/package.json +1 -1
  1049. package/tui/dist/commands/registry.d.ts.map +1 -1
  1050. package/tui/dist/commands/registry.js +9 -4
  1051. package/tui/dist/commands/registry.js.map +1 -1
  1052. package/tui/dist/config/config-model.d.ts.map +1 -1
  1053. package/tui/dist/config/config-model.js +1 -0
  1054. package/tui/dist/config/config-model.js.map +1 -1
  1055. package/tui/dist/connections/connections-model.d.ts +5 -0
  1056. package/tui/dist/connections/connections-model.d.ts.map +1 -1
  1057. package/tui/dist/connections/connections-model.js +1 -1
  1058. package/tui/dist/connections/connections-model.js.map +1 -1
  1059. package/tui/dist/daemon-client.d.ts +6 -0
  1060. package/tui/dist/daemon-client.d.ts.map +1 -1
  1061. package/tui/dist/daemon-client.js +5 -2
  1062. package/tui/dist/daemon-client.js.map +1 -1
  1063. package/tui/dist/execution/workflow-model.d.ts.map +1 -1
  1064. package/tui/dist/execution/workflow-model.js +3 -1
  1065. package/tui/dist/execution/workflow-model.js.map +1 -1
  1066. package/tui/dist/hydrate.d.ts +1 -1
  1067. package/tui/dist/hydrate.d.ts.map +1 -1
  1068. package/tui/dist/hydrate.js +3 -1
  1069. package/tui/dist/hydrate.js.map +1 -1
  1070. package/tui/dist/main.js +53 -14
  1071. package/tui/dist/main.js.map +1 -1
  1072. package/tui/dist/page-read.js +1 -1
  1073. package/tui/dist/page-read.js.map +1 -1
  1074. package/tui/dist/pending-address.d.ts +7 -0
  1075. package/tui/dist/pending-address.d.ts.map +1 -0
  1076. package/tui/dist/pending-address.js +11 -0
  1077. package/tui/dist/pending-address.js.map +1 -0
  1078. package/tui/dist/render.d.ts.map +1 -1
  1079. package/tui/dist/render.js +74 -23
  1080. package/tui/dist/render.js.map +1 -1
  1081. package/tui/dist/socket-server.d.ts +3 -1
  1082. package/tui/dist/socket-server.d.ts.map +1 -1
  1083. package/tui/dist/socket-server.js +6 -0
  1084. package/tui/dist/socket-server.js.map +1 -1
  1085. package/tui/dist/specs/graph.d.ts +5 -0
  1086. package/tui/dist/specs/graph.d.ts.map +1 -0
  1087. package/tui/dist/specs/graph.js +16 -0
  1088. package/tui/dist/specs/graph.js.map +1 -0
  1089. package/tui/dist/specs/launch.d.ts +29 -0
  1090. package/tui/dist/specs/launch.d.ts.map +1 -0
  1091. package/tui/dist/specs/launch.js +64 -0
  1092. package/tui/dist/specs/launch.js.map +1 -0
  1093. package/tui/dist/startup.d.ts.map +1 -1
  1094. package/tui/dist/startup.js +15 -6
  1095. package/tui/dist/startup.js.map +1 -1
  1096. package/tui/dist/state.d.ts +2 -2
  1097. package/tui/dist/state.d.ts.map +1 -1
  1098. package/tui/dist/state.js +77 -27
  1099. package/tui/dist/state.js.map +1 -1
  1100. package/tui/dist/stylize.js +1 -1
  1101. package/tui/dist/stylize.js.map +1 -1
  1102. package/tui/dist/terminals/open-window.d.ts +5 -0
  1103. package/tui/dist/terminals/open-window.d.ts.map +1 -0
  1104. package/tui/dist/terminals/open-window.js +55 -0
  1105. package/tui/dist/terminals/open-window.js.map +1 -0
  1106. package/tui/dist/terminals/terminal-model.d.ts +1 -0
  1107. package/tui/dist/terminals/terminal-model.d.ts.map +1 -1
  1108. package/tui/dist/terminals/terminal-model.js +21 -5
  1109. package/tui/dist/terminals/terminal-model.js.map +1 -1
  1110. package/tui/dist/types.d.ts +32 -0
  1111. package/tui/dist/types.d.ts.map +1 -1
  1112. package/ui/dist/assets/{index-HHSvwF97.js → index-D5n8EwkG.js} +1 -1
  1113. package/ui/dist/index.html +1 -1
  1114. package/daemon/specs/rigs/launch/conveyor/README.md +0 -33
  1115. package/daemon/specs/rigs/launch/conveyor/rig.yaml +0 -72
  1116. package/daemon/specs/rigs/launch/demo/project-example/README.md +0 -25
  1117. package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/SPEC.md +0 -19
  1118. package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROGRESS.md +0 -6
  1119. package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROOF.md +0 -7
  1120. package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/SPEC.md +0 -31
  1121. package/daemon/specs/rigs/launch/first-project/rig.yaml +0 -31
  1122. package/daemon/specs/rigs/launch/first-project-claude/rig.yaml +0 -30
  1123. package/daemon/specs/rigs/launch/implementation-pair/rig.yaml +0 -27
  1124. package/daemon/specs/rigs/preview/product-team/rig.yaml +0 -90
  1125. /package/daemon/specs/rigs/launch/factory-rsi/{rig.yaml → world-bundle.yaml} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"slack-api.js","sourceRoot":"","sources":["../../../../src/domain/gateway/slack/slack-api.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,EAAE;AACF,yEAAyE;AACzE,0EAA0E;AAC1E,yEAAyE;AACzE,8EAA8E;AAC9E,EAAE;AACF,2EAA2E;AAC3E,+EAA+E;AAC/E,4EAA4E;AAC5E,iFAAiF;AACjF,0EAA0E;AAC1E,iEAAiE;AAIjE,MAAM,YAAY,GAAc,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAChE,MAAM,kBAAkB,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AAC"}
@@ -5,7 +5,18 @@ import type { SubsystemDeliverFn } from "../gateway-subsystem.js";
5
5
  import type { OutboundPostPayload } from "./outbound-driver.js";
6
6
  export interface SubsystemSlackDeliveryOpts {
7
7
  botToken: string;
8
+ /** The default channel: every post goes here unless resolveChannel names another. */
8
9
  channel: string;
10
+ /** #192: the channel for this payload (the channel map). Absent = `channel` for every post.
11
+ * Post, reconcile scan and upload all use the one resolved channel. */
12
+ resolveChannel?: (payload: OutboundPostPayload) => string;
13
+ /** #192: decide a post's channel ONCE, at its first attempt, and record it in `attempted`;
14
+ * every retry or replay of that post reuses it, so the channel/thread pair always names one
15
+ * conversation and reconciliation scans where the first attempt went. A recorded channel is
16
+ * honoured whenever present. A post already attempted without a record (its first attempt ran
17
+ * before any map existed) retries in the default `channel`, where it went. With pinChannel off
18
+ * (no map) nothing is recorded and the channel is resolved as before. */
19
+ pinChannel?: boolean;
9
20
  sourceLabel: string;
10
21
  bodyExcerpt?: number;
11
22
  fetchImpl?: FetchImpl;
@@ -20,16 +31,25 @@ export interface SubsystemSlackDeliveryOpts {
20
31
  /** Release the outbound driver's in-flight guard once an episode is durably seen. */
21
32
  release?: (notificationKey: string) => void;
22
33
  /** E (thread routing): resolve the thread anchor for this payload; undefined = new root.
23
- * Wired by the thread-seat map; absent in the pre-routing composition. */
24
- resolveThreadTs?: (payload: OutboundPostPayload) => string | undefined;
25
- /** E: record a NEW root's ts so the conversation threads from here on. */
26
- onPostedRoot?: (payload: OutboundPostPayload, ts: string) => void;
34
+ * Wired by the thread-seat map; absent in the pre-routing composition. `channel` is the
35
+ * channel this attempt posts to, so a thread is only ever chosen within it. */
36
+ resolveThreadTs?: (payload: OutboundPostPayload, channel: string) => string | undefined;
37
+ /** E: record a NEW root's ts (and the channel it was posted in) so the conversation threads
38
+ * from here on. */
39
+ onPostedRoot?: (payload: OutboundPostPayload, ts: string, channel: string) => void;
27
40
  /** Receipt hook for every successful post, root or threaded. */
28
41
  onPosted?: (payload: OutboundPostPayload, messageTs: string, threadTs?: string) => void;
42
+ /** #899 — receipt hook for every message posted (or reconciled) into a thread: a long ask's reply
43
+ * parts, a later notification in an ask's own thread, an ask posted into another thread. The payload
44
+ * names the ask and its seat, and `channel` the channel the message was posted to (#192), so a
45
+ * reaction on that message can reach them. A throw retains the
46
+ * delivery like any receipt failure; the replay reconciles the message by marker and records it again. */
47
+ onPostedPart?: (payload: OutboundPostPayload, messageTs: string, threadTs: string, channel: string) => void;
29
48
  /** OPR.0.5.6.14 — the transport-failure receipt hook: a failed post writes
30
49
  * the row's transport-failed ledger transition (class + API error), so a
31
- * delivery failure is as legible on the row as a success. */
32
- onTransportFailed?: (payload: OutboundPostPayload, failureClass: string, detail: string) => void;
50
+ * delivery failure is as legible on the row as a success. `partlyPosted` marks an ask whose
51
+ * remaining parts can't be posted although part of it may already be in Slack (#897). */
52
+ onTransportFailed?: (payload: OutboundPostPayload, failureClass: string, detail: string, partlyPosted?: boolean) => void;
33
53
  /** F (interim loudness rule): return the Slack USER ID to mention for an ESCALATION payload,
34
54
  * undefined for everything else (quiet-threaded). The composition wires the registry lookup
35
55
  * + the escalation predicate; delivery just renders what it is told. */
@@ -71,7 +91,10 @@ export declare function evidenceAttachment(media: unknown, evidenceRef: unknown,
71
91
  mediaRefs: SlackMediaRef[] | undefined;
72
92
  evidenceLink: string | undefined;
73
93
  };
74
- /** One authored primary and, optionally, one coherent supplemental reply. The
94
+ /** #897 — the most Slack messages one ask may post: the primary plus its thread replies. */
95
+ export declare const MAX_HUMAN_MESSAGE_PARTS = 20;
96
+ /** One authored primary and, optionally, one coherent supplemental reply; a brief or
97
+ * detail too long for that is posted as more numbered thread replies (#897). The
75
98
  * existing attempted/delivered stores and marker reconciler own each stable part.
76
99
  * Preflight ALL parts before posting; the episode receipt is written only after
77
100
  * every required part. A restart retries missing parts and the final receipt. */
@@ -1 +1 @@
1
- {"version":3,"file":"slack-delivery.d.ts","sourceRoot":"","sources":["../../../../src/domain/gateway/slack/slack-delivery.ts"],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s from "node:fs";
16
16
  import path from "node:path";
17
17
  import { postChatMessage, getUploadURLExternal, uploadBytesExternal, completeUploadExternal, fetchRecentMessageTexts } from "./slack-api.js";
18
- import { buildOutboundMessage, attributionFromSession, reconcileToken, redactSecrets } from "./message.js";
18
+ import { buildOutboundMessage, attributionFromSession, reconcileToken, redactSecrets, splitForSlack, HumanMessageShapeError, SLACK_SECTION_CAP, SLACK_TEXT_CAP, } from "./message.js";
19
19
  const LOCAL_IMAGE_EXT = new Set([".png", ".jpg", ".jpeg", ".gif", ".webp"]);
20
20
  /** Local evidence files uploaded into the thread: images, video (Slack plays mp4/webm/mov inline)
21
21
  * and PDF. Wider than LOCAL_IMAGE_EXT, which gates https Block Kit image blocks. */
@@ -23,6 +23,23 @@ const LOCAL_ATTACHMENT_EXT = new Set([...LOCAL_IMAGE_EXT, ".mp4", ".webm", ".mov
23
23
  /** Well under Slack's 1 GB per-file limit, and bounded for a daemon that holds the bytes in memory. */
24
24
  export const LOCAL_ATTACHMENT_MAX_BYTES = 50 * 1024 * 1024;
25
25
  const TRANSPORT_FAILURE_RECEIPT_PREFIX = "::transport-failure-receipt::";
26
+ /** #192: `<decisionId>::channel::<channel>` in the attempted store = the channel this post's first
27
+ * attempt was decided for (see pinChannel). Keyed like the transport-failure receipt. */
28
+ const CHANNEL_DECIDED_PREFIX = "::channel::";
29
+ function decidedChannel(attempted, decisionId) {
30
+ const prefix = `${decisionId}${CHANNEL_DECIDED_PREFIX}`;
31
+ for (const key of attempted.keys())
32
+ if (key.startsWith(prefix))
33
+ return key.slice(prefix.length) || undefined;
34
+ return undefined;
35
+ }
36
+ /** The channel this post's first attempt went to, if it has had one: its recorded channel, or, with
37
+ * a map now configured (pinChannel) but no record, the default channel. A post attempted before the
38
+ * map existed went where unmapped posts go, so its retries stay there. Undefined = not attempted yet
39
+ * (or no map): resolve as usual. */
40
+ function firstAttemptChannel(opts, attempted, decisionId) {
41
+ return decidedChannel(attempted, decisionId) ?? (opts.pinChannel && attempted.has(decisionId) ? opts.channel : undefined);
42
+ }
26
43
  const TRANSPORT_FAILURE_RECEIPT_REPAIRED = "::repaired";
27
44
  function transportFailureReceiptKey(decisionId, failureClass, detail) {
28
45
  const encoded = Buffer.from(JSON.stringify([failureClass, detail]), "utf8").toString("base64url");
@@ -132,31 +149,20 @@ function deliverSinglePart(opts, markEpisode = true) {
132
149
  return { ok: true };
133
150
  }
134
151
  const q = (decision.payload ?? {});
135
- // M1 A5b (carried over from the retired sweep): an alert's evidenceRef IS the artifact the
136
- // human judges. #47 — it rides as a Block Kit image ONLY when it looks like an image;
137
- // a non-image https ref rides as a plain link instead (Slack's invalid_blocks rejects
138
- // the whole message when an image block's URL is not a real image).
139
- const { mediaRefs, evidenceLink } = evidenceAttachment(q.media, q.evidenceRef, q.summary);
140
- const payload = buildOutboundMessage({
141
- qitemId: q.qitemId ?? decision.decisionId,
142
- summary: q.summary,
143
- body: q.body,
144
- humanQuestions: q.humanQuestions,
145
- destinationSession: q.destinationSession ?? decision.entityBindingRef,
146
- }, {
147
- sourceLabel: opts.sourceLabel,
148
- bodyExcerpt: opts.bodyExcerpt,
149
- mediaRefs,
150
- evidenceLink,
151
- // A1.2 — attribution rides every post; identity stays the app's own (postChatMessage
152
- // structurally cannot carry username/icon overrides — the customize-absence rail).
153
- attribution: attributionFromSession(q.sourceSession),
154
- mentionUserId: opts.resolveMentionUserId?.(q),
155
- // fix-r3 — the reconcile identity, reserved outside the clamp budget (same function
156
- // the scan below matches: one identity, same bytes, both sides).
157
- reconcileMarker: reconcileToken(decision.decisionId),
158
- });
159
- const threadTs = opts.resolveThreadTs?.(q);
152
+ // #192: the channel first, from this post's record when it has one, so the thread below is
153
+ // chosen inside the channel the post actually goes to (and went to, on a retry).
154
+ const pinned = firstAttemptChannel(opts, opts.attempted.load(), decision.decisionId);
155
+ const channel = pinned ?? opts.resolveChannel?.(q) ?? opts.channel;
156
+ if (!pinned && opts.pinChannel) {
157
+ try {
158
+ opts.attempted.mark(`${decision.decisionId}${CHANNEL_DECIDED_PREFIX}${channel}`, "channel-decided");
159
+ }
160
+ catch (e) {
161
+ log(`channel record FAILED for ${q.qitemId ?? decision.decisionId}: ${e.message} — retained, nothing posted`);
162
+ return { ok: false, class: "channel-unrecorded", detail: e.message };
163
+ }
164
+ }
165
+ const threadTs = opts.resolveThreadTs?.(q, channel);
160
166
  // A failed HTTP outcome whose row-receipt write failed is held in the
161
167
  // existing restart-surviving attempted store. Repair that authoritative
162
168
  // transition before reconciliation can progress to a later post.
@@ -192,7 +198,7 @@ function deliverSinglePart(opts, markEpisode = true) {
192
198
  // identity, same bytes, both sides.
193
199
  const marker = reconcileToken(decision.decisionId);
194
200
  if (attempted.has(decision.decisionId)) {
195
- const scan = await fetchRecentMessageTexts(opts.botToken, opts.channel, threadTs, opts.fetchImpl, undefined, undefined, marker);
201
+ const scan = await fetchRecentMessageTexts(opts.botToken, channel, threadTs, opts.fetchImpl, undefined, undefined, marker);
196
202
  if (!scan.ok) {
197
203
  log(`reconcile scan failed for ${decision.decisionId} (${scan.error}) — retained, no blind repost`);
198
204
  return { ok: false, class: "reconcile-unreadable", detail: scan.error };
@@ -211,7 +217,9 @@ function deliverSinglePart(opts, markEpisode = true) {
211
217
  // replay (the marker stays findable; no repost can occur).
212
218
  try {
213
219
  if (threadTs === undefined)
214
- opts.onPostedRoot?.(q, matched.ts);
220
+ opts.onPostedRoot?.(q, matched.ts, channel);
221
+ else
222
+ opts.onPostedPart?.(q, matched.ts, threadTs, channel);
215
223
  opts.onPosted?.(q, matched.ts, threadTs);
216
224
  }
217
225
  catch (e) {
@@ -240,9 +248,35 @@ function deliverSinglePart(opts, markEpisode = true) {
240
248
  log(`reconcile: marker "${marker}" absent — safe to send`);
241
249
  }
242
250
  }
251
+ // Rendered only when a post is about to happen: a message already found by its marker above is
252
+ // acknowledged even if it would no longer render (#899: a changed sender label after it landed).
253
+ // M1 A5b (carried over from the retired sweep): an alert's evidenceRef IS the artifact the
254
+ // human judges. #47 — it rides as a Block Kit image ONLY when it looks like an image;
255
+ // a non-image https ref rides as a plain link instead (Slack's invalid_blocks rejects
256
+ // the whole message when an image block's URL is not a real image).
257
+ const { mediaRefs, evidenceLink } = evidenceAttachment(q.media, q.evidenceRef, q.summary);
258
+ const payload = buildOutboundMessage({
259
+ qitemId: q.qitemId ?? decision.decisionId,
260
+ summary: q.summary,
261
+ body: q.body,
262
+ humanQuestions: q.humanQuestions,
263
+ destinationSession: q.destinationSession ?? decision.entityBindingRef,
264
+ }, {
265
+ sourceLabel: opts.sourceLabel,
266
+ bodyExcerpt: opts.bodyExcerpt,
267
+ mediaRefs,
268
+ evidenceLink,
269
+ // A1.2 — attribution rides every post; identity stays the app's own (postChatMessage
270
+ // structurally cannot carry username/icon overrides — the customize-absence rail).
271
+ attribution: attributionFromSession(q.sourceSession),
272
+ mentionUserId: opts.resolveMentionUserId?.(q),
273
+ // fix-r3 — the reconcile identity, reserved outside the clamp budget (same function
274
+ // the scan above matches: one identity, same bytes, both sides).
275
+ reconcileMarker: reconcileToken(decision.decisionId),
276
+ });
243
277
  // Marked ATTEMPTED durably BEFORE the post: from here any outcome is ambiguous until 2xx.
244
278
  opts.attempted.mark(decision.decisionId, "attempted");
245
- const res = await postChatMessage(opts.botToken, { channel: opts.channel, text: payload.text, blocks: payload.blocks, thread_ts: threadTs }, opts.fetchImpl);
279
+ const res = await postChatMessage(opts.botToken, { channel, text: payload.text, blocks: payload.blocks, thread_ts: threadTs }, opts.fetchImpl);
246
280
  if (!res.ok) {
247
281
  const failureClass = res.status === 0 ? "transport" : `http-${res.status}`;
248
282
  // Persist the receipt input before the row write. A throwing row write
@@ -288,7 +322,9 @@ function deliverSinglePart(opts, markEpisode = true) {
288
322
  // IS in the channel — and retries the idempotent receipt without reposting.
289
323
  try {
290
324
  if (threadTs === undefined)
291
- opts.onPostedRoot?.(q, res.ts);
325
+ opts.onPostedRoot?.(q, res.ts, channel);
326
+ else
327
+ opts.onPostedPart?.(q, res.ts, threadTs, channel);
292
328
  opts.onPosted?.(q, res.ts, threadTs);
293
329
  }
294
330
  catch (e) {
@@ -323,7 +359,7 @@ function deliverSinglePart(opts, markEpisode = true) {
323
359
  if (put.ok) {
324
360
  const done = await completeUploadExternal(opts.botToken,
325
361
  // #300: the title is shown in Slack like the text, so it gets the same secret redaction.
326
- { files: [{ id: up.fileId, title: redactSecrets(q.summary ?? local.filename) }], channelId: opts.channel, threadTs: intoThread }, opts.fetchImpl);
362
+ { files: [{ id: up.fileId, title: redactSecrets(q.summary ?? local.filename) }], channelId: channel, threadTs: intoThread }, opts.fetchImpl);
327
363
  if (done.ok)
328
364
  log(`uploaded ${local.filename} into thread ${intoThread ?? "(root)"} for ${q.qitemId ?? decision.decisionId}`);
329
365
  else
@@ -341,7 +377,98 @@ function deliverSinglePart(opts, markEpisode = true) {
341
377
  return { ok: true };
342
378
  };
343
379
  }
344
- /** One authored primary and, optionally, one coherent supplemental reply. The
380
+ /** #897 — the most Slack messages one ask may post: the primary plus its thread replies. */
381
+ export const MAX_HUMAN_MESSAGE_PARTS = 20;
382
+ const CONTINUES_NOTE = "The rest of this brief follows in this thread.";
383
+ const DETAIL_NOTE = "Supplemental detail follows in this thread.";
384
+ const DELIVERY_PLAN = "::delivery-plan::";
385
+ function recordedPlan(attempted, decisionId) {
386
+ const prefix = `${decisionId}${DELIVERY_PLAN}`;
387
+ // The newest plan wins: a retry that had to plan again keeps its new plan after the first.
388
+ const key = [...attempted.keys()].filter((candidate) => candidate.startsWith(prefix)).at(-1);
389
+ return key ? JSON.parse(Buffer.from(key.slice(prefix.length), "base64url").toString("utf8")) : undefined;
390
+ }
391
+ /** Whether an ask's first message can already be in Slack; later parts post only after it lands. It can be if
392
+ * it was delivered or its receipt was kept, or if it was attempted and a scan finds its marker or reads only
393
+ * part of the history. An unreadable scan is reported, so the caller retains the ask instead of guessing. */
394
+ async function firstMessageMayHaveLanded(opts, q, decisionId, firstId) {
395
+ if (opts.delivered.load().has(firstId))
396
+ return "found";
397
+ const attempted = opts.attempted.load();
398
+ if ([...attempted.keys()].some((key) => key.startsWith(`${decisionId}::primary-receipt::`)))
399
+ return "found";
400
+ if (!attempted.has(firstId))
401
+ return "absent";
402
+ const marker = reconcileToken(firstId);
403
+ // #192: look where the first message went: its first attempt's channel, with the same precedence
404
+ // a supplemental part uses (recorded, else this ask's channel, else the default), and that
405
+ // channel's thread. With no map this is the default channel, as before.
406
+ const channel = firstAttemptChannel(opts, attempted, firstId) ?? opts.resolveChannel?.(q) ?? opts.channel;
407
+ const scan = await fetchRecentMessageTexts(opts.botToken, channel, opts.resolveThreadTs?.(q, channel), opts.fetchImpl, undefined, undefined, marker);
408
+ if (!scan.ok)
409
+ return { unreadable: scan.error ?? "reconcile scan failed" };
410
+ if (scan.messages.some((m) => m.text.includes(marker)))
411
+ return "found";
412
+ return scan.incomplete ? "maybe" : "absent";
413
+ }
414
+ /** The pieces splitForSlack cut, replayed from their recorded lengths; undefined if they no longer add up. */
415
+ function replayPieces(text, lengths) {
416
+ const rest = redactSecrets(text).trimEnd();
417
+ if (!lengths || lengths.reduce((sum, n) => sum + n, 0) !== rest.length)
418
+ return undefined;
419
+ let at = 0;
420
+ return lengths.map((n) => rest.slice(at, (at += n)));
421
+ }
422
+ function partIdFor(decisionId, count, index) {
423
+ return count === 1 ? decisionId : `${decisionId}:part:${index + 1}`;
424
+ }
425
+ /** Render one part exactly as deliverSinglePart will, throwing HumanMessageShapeError if it can't. */
426
+ function renderPart(opts, q, part, index, partId) {
427
+ // #47 — preflight must mirror deliverSinglePart exactly: the same evidenceRef
428
+ // split (image attachment vs. plain link) so the shape check sees the true payload.
429
+ const partEvidence = evidenceAttachment(part.media, part.evidenceRef, part.summary);
430
+ return buildOutboundMessage(part, {
431
+ sourceLabel: opts.sourceLabel,
432
+ attribution: attributionFromSession(part.sourceSession),
433
+ mentionUserId: index === 0 ? opts.resolveMentionUserId?.(q) : undefined,
434
+ reconcileMarker: reconcileToken(partId),
435
+ mediaRefs: partEvidence.mediaRefs,
436
+ evidenceLink: partEvidence.evidenceLink,
437
+ });
438
+ }
439
+ /** #897 — a brief or supplemental detail too long for one message: the primary keeps the
440
+ * subject, the start of the brief, any options and the evidence; the rest follows as
441
+ * numbered replies in its thread, each sized to its own message limits. */
442
+ function splitIntoParts(opts, q, decisionId, recorded) {
443
+ const reply = (summary) => ({ ...q, humanDetail: undefined, humanQuestions: undefined, summary, media: [], evidenceRef: null });
444
+ const widest = `${MAX_HUMAN_MESSAGE_PARTS} of ${MAX_HUMAN_MESSAGE_PARTS}`;
445
+ // A part's room is what its subject, options, evidence, sender and marker leave of both limits.
446
+ const roomFor = (part, index, reserve = 0) => {
447
+ const frame = renderPart(opts, q, { ...part, body: "" }, index, partIdFor(decisionId, 2, index));
448
+ return Math.min(SLACK_SECTION_CAP, SLACK_TEXT_CAP - frame.text.length - 1) - reserve;
449
+ };
450
+ const primary = { ...q, humanDetail: undefined };
451
+ // A retry replays its first attempt's cuts, so no piece moves between the parts already posted and the rest.
452
+ const body = replayPieces(q.body ?? "", recorded?.body) ?? splitForSlack(q.body ?? "", (i) => i === 0
453
+ ? roomFor(primary, 0, Math.max(CONTINUES_NOTE.length, DETAIL_NOTE.length) + 2)
454
+ : roomFor(reply(`Continued (${widest})`), i));
455
+ const first = Math.max(body.length, 1);
456
+ const detail = q.humanDetail
457
+ ? replayPieces(q.humanDetail, recorded?.detail) ?? splitForSlack(q.humanDetail, (j) => roomFor(reply(`Supplemental detail (${widest})`), first + j))
458
+ : [];
459
+ // A brief that fits keeps the usual note; only a brief that continues says so.
460
+ const note = body.length > 1 ? CONTINUES_NOTE : DETAIL_NOTE;
461
+ const parts = [{ ...primary, body: body[0] ? `${body[0]}\n\n${note}` : note }];
462
+ for (let k = 1; k < body.length; k++)
463
+ parts.push({ ...reply(`Continued (${k + 1} of ${body.length})`), body: body[k] });
464
+ detail.forEach((piece, j) => parts.push({ ...reply(`Supplemental detail (${j + 1} of ${detail.length})`), body: piece }));
465
+ if (parts.length > MAX_HUMAN_MESSAGE_PARTS) {
466
+ throw new HumanMessageShapeError(`This brief needs ${parts.length} Slack messages (maximum ${MAX_HUMAN_MESSAGE_PARTS}). Shorten it, or put the long part in a file and link it.`);
467
+ }
468
+ return { parts, plan: { body: body.map((piece) => piece.length), detail: detail.map((piece) => piece.length) } };
469
+ }
470
+ /** One authored primary and, optionally, one coherent supplemental reply; a brief or
471
+ * detail too long for that is posted as more numbered thread replies (#897). The
345
472
  * existing attempted/delivered stores and marker reconciler own each stable part.
346
473
  * Preflight ALL parts before posting; the episode receipt is written only after
347
474
  * every required part. A restart retries missing parts and the final receipt. */
@@ -350,40 +477,110 @@ export function subsystemSlackDeliver(opts) {
350
477
  if (opts.delivered.load().has(decision.decisionId))
351
478
  return { ok: true };
352
479
  const q = (decision.payload ?? {});
353
- const parts = q.humanDetail
480
+ let parts = q.humanDetail
354
481
  ? [
355
- { ...q, humanDetail: undefined, body: `${q.body ?? ""}\n\nSupplemental detail follows in this thread.` },
482
+ { ...q, humanDetail: undefined, body: `${q.body ?? ""}\n\n${DETAIL_NOTE}` },
356
483
  { ...q, humanDetail: undefined, humanQuestions: undefined, summary: `Supplemental detail: ${q.summary ?? ""}`, body: q.humanDetail, media: [], evidenceRef: null },
357
484
  ]
358
485
  : [q];
359
- const partId = (index) => parts.length === 1 ? decision.decisionId : `${decision.decisionId}:part:${index + 1}`;
486
+ // #897 — the first attempt decides the shape from the real render and records it; a retry renders
487
+ // with the recorded mention and cuts, so it can't switch between one message and a split or move a cut.
488
+ let recorded;
360
489
  try {
361
- for (const [index, part] of parts.entries()) {
362
- // #47 — preflight must mirror deliverSinglePart exactly: the same evidenceRef
363
- // split (image attachment vs. plain link) so the shape check sees the true payload.
364
- const partEvidence = evidenceAttachment(part.media, part.evidenceRef, part.summary);
365
- buildOutboundMessage(part, {
366
- sourceLabel: opts.sourceLabel,
367
- attribution: attributionFromSession(part.sourceSession),
368
- mentionUserId: index === 0 ? opts.resolveMentionUserId?.(q) : undefined,
369
- reconcileMarker: reconcileToken(partId(index)),
370
- mediaRefs: partEvidence.mediaRefs,
371
- evidenceLink: partEvidence.evidenceLink,
372
- });
490
+ recorded = recordedPlan(opts.attempted.load(), decision.decisionId);
491
+ }
492
+ catch (error) {
493
+ return { ok: false, class: "receipt-failed", detail: `delivery plan is unreadable: ${error.message}` };
494
+ }
495
+ const authored = parts;
496
+ /** The parts a plan renders to, preflighted; with no plan, decide one from the real render. */
497
+ const choose = (kept) => {
498
+ const mention = kept ? kept.mention : opts.resolveMentionUserId?.(q);
499
+ const planned = { ...opts, resolveMentionUserId: () => mention };
500
+ // A kept plan checks only the parts still to post: delivered parts are acknowledged, never rendered again.
501
+ const delivered = kept ? opts.delivered.load() : new Set();
502
+ const preflight = (candidate) => {
503
+ for (const [index, part] of candidate.entries()) {
504
+ const id = partIdFor(decision.decisionId, candidate.length, index);
505
+ if (!delivered.has(id))
506
+ renderPart(planned, q, part, index, id);
507
+ }
508
+ };
509
+ if (kept?.body) {
510
+ const split = splitIntoParts(planned, q, decision.decisionId, kept).parts;
511
+ preflight(split);
512
+ return { parts: split, planned, plan: kept };
513
+ }
514
+ try {
515
+ preflight(authored);
516
+ return { parts: authored, planned, plan: { mention } };
517
+ }
518
+ catch (error) {
519
+ if (kept || !(error instanceof HumanMessageShapeError))
520
+ throw error;
521
+ // #897 — too long for the authored parts: split, and refuse only if that can't fit.
522
+ const split = splitIntoParts(planned, q, decision.decisionId);
523
+ if (split.parts.length < 2)
524
+ throw error;
525
+ preflight(split.parts);
526
+ return { parts: split.parts, planned, plan: { mention, ...split.plan } };
527
+ }
528
+ };
529
+ let chosen;
530
+ let replanned = false;
531
+ let partlyPosted = false;
532
+ try {
533
+ try {
534
+ chosen = choose(recorded);
535
+ }
536
+ catch (error) {
537
+ if (!recorded || !(error instanceof HumanMessageShapeError))
538
+ throw error;
539
+ // A recorded plan that no longer renders (the sender label or the rendering changed between
540
+ // attempts) is planned afresh, as before #897, only if none of it can be in Slack yet: new cuts or
541
+ // ids could otherwise repeat or lose text. If some may be, the rest is refused, loudly, unless the
542
+ // whole ask was one message that is found in Slack, which is simply delivered.
543
+ const firstId = partIdFor(decision.decisionId, recorded.body ? 2 : authored.length, 0);
544
+ const landed = await firstMessageMayHaveLanded(opts, q, decision.decisionId, firstId);
545
+ if (typeof landed === "object")
546
+ return { ok: false, class: "reconcile-unreadable", detail: landed.unreadable };
547
+ if (landed !== "absent")
548
+ partlyPosted = true;
549
+ if (landed === "found" && !recorded.body && authored.length === 1) {
550
+ // #899 — the one message is the whole ask, and it is in Slack: acknowledge it through the
551
+ // reconcile receipt, which finds it by marker before rendering, instead of refusing it.
552
+ const keptMention = recorded.mention;
553
+ return await deliverSinglePart({ ...opts, resolveMentionUserId: () => keptMention })(decision);
554
+ }
555
+ if (partlyPosted)
556
+ throw error;
557
+ chosen = choose();
558
+ replanned = true;
373
559
  }
374
560
  }
375
561
  catch (error) {
376
562
  const detail = error.message;
377
563
  try {
378
- opts.onTransportFailed?.(q, "human-message-unrenderable", detail);
564
+ opts.onTransportFailed?.(q, "human-message-unrenderable", detail, partlyPosted);
379
565
  }
380
566
  catch (receiptError) {
381
567
  return { ok: false, class: "receipt-failed", detail: receiptError.message };
382
568
  }
383
569
  return { ok: false, class: "human-message-unrenderable", detail };
384
570
  }
571
+ parts = chosen.parts;
572
+ const { planned } = chosen;
573
+ if (!recorded || replanned) {
574
+ try {
575
+ opts.attempted.mark(`${decision.decisionId}${DELIVERY_PLAN}${Buffer.from(JSON.stringify(chosen.plan)).toString("base64url")}`, "delivery-plan");
576
+ }
577
+ catch (error) {
578
+ return { ok: false, class: "receipt-failed", detail: `delivery plan not kept: ${error.message}` };
579
+ }
580
+ }
581
+ const partId = (index) => partIdFor(decision.decisionId, parts.length, index);
385
582
  if (parts.length === 1)
386
- return deliverSinglePart(opts)(decision);
583
+ return deliverSinglePart(planned)(decision);
387
584
  const rootPrefix = `${decision.decisionId}::primary-receipt::`;
388
585
  const retained = [...opts.attempted.load()].find((key) => key.startsWith(rootPrefix));
389
586
  let primary = retained
@@ -394,9 +591,14 @@ export function subsystemSlackDeliver(opts) {
394
591
  return { ok: false, class: "receipt-failed", detail: "Supplemental delivery requires the actual primary Slack timestamp; retain for reconciliation." };
395
592
  }
396
593
  const outcome = await deliverSinglePart({
397
- ...opts,
398
- resolveMentionUserId: index === 0 ? opts.resolveMentionUserId : undefined,
594
+ ...planned,
595
+ resolveMentionUserId: index === 0 ? planned.resolveMentionUserId : undefined,
399
596
  resolveThreadTs: index === 0 ? opts.resolveThreadTs : () => primary.threadTs ?? primary.messageTs,
597
+ // #192: a supplemental part goes where the primary went (its recorded channel), never to a
598
+ // channel re-resolved after a remap; without a record, resolution as before.
599
+ resolveChannel: index === 0
600
+ ? opts.resolveChannel
601
+ : (part) => firstAttemptChannel(opts, opts.attempted.load(), partId(0)) ?? opts.resolveChannel?.(part) ?? opts.channel,
400
602
  onPostedRoot: index === 0 ? opts.onPostedRoot : undefined,
401
603
  onPosted: (_part, messageTs, threadTs) => {
402
604
  if (index !== 0)