@telora/daemon 0.19.47 → 0.19.82

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 (597) hide show
  1. package/build-info.json +8 -3
  2. package/dist/assembly-engine.d.ts +9 -0
  3. package/dist/assembly-engine.d.ts.map +1 -1
  4. package/dist/assembly-engine.js.map +1 -1
  5. package/dist/audit-hooks.js +1 -1
  6. package/dist/branch-status.js +2 -2
  7. package/dist/branch-status.js.map +1 -1
  8. package/dist/ci-sensor-loop.d.ts +47 -0
  9. package/dist/ci-sensor-loop.d.ts.map +1 -0
  10. package/dist/ci-sensor-loop.js +116 -0
  11. package/dist/ci-sensor-loop.js.map +1 -0
  12. package/dist/ci-status-git.d.ts +52 -0
  13. package/dist/ci-status-git.d.ts.map +1 -0
  14. package/dist/ci-status-git.js +86 -0
  15. package/dist/ci-status-git.js.map +1 -0
  16. package/dist/ci-status.d.ts +122 -0
  17. package/dist/ci-status.d.ts.map +1 -0
  18. package/dist/ci-status.js +114 -0
  19. package/dist/ci-status.js.map +1 -0
  20. package/dist/cli/connect/agents.d.ts +24 -0
  21. package/dist/cli/connect/agents.d.ts.map +1 -0
  22. package/dist/cli/connect/agents.js +65 -0
  23. package/dist/cli/connect/agents.js.map +1 -0
  24. package/dist/cli/connect/claude.d.ts +31 -0
  25. package/dist/cli/connect/claude.d.ts.map +1 -0
  26. package/dist/cli/connect/claude.js +104 -0
  27. package/dist/cli/connect/claude.js.map +1 -0
  28. package/dist/cli/connect/cline.d.ts +37 -0
  29. package/dist/cli/connect/cline.d.ts.map +1 -0
  30. package/dist/cli/connect/cline.js +115 -0
  31. package/dist/cli/connect/cline.js.map +1 -0
  32. package/dist/cli/connect/codex.d.ts +44 -0
  33. package/dist/cli/connect/codex.d.ts.map +1 -0
  34. package/dist/cli/connect/codex.js +111 -0
  35. package/dist/cli/connect/codex.js.map +1 -0
  36. package/dist/cli/connect/ide.d.ts +69 -0
  37. package/dist/cli/connect/ide.d.ts.map +1 -0
  38. package/dist/cli/connect/ide.js +134 -0
  39. package/dist/cli/connect/ide.js.map +1 -0
  40. package/dist/cli/connect/scaffolding.d.ts +31 -0
  41. package/dist/cli/connect/scaffolding.d.ts.map +1 -0
  42. package/dist/cli/connect/scaffolding.js +52 -0
  43. package/dist/cli/connect/scaffolding.js.map +1 -0
  44. package/dist/cli/connect/shared.d.ts +30 -0
  45. package/dist/cli/connect/shared.d.ts.map +1 -0
  46. package/dist/cli/connect/shared.js +11 -0
  47. package/dist/cli/connect/shared.js.map +1 -0
  48. package/dist/cli/connect.d.ts +9 -210
  49. package/dist/cli/connect.d.ts.map +1 -1
  50. package/dist/cli/connect.js +10 -526
  51. package/dist/cli/connect.js.map +1 -1
  52. package/dist/cli/open.js +2 -2
  53. package/dist/completion/event.d.ts +2 -0
  54. package/dist/completion/event.d.ts.map +1 -1
  55. package/dist/completion/event.js +19 -2
  56. package/dist/completion/event.js.map +1 -1
  57. package/dist/completion/merge-phase.d.ts +3 -0
  58. package/dist/completion/merge-phase.d.ts.map +1 -1
  59. package/dist/completion/merge-phase.js +35 -3
  60. package/dist/completion/merge-phase.js.map +1 -1
  61. package/dist/completion/read-only-pristine.d.ts +1 -1
  62. package/dist/completion/read-only-pristine.d.ts.map +1 -1
  63. package/dist/completion/read-only-pristine.js +1 -1
  64. package/dist/completion/read-only-pristine.js.map +1 -1
  65. package/dist/completion/review-exit-phase.d.ts +30 -3
  66. package/dist/completion/review-exit-phase.d.ts.map +1 -1
  67. package/dist/completion/review-exit-phase.js +203 -15
  68. package/dist/completion/review-exit-phase.js.map +1 -1
  69. package/dist/completion/status-advance-phase.js +1 -1
  70. package/dist/completion/status-advance-phase.js.map +1 -1
  71. package/dist/completion/team-completion.d.ts.map +1 -1
  72. package/dist/completion/team-completion.js +22 -2
  73. package/dist/completion/team-completion.js.map +1 -1
  74. package/dist/completion/team-lifecycle.js +1 -1
  75. package/dist/completion/terminated-work-reconcile.js +1 -1
  76. package/dist/completion/terminated-work-reconcile.js.map +1 -1
  77. package/dist/condition-evaluators.d.ts +41 -2
  78. package/dist/condition-evaluators.d.ts.map +1 -1
  79. package/dist/condition-evaluators.js +37 -288
  80. package/dist/condition-evaluators.js.map +1 -1
  81. package/dist/config.d.ts.map +1 -1
  82. package/dist/config.js +23 -0
  83. package/dist/config.js.map +1 -1
  84. package/dist/context-audit.d.ts +1 -1
  85. package/dist/context-audit.d.ts.map +1 -1
  86. package/dist/context-lock.d.ts +1 -1
  87. package/dist/context-lock.d.ts.map +1 -1
  88. package/dist/control-state.d.ts +2 -2
  89. package/dist/control-state.d.ts.map +1 -1
  90. package/dist/control-state.js +4 -3
  91. package/dist/control-state.js.map +1 -1
  92. package/dist/daemon-process.d.ts +1 -1
  93. package/dist/daemon-process.d.ts.map +1 -1
  94. package/dist/delivery-advance-block.d.ts +1 -1
  95. package/dist/delivery-advance-block.d.ts.map +1 -1
  96. package/dist/delivery-advance-block.js +1 -1
  97. package/dist/delivery-advance-block.js.map +1 -1
  98. package/dist/delivery-lifecycle.js +1 -1
  99. package/dist/delivery-reconciler-shadow.d.ts +1 -1
  100. package/dist/delivery-reconciler-shadow.d.ts.map +1 -1
  101. package/dist/delivery-reconciler-shadow.js +1 -1
  102. package/dist/delivery-reconciler-shadow.js.map +1 -1
  103. package/dist/directive-executor.js +1 -1
  104. package/dist/directive-executor.js.map +1 -1
  105. package/dist/drift-eval-loop.d.ts.map +1 -1
  106. package/dist/drift-eval-loop.js +6 -14
  107. package/dist/drift-eval-loop.js.map +1 -1
  108. package/dist/escalations.d.ts +1 -1
  109. package/dist/escalations.d.ts.map +1 -1
  110. package/dist/escalations.js +1 -1
  111. package/dist/escalations.js.map +1 -1
  112. package/dist/evaluation-context.d.ts +2 -33
  113. package/dist/evaluation-context.d.ts.map +1 -1
  114. package/dist/evaluation-context.js +2 -56
  115. package/dist/evaluation-context.js.map +1 -1
  116. package/dist/focus-engine.d.ts +14 -5
  117. package/dist/focus-engine.d.ts.map +1 -1
  118. package/dist/focus-engine.js +35 -289
  119. package/dist/focus-engine.js.map +1 -1
  120. package/dist/focus-executor.d.ts +10 -791
  121. package/dist/focus-executor.d.ts.map +1 -1
  122. package/dist/focus-executor.js +81 -1572
  123. package/dist/focus-executor.js.map +1 -1
  124. package/dist/focus-lifecycle.js +2 -2
  125. package/dist/focus-lifecycle.js.map +1 -1
  126. package/dist/focus-loop-registry.d.ts +52 -0
  127. package/dist/focus-loop-registry.d.ts.map +1 -0
  128. package/dist/focus-loop-registry.js +328 -0
  129. package/dist/focus-loop-registry.js.map +1 -0
  130. package/dist/focus-merge.d.ts +1 -1
  131. package/dist/focus-merge.d.ts.map +1 -1
  132. package/dist/focus-merge.js +6 -6
  133. package/dist/focus-merge.js.map +1 -1
  134. package/dist/focus-phase.d.ts +4 -0
  135. package/dist/focus-phase.d.ts.map +1 -1
  136. package/dist/focus-phase.js +3 -3
  137. package/dist/focus-phase.js.map +1 -1
  138. package/dist/focus-prompt-builder.d.ts.map +1 -1
  139. package/dist/focus-prompt-builder.js +4 -1
  140. package/dist/focus-prompt-builder.js.map +1 -1
  141. package/dist/focus-stage-lifecycle/planning-release.d.ts +197 -0
  142. package/dist/focus-stage-lifecycle/planning-release.d.ts.map +1 -0
  143. package/dist/focus-stage-lifecycle/planning-release.js +312 -0
  144. package/dist/focus-stage-lifecycle/planning-release.js.map +1 -0
  145. package/dist/focus-stage-lifecycle/review-convergence.d.ts +133 -0
  146. package/dist/focus-stage-lifecycle/review-convergence.d.ts.map +1 -0
  147. package/dist/focus-stage-lifecycle/review-convergence.js +235 -0
  148. package/dist/focus-stage-lifecycle/review-convergence.js.map +1 -0
  149. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +133 -0
  150. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -0
  151. package/dist/focus-stage-lifecycle/wedge-watchdog.js +365 -0
  152. package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -0
  153. package/dist/focus-stage-lifecycle.d.ts +22 -421
  154. package/dist/focus-stage-lifecycle.d.ts.map +1 -1
  155. package/dist/focus-stage-lifecycle.js +24 -832
  156. package/dist/focus-stage-lifecycle.js.map +1 -1
  157. package/dist/{git-activity.d.ts → git/activity.d.ts} +1 -1
  158. package/dist/git/activity.d.ts.map +1 -0
  159. package/dist/{git-activity.js → git/activity.js} +2 -2
  160. package/dist/git/activity.js.map +1 -0
  161. package/dist/{git-branch.d.ts → git/branch.d.ts} +2 -2
  162. package/dist/git/branch.d.ts.map +1 -0
  163. package/dist/{git-branch.js → git/branch.js} +2 -2
  164. package/dist/git/branch.js.map +1 -0
  165. package/dist/{git-fetch.d.ts → git/fetch.d.ts} +2 -2
  166. package/dist/git/fetch.d.ts.map +1 -0
  167. package/dist/{git-fetch.js → git/fetch.js} +1 -1
  168. package/dist/git/fetch.js.map +1 -0
  169. package/dist/{git-genesis.d.ts → git/genesis.d.ts} +3 -3
  170. package/dist/git/genesis.d.ts.map +1 -0
  171. package/dist/{git-genesis.js → git/genesis.js} +5 -5
  172. package/dist/git/genesis.js.map +1 -0
  173. package/dist/git/index.d.ts +36 -0
  174. package/dist/git/index.d.ts.map +1 -0
  175. package/dist/git/index.js +36 -0
  176. package/dist/git/index.js.map +1 -0
  177. package/dist/{git-integration.d.ts → git/integration.d.ts} +2 -2
  178. package/dist/git/integration.d.ts.map +1 -0
  179. package/dist/{git-integration.js → git/integration.js} +4 -4
  180. package/dist/git/integration.js.map +1 -0
  181. package/dist/{git-merge-helpers.d.ts → git/merge-helpers.d.ts} +3 -3
  182. package/dist/git/merge-helpers.d.ts.map +1 -0
  183. package/dist/{git-merge-helpers.js → git/merge-helpers.js} +3 -3
  184. package/dist/git/merge-helpers.js.map +1 -0
  185. package/dist/{git-merge-lock.d.ts → git/merge-lock.d.ts} +1 -1
  186. package/dist/git/merge-lock.d.ts.map +1 -0
  187. package/dist/{git-merge-lock.js → git/merge-lock.js} +1 -1
  188. package/dist/git/merge-lock.js.map +1 -0
  189. package/dist/{git-merge-strategies.d.ts → git/merge-strategies.d.ts} +2 -2
  190. package/dist/git/merge-strategies.d.ts.map +1 -0
  191. package/dist/{git-merge-strategies.js → git/merge-strategies.js} +3 -3
  192. package/dist/git/merge-strategies.js.map +1 -0
  193. package/dist/{git-merge.d.ts → git/merge.d.ts} +4 -4
  194. package/dist/git/merge.d.ts.map +1 -0
  195. package/dist/{git-merge.js → git/merge.js} +4 -4
  196. package/dist/git/merge.js.map +1 -0
  197. package/dist/{git-state-detector.d.ts → git/state-detector.d.ts} +2 -2
  198. package/dist/git/state-detector.d.ts.map +1 -0
  199. package/dist/{git-state-detector.js → git/state-detector.js} +7 -7
  200. package/dist/git/state-detector.js.map +1 -0
  201. package/dist/{git-types.d.ts → git/types.d.ts} +2 -2
  202. package/dist/git/types.d.ts.map +1 -0
  203. package/dist/{git-types.js → git/types.js} +1 -1
  204. package/dist/git/types.js.map +1 -0
  205. package/dist/{git-utils.d.ts → git/utils.d.ts} +1 -1
  206. package/dist/git/utils.d.ts.map +1 -0
  207. package/dist/{git-utils.js → git/utils.js} +2 -2
  208. package/dist/git/utils.js.map +1 -0
  209. package/dist/git.d.ts +5 -5
  210. package/dist/git.d.ts.map +1 -1
  211. package/dist/git.js +10 -10
  212. package/dist/git.js.map +1 -1
  213. package/dist/guard-engine.d.ts +3 -2
  214. package/dist/guard-engine.d.ts.map +1 -1
  215. package/dist/guard-engine.js +2 -2
  216. package/dist/guard-engine.js.map +1 -1
  217. package/dist/install-probe-tick.d.ts +63 -0
  218. package/dist/install-probe-tick.d.ts.map +1 -0
  219. package/dist/install-probe-tick.js +137 -0
  220. package/dist/install-probe-tick.js.map +1 -0
  221. package/dist/install-probe.d.ts +115 -0
  222. package/dist/install-probe.d.ts.map +1 -0
  223. package/dist/install-probe.js +197 -0
  224. package/dist/install-probe.js.map +1 -0
  225. package/dist/listener-auto-advance.d.ts.map +1 -1
  226. package/dist/listener-auto-advance.js +31 -0
  227. package/dist/listener-auto-advance.js.map +1 -1
  228. package/dist/listener.js +5 -5
  229. package/dist/listener.js.map +1 -1
  230. package/dist/{loop-context-audit-pass.d.ts → loops/context-audit-pass.d.ts} +4 -4
  231. package/dist/loops/context-audit-pass.d.ts.map +1 -0
  232. package/dist/{loop-context-audit-pass.js → loops/context-audit-pass.js} +7 -7
  233. package/dist/loops/context-audit-pass.js.map +1 -0
  234. package/dist/{loop-engine-types.d.ts → loops/engine-types.d.ts} +1 -1
  235. package/dist/loops/engine-types.d.ts.map +1 -0
  236. package/dist/{loop-engine-types.js → loops/engine-types.js} +1 -1
  237. package/dist/loops/engine-types.js.map +1 -0
  238. package/dist/{loop-engine.d.ts → loops/engine.d.ts} +6 -6
  239. package/dist/loops/engine.d.ts.map +1 -0
  240. package/dist/{loop-engine.js → loops/engine.js} +13 -13
  241. package/dist/loops/engine.js.map +1 -0
  242. package/dist/{loop-event-bus.d.ts → loops/event-bus.d.ts} +1 -1
  243. package/dist/loops/event-bus.d.ts.map +1 -0
  244. package/dist/{loop-event-bus.js → loops/event-bus.js} +1 -1
  245. package/dist/loops/event-bus.js.map +1 -0
  246. package/dist/loops/index.d.ts +33 -0
  247. package/dist/loops/index.d.ts.map +1 -0
  248. package/dist/loops/index.js +32 -0
  249. package/dist/loops/index.js.map +1 -0
  250. package/dist/{loop-llm-client.d.ts → loops/llm-client.d.ts} +3 -3
  251. package/dist/loops/llm-client.d.ts.map +1 -0
  252. package/dist/{loop-llm-client.js → loops/llm-client.js} +3 -3
  253. package/dist/loops/llm-client.js.map +1 -0
  254. package/dist/{loop-llm-flag.d.ts → loops/llm-flag.d.ts} +1 -1
  255. package/dist/loops/llm-flag.d.ts.map +1 -0
  256. package/dist/{loop-llm-flag.js → loops/llm-flag.js} +1 -1
  257. package/dist/loops/llm-flag.js.map +1 -0
  258. package/dist/{loop-operational-block.d.ts → loops/operational-block.d.ts} +1 -1
  259. package/dist/loops/operational-block.d.ts.map +1 -0
  260. package/dist/{loop-operational-block.js → loops/operational-block.js} +1 -1
  261. package/dist/loops/operational-block.js.map +1 -0
  262. package/dist/{loop-prompt-builder.d.ts → loops/prompt-builder.d.ts} +2 -2
  263. package/dist/loops/prompt-builder.d.ts.map +1 -0
  264. package/dist/{loop-prompt-builder.js → loops/prompt-builder.js} +1 -1
  265. package/dist/loops/prompt-builder.js.map +1 -0
  266. package/dist/{loop-variance.d.ts → loops/variance.d.ts} +1 -1
  267. package/dist/loops/variance.d.ts.map +1 -0
  268. package/dist/{loop-variance.js → loops/variance.js} +1 -1
  269. package/dist/loops/variance.js.map +1 -0
  270. package/dist/merge-back-loop.d.ts.map +1 -1
  271. package/dist/merge-back-loop.js +4 -3
  272. package/dist/merge-back-loop.js.map +1 -1
  273. package/dist/merge-detector.js +2 -2
  274. package/dist/merge-detector.js.map +1 -1
  275. package/dist/{nexus-endpoint-clearance.d.ts → nexus/endpoint-clearance.d.ts} +2 -2
  276. package/dist/nexus/endpoint-clearance.d.ts.map +1 -0
  277. package/dist/{nexus-endpoint-clearance.js → nexus/endpoint-clearance.js} +2 -2
  278. package/dist/nexus/endpoint-clearance.js.map +1 -0
  279. package/dist/{nexus-escalation-bridge.d.ts → nexus/escalation-bridge.d.ts} +1 -1
  280. package/dist/nexus/escalation-bridge.d.ts.map +1 -0
  281. package/dist/{nexus-escalation-bridge.js → nexus/escalation-bridge.js} +2 -2
  282. package/dist/nexus/escalation-bridge.js.map +1 -0
  283. package/dist/{nexus-incoming.d.ts → nexus/incoming.d.ts} +2 -2
  284. package/dist/nexus/incoming.d.ts.map +1 -0
  285. package/dist/{nexus-incoming.js → nexus/incoming.js} +2 -2
  286. package/dist/nexus/incoming.js.map +1 -0
  287. package/dist/nexus/index.d.ts +20 -0
  288. package/dist/nexus/index.d.ts.map +1 -0
  289. package/dist/nexus/index.js +20 -0
  290. package/dist/nexus/index.js.map +1 -0
  291. package/dist/{nexus-intake-spawn.d.ts → nexus/intake-spawn.d.ts} +3 -3
  292. package/dist/nexus/intake-spawn.d.ts.map +1 -0
  293. package/dist/{nexus-intake-spawn.js → nexus/intake-spawn.js} +1 -1
  294. package/dist/nexus/intake-spawn.js.map +1 -0
  295. package/dist/{nexus-intake.d.ts → nexus/intake.d.ts} +2 -2
  296. package/dist/nexus/intake.d.ts.map +1 -0
  297. package/dist/{nexus-intake.js → nexus/intake.js} +4 -4
  298. package/dist/nexus/intake.js.map +1 -0
  299. package/dist/{nexus-return.d.ts → nexus/return.d.ts} +3 -3
  300. package/dist/nexus/return.d.ts.map +1 -0
  301. package/dist/{nexus-return.js → nexus/return.js} +4 -4
  302. package/dist/nexus/return.js.map +1 -0
  303. package/dist/otlp/index.d.ts +19 -0
  304. package/dist/otlp/index.d.ts.map +1 -0
  305. package/dist/otlp/index.js +19 -0
  306. package/dist/otlp/index.js.map +1 -0
  307. package/dist/{otlp-log-parser.d.ts → otlp/log-parser.d.ts} +2 -2
  308. package/dist/otlp/log-parser.d.ts.map +1 -0
  309. package/dist/{otlp-log-parser.js → otlp/log-parser.js} +5 -6
  310. package/dist/otlp/log-parser.js.map +1 -0
  311. package/dist/{otlp-metric-parser.d.ts → otlp/metric-parser.d.ts} +2 -2
  312. package/dist/otlp/metric-parser.d.ts.map +1 -0
  313. package/dist/{otlp-metric-parser.js → otlp/metric-parser.js} +4 -5
  314. package/dist/otlp/metric-parser.js.map +1 -0
  315. package/dist/{otlp-port-manager.d.ts → otlp/port-manager.d.ts} +1 -1
  316. package/dist/otlp/port-manager.d.ts.map +1 -0
  317. package/dist/{otlp-port-manager.js → otlp/port-manager.js} +1 -1
  318. package/dist/otlp/port-manager.js.map +1 -0
  319. package/dist/{otlp-receiver.d.ts → otlp/receiver.d.ts} +2 -2
  320. package/dist/otlp/receiver.d.ts.map +1 -0
  321. package/dist/{otlp-receiver.js → otlp/receiver.js} +5 -33
  322. package/dist/otlp/receiver.js.map +1 -0
  323. package/dist/{otlp-types.d.ts → otlp/types.d.ts} +1 -9
  324. package/dist/otlp/types.d.ts.map +1 -0
  325. package/dist/{otlp-types.js → otlp/types.js} +1 -27
  326. package/dist/otlp/types.js.map +1 -0
  327. package/dist/pipeline-config.d.ts +1 -1
  328. package/dist/{prd-controller.d.ts → prd/controller.d.ts} +7 -7
  329. package/dist/prd/controller.d.ts.map +1 -0
  330. package/dist/{prd-controller.js → prd/controller.js} +11 -11
  331. package/dist/prd/controller.js.map +1 -0
  332. package/dist/{prd-divergence.d.ts → prd/divergence.d.ts} +2 -2
  333. package/dist/prd/divergence.d.ts.map +1 -0
  334. package/dist/{prd-divergence.js → prd/divergence.js} +1 -1
  335. package/dist/prd/divergence.js.map +1 -0
  336. package/dist/{prd-focus-pushdown.d.ts → prd/focus-pushdown.d.ts} +2 -2
  337. package/dist/prd/focus-pushdown.d.ts.map +1 -0
  338. package/dist/{prd-focus-pushdown.js → prd/focus-pushdown.js} +3 -3
  339. package/dist/prd/focus-pushdown.js.map +1 -0
  340. package/dist/{prd-frontier.d.ts → prd/frontier.d.ts} +2 -2
  341. package/dist/prd/frontier.d.ts.map +1 -0
  342. package/dist/{prd-frontier.js → prd/frontier.js} +1 -1
  343. package/dist/prd/frontier.js.map +1 -0
  344. package/dist/prd/index.d.ts +26 -0
  345. package/dist/prd/index.d.ts.map +1 -0
  346. package/dist/prd/index.js +25 -0
  347. package/dist/prd/index.js.map +1 -0
  348. package/dist/{prd-steward.d.ts → prd/steward.d.ts} +4 -4
  349. package/dist/prd/steward.d.ts.map +1 -0
  350. package/dist/{prd-steward.js → prd/steward.js} +4 -4
  351. package/dist/prd/steward.js.map +1 -0
  352. package/dist/{prd-viability.d.ts → prd/viability.d.ts} +2 -2
  353. package/dist/prd/viability.d.ts.map +1 -0
  354. package/dist/{prd-viability.js → prd/viability.js} +1 -1
  355. package/dist/prd/viability.js.map +1 -0
  356. package/dist/product-scaffold.js +2 -2
  357. package/dist/product-scaffold.js.map +1 -1
  358. package/dist/prompt-contradictions.d.ts +55 -0
  359. package/dist/prompt-contradictions.d.ts.map +1 -0
  360. package/dist/prompt-contradictions.js +114 -0
  361. package/dist/prompt-contradictions.js.map +1 -0
  362. package/dist/prompt-listing.d.ts +19 -0
  363. package/dist/prompt-listing.d.ts.map +1 -1
  364. package/dist/prompt-listing.js +49 -0
  365. package/dist/prompt-listing.js.map +1 -1
  366. package/dist/prompt-sections/execution-sections.d.ts +3 -2
  367. package/dist/prompt-sections/execution-sections.d.ts.map +1 -1
  368. package/dist/prompt-sections/execution-sections.js +70 -97
  369. package/dist/prompt-sections/execution-sections.js.map +1 -1
  370. package/dist/prompt-sections/persona-sections.d.ts +12 -0
  371. package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
  372. package/dist/prompt-sections/persona-sections.js +29 -2
  373. package/dist/prompt-sections/persona-sections.js.map +1 -1
  374. package/dist/prompt-sections/role-sections.js +2 -2
  375. package/dist/prompt-sections/role-sections.js.map +1 -1
  376. package/dist/queries/context-assembly.d.ts +14 -4
  377. package/dist/queries/context-assembly.d.ts.map +1 -1
  378. package/dist/queries/context-assembly.js +14 -4
  379. package/dist/queries/context-assembly.js.map +1 -1
  380. package/dist/queries/context-lock-queries.js +1 -1
  381. package/dist/queries/context-lock-queries.js.map +1 -1
  382. package/dist/queries/deliveries.d.ts +45 -0
  383. package/dist/queries/deliveries.d.ts.map +1 -1
  384. package/dist/queries/deliveries.js +2 -0
  385. package/dist/queries/deliveries.js.map +1 -1
  386. package/dist/queries/focuses.d.ts +17 -7
  387. package/dist/queries/focuses.d.ts.map +1 -1
  388. package/dist/queries/focuses.js +27 -9
  389. package/dist/queries/focuses.js.map +1 -1
  390. package/dist/queries/index.d.ts +1 -1
  391. package/dist/queries/index.d.ts.map +1 -1
  392. package/dist/queries/index.js +1 -1
  393. package/dist/queries/index.js.map +1 -1
  394. package/dist/queries/schemas.d.ts +4 -0
  395. package/dist/queries/schemas.d.ts.map +1 -1
  396. package/dist/queries/schemas.js +8 -0
  397. package/dist/queries/schemas.js.map +1 -1
  398. package/dist/reality-pole.js +1 -1
  399. package/dist/resolvers/escalation-answers.d.ts +40 -0
  400. package/dist/resolvers/escalation-answers.d.ts.map +1 -1
  401. package/dist/resolvers/escalation-answers.js +54 -35
  402. package/dist/resolvers/escalation-answers.js.map +1 -1
  403. package/dist/resolvers/git-diff-against-base.d.ts.map +1 -1
  404. package/dist/resolvers/git-diff-against-base.js +4 -1
  405. package/dist/resolvers/git-diff-against-base.js.map +1 -1
  406. package/dist/resolvers/prd-context.js +1 -1
  407. package/dist/resolvers/shared/wiki.d.ts +27 -0
  408. package/dist/resolvers/shared/wiki.d.ts.map +1 -1
  409. package/dist/resolvers/shared/wiki.js +39 -0
  410. package/dist/resolvers/shared/wiki.js.map +1 -1
  411. package/dist/sensor-sweep.js +1 -1
  412. package/dist/spawn/delivered-manifest.d.ts +42 -0
  413. package/dist/spawn/delivered-manifest.d.ts.map +1 -0
  414. package/dist/spawn/delivered-manifest.js +64 -0
  415. package/dist/spawn/delivered-manifest.js.map +1 -0
  416. package/dist/spawn/model-routing.d.ts +277 -0
  417. package/dist/spawn/model-routing.d.ts.map +1 -0
  418. package/dist/spawn/model-routing.js +464 -0
  419. package/dist/spawn/model-routing.js.map +1 -0
  420. package/dist/spawn/process-spawn.d.ts +137 -0
  421. package/dist/spawn/process-spawn.d.ts.map +1 -0
  422. package/dist/spawn/process-spawn.js +385 -0
  423. package/dist/spawn/process-spawn.js.map +1 -0
  424. package/dist/spawn/prompt-assembly.d.ts +170 -0
  425. package/dist/spawn/prompt-assembly.d.ts.map +1 -0
  426. package/dist/spawn/prompt-assembly.js +272 -0
  427. package/dist/spawn/prompt-assembly.js.map +1 -0
  428. package/dist/spawn/shared.d.ts +96 -0
  429. package/dist/spawn/shared.d.ts.map +1 -0
  430. package/dist/spawn/shared.js +14 -0
  431. package/dist/spawn/shared.js.map +1 -0
  432. package/dist/spawn/spawn-decision.d.ts +239 -0
  433. package/dist/spawn/spawn-decision.d.ts.map +1 -0
  434. package/dist/spawn/spawn-decision.js +437 -0
  435. package/dist/spawn/spawn-decision.js.map +1 -0
  436. package/dist/spawn/worktree-session.d.ts +105 -0
  437. package/dist/spawn/worktree-session.d.ts.map +1 -0
  438. package/dist/spawn/worktree-session.js +216 -0
  439. package/dist/spawn/worktree-session.js.map +1 -0
  440. package/dist/spawner/lifecycle.js +5 -5
  441. package/dist/spawner/lifecycle.js.map +1 -1
  442. package/dist/spawner/resolution.js +4 -4
  443. package/dist/spawner/resolution.js.map +1 -1
  444. package/dist/stall-detector-config.d.ts +4 -0
  445. package/dist/stall-detector-config.d.ts.map +1 -1
  446. package/dist/stall-detector-config.js +6 -0
  447. package/dist/stall-detector-config.js.map +1 -1
  448. package/dist/state-cascade.js +1 -1
  449. package/dist/state-cascade.js.map +1 -1
  450. package/dist/trigger-executor.d.ts +5 -9
  451. package/dist/trigger-executor.d.ts.map +1 -1
  452. package/dist/trigger-executor.js +14 -36
  453. package/dist/trigger-executor.js.map +1 -1
  454. package/dist/types/config.d.ts +44 -0
  455. package/dist/types/config.d.ts.map +1 -1
  456. package/dist/types/focus.d.ts +13 -0
  457. package/dist/types/focus.d.ts.map +1 -1
  458. package/dist/types/workflow.d.ts +1 -3
  459. package/dist/types/workflow.d.ts.map +1 -1
  460. package/dist/unified-engine-lifecycle.js +1 -1
  461. package/dist/unified-init.d.ts +3 -3
  462. package/dist/unified-init.d.ts.map +1 -1
  463. package/dist/unified-init.js +9 -25
  464. package/dist/unified-init.js.map +1 -1
  465. package/dist/unified-shell.d.ts +3 -3
  466. package/dist/unified-shell.js +4 -4
  467. package/dist/unified-shell.js.map +1 -1
  468. package/dist/verification-baseline.d.ts +112 -0
  469. package/dist/verification-baseline.d.ts.map +1 -0
  470. package/dist/verification-baseline.js +264 -0
  471. package/dist/verification-baseline.js.map +1 -0
  472. package/dist/verification-config.d.ts +53 -0
  473. package/dist/verification-config.d.ts.map +1 -0
  474. package/dist/verification-config.js +72 -0
  475. package/dist/verification-config.js.map +1 -0
  476. package/dist/verification-default-on.d.ts +87 -0
  477. package/dist/verification-default-on.d.ts.map +1 -0
  478. package/dist/verification-default-on.js +186 -0
  479. package/dist/verification-default-on.js.map +1 -0
  480. package/dist/verification-deterministic.d.ts +56 -0
  481. package/dist/verification-deterministic.d.ts.map +1 -0
  482. package/dist/verification-deterministic.js +123 -0
  483. package/dist/verification-deterministic.js.map +1 -0
  484. package/dist/verification-engine.d.ts +22 -15
  485. package/dist/verification-engine.d.ts.map +1 -1
  486. package/dist/verification-engine.js +94 -65
  487. package/dist/verification-engine.js.map +1 -1
  488. package/dist/verification-failure-parser.d.ts +48 -0
  489. package/dist/verification-failure-parser.d.ts.map +1 -0
  490. package/dist/verification-failure-parser.js +102 -0
  491. package/dist/verification-failure-parser.js.map +1 -0
  492. package/dist/verification-feedback.d.ts +58 -0
  493. package/dist/verification-feedback.d.ts.map +1 -0
  494. package/dist/verification-feedback.js +110 -0
  495. package/dist/verification-feedback.js.map +1 -0
  496. package/dist/{worktree-focus.d.ts → worktree/focus.d.ts} +2 -2
  497. package/dist/worktree/focus.d.ts.map +1 -0
  498. package/dist/{worktree-focus.js → worktree/focus.js} +7 -7
  499. package/dist/worktree/focus.js.map +1 -0
  500. package/dist/worktree/index.d.ts +16 -0
  501. package/dist/worktree/index.d.ts.map +1 -0
  502. package/dist/worktree/index.js +16 -0
  503. package/dist/worktree/index.js.map +1 -0
  504. package/dist/{worktree-safety.d.ts → worktree/safety.d.ts} +1 -1
  505. package/dist/worktree/safety.d.ts.map +1 -0
  506. package/dist/{worktree-safety.js → worktree/safety.js} +2 -2
  507. package/dist/worktree/safety.js.map +1 -0
  508. package/dist/{worktree-state.d.ts → worktree/state.d.ts} +1 -1
  509. package/dist/worktree/state.d.ts.map +1 -0
  510. package/dist/{worktree-state.js → worktree/state.js} +6 -6
  511. package/dist/worktree/state.js.map +1 -0
  512. package/dist/worktree.d.ts +1 -1
  513. package/dist/worktree.js +5 -5
  514. package/dist/worktree.js.map +1 -1
  515. package/package.json +5 -4
  516. package/dist/git-activity.d.ts.map +0 -1
  517. package/dist/git-activity.js.map +0 -1
  518. package/dist/git-branch.d.ts.map +0 -1
  519. package/dist/git-branch.js.map +0 -1
  520. package/dist/git-fetch.d.ts.map +0 -1
  521. package/dist/git-fetch.js.map +0 -1
  522. package/dist/git-genesis.d.ts.map +0 -1
  523. package/dist/git-genesis.js.map +0 -1
  524. package/dist/git-integration.d.ts.map +0 -1
  525. package/dist/git-integration.js.map +0 -1
  526. package/dist/git-merge-helpers.d.ts.map +0 -1
  527. package/dist/git-merge-helpers.js.map +0 -1
  528. package/dist/git-merge-lock.d.ts.map +0 -1
  529. package/dist/git-merge-lock.js.map +0 -1
  530. package/dist/git-merge-strategies.d.ts.map +0 -1
  531. package/dist/git-merge-strategies.js.map +0 -1
  532. package/dist/git-merge.d.ts.map +0 -1
  533. package/dist/git-merge.js.map +0 -1
  534. package/dist/git-state-detector.d.ts.map +0 -1
  535. package/dist/git-state-detector.js.map +0 -1
  536. package/dist/git-types.d.ts.map +0 -1
  537. package/dist/git-types.js.map +0 -1
  538. package/dist/git-utils.d.ts.map +0 -1
  539. package/dist/git-utils.js.map +0 -1
  540. package/dist/loop-context-audit-pass.d.ts.map +0 -1
  541. package/dist/loop-context-audit-pass.js.map +0 -1
  542. package/dist/loop-engine-types.d.ts.map +0 -1
  543. package/dist/loop-engine-types.js.map +0 -1
  544. package/dist/loop-engine.d.ts.map +0 -1
  545. package/dist/loop-engine.js.map +0 -1
  546. package/dist/loop-event-bus.d.ts.map +0 -1
  547. package/dist/loop-event-bus.js.map +0 -1
  548. package/dist/loop-llm-client.d.ts.map +0 -1
  549. package/dist/loop-llm-client.js.map +0 -1
  550. package/dist/loop-llm-flag.d.ts.map +0 -1
  551. package/dist/loop-llm-flag.js.map +0 -1
  552. package/dist/loop-operational-block.d.ts.map +0 -1
  553. package/dist/loop-operational-block.js.map +0 -1
  554. package/dist/loop-prompt-builder.d.ts.map +0 -1
  555. package/dist/loop-prompt-builder.js.map +0 -1
  556. package/dist/loop-variance.d.ts.map +0 -1
  557. package/dist/loop-variance.js.map +0 -1
  558. package/dist/nexus-endpoint-clearance.d.ts.map +0 -1
  559. package/dist/nexus-endpoint-clearance.js.map +0 -1
  560. package/dist/nexus-escalation-bridge.d.ts.map +0 -1
  561. package/dist/nexus-escalation-bridge.js.map +0 -1
  562. package/dist/nexus-incoming.d.ts.map +0 -1
  563. package/dist/nexus-incoming.js.map +0 -1
  564. package/dist/nexus-intake-spawn.d.ts.map +0 -1
  565. package/dist/nexus-intake-spawn.js.map +0 -1
  566. package/dist/nexus-intake.d.ts.map +0 -1
  567. package/dist/nexus-intake.js.map +0 -1
  568. package/dist/nexus-return.d.ts.map +0 -1
  569. package/dist/nexus-return.js.map +0 -1
  570. package/dist/otlp-log-parser.d.ts.map +0 -1
  571. package/dist/otlp-log-parser.js.map +0 -1
  572. package/dist/otlp-metric-parser.d.ts.map +0 -1
  573. package/dist/otlp-metric-parser.js.map +0 -1
  574. package/dist/otlp-port-manager.d.ts.map +0 -1
  575. package/dist/otlp-port-manager.js.map +0 -1
  576. package/dist/otlp-receiver.d.ts.map +0 -1
  577. package/dist/otlp-receiver.js.map +0 -1
  578. package/dist/otlp-types.d.ts.map +0 -1
  579. package/dist/otlp-types.js.map +0 -1
  580. package/dist/prd-controller.d.ts.map +0 -1
  581. package/dist/prd-controller.js.map +0 -1
  582. package/dist/prd-divergence.d.ts.map +0 -1
  583. package/dist/prd-divergence.js.map +0 -1
  584. package/dist/prd-focus-pushdown.d.ts.map +0 -1
  585. package/dist/prd-focus-pushdown.js.map +0 -1
  586. package/dist/prd-frontier.d.ts.map +0 -1
  587. package/dist/prd-frontier.js.map +0 -1
  588. package/dist/prd-steward.d.ts.map +0 -1
  589. package/dist/prd-steward.js.map +0 -1
  590. package/dist/prd-viability.d.ts.map +0 -1
  591. package/dist/prd-viability.js.map +0 -1
  592. package/dist/worktree-focus.d.ts.map +0 -1
  593. package/dist/worktree-focus.js.map +0 -1
  594. package/dist/worktree-safety.d.ts.map +0 -1
  595. package/dist/worktree-safety.js.map +0 -1
  596. package/dist/worktree-state.d.ts.map +0 -1
  597. package/dist/worktree-state.js.map +0 -1
@@ -0,0 +1,272 @@
1
+ /**
2
+ * Prompt-assembly seam for the focus-team spawn path.
3
+ *
4
+ * Extracted verbatim from focus-executor.ts (behavior-preserving): the pure
5
+ * prompt-context factory, the composed team-lead prompt builder, the stdin
6
+ * message selector (fresh prompt vs resume-delta vs scoping directive), and the
7
+ * scoping helpers they depend on. focus-executor.ts re-exports this surface for
8
+ * backward compatibility, so external importers keep resolving these symbols
9
+ * from '../focus-executor.js'.
10
+ *
11
+ * Cycle rule: this module must NOT import from '../focus-executor.js'.
12
+ */
13
+ import { getActiveFocuses } from '../queries/deliveries.js';
14
+ import { consumeForceFullPassReview } from '../completion/review-exit-phase.js';
15
+ import { buildRoleFrameworkPrompt, buildRemediationFramingSection, buildReviewOutcomeStampingSection, buildReviewSensorAuditSection, buildResumeDeltaMessage, } from '../team-prompt-base.js';
16
+ import { buildFocusTeamPrompt } from '../focus-prompt-builder.js';
17
+ import { resolveAssemblyRecipeWithManifest } from '../assembly-engine.js';
18
+ /**
19
+ * Phase C input: assemble the FocusTeamPromptContext threaded into both the
20
+ * directive and legacy prompt builders. Pure factory -- byte-identical to the
21
+ * original inline object literal; extracted so the orchestrator reads as ordered
22
+ * phase calls rather than inlining the context shape.
23
+ */
24
+ export function buildFocusPromptContext(args) {
25
+ const { config, focusId, focusName, focusDescription, deliveries, issues, executionConfig, pipelineConfig, deploymentProfileSnapshot, readOnly, loopContext, reviewFiledOpenCount, engineId, } = args;
26
+ return {
27
+ focusId,
28
+ focusName,
29
+ focusDescription,
30
+ organizationId: config.organizationId,
31
+ productId: config.productId,
32
+ deliveries,
33
+ issues,
34
+ executionConfig,
35
+ pipelineConfig,
36
+ deploymentProfileSnapshot,
37
+ readOnly,
38
+ loopContext,
39
+ reviewFiledOpenCount,
40
+ engineId,
41
+ };
42
+ }
43
+ /**
44
+ * Phase C: compose the final team-lead message -- role framework + remediation
45
+ * framing + directive body (or the legacy full focus prompt), then the PRD
46
+ * milestone push-down appended last so it reaches BOTH prompt paths. Pure +
47
+ * testable. Byte-identical to the original inline composition.
48
+ */
49
+ export function buildSpawnPrompt(args) {
50
+ const { role, promptContext, useLegacyFullPrompt, directiveBody, prdMilestoneContext, answeredEscalationsSection = '', isReviewPass, agentSessionId } = args;
51
+ let prompt;
52
+ if (!useLegacyFullPrompt && directiveBody !== null) {
53
+ const framing = buildRemediationFramingSection(directiveBody).join('\n');
54
+ prompt = buildRoleFrameworkPrompt(role, promptContext)
55
+ + '\n\n'
56
+ + (framing ? framing + '\n' : '')
57
+ + directiveBody;
58
+ }
59
+ else {
60
+ prompt = buildFocusTeamPrompt(role, promptContext);
61
+ }
62
+ // Answered directed escalations (first-class): appended so BOTH the directive
63
+ // and legacy prompt paths carry answered intent. On the legacy path the same
64
+ // content also appears via the loop-context section; the fresh directive path
65
+ // has no other channel for it, which is the loss this closes.
66
+ if (answeredEscalationsSection.trim()) {
67
+ prompt += '\n\n' + answeredEscalationsSection;
68
+ }
69
+ // Review passes carry two review-only obligations. The sensor-audit charge
70
+ // (weak-sensor audit injection #8) makes the independent review frame
71
+ // interrogate the tests, not just the code; the outcome-stamping obligation
72
+ // is the terminal step, so it is appended LAST. Both reach the directive and
73
+ // legacy prompt paths and are emitted for review spawns only.
74
+ if (isReviewPass) {
75
+ prompt += '\n\n' + buildReviewSensorAuditSection().join('\n');
76
+ prompt += '\n\n' + buildReviewOutcomeStampingSection(agentSessionId).join('\n');
77
+ }
78
+ // Append PRD milestone context (push-down) so a PRD-armed focus team inherits
79
+ // the milestone's goal/expansion/vision + frontier position. Appended to the
80
+ // final prompt so it reaches BOTH the directive and legacy prompt paths; empty
81
+ // for any focus not armed by a PRD (no change to ordinary focus spawns).
82
+ if (prdMilestoneContext.trim()) {
83
+ prompt += '\n\n' + prdMilestoneContext;
84
+ }
85
+ return prompt;
86
+ }
87
+ /**
88
+ * Phase: choose the stdin message. A fresh spawn sends the full composed prompt;
89
+ * a resume sends an incremental delta (git diff + prior findings to verify) since
90
+ * the resumed session already holds its role + accumulated context (INJ-D).
91
+ *
92
+ * The scoping case is the one exception that overrides the fresh-vs-resume split:
93
+ * when a NON-read_only (executable) focus has queued deliveries carrying only
94
+ * Context Group issues and zero Task/Bug issues, this returns the role framework
95
+ * PLUS `buildQueuedDeliveryScopingMessage` REGARDLESS of resumeId. The caller pairs
96
+ * this with `resolveScopingSpawnResume`, which forces the spawn fresh (resumeId
97
+ * null) so the directive lands on a new session instead of no-opping a concluded
98
+ * one. Because the fresh session holds no accumulated context, the role framework
99
+ * (identity + Scoping Mandate + status-update rules) is prepended here; only the
100
+ * audit/kickoff DIRECTIVE body carried in `prompt` is dropped, per AC. `readOnlyFocus`
101
+ * focuses are discovery-only (audit-playbook origin): their CG-only deliveries are
102
+ * INTENTIONALLY unscoped, so they are never driven into scoping here --
103
+ * delivery-lifecycle terminalizes them instead.
104
+ */
105
+ export async function buildSpawnMessage(args) {
106
+ const { prompt, resumeId, readOnlyFocus, role, promptContext, spawnSpec, config, focusId, focusName, deliveries, issues, worktreePath, priorFindings, answeredEscalationsSection = '', gitDiffManifestSink } = args;
107
+ const answersSuffix = answeredEscalationsSection.trim() ? `\n\n${answeredEscalationsSection}` : '';
108
+ // Scoping directive takes priority over the fresh/resume split, but ONLY for
109
+ // executable (non-discovery) focuses. It is returned even when resumeId is
110
+ // null because the caller forces this spawn fresh for exactly this case.
111
+ if (!readOnlyFocus) {
112
+ const unscopedDeliveries = findQueuedDeliveriesWithoutTaskIssues(deliveries, issues);
113
+ if (unscopedDeliveries.length > 0) {
114
+ // Prepend the role framework (identity, Scoping Mandate, MANDATORY
115
+ // status-update rules, worker-management, escalation) so the FORCED-FRESH
116
+ // scoping session receives its operating contract -- the audit/kickoff
117
+ // DIRECTIVE body in `prompt` is the only part intentionally dropped, not the
118
+ // role framework. On a fresh session stdin is the sole first-turn message,
119
+ // so omitting the framework would leave the team lead with no identity.
120
+ const roleFramework = buildRoleFrameworkPrompt(role, promptContext);
121
+ const scopingDirective = buildQueuedDeliveryScopingMessage({
122
+ lineage: spawnSpec.lineage,
123
+ focusName,
124
+ deliveries: unscopedDeliveries,
125
+ });
126
+ const messageToSend = `${roleFramework}\n\n${scopingDirective}${answersSuffix}`;
127
+ console.log(`[focus-executor] Spawning fresh scoping session for "${focusName}" ` +
128
+ `-- role framework + explicit scoping directive for ${unscopedDeliveries.length} queued ` +
129
+ `zero-issue deliver${unscopedDeliveries.length === 1 ? 'y' : 'ies'} ` +
130
+ `(lineage ${spawnSpec.lineage}, ${messageToSend.length} chars)`);
131
+ return messageToSend;
132
+ }
133
+ }
134
+ if (!resumeId)
135
+ return prompt;
136
+ // Review resume delta is computed from the coverage watermark, not "since
137
+ // last spawn": a resumed reviewer sees reviewed_through_sha..tip when a
138
+ // completed cycle set the watermark, and the FULL branch diff (with an
139
+ // explicit full-pass demand) when none exists (first review, or the prior
140
+ // cycle aborted). Non-review resumes keep the integration-base diff.
141
+ let reviewCoverage;
142
+ let diffBaseOverride;
143
+ if (spawnSpec.lineage === 'review') {
144
+ try {
145
+ // A prior review under-covered (the branch drifted mid-review), so the
146
+ // review-exit handler armed a full pass: the incremental watermark cannot
147
+ // be trusted this cycle. consumeForceFullPassReview clears the one-shot arm.
148
+ if (consumeForceFullPassReview(focusId)) {
149
+ reviewCoverage = { mode: 'full-pass' };
150
+ }
151
+ else {
152
+ const focuses = await getActiveFocuses(config.organizationId, config.productId);
153
+ const watermark = focuses.find(f => f.focus_id === focusId)?.reviewed_through_sha ?? null;
154
+ if (watermark) {
155
+ diffBaseOverride = watermark;
156
+ reviewCoverage = { mode: 'incremental', baseSha: watermark };
157
+ }
158
+ else {
159
+ reviewCoverage = { mode: 'full-pass' };
160
+ }
161
+ }
162
+ }
163
+ catch (err) {
164
+ // On a resolve failure, default to a full pass -- the safe direction
165
+ // (re-cover everything rather than silently skip an unreviewed range).
166
+ console.debug(`[focus-executor] Review coverage watermark resolve failed (non-fatal):`, err.message);
167
+ reviewCoverage = { mode: 'full-pass' };
168
+ }
169
+ }
170
+ let gitDiff = '';
171
+ try {
172
+ const diffCtx = {
173
+ focusId,
174
+ deliveryIds: deliveries.map(d => d.id),
175
+ worktreePath,
176
+ config,
177
+ organizationId: config.organizationId,
178
+ productId: config.productId,
179
+ ...(diffBaseOverride ? { diffBaseOverride } : {}),
180
+ };
181
+ const { content, manifest } = await resolveAssemblyRecipeWithManifest(['git.diff_against_base'], diffCtx);
182
+ gitDiff = content;
183
+ if (gitDiffManifestSink)
184
+ gitDiffManifestSink.push(...manifest);
185
+ }
186
+ catch (err) {
187
+ console.debug(`[focus-executor] Resume-delta diff assembly failed (non-fatal):`, err.message);
188
+ }
189
+ const messageToSend = buildResumeDeltaMessage({
190
+ lineage: spawnSpec.lineage,
191
+ focusName,
192
+ gitDiff,
193
+ priorFindings,
194
+ ...(reviewCoverage ? { reviewCoverage } : {}),
195
+ }) + answersSuffix;
196
+ console.log(`[focus-executor] Resuming Claude session ${resumeId} for "${focusName}" ` +
197
+ `-- sending incremental delta (lineage ${spawnSpec.lineage}, ${messageToSend.length} chars, ` +
198
+ `${priorFindings.length} prior finding(s))`);
199
+ return messageToSend;
200
+ }
201
+ /**
202
+ * Decide whether this spawn must be forced fresh to deliver a scoping directive,
203
+ * and return the resume id the spawn should actually use.
204
+ *
205
+ * The wedge this closes: a queued delivery carrying only Context Group issues and
206
+ * zero Task/Bug issues can never cross the queued->coding gate. The daemon
207
+ * re-spawns the focus every poll, but the resume lands on a session that already
208
+ * considers the audit "done" and no-ops in one turn. The fix is to force the
209
+ * scoping spawn FRESH (resumeId null) so `buildQueuedDeliveryScopingMessage`
210
+ * primes a new session as its first instruction rather than a resume-delta a
211
+ * concluded session ignores.
212
+ *
213
+ * Only executable focuses are driven into scoping. A `readOnly` (discovery-only,
214
+ * audit-playbook) focus's CG-only deliveries are intentionally unscoped, so this
215
+ * never forces them fresh -- their resume id passes through unchanged and the
216
+ * delivery reaches a terminal state via the reconciler's discovery-only path.
217
+ *
218
+ * Pure and exported so the fresh-spawn contract is unit-testable without a live
219
+ * spawn.
220
+ */
221
+ export function resolveScopingSpawnResume(args) {
222
+ const { readOnly, deliveries, issues, resumeId } = args;
223
+ if (readOnly)
224
+ return { resumeId, isScopingSpawn: false };
225
+ const isScopingSpawn = findQueuedDeliveriesWithoutTaskIssues(deliveries, issues).length > 0;
226
+ return {
227
+ resumeId: isScopingSpawn ? null : resumeId,
228
+ isScopingSpawn,
229
+ };
230
+ }
231
+ export function findQueuedDeliveriesWithoutTaskIssues(deliveries, issues) {
232
+ const taskIssueCounts = new Map();
233
+ for (const issue of issues) {
234
+ if (issue.issueType !== 'Task' && issue.issueType !== 'Bug')
235
+ continue;
236
+ taskIssueCounts.set(issue.deliveryId, (taskIssueCounts.get(issue.deliveryId) ?? 0) + 1);
237
+ }
238
+ return deliveries.filter(delivery => (delivery.executionStatus ?? '') === 'queued' &&
239
+ (taskIssueCounts.get(delivery.id) ?? 0) === 0);
240
+ }
241
+ export function buildQueuedDeliveryScopingMessage(args) {
242
+ const deliverySections = args.deliveries
243
+ .slice()
244
+ .sort((a, b) => a.priorityRank - b.priorityRank)
245
+ .map((delivery, index) => [
246
+ `### ${index + 1}. ${delivery.name}`,
247
+ `- Delivery ID: ${delivery.id}`,
248
+ `- Priority rank: ${delivery.priorityRank}`,
249
+ '',
250
+ '**Description**',
251
+ delivery.description?.trim() || '(none)',
252
+ '',
253
+ '**Acceptance Criteria**',
254
+ delivery.acceptanceCriteria?.trim() || '(none)',
255
+ '',
256
+ '**Technical Context**',
257
+ delivery.techContext?.trim() || '(none)',
258
+ ].join('\n'))
259
+ .join('\n\n');
260
+ return [
261
+ `# Scoping Required for Newly Queued Deliveries`,
262
+ '',
263
+ `You are the team lead for lineage "${args.lineage}" on focus "${args.focusName}". This is a FRESH scoping turn (not an incremental coding-resume): the role framework above is your operating contract for it.`,
264
+ '',
265
+ `The focus has queued deliveries with zero Task/Bug issues. Decompose each delivery below into Task/Bug issues before doing code work. For each delivery, create agent-satisfiable issues from its acceptance criteria, then move at least one Task/Bug issue to In Progress. The daemon advances the delivery queued -> coding (single-writer reconciler) the moment a work issue is In Progress.`,
266
+ '',
267
+ `Do not acknowledge and stop after reading this message. The required output of this turn is scoped issues on every listed delivery, with issue statuses kept current via Telora.`,
268
+ '',
269
+ deliverySections,
270
+ ].join('\n');
271
+ }
272
+ //# sourceMappingURL=prompt-assembly.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-assembly.js","sourceRoot":"","sources":["../../src/spawn/prompt-assembly.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EACL,wBAAwB,EACxB,8BAA8B,EAC9B,iCAAiC,EACjC,6BAA6B,EAC7B,uBAAuB,GAExB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,iCAAiC,EAAoD,MAAM,uBAAuB,CAAC;AAG5H;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAevC;IACC,MAAM,EACJ,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,eAAe,EACjF,cAAc,EAAE,yBAAyB,EAAE,QAAQ,EAAE,WAAW,EAChE,oBAAoB,EAAE,QAAQ,GAC/B,GAAG,IAAI,CAAC;IACT,OAAO;QACL,OAAO;QACP,SAAS;QACT,gBAAgB;QAChB,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,UAAU;QACV,MAAM;QACN,eAAe;QACf,cAAc;QACd,yBAAyB;QACzB,QAAQ;QACR,WAAW;QACX,oBAAoB;QACpB,QAAQ;KACT,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,IA4BhC;IACC,MAAM,EAAE,IAAI,EAA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C,YAAY,CAAC;SAC/C,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC;QACxB,OAAO,KAAK,GAAG,CAAC,KAAK,QAAQ,CAAC,IAAI,EAAE;QACpC,kBAAkB,QAAQ,CAAC,EAAE,EAAE;QAC/B,oBAAoB,QAAQ,CAAC,YAAY,EAAE;QAC3C,EAAE;QACF,iBAAiB;QACjB,QAAQ,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,QAAQ;QACxC,EAAE;QACF,yBAAyB;QACzB,QAAQ,CAAC,kBAAkB,EAAE,IAAI,EAAE,IAAI,QAAQ;QAC/C,EAAE;QACF,uBAAuB;QACvB,QAAQ,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,QAAQ;KACzC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACZ,IAAI,CAAC,MAAM,CAAC,CAAC;IAEhB,OAAO;QACL,gDAAgD;QAChD,EAAE;QACF,sCAAsC,IAAI,CAAC,OAAO,eAAe,IAAI,CAAC,SAAS,iIAAiI;QAChN,EAAE;QACF,mYAAmY;QACnY,EAAE;QACF,kLAAkL;QAClL,EAAE;QACF,gBAAgB;KACjB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Shared spawn-path types used by BOTH focus-executor.ts and the extracted
3
+ * spawn/ seams (prompt-assembly.ts).
4
+ *
5
+ * Lives here to break the import cycle: a type referenced by an extracted seam
6
+ * AND by code that remains in focus-executor.ts cannot be defined in
7
+ * focus-executor.ts (that would force a back-edge import from the seam to
8
+ * '../focus-executor.js'), so it is hoisted here where both sides import it
9
+ * without a cycle.
10
+ *
11
+ * Cycle rule: this module must NOT import from '../focus-executor.js'.
12
+ */
13
+ import type { getFocusDeliveries, getFocusIssues, getProductDeploymentProfileSnapshot } from '../queries/focuses.js';
14
+ import type { AssemblyManifestEntry } from '../assembly-engine.js';
15
+ import type { SessionContinuity } from '../session-lineage.js';
16
+ /**
17
+ * Phase 1 contract: everything the spawn needs that comes from the DB / assembly
18
+ * layer, fetched up front. `assemblyManifest` is the live accumulator the later
19
+ * phases keep appending to (directive assembly, etc.) before it is persisted.
20
+ */
21
+ export interface SpawnContext {
22
+ deliveries: Awaited<ReturnType<typeof getFocusDeliveries>>;
23
+ issues: Awaited<ReturnType<typeof getFocusIssues>>;
24
+ deploymentProfileSnapshot: Awaited<ReturnType<typeof getProductDeploymentProfileSnapshot>> | null;
25
+ /**
26
+ * The answered-directed-escalation section rendered first-class + the ids it
27
+ * delivers. Delivered on EVERY message shape (directive prompt, resume delta,
28
+ * scoping) and stamped consumed only AFTER the message is dispatched -- decoupled
29
+ * from resolution so answered intent is never lost on a path that drops the
30
+ * loop-context recipe. See resolvers/escalation-answers.resolveAnsweredEscalations.
31
+ */
32
+ answeredEscalations: {
33
+ section: string;
34
+ ids: string[];
35
+ };
36
+ prdMilestoneContext: string;
37
+ /**
38
+ * Manifest for the PRD milestone context, kept SEPARATE from assemblyManifest
39
+ * because it is delivered only on the fresh-prompt shapes (buildSpawnPrompt
40
+ * appends it; the resume-delta / scoping messages drop it). Folded into the
41
+ * delivered manifest per shape by the spawn orchestrator.
42
+ */
43
+ prdMilestoneManifest: AssemblyManifestEntry[];
44
+ /**
45
+ * The directive / legacy-loop-context manifest accumulator. Entries are pushed
46
+ * ONLY on the paths that actually render them: directive-recipe entries on a
47
+ * fresh directive spawn (resolveDirectiveOrFallback skips assembly otherwise),
48
+ * loop-context entries on the legacy path (resolveLegacyLoopContext). Empty on
49
+ * resume-delta / scoping spawns -- so it already tracks delivered sources for
50
+ * those two families.
51
+ */
52
+ assemblyManifest: AssemblyManifestEntry[];
53
+ }
54
+ /**
55
+ * Phase A contract: the resolved directive body + the spawn metadata derived
56
+ * with it, BEFORE the prompt is built. Covers all three paths -- pending
57
+ * directive, current-stage directive, legacy fallback -- in one typed result.
58
+ *
59
+ * Hoisted here to break the import cycle: referenced by both the worktree-session
60
+ * seam (resolveEngineForPass consumes spawnDirectiveDeclared) AND by code that
61
+ * remains in focus-executor.ts (resolveDirectiveOrFallback returns it), so it
62
+ * cannot live in either without a back-edge.
63
+ */
64
+ export interface DirectiveResolution {
65
+ /** Directive content appended after the role framework; null => legacy prompt. */
66
+ directiveBody: string | null;
67
+ /** Directive-declared model (legacy fallback only; filtered downstream). */
68
+ directiveModel: string | null;
69
+ /**
70
+ * Workflow stage directive engine + local-model for this spawn (the Workflow
71
+ * layer of Focus > Workflow > Default on those two axes), or null. Threaded
72
+ * into resolveEngineForPass (engine) and resolveSpawnModel (local model) so all
73
+ * three axes inherit the stage directive when the focus does not override.
74
+ */
75
+ directiveEngine: string | null;
76
+ directiveLocalModel: string | null;
77
+ /**
78
+ * Focus model override captured when a pending spawn directive (respawn) was
79
+ * stored, or null. Threaded into resolveSpawnModel so respawn resolves the
80
+ * team model under the SAME precedence as initial spawn (focus override ->
81
+ * stage -> CLI). Null when this spawn did not come from a pending directive
82
+ * (initial spawn / stage-directive path), where the live pipeline_config.model
83
+ * already carries the override.
84
+ */
85
+ pendingFocusOverrideModel: string | null;
86
+ /** Workflow stage active at spawn -- stamped as the .stage telemetry lever. */
87
+ spawnStageName: string | null;
88
+ /** Lineage + continuity declared by whatever fired this spawn (resolved later). */
89
+ spawnDirectiveDeclared: {
90
+ lineage?: string | null;
91
+ continuity?: SessionContinuity | null;
92
+ } | null;
93
+ /** True => no usable directive; build the legacy full focus prompt. */
94
+ useLegacyFullPrompt: boolean;
95
+ }
96
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/spawn/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,mCAAmC,EACpC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,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-path types used by BOTH focus-executor.ts and the extracted
3
+ * spawn/ seams (prompt-assembly.ts).
4
+ *
5
+ * Lives here to break the import cycle: a type referenced by an extracted seam
6
+ * AND by code that remains in focus-executor.ts cannot be defined in
7
+ * focus-executor.ts (that would force a back-edge import from the seam to
8
+ * '../focus-executor.js'), so it is hoisted here where both sides import it
9
+ * without a cycle.
10
+ *
11
+ * Cycle rule: this module must NOT import from '../focus-executor.js'.
12
+ */
13
+ export {};
14
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/spawn/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
@@ -0,0 +1,239 @@
1
+ /**
2
+ * Spawn-decision seam for the focus-team spawn path.
3
+ *
4
+ * Extracted verbatim from focus-executor.ts (behavior-preserving): the
5
+ * rank-ordered pre-spawn guard (findActionableDeliveries), the Phase 1 context
6
+ * fetch (fetchSpawnContext), the Phase 2 actionable-delivery resolution
7
+ * (resolveActionableDeliveries), and the Phase A directive-or-fallback resolver
8
+ * (resolveDirectiveOrFallback) -- plus the SpawnFocusTeamParams input contract
9
+ * and the DEFAULT_LOOP_CONTEXT_RECIPE these consume. focus-executor.ts
10
+ * re-exports this surface for backward compatibility, so external importers keep
11
+ * resolving these symbols from '../focus-executor.js'.
12
+ *
13
+ * Cycle rule: this module must NOT import from '../focus-executor.js'.
14
+ */
15
+ import type { DaemonConfig, AgentRole, FocusTeamState, PipelineConfig } from '../types.js';
16
+ import { getFocusDeliveries, getFocusIssues } from '../queries/focuses.js';
17
+ import { consumePendingSpawnDirective } from '../directive-executor.js';
18
+ import { type AssemblyManifestEntry } from '../assembly-engine.js';
19
+ import { type EngineOverride } from '../backends/index.js';
20
+ import type { SessionContinuity } from '../session-lineage.js';
21
+ import type { SpawnContext, DirectiveResolution } from './shared.js';
22
+ /**
23
+ * Default loop-context assembly recipe for a focus-team spawn.
24
+ *
25
+ * Composed once per spawn into the team prompt. `focus.endpoint_catalog`
26
+ * is placed right after `focus.injections` so the exposed/consumed endpoint
27
+ * catalog reads alongside the tree context -- surfacing cross-product
28
+ * interrelations at scoping time (shift-left) so a dependency on another
29
+ * product can be mapped into the reality tree as an externally-owned obstacle
30
+ * rather than surfacing reactively as a blocked_by_external escalation.
31
+ */
32
+ export declare const DEFAULT_LOOP_CONTEXT_RECIPE: string[];
33
+ /**
34
+ * Result of the pre-spawn guard. Discriminated union so the caller can
35
+ * distinguish between "no work yet, spawn a planning team" and "actionable
36
+ * deliveries are queued, run them" without conflating null with empty.
37
+ */
38
+ export type SpawnDecision = {
39
+ kind: 'planning';
40
+ } | {
41
+ kind: 'execute';
42
+ deliveries: Awaited<ReturnType<typeof getFocusDeliveries>>;
43
+ } | {
44
+ kind: 'skip';
45
+ };
46
+ /**
47
+ * Pre-spawn guard: rank-ordered walk that collects every agent-actionable
48
+ * delivery into the spawn set.
49
+ *
50
+ * "Actionable" and "blocking" are independent properties of a status:
51
+ *
52
+ * - actionable = `isStatusAgentActionable(status)` -- queued | coding |
53
+ * verify_failed. Work the team can pick up.
54
+ * - blocking = `isStatusBlocking(status)` -- statuses that gate
55
+ * subsequent ranks (queued, coding, planning, paused).
56
+ *
57
+ * A delivery may be actionable and blocking (queued, coding -- the common
58
+ * case), actionable and non-blocking (`verify_failed` -- has remediation
59
+ * work from a review pass, but the next-ranked queued delivery should not
60
+ * wait on it), or non-actionable and blocking (planning, paused -- gates
61
+ * the queue and the team has nothing to do here).
62
+ *
63
+ * Walk semantics:
64
+ * - Collect every actionable delivery into the spawn set.
65
+ * - Stop the walk when we hit the first blocking-and-not-actionable status
66
+ * (planning, paused). Lower-ranked deliveries past this point are gated.
67
+ * - Skip past non-blocking non-actionable statuses (done, cancelled, verify)
68
+ * without breaking the walk.
69
+ *
70
+ * Returns:
71
+ * - 'planning' when the focus has zero deliveries (agent will scope them).
72
+ * - 'execute' with the collected actionable deliveries.
73
+ * - 'skip' when the walk found zero actionable deliveries.
74
+ *
75
+ * Why verify_failed must be in the spawn set: the auto-review loop
76
+ * routes a delivery from `verify` -> `verify_failed` when the review
77
+ * agent finds remediation work, clears `review_requested_at`, and emits a
78
+ * `review_completed` loop trigger. The next poll re-derives phase from
79
+ * `ACTIVE_STATUSES` (which includes verify_failed), so the focus is
80
+ * eligible to spawn. If this guard then skips past `verify_failed`, no
81
+ * team ever picks up the remediation issues and the loop dies after the
82
+ * first pass. See delivery ac5c69f7.
83
+ */
84
+ export declare function findActionableDeliveries(deliveries: Awaited<ReturnType<typeof getFocusDeliveries>>, focusName: string): SpawnDecision;
85
+ export interface SpawnFocusTeamParams {
86
+ config: DaemonConfig;
87
+ focusId: string;
88
+ focusName: string;
89
+ role: AgentRole;
90
+ pipelineConfig: PipelineConfig | null;
91
+ readOnly?: boolean;
92
+ /** Previous Claude Code session ID for --resume support (legacy single slot). */
93
+ lastClaudeSessionId?: string | null;
94
+ /**
95
+ * Per-lineage session-id map from the focus (INJ-A). The spawn resolves its
96
+ * resume id from the slot matching the lineage being spawned, so a coding
97
+ * spawn never reads a slot a review spawn wrote.
98
+ */
99
+ claudeSessionIds?: Record<string, string> | null;
100
+ /**
101
+ * Per-focus engine override (per-pass map {coding, review}); null/absent =
102
+ * inherit the org default. Fed into resolveBackend() (D3).
103
+ */
104
+ engineOverride?: EngineOverride | null;
105
+ /**
106
+ * Per-focus selected local model (per-pass map {coding?, review?} of
107
+ * local_models ids); null/absent = no specific local model selected. When the
108
+ * resolved engine for a pass is codex and this carries a ref for that pass,
109
+ * the daemon resolves the ref to coordinates and routes the spawn to that
110
+ * model's endpoint (D3).
111
+ */
112
+ localModelOverride?: Record<string, string | null> | null;
113
+ /** Org-level default engine id; null/absent = the global default ('claude'). */
114
+ orgDefaultEngine?: string | null;
115
+ /**
116
+ * Force a spawn even when findActionableDeliveries would return 'skip' (all
117
+ * deliveries verify/done). Set for the escalation answer re-arm path: the
118
+ * spawn's purpose is to consume a pending answer (delivered by the
119
+ * escalation.answers resolver in the standard recipe), not to advance a
120
+ * delivery -- so an idle/exited focus must still spawn. Mirrors the
121
+ * pending-spawn-directive bypass, which likewise spawns past a 'skip'.
122
+ */
123
+ forceSpawn?: boolean;
124
+ }
125
+ /**
126
+ * Phase 1: fetch all spawn context (deliveries / issues / product-context /
127
+ * deployment-profile / loop-context) in one Promise.all, then resolve the PRD
128
+ * milestone push-down. Returns null when the context fetch rejects -- the
129
+ * caller treats null as "tear down the freshly-inserted team and return"
130
+ * (activeTeams.delete). The PRD push-down deliberately propagates on throw,
131
+ * matching the pre-extraction behavior (it sits after the try/catch).
132
+ *
133
+ * Behavior-preserving extraction of the original inline block; the log lines,
134
+ * the deployment-profile .catch fallback, the loop-context try/catch fallback,
135
+ * and the manifest accumulation order are byte-identical.
136
+ */
137
+ export declare function fetchSpawnContext(config: DaemonConfig, focusId: string, focusName: string): Promise<SpawnContext | null>;
138
+ /**
139
+ * Resolve the legacy loop-context recipe (loop.context + focus.injections +
140
+ * focus.endpoint_catalog). Called ONLY on the legacy prompt path
141
+ * (useLegacyFullPrompt), where buildFocusTeamPrompt renders it -- the directive
142
+ * path drops loopContext entirely, so resolving it there was wasted work (and a
143
+ * duplicate focus.injections resolution on top of the directive's own assembly).
144
+ * Fails soft to empty content, never blocking the spawn.
145
+ */
146
+ export declare function resolveLegacyLoopContext(config: DaemonConfig, focusId: string): Promise<{
147
+ content: string;
148
+ manifest: AssemblyManifestEntry[];
149
+ }>;
150
+ /**
151
+ * Phase 2 contract: the actionable-delivery decision. 'skip' tells the caller to
152
+ * tear down (activeTeams.delete + return); 'proceed' carries the consumed
153
+ * pending directive (used downstream in Phase A + spawn-phase tagging), the
154
+ * collected actionable deliveries, and the planning-spawn flag.
155
+ */
156
+ export type ActionableResolution = {
157
+ kind: 'skip';
158
+ } | {
159
+ kind: 'proceed';
160
+ pendingDirective: ReturnType<typeof consumePendingSpawnDirective>;
161
+ actionableDeliveries: Awaited<ReturnType<typeof getFocusDeliveries>>;
162
+ isPlanningSpawn: boolean;
163
+ };
164
+ /**
165
+ * Phase 2: consume any pending spawn directive, enforce the rank-ordered
166
+ * pre-spawn guard, and record known-delivery bookkeeping on the team state.
167
+ *
168
+ * Mutates `teamState` exactly as the original inline block did
169
+ * (lastConsumedDirectiveHash, sessionType, planningPhase, knownDeliveryIds,
170
+ * deliveryStageIds, mergedDeliveryIds) and emits the same log lines. Returns
171
+ * 'skip' for the findActionableDeliveries skip case (the caller owns the
172
+ * activeTeams.delete + return so the team-state map stays the orchestrator's
173
+ * responsibility). Behavior byte-identical.
174
+ */
175
+ export declare function resolveActionableDeliveries(args: {
176
+ focusId: string;
177
+ focusName: string;
178
+ deliveries: Awaited<ReturnType<typeof getFocusDeliveries>>;
179
+ issues: Awaited<ReturnType<typeof getFocusIssues>>;
180
+ forceSpawn: boolean;
181
+ teamState: FocusTeamState;
182
+ }): ActionableResolution;
183
+ /**
184
+ * Phase A: resolve the team-lead directive body + spawn metadata (no prompt
185
+ * yet). Priority: pending spawn directive > current-stage directive > legacy
186
+ * full prompt. Pushes any assembled directive manifest entries onto the shared
187
+ * `assemblyManifest` accumulator.
188
+ *
189
+ * Behavior-preserving extraction of the original inline Phase A block -- the
190
+ * "Using pending spawn directive" / "Using stage directive" log lines, the
191
+ * "LEGACY PROMPT FALLBACK" warning and every fallbackReason string, and the
192
+ * directive-manifest accumulation are byte-identical.
193
+ */
194
+ /**
195
+ * Will the composed directive body actually be SENT on this spawn?
196
+ *
197
+ * buildSpawnMessage sends the full composed prompt (which carries the directive
198
+ * body) ONLY on a fresh spawn -- not scoping, no resume id. A forced-fresh
199
+ * scoping spawn sends role-framework + scoping directive, and a resume sends an
200
+ * incremental delta; both discard the directive body. So this returns false for
201
+ * those two shapes, letting resolveDirectiveOrFallback skip the body's expensive
202
+ * assembly recipe (INJ-D). Pure -- mirrors buildSpawnMessage's shape selection
203
+ * (resolveScopingSpawnResume + resolveResumeId) so the skip is unit-testable
204
+ * without a live spawn.
205
+ */
206
+ export declare function willSendDirectiveBody(args: {
207
+ declared: {
208
+ lineage?: string | null;
209
+ continuity?: SessionContinuity | null;
210
+ } | null;
211
+ stageName: string | null;
212
+ claudeSessionIds: Record<string, string> | null | undefined;
213
+ deliveries: Awaited<ReturnType<typeof getFocusDeliveries>>;
214
+ issues: Awaited<ReturnType<typeof getFocusIssues>>;
215
+ readOnly: boolean;
216
+ }): boolean;
217
+ export declare function resolveDirectiveOrFallback(args: {
218
+ config: DaemonConfig;
219
+ focusId: string;
220
+ focusName: string;
221
+ worktreePath: string;
222
+ pendingDirective: ReturnType<typeof consumePendingSpawnDirective>;
223
+ assemblyManifest: AssemblyManifestEntry[];
224
+ /**
225
+ * The focus's per-lineage session map, deliveries, issues, and read-only flag
226
+ * -- used ONLY to decide whether the current-stage directive body will actually
227
+ * be sent (INJ-D). On a resume-delta or forced-fresh scoping spawn the composed
228
+ * directive body is discarded (buildSpawnMessage sends the delta / scoping
229
+ * message), so its expensive assembly recipe (focus.context, wiki.search,
230
+ * git.diff, ...) is skipped -- directive METADATA (model/engine/localModel/
231
+ * lineage/stage) is still resolved. Absent map/deliveries => treat as a fresh
232
+ * spawn (assemble), preserving prior behavior.
233
+ */
234
+ claudeSessionIds?: Record<string, string> | null;
235
+ deliveries: Awaited<ReturnType<typeof getFocusDeliveries>>;
236
+ issues: Awaited<ReturnType<typeof getFocusIssues>>;
237
+ readOnly: boolean;
238
+ }): Promise<DirectiveResolution>;
239
+ //# sourceMappingURL=spawn-decision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spawn-decision.d.ts","sourceRoot":"","sources":["../../src/spawn/spawn-decision.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,cAAc,EACf,MAAM,aAAa,CAAC;AAIrB,OAAO,EACL,kBAAkB,EAClB,cAAc,EAGf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,4BAA4B,EAI7B,MAAM,0BAA0B,CAAC;AA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