@telora/daemon 0.15.1 → 0.15.3

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 (356) hide show
  1. package/README.md +11 -11
  2. package/build-info.json +2 -2
  3. package/dist/assembly-engine.d.ts +1 -1
  4. package/dist/assembly-engine.d.ts.map +1 -1
  5. package/dist/assembly-resolvers.js +41 -41
  6. package/dist/assembly-resolvers.js.map +1 -1
  7. package/dist/branch-status.d.ts +4 -4
  8. package/dist/branch-status.d.ts.map +1 -1
  9. package/dist/branch-status.js +23 -23
  10. package/dist/branch-status.js.map +1 -1
  11. package/dist/cli/connect.js +1 -1
  12. package/dist/cli/connect.js.map +1 -1
  13. package/dist/completion-detector.d.ts +1 -1
  14. package/dist/completion-detector.js +1 -1
  15. package/dist/completion-handler.d.ts +1 -1
  16. package/dist/completion-handler.js +4 -4
  17. package/dist/completion-handler.js.map +1 -1
  18. package/dist/condition-evaluators.js +4 -4
  19. package/dist/condition-evaluators.js.map +1 -1
  20. package/dist/control-state.d.ts +6 -6
  21. package/dist/control-state.d.ts.map +1 -1
  22. package/dist/control-state.js +43 -43
  23. package/dist/control-state.js.map +1 -1
  24. package/dist/crash-recovery-scan.d.ts +1 -1
  25. package/dist/crash-recovery-scan.js +20 -20
  26. package/dist/crash-recovery-scan.js.map +1 -1
  27. package/dist/crash-recovery-types.d.ts +3 -3
  28. package/dist/crash-recovery-types.d.ts.map +1 -1
  29. package/dist/crash-recovery-types.js +2 -2
  30. package/dist/crash-recovery-types.js.map +1 -1
  31. package/dist/crash-recovery.d.ts +3 -3
  32. package/dist/crash-recovery.d.ts.map +1 -1
  33. package/dist/crash-recovery.js +21 -21
  34. package/dist/crash-recovery.js.map +1 -1
  35. package/dist/daemon-process.d.ts +1 -1
  36. package/dist/daemon-process.d.ts.map +1 -1
  37. package/dist/dag-validator.d.ts +6 -6
  38. package/dist/dag-validator.d.ts.map +1 -1
  39. package/dist/dag-validator.js +2 -2
  40. package/dist/dag-validator.js.map +1 -1
  41. package/dist/delivery-guards.d.ts +1 -1
  42. package/dist/delivery-guards.js +1 -1
  43. package/dist/delivery-lifecycle.d.ts +5 -5
  44. package/dist/delivery-lifecycle.d.ts.map +1 -1
  45. package/dist/delivery-lifecycle.js +12 -12
  46. package/dist/delivery-lifecycle.js.map +1 -1
  47. package/dist/delivery-merge.js +1 -1
  48. package/dist/delivery-merge.js.map +1 -1
  49. package/dist/dependency-resolver.d.ts +7 -7
  50. package/dist/dependency-resolver.d.ts.map +1 -1
  51. package/dist/dependency-resolver.js.map +1 -1
  52. package/dist/directive-executor.d.ts +15 -15
  53. package/dist/directive-executor.d.ts.map +1 -1
  54. package/dist/directive-executor.js +76 -76
  55. package/dist/directive-executor.js.map +1 -1
  56. package/dist/evaluation-context.d.ts +2 -2
  57. package/dist/evaluation-context.d.ts.map +1 -1
  58. package/dist/evaluation-context.js +4 -4
  59. package/dist/evaluation-context.js.map +1 -1
  60. package/dist/focus-completion-event.d.ts +97 -0
  61. package/dist/focus-completion-event.d.ts.map +1 -0
  62. package/dist/focus-completion-event.js +257 -0
  63. package/dist/focus-completion-event.js.map +1 -0
  64. package/dist/focus-completion.d.ts +85 -0
  65. package/dist/focus-completion.d.ts.map +1 -0
  66. package/dist/focus-completion.js +459 -0
  67. package/dist/focus-completion.js.map +1 -0
  68. package/dist/focus-engine.d.ts +47 -0
  69. package/dist/focus-engine.d.ts.map +1 -0
  70. package/dist/focus-engine.js +421 -0
  71. package/dist/focus-engine.js.map +1 -0
  72. package/dist/focus-executor.d.ts +55 -0
  73. package/dist/focus-executor.d.ts.map +1 -0
  74. package/dist/focus-executor.js +549 -0
  75. package/dist/focus-executor.js.map +1 -0
  76. package/dist/focus-lifecycle.d.ts +61 -0
  77. package/dist/focus-lifecycle.d.ts.map +1 -0
  78. package/dist/focus-lifecycle.js +544 -0
  79. package/dist/focus-lifecycle.js.map +1 -0
  80. package/dist/focus-merge.d.ts +77 -0
  81. package/dist/focus-merge.d.ts.map +1 -0
  82. package/dist/focus-merge.js +378 -0
  83. package/dist/focus-merge.js.map +1 -0
  84. package/dist/focus-prompt-builder.d.ts +35 -0
  85. package/dist/focus-prompt-builder.d.ts.map +1 -0
  86. package/dist/focus-prompt-builder.js +138 -0
  87. package/dist/focus-prompt-builder.js.map +1 -0
  88. package/dist/focus-provisioning.d.ts +16 -0
  89. package/dist/focus-provisioning.d.ts.map +1 -0
  90. package/dist/focus-provisioning.js +119 -0
  91. package/dist/focus-provisioning.js.map +1 -0
  92. package/dist/focus-spawn-helpers.d.ts +67 -0
  93. package/dist/focus-spawn-helpers.d.ts.map +1 -0
  94. package/dist/focus-spawn-helpers.js +160 -0
  95. package/dist/focus-spawn-helpers.js.map +1 -0
  96. package/dist/focus-team-lifecycle.d.ts +50 -0
  97. package/dist/focus-team-lifecycle.d.ts.map +1 -0
  98. package/dist/focus-team-lifecycle.js +256 -0
  99. package/dist/focus-team-lifecycle.js.map +1 -0
  100. package/dist/focus-team-state.d.ts +24 -0
  101. package/dist/focus-team-state.d.ts.map +1 -0
  102. package/dist/focus-team-state.js +43 -0
  103. package/dist/focus-team-state.js.map +1 -0
  104. package/dist/focus-worktree-state.d.ts +47 -0
  105. package/dist/focus-worktree-state.d.ts.map +1 -0
  106. package/dist/focus-worktree-state.js +104 -0
  107. package/dist/focus-worktree-state.js.map +1 -0
  108. package/dist/git-merge.d.ts +5 -5
  109. package/dist/git-merge.d.ts.map +1 -1
  110. package/dist/git-merge.js +5 -5
  111. package/dist/git-merge.js.map +1 -1
  112. package/dist/git-state-detector.d.ts +1 -1
  113. package/dist/git-state-detector.js +9 -9
  114. package/dist/git-state-detector.js.map +1 -1
  115. package/dist/git-utils.d.ts +1 -1
  116. package/dist/git-utils.js +1 -1
  117. package/dist/git.d.ts +2 -2
  118. package/dist/git.d.ts.map +1 -1
  119. package/dist/git.js +3 -3
  120. package/dist/git.js.map +1 -1
  121. package/dist/heartbeat.d.ts +4 -4
  122. package/dist/heartbeat.d.ts.map +1 -1
  123. package/dist/heartbeat.js +7 -7
  124. package/dist/heartbeat.js.map +1 -1
  125. package/dist/index.d.ts +1 -1
  126. package/dist/index.js +10 -10
  127. package/dist/index.js.map +1 -1
  128. package/dist/listener-auto-advance.d.ts +2 -2
  129. package/dist/listener-auto-advance.js +21 -21
  130. package/dist/listener-auto-advance.js.map +1 -1
  131. package/dist/listener.d.ts +12 -12
  132. package/dist/listener.d.ts.map +1 -1
  133. package/dist/listener.js +80 -75
  134. package/dist/listener.js.map +1 -1
  135. package/dist/loop-engine.d.ts +20 -20
  136. package/dist/loop-engine.d.ts.map +1 -1
  137. package/dist/loop-engine.js +82 -82
  138. package/dist/loop-engine.js.map +1 -1
  139. package/dist/loop-event-bus.d.ts +5 -5
  140. package/dist/loop-event-bus.d.ts.map +1 -1
  141. package/dist/loop-event-bus.js +3 -3
  142. package/dist/loop-llm-client.d.ts +1 -1
  143. package/dist/loop-llm-client.js +1 -1
  144. package/dist/loop-variance.d.ts +1 -1
  145. package/dist/loop-variance.js +1 -1
  146. package/dist/merge-detector.d.ts +6 -6
  147. package/dist/merge-detector.d.ts.map +1 -1
  148. package/dist/merge-detector.js +47 -47
  149. package/dist/merge-detector.js.map +1 -1
  150. package/dist/otlp-log-parser.js +2 -2
  151. package/dist/otlp-log-parser.js.map +1 -1
  152. package/dist/otlp-metric-parser.js +1 -1
  153. package/dist/otlp-metric-parser.js.map +1 -1
  154. package/dist/otlp-receiver.d.ts +1 -1
  155. package/dist/otlp-receiver.js +7 -7
  156. package/dist/otlp-receiver.js.map +1 -1
  157. package/dist/otlp-types.d.ts +1 -1
  158. package/dist/otlp-types.d.ts.map +1 -1
  159. package/dist/otlp-types.js +3 -3
  160. package/dist/otlp-types.js.map +1 -1
  161. package/dist/output-monitor.d.ts +6 -6
  162. package/dist/output-monitor.d.ts.map +1 -1
  163. package/dist/output-monitor.js +11 -11
  164. package/dist/output-monitor.js.map +1 -1
  165. package/dist/planning-prompt-builder.d.ts +17 -15
  166. package/dist/planning-prompt-builder.d.ts.map +1 -1
  167. package/dist/planning-prompt-builder.js +34 -32
  168. package/dist/planning-prompt-builder.js.map +1 -1
  169. package/dist/pm/mitigation-correlator.d.ts +7 -7
  170. package/dist/pm/mitigation-correlator.d.ts.map +1 -1
  171. package/dist/pm/mitigation-correlator.js +33 -33
  172. package/dist/pm/mitigation-correlator.js.map +1 -1
  173. package/dist/pm-engine.js +1 -1
  174. package/dist/pm-engine.js.map +1 -1
  175. package/dist/prompt-builder.d.ts +1 -1
  176. package/dist/prompt-builder.js +9 -9
  177. package/dist/prompt-builder.js.map +1 -1
  178. package/dist/prompts/starter-prompt.d.ts +2 -2
  179. package/dist/prompts/starter-prompt.d.ts.map +1 -1
  180. package/dist/prompts/starter-prompt.js +6 -6
  181. package/dist/qa-crash-recovery.d.ts +10 -10
  182. package/dist/qa-crash-recovery.d.ts.map +1 -1
  183. package/dist/qa-crash-recovery.js +32 -32
  184. package/dist/qa-crash-recovery.js.map +1 -1
  185. package/dist/qa-dev-server.d.ts +3 -3
  186. package/dist/qa-dev-server.d.ts.map +1 -1
  187. package/dist/qa-dev-server.js +3 -3
  188. package/dist/qa-dev-server.js.map +1 -1
  189. package/dist/qa-orchestrator.d.ts +18 -18
  190. package/dist/qa-orchestrator.d.ts.map +1 -1
  191. package/dist/qa-orchestrator.js +47 -47
  192. package/dist/qa-orchestrator.js.map +1 -1
  193. package/dist/qa-provisioner.d.ts +3 -3
  194. package/dist/qa-provisioner.d.ts.map +1 -1
  195. package/dist/qa-provisioner.js +14 -14
  196. package/dist/qa-provisioner.js.map +1 -1
  197. package/dist/qa-state.d.ts +10 -10
  198. package/dist/qa-state.d.ts.map +1 -1
  199. package/dist/qa-state.js +11 -11
  200. package/dist/qa-state.js.map +1 -1
  201. package/dist/queries/control-state.d.ts +5 -5
  202. package/dist/queries/control-state.d.ts.map +1 -1
  203. package/dist/queries/control-state.js +4 -4
  204. package/dist/queries/control-state.js.map +1 -1
  205. package/dist/queries/deliveries.d.ts +28 -24
  206. package/dist/queries/deliveries.d.ts.map +1 -1
  207. package/dist/queries/deliveries.js +32 -28
  208. package/dist/queries/deliveries.js.map +1 -1
  209. package/dist/queries/focuses.d.ts +97 -0
  210. package/dist/queries/focuses.d.ts.map +1 -0
  211. package/dist/queries/focuses.js +136 -0
  212. package/dist/queries/focuses.js.map +1 -0
  213. package/dist/queries/index.d.ts +3 -3
  214. package/dist/queries/index.d.ts.map +1 -1
  215. package/dist/queries/index.js +2 -2
  216. package/dist/queries/index.js.map +1 -1
  217. package/dist/queries/qa.d.ts +16 -16
  218. package/dist/queries/qa.d.ts.map +1 -1
  219. package/dist/queries/qa.js +22 -22
  220. package/dist/queries/qa.js.map +1 -1
  221. package/dist/queries/schemas.d.ts +40 -34
  222. package/dist/queries/schemas.d.ts.map +1 -1
  223. package/dist/queries/schemas.js +31 -26
  224. package/dist/queries/schemas.js.map +1 -1
  225. package/dist/queries/sessions.d.ts +1 -1
  226. package/dist/queries/sessions.d.ts.map +1 -1
  227. package/dist/queries/sessions.js +2 -2
  228. package/dist/queries/sessions.js.map +1 -1
  229. package/dist/queries/shared.js +10 -10
  230. package/dist/queries/shared.js.map +1 -1
  231. package/dist/queries/workflows.d.ts +1 -1
  232. package/dist/queries/workflows.js +1 -1
  233. package/dist/queries/worktrees.d.ts +7 -7
  234. package/dist/queries/worktrees.d.ts.map +1 -1
  235. package/dist/queries/worktrees.js +7 -7
  236. package/dist/queries/worktrees.js.map +1 -1
  237. package/dist/review-defect-detector.d.ts +125 -0
  238. package/dist/review-defect-detector.d.ts.map +1 -0
  239. package/dist/review-defect-detector.js +289 -0
  240. package/dist/review-defect-detector.js.map +1 -0
  241. package/dist/session-lifecycle.d.ts +17 -17
  242. package/dist/session-lifecycle.d.ts.map +1 -1
  243. package/dist/session-lifecycle.js +82 -82
  244. package/dist/session-lifecycle.js.map +1 -1
  245. package/dist/spawn-cooldown.d.ts +8 -8
  246. package/dist/spawn-cooldown.d.ts.map +1 -1
  247. package/dist/spawn-cooldown.js +15 -15
  248. package/dist/spawn-cooldown.js.map +1 -1
  249. package/dist/spawn-environment.d.ts +2 -2
  250. package/dist/spawn-environment.d.ts.map +1 -1
  251. package/dist/spawn-environment.js +3 -3
  252. package/dist/spawn-environment.js.map +1 -1
  253. package/dist/spawner-lifecycle.d.ts +2 -2
  254. package/dist/spawner-lifecycle.d.ts.map +1 -1
  255. package/dist/spawner-lifecycle.js +3 -3
  256. package/dist/spawner-lifecycle.js.map +1 -1
  257. package/dist/spawner-resolution.d.ts +3 -3
  258. package/dist/spawner-resolution.d.ts.map +1 -1
  259. package/dist/spawner-resolution.js +4 -4
  260. package/dist/spawner-resolution.js.map +1 -1
  261. package/dist/spawner-stream-handlers.js +2 -2
  262. package/dist/spawner-stream-handlers.js.map +1 -1
  263. package/dist/spawner.d.ts +1 -1
  264. package/dist/spawner.d.ts.map +1 -1
  265. package/dist/spawner.js +6 -6
  266. package/dist/spawner.js.map +1 -1
  267. package/dist/stage-classifier.d.ts +1 -1
  268. package/dist/stage-classifier.js +1 -1
  269. package/dist/state-cascade.d.ts +25 -25
  270. package/dist/state-cascade.d.ts.map +1 -1
  271. package/dist/state-cascade.js +89 -89
  272. package/dist/state-cascade.js.map +1 -1
  273. package/dist/strategy-completion-event.d.ts +37 -3
  274. package/dist/strategy-completion-event.d.ts.map +1 -1
  275. package/dist/strategy-completion-event.js +78 -9
  276. package/dist/strategy-completion-event.js.map +1 -1
  277. package/dist/strategy-completion.d.ts +11 -0
  278. package/dist/strategy-completion.d.ts.map +1 -1
  279. package/dist/strategy-completion.js +22 -1
  280. package/dist/strategy-completion.js.map +1 -1
  281. package/dist/strategy-executor.d.ts.map +1 -1
  282. package/dist/strategy-executor.js +46 -14
  283. package/dist/strategy-executor.js.map +1 -1
  284. package/dist/strategy-merge.d.ts.map +1 -1
  285. package/dist/strategy-merge.js +4 -0
  286. package/dist/strategy-merge.js.map +1 -1
  287. package/dist/strategy-team-lifecycle.d.ts.map +1 -1
  288. package/dist/strategy-team-lifecycle.js +3 -0
  289. package/dist/strategy-team-lifecycle.js.map +1 -1
  290. package/dist/supabase.d.ts +4 -4
  291. package/dist/supabase.d.ts.map +1 -1
  292. package/dist/supabase.js +5 -5
  293. package/dist/supabase.js.map +1 -1
  294. package/dist/task-converter.d.ts +4 -4
  295. package/dist/task-converter.d.ts.map +1 -1
  296. package/dist/task-converter.js +1 -1
  297. package/dist/task-converter.js.map +1 -1
  298. package/dist/team-prompt-base.d.ts +59 -19
  299. package/dist/team-prompt-base.d.ts.map +1 -1
  300. package/dist/team-prompt-base.js +206 -25
  301. package/dist/team-prompt-base.js.map +1 -1
  302. package/dist/team-spawner.d.ts +9 -9
  303. package/dist/team-spawner.d.ts.map +1 -1
  304. package/dist/team-spawner.js +87 -83
  305. package/dist/team-spawner.js.map +1 -1
  306. package/dist/telemetry-writer.d.ts +2 -2
  307. package/dist/telemetry-writer.d.ts.map +1 -1
  308. package/dist/templates/claude-md.js +8 -8
  309. package/dist/templates/claude-settings.d.ts +1 -1
  310. package/dist/templates/claude-settings.js +2 -2
  311. package/dist/templates/claude-settings.js.map +1 -1
  312. package/dist/trigger-executor.d.ts +4 -4
  313. package/dist/trigger-executor.d.ts.map +1 -1
  314. package/dist/trigger-executor.js +11 -11
  315. package/dist/trigger-executor.js.map +1 -1
  316. package/dist/types/dag.d.ts +1 -1
  317. package/dist/types/delivery.d.ts +3 -3
  318. package/dist/types/delivery.d.ts.map +1 -1
  319. package/dist/types/focus.d.ts +214 -0
  320. package/dist/types/focus.d.ts.map +1 -0
  321. package/dist/types/focus.js +5 -0
  322. package/dist/types/focus.js.map +1 -0
  323. package/dist/types/index.d.ts +1 -1
  324. package/dist/types/index.d.ts.map +1 -1
  325. package/dist/types/index.js +1 -1
  326. package/dist/types/index.js.map +1 -1
  327. package/dist/types/merge.d.ts +1 -1
  328. package/dist/types/session.d.ts +2 -2
  329. package/dist/types/session.d.ts.map +1 -1
  330. package/dist/types/strategy.d.ts +7 -0
  331. package/dist/types/strategy.d.ts.map +1 -1
  332. package/dist/unified-engine-lifecycle.js +11 -11
  333. package/dist/unified-engine-lifecycle.js.map +1 -1
  334. package/dist/unified-init.d.ts +1 -1
  335. package/dist/unified-init.js +9 -9
  336. package/dist/unified-init.js.map +1 -1
  337. package/dist/unified-shell-config.d.ts +4 -4
  338. package/dist/unified-shell-config.d.ts.map +1 -1
  339. package/dist/unified-shell-config.js +5 -5
  340. package/dist/unified-shell-config.js.map +1 -1
  341. package/dist/unified-shell-status.js +3 -3
  342. package/dist/unified-shell-status.js.map +1 -1
  343. package/dist/unified-shell.d.ts +1 -1
  344. package/dist/unified-shell.js +4 -4
  345. package/dist/unified-shell.js.map +1 -1
  346. package/dist/workflow-engine.d.ts +1 -1
  347. package/dist/workflow-engine.d.ts.map +1 -1
  348. package/dist/worktree-focus.d.ts +69 -0
  349. package/dist/worktree-focus.d.ts.map +1 -0
  350. package/dist/worktree-focus.js +214 -0
  351. package/dist/worktree-focus.js.map +1 -0
  352. package/dist/worktree.d.ts +10 -10
  353. package/dist/worktree.d.ts.map +1 -1
  354. package/dist/worktree.js +39 -39
  355. package/dist/worktree.js.map +1 -1
  356. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"qa-state.js","sourceRoot":"","sources":["../src/qa-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA6BH,wEAAwE;AAExE,+DAA+D;AAC/D,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAA8B,CAAC;AAEjE;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAkB;IACjD,OAAO,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAkB;IACvD,OAAO,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;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AAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAC,WAAmB;IACjE,OAAO,2BAA2B,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,WAAmB,EAAE,KAAkC;IAC/F,2BAA2B,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,WAAmB;IAC9D,OAAO,2BAA2B,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,SAAiB;IACvD,OAAO,yBAAyB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,6BAA6B,CAAC,SAAiB;IAC7D,OAAO,yBAAyB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,SAAiB,EAAE,KAAgC;IACzF,yBAAyB,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CAAC,SAAiB;IAC1D,OAAO,yBAAyB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACrD,CAAC"}
@@ -1,25 +1,25 @@
1
1
  /**
2
2
  * Control state queries for the daemon.
3
3
  *
4
- * Polls for strategies and factory instances with non-running control states
4
+ * Polls for focuses and factory instances with non-running control states
5
5
  * so the daemon can suspend, resume, or stop agents accordingly.
6
6
  */
7
7
  /**
8
8
  * A control state change entry from the API.
9
9
  */
10
10
  export interface ControlStateChange {
11
- entityType: 'strategy' | 'factory_instance';
11
+ entityType: 'focus' | 'factory_instance';
12
12
  entityId: string;
13
13
  entityName?: string;
14
14
  controlState: 'stopped' | 'human_control' | 'resuming';
15
15
  controlNote: string | null;
16
16
  }
17
17
  /**
18
- * Fetch all strategies and factory instances with non-running control states.
18
+ * Fetch all focuses and factory instances with non-running control states.
19
19
  */
20
20
  export declare function getControlStateChanges(productId?: string): Promise<ControlStateChange[]>;
21
21
  /**
22
- * Update a strategy's control state to 'running' (after resuming).
22
+ * Update a focus's control state to 'running' (after resuming).
23
23
  */
24
- export declare function setControlStateRunning(entityType: 'strategy' | 'factory_instance', entityId: string): Promise<void>;
24
+ export declare function setControlStateRunning(entityType: 'focus' | 'factory_instance', entityId: string): Promise<void>;
25
25
  //# sourceMappingURL=control-state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"control-state.d.ts","sourceRoot":"","sources":["../../src/queries/control-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,UAAU,GAAG,kBAAkB,CAAC;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,SAAS,GAAG,eAAe,GAAG,UAAU,CAAC;IACvD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAUD;;GAEG;AACH,wBAAsB,sBAAsB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAe9F;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,UAAU,GAAG,kBAAkB,EAC3C,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAQf"}
1
+ {"version":3,"file":"control-state.d.ts","sourceRoot":"","sources":["../../src/queries/control-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,OAAO,GAAG,kBAAkB,CAAC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,SAAS,GAAG,eAAe,GAAG,UAAU,CAAC;IACvD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAUD;;GAEG;AACH,wBAAsB,sBAAsB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAe9F;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,OAAO,GAAG,kBAAkB,EACxC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAQf"}
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Control state queries for the daemon.
3
3
  *
4
- * Polls for strategies and factory instances with non-running control states
4
+ * Polls for focuses and factory instances with non-running control states
5
5
  * so the daemon can suspend, resume, or stop agents accordingly.
6
6
  */
7
7
  import { callApi } from './shared.js';
8
8
  /**
9
- * Fetch all strategies and factory instances with non-running control states.
9
+ * Fetch all focuses and factory instances with non-running control states.
10
10
  */
11
11
  export async function getControlStateChanges(productId) {
12
12
  const params = {};
@@ -15,12 +15,12 @@ export async function getControlStateChanges(productId) {
15
15
  }
16
16
  const result = await callApi('daemon_get_control_state_changes', params);
17
17
  return [
18
- ...(result.strategies ?? []),
18
+ ...(result.focuses ?? []),
19
19
  ...(result.factoryInstances ?? []),
20
20
  ];
21
21
  }
22
22
  /**
23
- * Update a strategy's control state to 'running' (after resuming).
23
+ * Update a focus's control state to 'running' (after resuming).
24
24
  */
25
25
  export async function setControlStateRunning(entityType, entityId) {
26
26
  await callApi('set_execution_unit_control_state', {
@@ -1 +1 @@
1
- {"version":3,"file":"control-state.js","sourceRoot":"","sources":["../../src/queries/control-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAqBtC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,SAAkB;IAC7D,MAAM,MAAM,GAA4B,EAAE,CAAC;IAC3C,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AE,SAAS;SAClB;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Delivery and strategy queries.
2
+ * Delivery and focus queries.
3
3
  */
4
4
  import type { DeliveryContext, PipelineConfig, GitState } from '../types.js';
5
5
  /**
6
- * @deprecated Use getReadyStrategies instead. Kept for backward compatibility.
6
+ * @deprecated Use getReadyFocuses instead. Kept for backward compatibility.
7
7
  * Get deliveries ready for agent work (assigned to role, no active session).
8
8
  */
9
9
  export declare function getReadyDeliveries(_organizationId: string, productId?: string): Promise<Array<{
@@ -16,7 +16,7 @@ export declare function getReadyDeliveries(_organizationId: string, productId?:
16
16
  /**
17
17
  * Get full delivery context including product, context groups, and tasks.
18
18
  *
19
- * Note: The API returns camelCase fields for nested objects (product, strategy,
19
+ * Note: The API returns camelCase fields for nested objects (product, focus,
20
20
  * issues). The validated result is cast to DeliveryContext, preserving the
21
21
  * existing runtime behavior where camelCase field names are used.
22
22
  */
@@ -34,18 +34,21 @@ export declare function getDoneDeliveries(_organizationId: string, productId?: s
34
34
  delivery_id: string;
35
35
  delivery_name: string;
36
36
  product_id: string | null;
37
- strategy_id: string | null;
37
+ focus_id: string | null;
38
38
  pipeline_config: PipelineConfig | null;
39
39
  }>>;
40
40
  /**
41
- * Get strategies with agent assignments that have ready deliveries.
42
- * Returns the next ready delivery per strategy.
41
+ * Get focuses with agent assignments that have ready deliveries.
42
+ * Returns the next ready delivery per focus.
43
+ *
44
+ * delivery_id and delivery_name are null when the focus has zero
45
+ * deliveries -- the team is expected to scope deliveries as its first act.
43
46
  */
44
- export declare function getReadyStrategies(_organizationId: string, productId?: string): Promise<Array<{
45
- strategy_id: string;
46
- strategy_name: string;
47
- delivery_id: string;
48
- delivery_name: string;
47
+ export declare function getReadyFocuses(_organizationId: string, productId?: string): Promise<Array<{
48
+ focus_id: string;
49
+ focus_name: string;
50
+ delivery_id: string | null;
51
+ delivery_name: string | null;
49
52
  product_id: string | null;
50
53
  pipeline_config: PipelineConfig | null;
51
54
  read_only: boolean;
@@ -54,17 +57,17 @@ export declare function getReadyStrategies(_organizationId: string, productId?:
54
57
  agent_role_name: string;
55
58
  }>>;
56
59
  /**
57
- * Get strategies with agent role assignments that are active.
60
+ * Get focuses with agent role assignments that are active.
58
61
  *
59
- * Unlike getReadyStrategies(), this does NOT filter by delivery state.
60
- * Returns all strategies with status='active' and an assigned agent role.
61
- * Used by the strategy lifecycle to determine which worktrees to keep alive
62
+ * Unlike getReadyFocuses(), this does NOT filter by delivery state.
63
+ * Returns all focuses with status='active' and an assigned agent role.
64
+ * Used by the focus lifecycle to determine which worktrees to keep alive
62
65
  * (QA environments, idle queues waiting for new deliveries, etc.) and by
63
66
  * orphan worktree cleanup to avoid incorrectly removing active worktrees.
64
67
  */
65
- export declare function getActiveStrategies(_organizationId: string, productId?: string): Promise<Array<{
66
- strategy_id: string;
67
- strategy_name: string;
68
+ export declare function getActiveFocuses(_organizationId: string, productId?: string): Promise<Array<{
69
+ focus_id: string;
70
+ focus_name: string;
68
71
  status: string;
69
72
  product_id: string | null;
70
73
  pipeline_config: PipelineConfig | null;
@@ -72,23 +75,24 @@ export declare function getActiveStrategies(_organizationId: string, productId?:
72
75
  assigned_agent_role_id: string | null;
73
76
  agent_role_name: string | null;
74
77
  current_workflow_stage_id: string | null;
78
+ review_requested_at: string | null;
75
79
  }>>;
76
80
  /**
77
81
  * Write the squash merge commit SHA to a delivery record.
78
82
  *
79
- * Called after a successful delivery→strategy squash merge so the
83
+ * Called after a successful delivery→focus squash merge so the
80
84
  * commit can be traced back to the delivery.
81
85
  */
82
86
  export declare function updateDeliveryMergeCommitSha(deliveryId: string, commitSha: string): Promise<void>;
83
87
  /**
84
- * Record a strategy merge in the strategy_merges table.
88
+ * Record a focus merge in the focus_merges table.
85
89
  *
86
90
  * Fire-and-forget: the caller catches errors. Uses ON CONFLICT DO NOTHING
87
- * on (strategy_id, merge_commit_sha) for deduplication.
91
+ * on (focus_id, merge_commit_sha) for deduplication.
88
92
  */
89
- export declare function recordStrategyMerge(params: {
93
+ export declare function recordFocusMerge(params: {
90
94
  organizationId: string;
91
- strategyId: string;
95
+ focusId: string;
92
96
  mergeCommitSha: string;
93
97
  commitShas: string[];
94
98
  branchName: string;
@@ -109,7 +113,7 @@ export declare function getMergeConflictDeliveries(_organizationId: string, prod
109
113
  delivery_id: string;
110
114
  delivery_name: string;
111
115
  git_branch_name: string | null;
112
- strategy_id: string | null;
116
+ focus_id: string | null;
113
117
  pipeline_config: PipelineConfig | null;
114
118
  }>>;
115
119
  //# sourceMappingURL=deliveries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deliveries.d.ts","sourceRoot":"","sources":["../../src/queries/deliveries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAY,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA4BvF;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IACnG,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC,CAAC,CAeF;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAkB5F;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,EACvB,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,GACrC,OAAO,CAAC,IAAI,CAAC,CASf;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,O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AAC;IACtB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,EAAE,cAAc,GAAG,IAAI,CAAC;CACxC,CAAC,CAAC,CAcF"}
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Delivery and strategy queries.
2
+ * Delivery and focus queries.
3
3
  */
4
4
  import { callApi, callApiValidated, createTransform } from './shared.js';
5
- import { ReadyDeliveriesResponseSchema, DeliveryContextResponseSchema, DoneDeliveriesResponseSchema, ReadyStrategiesResponseSchema, ActiveStrategiesResponseSchema, MergeConflictDeliveriesResponseSchema, } from './schemas.js';
5
+ import { ReadyDeliveriesResponseSchema, DeliveryContextResponseSchema, DoneDeliveriesResponseSchema, ReadyFocusesResponseSchema, ActiveFocusesResponseSchema, MergeConflictDeliveriesResponseSchema, } from './schemas.js';
6
6
  const transformDeliveryFromApi = createTransform({
7
7
  id: 'id',
8
8
  name: 'name',
@@ -15,7 +15,7 @@ const transformDeliveryFromApi = createTransform({
15
15
  agent_assigned_at: 'agentAssignedAt',
16
16
  });
17
17
  /**
18
- * @deprecated Use getReadyStrategies instead. Kept for backward compatibility.
18
+ * @deprecated Use getReadyFocuses instead. Kept for backward compatibility.
19
19
  * Get deliveries ready for agent work (assigned to role, no active session).
20
20
  */
21
21
  export async function getReadyDeliveries(_organizationId, productId) {
@@ -32,7 +32,7 @@ export async function getReadyDeliveries(_organizationId, productId) {
32
32
  /**
33
33
  * Get full delivery context including product, context groups, and tasks.
34
34
  *
35
- * Note: The API returns camelCase fields for nested objects (product, strategy,
35
+ * Note: The API returns camelCase fields for nested objects (product, focus,
36
36
  * issues). The validated result is cast to DeliveryContext, preserving the
37
37
  * existing runtime behavior where camelCase field names are used.
38
38
  */
@@ -76,19 +76,22 @@ export async function getDoneDeliveries(_organizationId, productId) {
76
76
  delivery_id: d.deliveryId,
77
77
  delivery_name: d.deliveryName,
78
78
  product_id: d.productId,
79
- strategy_id: d.strategyId,
79
+ focus_id: d.focusId,
80
80
  pipeline_config: d.pipelineConfig ?? null,
81
81
  }));
82
82
  }
83
83
  /**
84
- * Get strategies with agent assignments that have ready deliveries.
85
- * Returns the next ready delivery per strategy.
84
+ * Get focuses with agent assignments that have ready deliveries.
85
+ * Returns the next ready delivery per focus.
86
+ *
87
+ * delivery_id and delivery_name are null when the focus has zero
88
+ * deliveries -- the team is expected to scope deliveries as its first act.
86
89
  */
87
- export async function getReadyStrategies(_organizationId, productId) {
88
- const result = await callApiValidated('daemon_get_ready_strategies', ReadyStrategiesResponseSchema, productId ? { productId } : {});
89
- return result.strategies.map((s) => ({
90
- strategy_id: s.strategyId,
91
- strategy_name: s.strategyName,
90
+ export async function getReadyFocuses(_organizationId, productId) {
91
+ const result = await callApiValidated('daemon_get_ready_focuses', ReadyFocusesResponseSchema, productId ? { productId } : {});
92
+ return result.focuses.map((s) => ({
93
+ focus_id: s.focusId,
94
+ focus_name: s.focusName,
92
95
  delivery_id: s.deliveryId,
93
96
  delivery_name: s.deliveryName,
94
97
  product_id: s.productId,
@@ -100,19 +103,19 @@ export async function getReadyStrategies(_organizationId, productId) {
100
103
  }));
101
104
  }
102
105
  /**
103
- * Get strategies with agent role assignments that are active.
106
+ * Get focuses with agent role assignments that are active.
104
107
  *
105
- * Unlike getReadyStrategies(), this does NOT filter by delivery state.
106
- * Returns all strategies with status='active' and an assigned agent role.
107
- * Used by the strategy lifecycle to determine which worktrees to keep alive
108
+ * Unlike getReadyFocuses(), this does NOT filter by delivery state.
109
+ * Returns all focuses with status='active' and an assigned agent role.
110
+ * Used by the focus lifecycle to determine which worktrees to keep alive
108
111
  * (QA environments, idle queues waiting for new deliveries, etc.) and by
109
112
  * orphan worktree cleanup to avoid incorrectly removing active worktrees.
110
113
  */
111
- export async function getActiveStrategies(_organizationId, productId) {
112
- const result = await callApiValidated('daemon_get_active_strategies', ActiveStrategiesResponseSchema, productId ? { productId } : {});
113
- return result.strategies.map((s) => ({
114
- strategy_id: s.strategyId,
115
- strategy_name: s.strategyName,
114
+ export async function getActiveFocuses(_organizationId, productId) {
115
+ const result = await callApiValidated('daemon_get_active_focuses', ActiveFocusesResponseSchema, productId ? { productId } : {});
116
+ return result.focuses.map((s) => ({
117
+ focus_id: s.focusId,
118
+ focus_name: s.focusName,
116
119
  status: s.status ?? 'active',
117
120
  product_id: s.productId,
118
121
  pipeline_config: s.pipelineConfig ?? null,
@@ -120,12 +123,13 @@ export async function getActiveStrategies(_organizationId, productId) {
120
123
  assigned_agent_role_id: s.assignedAgentRoleId,
121
124
  agent_role_name: s.agentRoleName,
122
125
  current_workflow_stage_id: s.currentWorkflowStageId ?? null,
126
+ review_requested_at: s.reviewRequestedAt ?? null,
123
127
  }));
124
128
  }
125
129
  /**
126
130
  * Write the squash merge commit SHA to a delivery record.
127
131
  *
128
- * Called after a successful delivery→strategy squash merge so the
132
+ * Called after a successful delivery→focus squash merge so the
129
133
  * commit can be traced back to the delivery.
130
134
  */
131
135
  export async function updateDeliveryMergeCommitSha(deliveryId, commitSha) {
@@ -135,14 +139,14 @@ export async function updateDeliveryMergeCommitSha(deliveryId, commitSha) {
135
139
  });
136
140
  }
137
141
  /**
138
- * Record a strategy merge in the strategy_merges table.
142
+ * Record a focus merge in the focus_merges table.
139
143
  *
140
144
  * Fire-and-forget: the caller catches errors. Uses ON CONFLICT DO NOTHING
141
- * on (strategy_id, merge_commit_sha) for deduplication.
145
+ * on (focus_id, merge_commit_sha) for deduplication.
142
146
  */
143
- export async function recordStrategyMerge(params) {
144
- await callApi('daemon_record_strategy_merge', {
145
- strategyId: params.strategyId,
147
+ export async function recordFocusMerge(params) {
148
+ await callApi('daemon_record_focus_merge', {
149
+ focusId: params.focusId,
146
150
  fields: {
147
151
  mergeCommitSha: params.mergeCommitSha,
148
152
  commitShas: params.commitShas,
@@ -196,7 +200,7 @@ export async function getMergeConflictDeliveries(_organizationId, productId) {
196
200
  delivery_id: d.deliveryId,
197
201
  delivery_name: d.deliveryName,
198
202
  git_branch_name: d.gitBranchName,
199
- strategy_id: d.strategyId,
203
+ focus_id: d.focusId,
200
204
  pipeline_config: d.pipelineConfig ?? null,
201
205
  }));
202
206
  }
@@ -1 +1 @@
1
- {"version":3,"file":"deliveries.js","sourceRoot":"","sources":["../../src/queries/deliveries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAEL,6BAA6B,EAC7B,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC7B,8BAA8B,EAC9B,qCAAqC,GACtC,MAAM,cAAc,CAAC;AAMtB,MAAM,wBAAwB,GAAG,eAAe,CAAwB;IACtE,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,gBAAgB;IACjC,UAAU,EAAE,WAAW;IACvB,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,EAAE,KAAK,EAAE,UAAmB,EAAE;IACpC,sBAAsB,EAAE,qBAAqB;IAC7C,iBAAiB,EAAE,iBAAiB;CACrC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,eAAuB,EAAE,SAAkB;IAOlF,MAAM,MAAM,GAAG,MAAM,gBAAgB,CACnC,6BAA6B,EAC7B,6BAA6B,EAC7B,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAC/B,CAAC;IAEF,iEAAiE;IACjE,OAAO,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACnC,WAAW,EAAE,CAAC,CAAC,UAAU;QACzB,aAAa,EAAE,CAAC,CAAC,YAAY;QAC7B,UAAU,EAAE,CAAC,CAAC,SAAS;QACvB,sBAAsB,EAAE,CAAC,CAAC,mBAAmB;QAC7C,eAAe,EAAE,CAAC,C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AAC,CAAC;QACpB,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,eAAuB,EAAE,SAAkB;IAO1F,MAAM,MAAM,GAAG,MAAM,gBAAgB,CACnC,sCAAsC,EACtC,qCAAqC,EACrC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAC/B,CAAC;IAEF,OAAO,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACnC,WAAW,EAAE,CAAC,CAAC,UAAU;QACzB,aAAa,EAAE,CAAC,CAAC,YAAY;QAC7B,eAAe,EAAE,CAAC,CAAC,aAAa;QAChC,QAAQ,EAAE,CAAC,CAAC,OAAO;QACnB,eAAe,EAAE,CAAC,CAAC,cAAc,IAAI,IAAI;KAC1C,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Focus-level queries for team execution.
3
+ *
4
+ * Fetches all deliveries and issues for a focus so the team lead
5
+ * can build a complete task DAG.
6
+ */
7
+ import type { FocusDeliveryInfo, FocusIssueInfo, StageDirective, Workflow } from '../types.js';
8
+ /**
9
+ * A wiki page providing background information for AI agents.
10
+ *
11
+ * Currently returned as an empty list; the next delivery wires the
12
+ * resolver into wiki_search.
13
+ */
14
+ export interface ProductContextDoc {
15
+ title: string;
16
+ content: string;
17
+ }
18
+ /**
19
+ * Fetch all deliveries for a focus, ordered by priority rank.
20
+ */
21
+ export declare function getFocusDeliveries(focusId: string): Promise<FocusDeliveryInfo[]>;
22
+ /**
23
+ * Fetch all issues across all deliveries for a focus.
24
+ */
25
+ export declare function getFocusIssues(focusId: string): Promise<FocusIssueInfo[]>;
26
+ /**
27
+ * Fetch wiki pages relevant to a focus.
28
+ *
29
+ * Stub: returns no pages. Wired up to wiki_search in the next delivery
30
+ * (Retrieval and Assembly API).
31
+ */
32
+ export declare function getProductContextForFocus(_productId: string, _focusId: string): Promise<ProductContextDoc[]>;
33
+ /**
34
+ * Persist the Claude Code session ID on the focus row for --resume support.
35
+ */
36
+ export declare function updateFocusClaudeSessionId(focusId: string, claudeSessionId: string): Promise<void>;
37
+ /**
38
+ * The deployment profile snapshot stored on a product.
39
+ *
40
+ * Derived from the deployment_profiles record at the time the profile was linked.
41
+ * Used to inject operating context into agent prompts without live lookups.
42
+ */
43
+ export interface DeploymentProfileSnapshot {
44
+ name: string;
45
+ inceptionPrompt: string | null;
46
+ guidelines: string | null;
47
+ protectedPaths?: string[] | null;
48
+ }
49
+ /**
50
+ * Fetch the deployment profile snapshot for a product.
51
+ *
52
+ * Returns null if the product has no linked deployment profile or
53
+ * if the snapshot has not been stored yet.
54
+ */
55
+ export declare function getProductDeploymentProfileSnapshot(productId: string): Promise<DeploymentProfileSnapshot | null>;
56
+ /**
57
+ * Update a focus's status and/or workflow stage.
58
+ * Used by the cascade engine to advance focus stages.
59
+ */
60
+ export declare function updateFocusStatus(focusId: string, status: string, currentWorkflowStageId?: string | null, extraFields?: {
61
+ reviewRequestedAt?: string | null;
62
+ }): Promise<void>;
63
+ /** Clear review_requested_at without changing focus status or stage. */
64
+ export declare function clearReviewRequestedAt(focusId: string): Promise<void>;
65
+ /**
66
+ * A workflow stage with its optional agent directive.
67
+ * Mirrors WorkflowStage fields plus the directive payload used by the directive executor.
68
+ */
69
+ export interface WorkflowStageWithDirective {
70
+ id: string;
71
+ name: string;
72
+ description: string | null;
73
+ sort_order: number;
74
+ is_terminal?: boolean;
75
+ is_agent_actionable?: boolean;
76
+ meta_bucket?: 'backlog' | 'active' | 'done' | null;
77
+ agentDirective: StageDirective | null;
78
+ }
79
+ /**
80
+ * Workflow with stages that include agent directives.
81
+ */
82
+ export interface WorkflowWithDirectives {
83
+ id: string;
84
+ stages: WorkflowStageWithDirective[];
85
+ }
86
+ /**
87
+ * Fetch the effective workflow for a focus, including ordered stages.
88
+ * Uses resolve_effective_workflow RPC to walk the assignment hierarchy.
89
+ * Returns stages with agentDirective for use by the directive executor.
90
+ */
91
+ export declare function fetchFocusWorkflow(focusId: string): Promise<WorkflowWithDirectives>;
92
+ /**
93
+ * Fetch the effective workflow for a focus with transitions included.
94
+ * Used by the cascade engine for transition resolution.
95
+ */
96
+ export declare function fetchFocusWorkflowWithTransitions(focusId: string): Promise<Workflow>;
97
+ //# sourceMappingURL=focuses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focuses.d.ts","sourceRoot":"","sources":["../../src/queries/focuses.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAqC,MAAM,aAAa,CAAC;AAOlI;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAoBtF;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAQ/E;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAE9B;AAED;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC,CAKf;AAED;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI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ead
5
+ * can build a complete task DAG.
6
+ */
7
+ import { callApi, callApiValidated } from './shared.js';
8
+ import { FocusDeliveriesResponseSchema, FocusIssuesResponseSchema, } from './schemas.js';
9
+ /**
10
+ * Fetch all deliveries for a focus, ordered by priority rank.
11
+ */
12
+ export async function getFocusDeliveries(focusId) {
13
+ const result = await callApiValidated('daemon_get_focus_deliveries', FocusDeliveriesResponseSchema, { focusId });
14
+ return result.deliveries.map((d) => ({
15
+ id: d.id,
16
+ name: d.name,
17
+ description: d.description,
18
+ priorityRank: d.priorityRank ?? 999,
19
+ executionStatus: d.executionStatus,
20
+ acceptanceCriteria: d.acceptanceCriteria,
21
+ techContext: d.techContext,
22
+ currentWorkflowStageId: d.currentWorkflowStageId ?? null,
23
+ mergeCommitSha: d.mergeCommitSha ?? null,
24
+ gitState: d.gitState ?? null,
25
+ stageDescription: d.stageDescription ?? null,
26
+ }));
27
+ }
28
+ /**
29
+ * Fetch all issues across all deliveries for a focus.
30
+ */
31
+ export async function getFocusIssues(focusId) {
32
+ const result = await callApiValidated('daemon_get_focus_issues', FocusIssuesResponseSchema, { focusId });
33
+ return result.issues;
34
+ }
35
+ /**
36
+ * Fetch wiki pages relevant to a focus.
37
+ *
38
+ * Stub: returns no pages. Wired up to wiki_search in the next delivery
39
+ * (Retrieval and Assembly API).
40
+ */
41
+ export async function getProductContextForFocus(_productId, _focusId) {
42
+ return [];
43
+ }
44
+ /**
45
+ * Persist the Claude Code session ID on the focus row for --resume support.
46
+ */
47
+ export async function updateFocusClaudeSessionId(focusId, claudeSessionId) {
48
+ await callApi('daemon_update_focus_session_id', {
49
+ focusId,
50
+ claudeSessionId,
51
+ });
52
+ }
53
+ /**
54
+ * Fetch the deployment profile snapshot for a product.
55
+ *
56
+ * Returns null if the product has no linked deployment profile or
57
+ * if the snapshot has not been stored yet.
58
+ */
59
+ export async function getProductDeploymentProfileSnapshot(productId) {
60
+ const result = await callApi('get_product_deployment_profile_snapshot', { productId });
61
+ return result.snapshot ?? null;
62
+ }
63
+ /**
64
+ * Update a focus's status and/or workflow stage.
65
+ * Used by the cascade engine to advance focus stages.
66
+ */
67
+ export async function updateFocusStatus(focusId, status, currentWorkflowStageId, extraFields) {
68
+ const fields = { status };
69
+ if (currentWorkflowStageId !== undefined) {
70
+ fields.currentWorkflowStageId = currentWorkflowStageId;
71
+ }
72
+ if (extraFields?.reviewRequestedAt !== undefined) {
73
+ fields.reviewRequestedAt = extraFields.reviewRequestedAt;
74
+ }
75
+ await callApi('daemon_update_focus_status', {
76
+ focusId,
77
+ fields,
78
+ });
79
+ }
80
+ /** Clear review_requested_at without changing focus status or stage. */
81
+ export async function clearReviewRequestedAt(focusId) {
82
+ await callApi('daemon_update_focus_status', {
83
+ focusId,
84
+ fields: { reviewRequestedAt: null },
85
+ });
86
+ }
87
+ /**
88
+ * Fetch the effective workflow for a focus, including ordered stages.
89
+ * Uses resolve_effective_workflow RPC to walk the assignment hierarchy.
90
+ * Returns stages with agentDirective for use by the directive executor.
91
+ */
92
+ export async function fetchFocusWorkflow(focusId) {
93
+ const result = await callApi('daemon_get_focus_workflow', { focusId });
94
+ return {
95
+ id: result.workflow.id,
96
+ stages: result.workflow.stages.map((s) => ({
97
+ id: s.id,
98
+ name: s.name,
99
+ description: s.description,
100
+ sort_order: s.sortOrder,
101
+ is_terminal: s.isTerminal,
102
+ is_agent_actionable: s.isAgentActionable,
103
+ meta_bucket: s.metaBucket ?? null,
104
+ agentDirective: s.agentDirective ?? null,
105
+ })),
106
+ };
107
+ }
108
+ /**
109
+ * Fetch the effective workflow for a focus with transitions included.
110
+ * Used by the cascade engine for transition resolution.
111
+ */
112
+ export async function fetchFocusWorkflowWithTransitions(focusId) {
113
+ const result = await callApi('daemon_get_focus_workflow', { focusId, includeTransitions: true });
114
+ return {
115
+ id: result.workflow.id,
116
+ stages: result.workflow.stages.map((s) => ({
117
+ id: s.id,
118
+ name: s.name,
119
+ description: s.description,
120
+ sort_order: s.sortOrder,
121
+ is_terminal: s.isTerminal,
122
+ is_agent_actionable: s.isAgentActionable,
123
+ meta_bucket: s.metaBucket ?? undefined,
124
+ })),
125
+ transitions: (result.workflow.transitions ?? []).map((t) => ({
126
+ id: t.id,
127
+ workflow_id: t.workflowId,
128
+ from_stage_id: t.fromStageId,
129
+ to_stage_id: t.toStageId,
130
+ name: t.name,
131
+ is_automatic: t.isAutomatic,
132
+ sort_order: t.sortOrder,
133
+ })),
134
+ };
135
+ }
136
+ //# sourceMappingURL=focuses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focuses.js","sourceRoot":"","sources":["../../src/queries/focuses.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AAatB;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,OAAe;IACtD,MAAM,MAAM,GAAG,MAAM,gBAAgB,CACnC,6BAA6B,EAC7B,6BAA6B,EAC7B,EAAE,OAAO,EAAE,CACZ,CAAC;IAEF,OAAO,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACnC,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,GAAG;QACnC,eAAe,EAAE,CAAC,CAAC,eAAe;QAClC,kBAAkB,EAAE,CAAC,CAAC,kBAAkB;QACxC,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,sBAAsB,EAAE,CAAC,CAAC,sBAAsB,IAAI,IAAI;QACxD,cAAc,EAAE,CAAC,CAAC,cAAc,IAAI,IAAI;QACxC,QAAQ,EAAE,CAAC,CAAC,QAAQ,IAAI,IAAI;QAC5B,gBAAgB,EAAE,CAAC,C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;YACxD,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,WAAW,EAAE,CAAC,CAAC,WAAW;YAC1B,UAAU,EAAE,CAAC,CAAC,SAAS;YACvB,WAAW,EAAE,CAAC,CAAC,UAAU;YACzB,mBAAmB,EAAE,CAAC,CAAC,iBAAiB;YACxC,WAAW,EAAG,CAAC,CAAC,UAAmD,IAAI,SAAS;SACjF,CAAC,CAAC;QACH,WAAW,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAsB,EAAE,CAAC,CAAC;YAC/E,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,WAAW,EAAE,CAAC,CAAC,UAAU;YACzB,aAAa,EAAE,CAAC,CAAC,WAAW;YAC5B,WAAW,EAAE,CAAC,CAAC,SAAS;YACxB,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,YAAY,EAAE,CAAC,CAAC,WAAW;YAC3B,UAAU,EAAE,CAAC,CAAC,SAAS;SACxB,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC"}
@@ -7,13 +7,13 @@
7
7
  export { initSupabase } from './shared.js';
8
8
  export { getAgentRoles, getAgentRole } from './roles.js';
9
9
  export { getActiveSessions, getActiveSessionCountByRole, createSession, updateSession, } from './sessions.js';
10
- export { getReadyDeliveries, getDeliveryContext, updateDeliveryStatus, getDoneDeliveries, getReadyStrategies, getActiveStrategies, reportGitState, } from './deliveries.js';
10
+ export { getReadyDeliveries, getDeliveryContext, updateDeliveryStatus, getDoneDeliveries, getReadyFocuses, getActiveFocuses, reportGitState, } from './deliveries.js';
11
11
  export { fetchEffectiveWorkflow, fetchEffectiveWorkflowWithTransitions } from './workflows.js';
12
12
  export { getDeliveryIssues, getDeliverySessionCount, updateIssueStatus, createEscalation, createIssue, } from './issues.js';
13
13
  export { sendHeartbeat, sendDisconnect } from './daemon-connection.js';
14
14
  export { fetchTransitionGuards, createTransitionEvaluation, createTransitionBlock, getActiveTransitionBlock, getResolvedTransitionBlockForDelivery, } from './guards.js';
15
- export { getStrategyDeliveries, getStrategyIssues, getProductContextForStrategy, updateStrategyClaudeSessionId, } from './strategies.js';
16
- export type { ProductContextDoc } from './strategies.js';
15
+ export { getFocusDeliveries, getFocusIssues, getProductContextForFocus, updateFocusClaudeSessionId, } from './focuses.js';
16
+ export type { ProductContextDoc } from './focuses.js';
17
17
  export { getControlStateChanges, setControlStateRunning, } from './control-state.js';
18
18
  export type { ControlStateChange } from './control-state.js';
19
19
  export { getProductBranchConfig } from './products.js';