@telora/daemon 0.19.47 → 0.19.74

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 (529) hide show
  1. package/build-info.json +6 -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/context-audit.d.ts +1 -1
  82. package/dist/context-audit.d.ts.map +1 -1
  83. package/dist/context-lock.d.ts +1 -1
  84. package/dist/context-lock.d.ts.map +1 -1
  85. package/dist/control-state.d.ts +2 -2
  86. package/dist/control-state.d.ts.map +1 -1
  87. package/dist/control-state.js +4 -3
  88. package/dist/control-state.js.map +1 -1
  89. package/dist/daemon-process.d.ts +1 -1
  90. package/dist/daemon-process.d.ts.map +1 -1
  91. package/dist/delivery-advance-block.d.ts +1 -1
  92. package/dist/delivery-advance-block.d.ts.map +1 -1
  93. package/dist/delivery-advance-block.js +1 -1
  94. package/dist/delivery-advance-block.js.map +1 -1
  95. package/dist/delivery-lifecycle.js +1 -1
  96. package/dist/delivery-reconciler-shadow.d.ts +1 -1
  97. package/dist/delivery-reconciler-shadow.d.ts.map +1 -1
  98. package/dist/delivery-reconciler-shadow.js +1 -1
  99. package/dist/delivery-reconciler-shadow.js.map +1 -1
  100. package/dist/directive-executor.js +1 -1
  101. package/dist/directive-executor.js.map +1 -1
  102. package/dist/drift-eval-loop.d.ts.map +1 -1
  103. package/dist/drift-eval-loop.js +6 -14
  104. package/dist/drift-eval-loop.js.map +1 -1
  105. package/dist/escalations.d.ts +1 -1
  106. package/dist/escalations.d.ts.map +1 -1
  107. package/dist/escalations.js +1 -1
  108. package/dist/escalations.js.map +1 -1
  109. package/dist/evaluation-context.d.ts +2 -33
  110. package/dist/evaluation-context.d.ts.map +1 -1
  111. package/dist/evaluation-context.js +2 -56
  112. package/dist/evaluation-context.js.map +1 -1
  113. package/dist/focus-engine.d.ts +14 -5
  114. package/dist/focus-engine.d.ts.map +1 -1
  115. package/dist/focus-engine.js +35 -289
  116. package/dist/focus-engine.js.map +1 -1
  117. package/dist/focus-executor.d.ts +10 -791
  118. package/dist/focus-executor.d.ts.map +1 -1
  119. package/dist/focus-executor.js +42 -1568
  120. package/dist/focus-executor.js.map +1 -1
  121. package/dist/focus-lifecycle.js +2 -2
  122. package/dist/focus-lifecycle.js.map +1 -1
  123. package/dist/focus-loop-registry.d.ts +52 -0
  124. package/dist/focus-loop-registry.d.ts.map +1 -0
  125. package/dist/focus-loop-registry.js +328 -0
  126. package/dist/focus-loop-registry.js.map +1 -0
  127. package/dist/focus-merge.d.ts +1 -1
  128. package/dist/focus-merge.d.ts.map +1 -1
  129. package/dist/focus-merge.js +3 -3
  130. package/dist/focus-merge.js.map +1 -1
  131. package/dist/focus-phase.d.ts +4 -0
  132. package/dist/focus-phase.d.ts.map +1 -1
  133. package/dist/focus-phase.js +3 -3
  134. package/dist/focus-phase.js.map +1 -1
  135. package/dist/focus-stage-lifecycle/planning-release.d.ts +197 -0
  136. package/dist/focus-stage-lifecycle/planning-release.d.ts.map +1 -0
  137. package/dist/focus-stage-lifecycle/planning-release.js +312 -0
  138. package/dist/focus-stage-lifecycle/planning-release.js.map +1 -0
  139. package/dist/focus-stage-lifecycle/review-convergence.d.ts +133 -0
  140. package/dist/focus-stage-lifecycle/review-convergence.d.ts.map +1 -0
  141. package/dist/focus-stage-lifecycle/review-convergence.js +235 -0
  142. package/dist/focus-stage-lifecycle/review-convergence.js.map +1 -0
  143. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +133 -0
  144. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -0
  145. package/dist/focus-stage-lifecycle/wedge-watchdog.js +365 -0
  146. package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -0
  147. package/dist/focus-stage-lifecycle.d.ts +22 -421
  148. package/dist/focus-stage-lifecycle.d.ts.map +1 -1
  149. package/dist/focus-stage-lifecycle.js +24 -832
  150. package/dist/focus-stage-lifecycle.js.map +1 -1
  151. package/dist/{git-activity.d.ts → git/activity.d.ts} +1 -1
  152. package/dist/git/activity.d.ts.map +1 -0
  153. package/dist/{git-activity.js → git/activity.js} +2 -2
  154. package/dist/git/activity.js.map +1 -0
  155. package/dist/{git-branch.d.ts → git/branch.d.ts} +2 -2
  156. package/dist/git/branch.d.ts.map +1 -0
  157. package/dist/{git-branch.js → git/branch.js} +2 -2
  158. package/dist/git/branch.js.map +1 -0
  159. package/dist/{git-fetch.d.ts → git/fetch.d.ts} +2 -2
  160. package/dist/git/fetch.d.ts.map +1 -0
  161. package/dist/{git-fetch.js → git/fetch.js} +1 -1
  162. package/dist/git/fetch.js.map +1 -0
  163. package/dist/{git-genesis.d.ts → git/genesis.d.ts} +3 -3
  164. package/dist/git/genesis.d.ts.map +1 -0
  165. package/dist/{git-genesis.js → git/genesis.js} +5 -5
  166. package/dist/git/genesis.js.map +1 -0
  167. package/dist/git/index.d.ts +36 -0
  168. package/dist/git/index.d.ts.map +1 -0
  169. package/dist/git/index.js +36 -0
  170. package/dist/git/index.js.map +1 -0
  171. package/dist/{git-integration.d.ts → git/integration.d.ts} +2 -2
  172. package/dist/git/integration.d.ts.map +1 -0
  173. package/dist/{git-integration.js → git/integration.js} +4 -4
  174. package/dist/git/integration.js.map +1 -0
  175. package/dist/{git-merge-helpers.d.ts → git/merge-helpers.d.ts} +3 -3
  176. package/dist/git/merge-helpers.d.ts.map +1 -0
  177. package/dist/{git-merge-helpers.js → git/merge-helpers.js} +3 -3
  178. package/dist/git/merge-helpers.js.map +1 -0
  179. package/dist/{git-merge-lock.d.ts → git/merge-lock.d.ts} +1 -1
  180. package/dist/git/merge-lock.d.ts.map +1 -0
  181. package/dist/{git-merge-lock.js → git/merge-lock.js} +1 -1
  182. package/dist/git/merge-lock.js.map +1 -0
  183. package/dist/{git-merge-strategies.d.ts → git/merge-strategies.d.ts} +2 -2
  184. package/dist/git/merge-strategies.d.ts.map +1 -0
  185. package/dist/{git-merge-strategies.js → git/merge-strategies.js} +3 -3
  186. package/dist/git/merge-strategies.js.map +1 -0
  187. package/dist/{git-merge.d.ts → git/merge.d.ts} +4 -4
  188. package/dist/git/merge.d.ts.map +1 -0
  189. package/dist/{git-merge.js → git/merge.js} +4 -4
  190. package/dist/git/merge.js.map +1 -0
  191. package/dist/{git-state-detector.d.ts → git/state-detector.d.ts} +2 -2
  192. package/dist/git/state-detector.d.ts.map +1 -0
  193. package/dist/{git-state-detector.js → git/state-detector.js} +7 -7
  194. package/dist/git/state-detector.js.map +1 -0
  195. package/dist/{git-types.d.ts → git/types.d.ts} +2 -2
  196. package/dist/git/types.d.ts.map +1 -0
  197. package/dist/{git-types.js → git/types.js} +1 -1
  198. package/dist/git/types.js.map +1 -0
  199. package/dist/{git-utils.d.ts → git/utils.d.ts} +1 -1
  200. package/dist/git/utils.d.ts.map +1 -0
  201. package/dist/{git-utils.js → git/utils.js} +2 -2
  202. package/dist/git/utils.js.map +1 -0
  203. package/dist/git.d.ts +5 -5
  204. package/dist/git.d.ts.map +1 -1
  205. package/dist/git.js +10 -10
  206. package/dist/git.js.map +1 -1
  207. package/dist/guard-engine.d.ts +3 -2
  208. package/dist/guard-engine.d.ts.map +1 -1
  209. package/dist/guard-engine.js +2 -2
  210. package/dist/guard-engine.js.map +1 -1
  211. package/dist/install-probe-tick.d.ts +63 -0
  212. package/dist/install-probe-tick.d.ts.map +1 -0
  213. package/dist/install-probe-tick.js +137 -0
  214. package/dist/install-probe-tick.js.map +1 -0
  215. package/dist/install-probe.d.ts +115 -0
  216. package/dist/install-probe.d.ts.map +1 -0
  217. package/dist/install-probe.js +197 -0
  218. package/dist/install-probe.js.map +1 -0
  219. package/dist/listener-auto-advance.d.ts.map +1 -1
  220. package/dist/listener-auto-advance.js +31 -0
  221. package/dist/listener-auto-advance.js.map +1 -1
  222. package/dist/listener.js +5 -5
  223. package/dist/listener.js.map +1 -1
  224. package/dist/{loop-context-audit-pass.d.ts → loops/context-audit-pass.d.ts} +4 -4
  225. package/dist/loops/context-audit-pass.d.ts.map +1 -0
  226. package/dist/{loop-context-audit-pass.js → loops/context-audit-pass.js} +7 -7
  227. package/dist/loops/context-audit-pass.js.map +1 -0
  228. package/dist/{loop-engine-types.d.ts → loops/engine-types.d.ts} +1 -1
  229. package/dist/loops/engine-types.d.ts.map +1 -0
  230. package/dist/{loop-engine-types.js → loops/engine-types.js} +1 -1
  231. package/dist/loops/engine-types.js.map +1 -0
  232. package/dist/{loop-engine.d.ts → loops/engine.d.ts} +6 -6
  233. package/dist/loops/engine.d.ts.map +1 -0
  234. package/dist/{loop-engine.js → loops/engine.js} +13 -13
  235. package/dist/loops/engine.js.map +1 -0
  236. package/dist/{loop-event-bus.d.ts → loops/event-bus.d.ts} +1 -1
  237. package/dist/loops/event-bus.d.ts.map +1 -0
  238. package/dist/{loop-event-bus.js → loops/event-bus.js} +1 -1
  239. package/dist/loops/event-bus.js.map +1 -0
  240. package/dist/loops/index.d.ts +33 -0
  241. package/dist/loops/index.d.ts.map +1 -0
  242. package/dist/loops/index.js +32 -0
  243. package/dist/loops/index.js.map +1 -0
  244. package/dist/{loop-llm-client.d.ts → loops/llm-client.d.ts} +3 -3
  245. package/dist/loops/llm-client.d.ts.map +1 -0
  246. package/dist/{loop-llm-client.js → loops/llm-client.js} +3 -3
  247. package/dist/loops/llm-client.js.map +1 -0
  248. package/dist/{loop-llm-flag.d.ts → loops/llm-flag.d.ts} +1 -1
  249. package/dist/loops/llm-flag.d.ts.map +1 -0
  250. package/dist/{loop-llm-flag.js → loops/llm-flag.js} +1 -1
  251. package/dist/loops/llm-flag.js.map +1 -0
  252. package/dist/{loop-operational-block.d.ts → loops/operational-block.d.ts} +1 -1
  253. package/dist/loops/operational-block.d.ts.map +1 -0
  254. package/dist/{loop-operational-block.js → loops/operational-block.js} +1 -1
  255. package/dist/loops/operational-block.js.map +1 -0
  256. package/dist/{loop-prompt-builder.d.ts → loops/prompt-builder.d.ts} +2 -2
  257. package/dist/loops/prompt-builder.d.ts.map +1 -0
  258. package/dist/{loop-prompt-builder.js → loops/prompt-builder.js} +1 -1
  259. package/dist/loops/prompt-builder.js.map +1 -0
  260. package/dist/{loop-variance.d.ts → loops/variance.d.ts} +1 -1
  261. package/dist/loops/variance.d.ts.map +1 -0
  262. package/dist/{loop-variance.js → loops/variance.js} +1 -1
  263. package/dist/loops/variance.js.map +1 -0
  264. package/dist/merge-back-loop.d.ts.map +1 -1
  265. package/dist/merge-back-loop.js +4 -3
  266. package/dist/merge-back-loop.js.map +1 -1
  267. package/dist/merge-detector.js +2 -2
  268. package/dist/merge-detector.js.map +1 -1
  269. package/dist/{nexus-endpoint-clearance.d.ts → nexus/endpoint-clearance.d.ts} +2 -2
  270. package/dist/nexus/endpoint-clearance.d.ts.map +1 -0
  271. package/dist/{nexus-endpoint-clearance.js → nexus/endpoint-clearance.js} +2 -2
  272. package/dist/nexus/endpoint-clearance.js.map +1 -0
  273. package/dist/{nexus-escalation-bridge.d.ts → nexus/escalation-bridge.d.ts} +1 -1
  274. package/dist/nexus/escalation-bridge.d.ts.map +1 -0
  275. package/dist/{nexus-escalation-bridge.js → nexus/escalation-bridge.js} +2 -2
  276. package/dist/nexus/escalation-bridge.js.map +1 -0
  277. package/dist/{nexus-incoming.d.ts → nexus/incoming.d.ts} +2 -2
  278. package/dist/nexus/incoming.d.ts.map +1 -0
  279. package/dist/{nexus-incoming.js → nexus/incoming.js} +2 -2
  280. package/dist/nexus/incoming.js.map +1 -0
  281. package/dist/nexus/index.d.ts +20 -0
  282. package/dist/nexus/index.d.ts.map +1 -0
  283. package/dist/nexus/index.js +20 -0
  284. package/dist/nexus/index.js.map +1 -0
  285. package/dist/{nexus-intake-spawn.d.ts → nexus/intake-spawn.d.ts} +3 -3
  286. package/dist/nexus/intake-spawn.d.ts.map +1 -0
  287. package/dist/{nexus-intake-spawn.js → nexus/intake-spawn.js} +1 -1
  288. package/dist/nexus/intake-spawn.js.map +1 -0
  289. package/dist/{nexus-intake.d.ts → nexus/intake.d.ts} +2 -2
  290. package/dist/nexus/intake.d.ts.map +1 -0
  291. package/dist/{nexus-intake.js → nexus/intake.js} +4 -4
  292. package/dist/nexus/intake.js.map +1 -0
  293. package/dist/{nexus-return.d.ts → nexus/return.d.ts} +3 -3
  294. package/dist/nexus/return.d.ts.map +1 -0
  295. package/dist/{nexus-return.js → nexus/return.js} +4 -4
  296. package/dist/nexus/return.js.map +1 -0
  297. package/dist/otlp/index.d.ts +19 -0
  298. package/dist/otlp/index.d.ts.map +1 -0
  299. package/dist/otlp/index.js +19 -0
  300. package/dist/otlp/index.js.map +1 -0
  301. package/dist/{otlp-log-parser.d.ts → otlp/log-parser.d.ts} +2 -2
  302. package/dist/otlp/log-parser.d.ts.map +1 -0
  303. package/dist/{otlp-log-parser.js → otlp/log-parser.js} +5 -6
  304. package/dist/otlp/log-parser.js.map +1 -0
  305. package/dist/{otlp-metric-parser.d.ts → otlp/metric-parser.d.ts} +2 -2
  306. package/dist/otlp/metric-parser.d.ts.map +1 -0
  307. package/dist/{otlp-metric-parser.js → otlp/metric-parser.js} +4 -5
  308. package/dist/otlp/metric-parser.js.map +1 -0
  309. package/dist/{otlp-port-manager.d.ts → otlp/port-manager.d.ts} +1 -1
  310. package/dist/otlp/port-manager.d.ts.map +1 -0
  311. package/dist/{otlp-port-manager.js → otlp/port-manager.js} +1 -1
  312. package/dist/otlp/port-manager.js.map +1 -0
  313. package/dist/{otlp-receiver.d.ts → otlp/receiver.d.ts} +2 -2
  314. package/dist/otlp/receiver.d.ts.map +1 -0
  315. package/dist/{otlp-receiver.js → otlp/receiver.js} +5 -33
  316. package/dist/otlp/receiver.js.map +1 -0
  317. package/dist/{otlp-types.d.ts → otlp/types.d.ts} +1 -9
  318. package/dist/otlp/types.d.ts.map +1 -0
  319. package/dist/{otlp-types.js → otlp/types.js} +1 -27
  320. package/dist/otlp/types.js.map +1 -0
  321. package/dist/pipeline-config.d.ts +1 -1
  322. package/dist/{prd-controller.d.ts → prd/controller.d.ts} +7 -7
  323. package/dist/prd/controller.d.ts.map +1 -0
  324. package/dist/{prd-controller.js → prd/controller.js} +11 -11
  325. package/dist/prd/controller.js.map +1 -0
  326. package/dist/{prd-divergence.d.ts → prd/divergence.d.ts} +2 -2
  327. package/dist/prd/divergence.d.ts.map +1 -0
  328. package/dist/{prd-divergence.js → prd/divergence.js} +1 -1
  329. package/dist/prd/divergence.js.map +1 -0
  330. package/dist/{prd-focus-pushdown.d.ts → prd/focus-pushdown.d.ts} +2 -2
  331. package/dist/prd/focus-pushdown.d.ts.map +1 -0
  332. package/dist/{prd-focus-pushdown.js → prd/focus-pushdown.js} +3 -3
  333. package/dist/prd/focus-pushdown.js.map +1 -0
  334. package/dist/{prd-frontier.d.ts → prd/frontier.d.ts} +2 -2
  335. package/dist/prd/frontier.d.ts.map +1 -0
  336. package/dist/{prd-frontier.js → prd/frontier.js} +1 -1
  337. package/dist/prd/frontier.js.map +1 -0
  338. package/dist/prd/index.d.ts +26 -0
  339. package/dist/prd/index.d.ts.map +1 -0
  340. package/dist/prd/index.js +25 -0
  341. package/dist/prd/index.js.map +1 -0
  342. package/dist/{prd-steward.d.ts → prd/steward.d.ts} +4 -4
  343. package/dist/prd/steward.d.ts.map +1 -0
  344. package/dist/{prd-steward.js → prd/steward.js} +4 -4
  345. package/dist/prd/steward.js.map +1 -0
  346. package/dist/{prd-viability.d.ts → prd/viability.d.ts} +2 -2
  347. package/dist/prd/viability.d.ts.map +1 -0
  348. package/dist/{prd-viability.js → prd/viability.js} +1 -1
  349. package/dist/prd/viability.js.map +1 -0
  350. package/dist/product-scaffold.js +2 -2
  351. package/dist/product-scaffold.js.map +1 -1
  352. package/dist/prompt-sections/persona-sections.d.ts +12 -0
  353. package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
  354. package/dist/prompt-sections/persona-sections.js +29 -2
  355. package/dist/prompt-sections/persona-sections.js.map +1 -1
  356. package/dist/queries/context-lock-queries.js +1 -1
  357. package/dist/queries/context-lock-queries.js.map +1 -1
  358. package/dist/queries/deliveries.d.ts +15 -0
  359. package/dist/queries/deliveries.d.ts.map +1 -1
  360. package/dist/queries/deliveries.js +2 -0
  361. package/dist/queries/deliveries.js.map +1 -1
  362. package/dist/queries/focuses.d.ts +17 -0
  363. package/dist/queries/focuses.d.ts.map +1 -1
  364. package/dist/queries/focuses.js +27 -0
  365. package/dist/queries/focuses.js.map +1 -1
  366. package/dist/queries/schemas.d.ts +4 -0
  367. package/dist/queries/schemas.d.ts.map +1 -1
  368. package/dist/queries/schemas.js +8 -0
  369. package/dist/queries/schemas.js.map +1 -1
  370. package/dist/reality-pole.js +1 -1
  371. package/dist/resolvers/git-diff-against-base.d.ts.map +1 -1
  372. package/dist/resolvers/git-diff-against-base.js +4 -1
  373. package/dist/resolvers/git-diff-against-base.js.map +1 -1
  374. package/dist/resolvers/prd-context.js +1 -1
  375. package/dist/sensor-sweep.js +1 -1
  376. package/dist/spawn/model-routing.d.ts +277 -0
  377. package/dist/spawn/model-routing.d.ts.map +1 -0
  378. package/dist/spawn/model-routing.js +464 -0
  379. package/dist/spawn/model-routing.js.map +1 -0
  380. package/dist/spawn/process-spawn.d.ts +128 -0
  381. package/dist/spawn/process-spawn.d.ts.map +1 -0
  382. package/dist/spawn/process-spawn.js +378 -0
  383. package/dist/spawn/process-spawn.js.map +1 -0
  384. package/dist/spawn/prompt-assembly.d.ts +143 -0
  385. package/dist/spawn/prompt-assembly.d.ts.map +1 -0
  386. package/dist/spawn/prompt-assembly.js +263 -0
  387. package/dist/spawn/prompt-assembly.js.map +1 -0
  388. package/dist/spawn/shared.d.ts +72 -0
  389. package/dist/spawn/shared.d.ts.map +1 -0
  390. package/dist/spawn/shared.js +14 -0
  391. package/dist/spawn/shared.js.map +1 -0
  392. package/dist/spawn/spawn-decision.d.ts +189 -0
  393. package/dist/spawn/spawn-decision.d.ts.map +1 -0
  394. package/dist/spawn/spawn-decision.js +361 -0
  395. package/dist/spawn/spawn-decision.js.map +1 -0
  396. package/dist/spawn/worktree-session.d.ts +105 -0
  397. package/dist/spawn/worktree-session.d.ts.map +1 -0
  398. package/dist/spawn/worktree-session.js +216 -0
  399. package/dist/spawn/worktree-session.js.map +1 -0
  400. package/dist/spawner/lifecycle.js +2 -2
  401. package/dist/spawner/lifecycle.js.map +1 -1
  402. package/dist/spawner/resolution.js +1 -1
  403. package/dist/stall-detector-config.d.ts +4 -0
  404. package/dist/stall-detector-config.d.ts.map +1 -1
  405. package/dist/stall-detector-config.js +6 -0
  406. package/dist/stall-detector-config.js.map +1 -1
  407. package/dist/state-cascade.js +1 -1
  408. package/dist/state-cascade.js.map +1 -1
  409. package/dist/trigger-executor.d.ts +5 -9
  410. package/dist/trigger-executor.d.ts.map +1 -1
  411. package/dist/trigger-executor.js +14 -36
  412. package/dist/trigger-executor.js.map +1 -1
  413. package/dist/types/focus.d.ts +13 -0
  414. package/dist/types/focus.d.ts.map +1 -1
  415. package/dist/types/workflow.d.ts +1 -3
  416. package/dist/types/workflow.d.ts.map +1 -1
  417. package/dist/unified-engine-lifecycle.js +1 -1
  418. package/dist/unified-init.d.ts +3 -3
  419. package/dist/unified-init.d.ts.map +1 -1
  420. package/dist/unified-init.js +9 -25
  421. package/dist/unified-init.js.map +1 -1
  422. package/dist/unified-shell.d.ts +3 -3
  423. package/dist/unified-shell.js +4 -4
  424. package/dist/unified-shell.js.map +1 -1
  425. package/dist/verification-engine.d.ts.map +1 -1
  426. package/dist/verification-engine.js +15 -0
  427. package/dist/verification-engine.js.map +1 -1
  428. package/dist/{worktree-focus.d.ts → worktree/focus.d.ts} +2 -2
  429. package/dist/worktree/focus.d.ts.map +1 -0
  430. package/dist/{worktree-focus.js → worktree/focus.js} +7 -7
  431. package/dist/worktree/focus.js.map +1 -0
  432. package/dist/worktree/index.d.ts +16 -0
  433. package/dist/worktree/index.d.ts.map +1 -0
  434. package/dist/worktree/index.js +16 -0
  435. package/dist/worktree/index.js.map +1 -0
  436. package/dist/{worktree-safety.d.ts → worktree/safety.d.ts} +1 -1
  437. package/dist/worktree/safety.d.ts.map +1 -0
  438. package/dist/{worktree-safety.js → worktree/safety.js} +2 -2
  439. package/dist/worktree/safety.js.map +1 -0
  440. package/dist/{worktree-state.d.ts → worktree/state.d.ts} +1 -1
  441. package/dist/worktree/state.d.ts.map +1 -0
  442. package/dist/{worktree-state.js → worktree/state.js} +6 -6
  443. package/dist/worktree/state.js.map +1 -0
  444. package/dist/worktree.d.ts +1 -1
  445. package/dist/worktree.js +5 -5
  446. package/dist/worktree.js.map +1 -1
  447. package/package.json +5 -4
  448. package/dist/git-activity.d.ts.map +0 -1
  449. package/dist/git-activity.js.map +0 -1
  450. package/dist/git-branch.d.ts.map +0 -1
  451. package/dist/git-branch.js.map +0 -1
  452. package/dist/git-fetch.d.ts.map +0 -1
  453. package/dist/git-fetch.js.map +0 -1
  454. package/dist/git-genesis.d.ts.map +0 -1
  455. package/dist/git-genesis.js.map +0 -1
  456. package/dist/git-integration.d.ts.map +0 -1
  457. package/dist/git-integration.js.map +0 -1
  458. package/dist/git-merge-helpers.d.ts.map +0 -1
  459. package/dist/git-merge-helpers.js.map +0 -1
  460. package/dist/git-merge-lock.d.ts.map +0 -1
  461. package/dist/git-merge-lock.js.map +0 -1
  462. package/dist/git-merge-strategies.d.ts.map +0 -1
  463. package/dist/git-merge-strategies.js.map +0 -1
  464. package/dist/git-merge.d.ts.map +0 -1
  465. package/dist/git-merge.js.map +0 -1
  466. package/dist/git-state-detector.d.ts.map +0 -1
  467. package/dist/git-state-detector.js.map +0 -1
  468. package/dist/git-types.d.ts.map +0 -1
  469. package/dist/git-types.js.map +0 -1
  470. package/dist/git-utils.d.ts.map +0 -1
  471. package/dist/git-utils.js.map +0 -1
  472. package/dist/loop-context-audit-pass.d.ts.map +0 -1
  473. package/dist/loop-context-audit-pass.js.map +0 -1
  474. package/dist/loop-engine-types.d.ts.map +0 -1
  475. package/dist/loop-engine-types.js.map +0 -1
  476. package/dist/loop-engine.d.ts.map +0 -1
  477. package/dist/loop-engine.js.map +0 -1
  478. package/dist/loop-event-bus.d.ts.map +0 -1
  479. package/dist/loop-event-bus.js.map +0 -1
  480. package/dist/loop-llm-client.d.ts.map +0 -1
  481. package/dist/loop-llm-client.js.map +0 -1
  482. package/dist/loop-llm-flag.d.ts.map +0 -1
  483. package/dist/loop-llm-flag.js.map +0 -1
  484. package/dist/loop-operational-block.d.ts.map +0 -1
  485. package/dist/loop-operational-block.js.map +0 -1
  486. package/dist/loop-prompt-builder.d.ts.map +0 -1
  487. package/dist/loop-prompt-builder.js.map +0 -1
  488. package/dist/loop-variance.d.ts.map +0 -1
  489. package/dist/loop-variance.js.map +0 -1
  490. package/dist/nexus-endpoint-clearance.d.ts.map +0 -1
  491. package/dist/nexus-endpoint-clearance.js.map +0 -1
  492. package/dist/nexus-escalation-bridge.d.ts.map +0 -1
  493. package/dist/nexus-escalation-bridge.js.map +0 -1
  494. package/dist/nexus-incoming.d.ts.map +0 -1
  495. package/dist/nexus-incoming.js.map +0 -1
  496. package/dist/nexus-intake-spawn.d.ts.map +0 -1
  497. package/dist/nexus-intake-spawn.js.map +0 -1
  498. package/dist/nexus-intake.d.ts.map +0 -1
  499. package/dist/nexus-intake.js.map +0 -1
  500. package/dist/nexus-return.d.ts.map +0 -1
  501. package/dist/nexus-return.js.map +0 -1
  502. package/dist/otlp-log-parser.d.ts.map +0 -1
  503. package/dist/otlp-log-parser.js.map +0 -1
  504. package/dist/otlp-metric-parser.d.ts.map +0 -1
  505. package/dist/otlp-metric-parser.js.map +0 -1
  506. package/dist/otlp-port-manager.d.ts.map +0 -1
  507. package/dist/otlp-port-manager.js.map +0 -1
  508. package/dist/otlp-receiver.d.ts.map +0 -1
  509. package/dist/otlp-receiver.js.map +0 -1
  510. package/dist/otlp-types.d.ts.map +0 -1
  511. package/dist/otlp-types.js.map +0 -1
  512. package/dist/prd-controller.d.ts.map +0 -1
  513. package/dist/prd-controller.js.map +0 -1
  514. package/dist/prd-divergence.d.ts.map +0 -1
  515. package/dist/prd-divergence.js.map +0 -1
  516. package/dist/prd-focus-pushdown.d.ts.map +0 -1
  517. package/dist/prd-focus-pushdown.js.map +0 -1
  518. package/dist/prd-frontier.d.ts.map +0 -1
  519. package/dist/prd-frontier.js.map +0 -1
  520. package/dist/prd-steward.d.ts.map +0 -1
  521. package/dist/prd-steward.js.map +0 -1
  522. package/dist/prd-viability.d.ts.map +0 -1
  523. package/dist/prd-viability.js.map +0 -1
  524. package/dist/worktree-focus.d.ts.map +0 -1
  525. package/dist/worktree-focus.js.map +0 -1
  526. package/dist/worktree-safety.d.ts.map +0 -1
  527. package/dist/worktree-safety.js.map +0 -1
  528. package/dist/worktree-state.d.ts.map +0 -1
  529. package/dist/worktree-state.js.map +0 -1
@@ -41,7 +41,7 @@
41
41
  */
42
42
  import { readFileSync, readdirSync, existsSync } from 'node:fs';
43
43
  import { join } from 'node:path';
44
- import { runGitSync } from './git-types.js';
44
+ import { runGitSync } from './git/index.js';
45
45
  import { configForProduct } from './config.js';
46
46
  import { getLatestCodeMetrics, createCodeMetricsSnapshot } from './queries/code-metrics.js';
47
47
  /**
@@ -0,0 +1,277 @@
1
+ /**
2
+ * Model routing seam for the focus-team spawn path.
3
+ *
4
+ * Extracted verbatim from focus-executor.ts (behavior-preserving): the pure
5
+ * model/engine selection helpers, the per-pass local-model routing + host-control
6
+ * swap decisioning, the single-host GPU conflict surfacing, and the CLI-arg
7
+ * builder they feed. focus-executor.ts re-exports this surface for backward
8
+ * compatibility, so external importers keep resolving these symbols from
9
+ * '../focus-executor.js'.
10
+ *
11
+ * Cycle rule: this module must NOT import from '../focus-executor.js'.
12
+ */
13
+ import type { DaemonConfig, AgentRole, PipelineConfig } from '../types.js';
14
+ import { createEscalation } from '../queries/issues.js';
15
+ import { getLocalModel, getLocalModelSecret, type LocalModelCoordinates } from '../queries/local-models.js';
16
+ import { writeLocalModelCodexHome } from '../cli/codex-provision.js';
17
+ import { type CodexMcpProxyHandle } from '../backends/codex/codex-mcp-proxy.js';
18
+ import { type HostCapability } from '../host-control/index.js';
19
+ import { resolveBackend, type AgentBackend, type EnginePass } from '../backends/index.js';
20
+ /**
21
+ * Resolve the isolated CODEX_HOME to set on a spawn, or undefined when none
22
+ * applies. Pure + testable: only a codex-engine spawn against a product that
23
+ * carries a provisioned codexHome gets the override; every other case (claude
24
+ * engine, or a cloud product with no codexHome) returns undefined so the spawn
25
+ * environment is byte-for-byte unchanged.
26
+ */
27
+ export declare function codexHomeForSpawn(engineId: string, config: {
28
+ codexHome?: string;
29
+ }): string | undefined;
30
+ /**
31
+ * Select the per-pass local model ref to resolve for this spawn, or null.
32
+ *
33
+ * Pure + testable. A ref applies ONLY to a codex-engine spawn. The ref resolves
34
+ * under the unified Focus > Workflow > Default precedence (single-sourced in
35
+ * model-resolution.resolveLocalModelRefPrecedence): the focus's per-pass
36
+ * localModelOverride entry wins; absent that, the stage directive's localModel
37
+ * is inherited; absent both, null (the pass runs on the engine's default model).
38
+ * A claude engine or a blank ref returns null so the spawn keeps its
39
+ * per-product / engine-default behavior unchanged.
40
+ */
41
+ export declare function selectLocalModelRef(engineId: string, pass: EnginePass, localModelOverride: Record<string, string | null> | null | undefined, stageDirectiveLocalModel?: string | null): string | null;
42
+ /**
43
+ * Decide what a codex spawn should do with a selected local-model ref, given the
44
+ * resolved coordinates and the Telora-resolved bearer key VALUE. Pure + testable:
45
+ * it holds NO I/O (the DB calls that produce `coords` and `apiKey`, and the
46
+ * CODEX_HOME write / session update, happen in the caller). It only renders the
47
+ * routing DECISION:
48
+ *
49
+ * - ref null -> { kind: 'none' } (no local model selected)
50
+ * - ref set but coords null -> { kind: 'fallback' } (ref not in registry)
51
+ * - coords present -> { kind: 'route' } (key optional)
52
+ *
53
+ * Reached only when a ref exists upstream (codex-only is already enforced by
54
+ * `selectLocalModelRef`); `coords` is `getLocalModel(ref)`'s result and `apiKey`
55
+ * is `getLocalModelSecret(ref)`'s result (D8: the key lives in Telora, not host env).
56
+ */
57
+ export type LocalModelRouting = {
58
+ kind: 'none';
59
+ } | {
60
+ kind: 'fallback';
61
+ } | {
62
+ kind: 'route';
63
+ coords: LocalModelCoordinates;
64
+ apiKey: string | null;
65
+ };
66
+ export declare function decideLocalModelRouting(ref: string | null, coords: LocalModelCoordinates | null, apiKey: string | null): LocalModelRouting;
67
+ /**
68
+ * Pure gate: should the daemon perform a host-control model swap before this
69
+ * spawn? (Local model host control, D2.) True ONLY when routing resolved a local
70
+ * model for this pass AND the host advertises the optional control capability.
71
+ * A non-controllable host (today's behavior: the operator pre-loads the model in
72
+ * the studio) yields false -> NO swap, spawn proceeds unchanged. A pass with no
73
+ * routed local model (claude, no override) also yields false. Exported so the
74
+ * load-or-skip decision is unit-testable with NO HTTP.
75
+ */
76
+ export declare function shouldSwapForPass(input: {
77
+ routing: LocalModelRouting;
78
+ capability: HostCapability;
79
+ }): boolean;
80
+ /**
81
+ * Resolve the effective model id for a spawn, applying the single team-model
82
+ * precedence (focus override -> stage directive -> CLI default) via
83
+ * resolveTeamModel. This is the SAME helper used at stage respawn, so the two
84
+ * paths can never diverge on ordering.
85
+ *
86
+ * The focus-override slot folds in the selected local-Codex model: when this
87
+ * pass routes to a controllable Codex home, `codexModel` IS the focus's
88
+ * explicit pick and must win exactly like a focus pipeline_config.model would.
89
+ * `directiveModel` has already been filtered through
90
+ * selectDirectiveModelForSpawn() (nulled when the backend cannot run it, or
91
+ * when a focus override is present), so it only ever reaches here as a
92
+ * legitimate stage fallback.
93
+ *
94
+ * Pure + testable. Used by spawnFocusTeam to produce effectivePipelineConfig.model.
95
+ */
96
+ export declare function resolveEffectiveModel(directiveModel: string | null | undefined, spawnCodexHome: string | undefined, codexModel: string | undefined, pipelineModel: string | null | undefined): string | null;
97
+ export declare function isClaudeModelId(model: string | null | undefined): boolean;
98
+ /**
99
+ * Select the pipeline model fallback to feed into resolveEffectiveModel().
100
+ *
101
+ * Hosted Codex runs through the user's Codex account. Some registry labels
102
+ * exposed in the UI (for example gpt-5-codex) are not valid `codex exec
103
+ * --model` values for every account, and passing them fails the run before the
104
+ * agent starts. Local-model Codex still needs an explicit model, and Claude
105
+ * keeps the existing pipeline model behavior.
106
+ *
107
+ * Engine-compat (the per-pass bleed guard): product_focuses.pipeline_config.model
108
+ * is a SINGLE focus-wide value shared across passes, but each pass resolves its
109
+ * own engine. A pass whose engine resolved to claude can only run a claude-family
110
+ * model -- so a coding-pass codex model (e.g. gpt-5-codex) selected on the focus
111
+ * must NOT bleed into a claude review pass. When it would, null it so the claude
112
+ * backend picks its own default rather than receiving `--model gpt-5-codex` and
113
+ * erroring out. (The symmetric codex case is handled above + by spawnCodexModel
114
+ * routing; local-codex models reach the spawn via spawnCodexModel, not here.)
115
+ */
116
+ export declare function selectPipelineModelForSpawn(engineId: string, spawnCodexHome: string | undefined, pipelineModel: string | null | undefined): string | null;
117
+ /**
118
+ * Select whether a workflow directive's model may reach the backend.
119
+ *
120
+ * The focus pass selection is the source of truth for team launches. Stage
121
+ * directives contribute prompt/context; their model field is only a legacy
122
+ * fallback when the focus/pass has no selected model and the backend can run
123
+ * that model. In particular, never pass a Claude directive model to Codex.
124
+ */
125
+ export declare function selectDirectiveModelForSpawn(engineId: string, directiveModel: string | null | undefined, focusSelectedModel: string | null | undefined): string | null;
126
+ /**
127
+ * Build CLI args for the team lead via the selected backend.
128
+ *
129
+ * Engine-specific flag construction lives in the backend; resume uses the
130
+ * backend's dedicated resume-arg builder. Exported for the spawner barrel
131
+ * surface (legacy ./team-spawner.js consumers).
132
+ */
133
+ export declare function buildAgentArgs(backend: AgentBackend, config: DaemonConfig, worktreePath: string, pipelineConfig: PipelineConfig | null, resumeSessionId?: string | null, allowedTools?: readonly string[], readOnly?: boolean): string[];
134
+ /**
135
+ * Outcome of per-pass local-model resolution. The caller applies it:
136
+ * - none -> keep the per-product codexHome/codexModel defaults.
137
+ * - fallback -> ref not in the registry; warn and keep the defaults.
138
+ * - route -> provision the per-model CODEX_HOME and route the spawn there,
139
+ * optionally injecting the Telora-resolved key.
140
+ */
141
+ export type LocalModelConfig = {
142
+ kind: 'none';
143
+ } | {
144
+ kind: 'fallback';
145
+ ref: string | null;
146
+ } | {
147
+ kind: 'route';
148
+ codexHome: string;
149
+ codexModel: string;
150
+ apiKey: string | null;
151
+ coords: LocalModelCoordinates;
152
+ };
153
+ /**
154
+ * The I/O seams resolveLocalModelConfig depends on. Injectable so the route/
155
+ * fallback/none outcomes are unit-testable without the daemon-core
156
+ * module-mock constraint (default to the real implementations in production).
157
+ */
158
+ export interface LocalModelConfigDeps {
159
+ getLocalModel: typeof getLocalModel;
160
+ getLocalModelSecret: typeof getLocalModelSecret;
161
+ writeLocalModelCodexHome: typeof writeLocalModelCodexHome;
162
+ }
163
+ /**
164
+ * Phase: resolve the per-pass local-model routing for a codex spawn.
165
+ *
166
+ * Wraps the fetch (getLocalModel / getLocalModelSecret) + the pure decision
167
+ * (selectLocalModelRef -> decideLocalModelRouting) and, on 'route', provisions
168
+ * the per-model CODEX_HOME (writeLocalModelCodexHome) -- returning the codexHome
169
+ * the caller points the spawn at. The key VALUE comes from Telora (D8), never a
170
+ * host env var. Behavior byte-identical to the original inline block; only the
171
+ * apply-side (session-terminal write on skip, env injection on route) stays in
172
+ * the caller.
173
+ */
174
+ export declare function resolveLocalModelConfig(args: {
175
+ engineId: string;
176
+ enginePass: EnginePass;
177
+ localModelOverride: Record<string, string | null> | null | undefined;
178
+ /** Stage directive local-model: the Workflow layer inherited when the focus
179
+ * does not override this pass. Optional/absent = the stage pins none. */
180
+ stageDirectiveLocalModel?: string | null;
181
+ }, deps?: Partial<LocalModelConfigDeps>): Promise<LocalModelConfig>;
182
+ /** Injectable I/O seams for surfaceSingleHostModelConflict (test without DB). */
183
+ export interface HostConflictSurfaceDeps {
184
+ getLocalModel: typeof getLocalModel;
185
+ createEscalation: typeof createEscalation;
186
+ }
187
+ /**
188
+ * Surface (do NOT silently swap) two DIFFERENT local models bound to the coding
189
+ * vs review pass of one focus that share a single GPU host (#9). On a single
190
+ * card the two bindings force an evict+load swap on every pass alternation and
191
+ * fight over the GPU (the live incident: 0/56 routing attempts succeeded). The
192
+ * daemon must make the conflict VISIBLE rather than thrash silently.
193
+ *
194
+ * Cheap early-out: only when the focus pins a local model for BOTH passes and
195
+ * the two refs differ do we resolve coordinates (two getLocalModel reads) and run
196
+ * the pure detector. A conflict (same host root, different served models) is
197
+ * raised ONCE per focus per daemon run (shouldSurfaceHostConflictOnce) as a log
198
+ * line + a single escalation -- never re-raised every poll. Returns whether a new
199
+ * surfacing was raised this call. Best-effort: an escalation-create failure is
200
+ * logged, never fatal to the spawn.
201
+ */
202
+ export declare function surfaceSingleHostModelConflict(args: {
203
+ focusId: string;
204
+ focusName: string;
205
+ organizationId: string;
206
+ productId: string | undefined;
207
+ localModelOverride: Record<string, string | null> | null | undefined;
208
+ }, deps?: Partial<HostConflictSurfaceDeps>): Promise<{
209
+ surfaced: boolean;
210
+ }>;
211
+ /**
212
+ * Outcome of resolveSpawnModel:
213
+ * - 'skip_load' -- a controllable-host model swap (load/unload) FAILED this
214
+ * tick; do NOT spawn against a not-yet-loaded model. The caller
215
+ * logs an actionable message + skips the spawn so the 30s poll
216
+ * re-attempts. Conservative: no terminal session, no escalation.
217
+ * - 'still_loading' -- the per-host swap is in flight OFF the poll loop (#3),
218
+ * or the host is held by another focus's running pass (#4).
219
+ * Defer THIS focus's spawn only; retry next poll. The detached
220
+ * load is NOT awaited, so the serial poll loop is not stalled.
221
+ * - 'ready' -- a ready spawn carrying the CLI args + the env-affecting model bits.
222
+ */
223
+ export type SpawnModelResolution = {
224
+ kind: 'skip_load';
225
+ coords: LocalModelCoordinates;
226
+ dbMessage: string;
227
+ } | {
228
+ kind: 'still_loading';
229
+ coords: LocalModelCoordinates;
230
+ reason: string;
231
+ } | {
232
+ kind: 'ready';
233
+ args: string[];
234
+ effectiveModel: string | null;
235
+ spawnCodexHome: string | undefined;
236
+ spawnLocalModelKey: string | null;
237
+ isLocalModelPass: boolean;
238
+ /** Translating proxy started for an opt-in local-model pass (else null).
239
+ * Carried out so the caller can attach it to the team state for
240
+ * close-time teardown + reception read. */
241
+ mcpProxy?: CodexMcpProxyHandle | null;
242
+ };
243
+ /**
244
+ * Phase: resolve the per-product CODEX_HOME default, apply per-pass local-model
245
+ * routing (fallback / route), select the effective model, and build the CLI
246
+ * args. Returns 'ready' with the args + the model/env bits the spawn needs.
247
+ */
248
+ export declare function resolveSpawnModel(args: {
249
+ resolvedEngine: ReturnType<typeof resolveBackend>;
250
+ enginePass: EnginePass;
251
+ localModelOverride: Record<string, string | null> | null | undefined;
252
+ /**
253
+ * Stage directive local-model (Workflow layer of the unified local-model
254
+ * precedence); inherited when the focus does not override this pass. Null when
255
+ * the stage pins no local model.
256
+ */
257
+ stageDirectiveLocalModel?: string | null;
258
+ config: DaemonConfig;
259
+ directiveModel: string | null;
260
+ /**
261
+ * Focus override snapshotted on a pending spawn directive (respawn path), or
262
+ * null. When present it takes precedence over the live pipeline_config.model
263
+ * for the focus-override slot, so respawn honors the override even if the
264
+ * focus row's pipeline_config was refetched differently between store and
265
+ * consume. Null on the initial-spawn / stage-directive path.
266
+ */
267
+ pendingFocusOverrideModel: string | null;
268
+ pipelineConfig: PipelineConfig | null;
269
+ backend: AgentBackend;
270
+ worktreePath: string;
271
+ resumeId: string | null;
272
+ role: AgentRole;
273
+ readOnly: boolean;
274
+ focusName: string;
275
+ focusId: string;
276
+ }): Promise<SpawnModelResolution>;
277
+ //# sourceMappingURL=model-routing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-routing.d.ts","sourceRoot":"","sources":["../../src/spawn/model-routing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACf,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAC5G,OAAO,EAEL,wBAAwB,EAEzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,sCAAsC,C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