@telora/daemon 0.24.17 → 0.24.26

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 (536) hide show
  1. package/build-info.json +12 -3
  2. package/dist/audit/audit-prompt.d.ts.map +1 -1
  3. package/dist/audit/audit-prompt.js +15 -0
  4. package/dist/audit/audit-prompt.js.map +1 -1
  5. package/dist/ci/candidate-failure-record.d.ts +104 -0
  6. package/dist/ci/candidate-failure-record.d.ts.map +1 -0
  7. package/dist/ci/candidate-failure-record.js +135 -0
  8. package/dist/ci/candidate-failure-record.js.map +1 -0
  9. package/dist/ci/candidate-ref.d.ts.map +1 -1
  10. package/dist/ci/candidate-ref.js +10 -3
  11. package/dist/ci/candidate-ref.js.map +1 -1
  12. package/dist/ci/ci-status-git.d.ts.map +1 -1
  13. package/dist/ci/ci-status-git.js +1 -0
  14. package/dist/ci/ci-status-git.js.map +1 -1
  15. package/dist/ci/ci-status.d.ts.map +1 -1
  16. package/dist/ci/ci-status.js +1 -0
  17. package/dist/ci/ci-status.js.map +1 -1
  18. package/dist/ci/gate-ref.d.ts +10 -1
  19. package/dist/ci/gate-ref.d.ts.map +1 -1
  20. package/dist/ci/gate-ref.js +11 -4
  21. package/dist/ci/gate-ref.js.map +1 -1
  22. package/dist/ci/product-ci-repo.d.ts.map +1 -1
  23. package/dist/ci/product-ci-repo.js +3 -2
  24. package/dist/ci/product-ci-repo.js.map +1 -1
  25. package/dist/completion/completion-event/event.d.ts +4 -3
  26. package/dist/completion/completion-event/event.d.ts.map +1 -1
  27. package/dist/completion/completion-event/event.js.map +1 -1
  28. package/dist/completion/review-cycle-budget/review-cycle-cap.d.ts +19 -11
  29. package/dist/completion/review-cycle-budget/review-cycle-cap.d.ts.map +1 -1
  30. package/dist/completion/review-cycle-budget/review-cycle-cap.js +36 -36
  31. package/dist/completion/review-cycle-budget/review-cycle-cap.js.map +1 -1
  32. package/dist/completion/review-cycle-budget/review-loop-detection.d.ts +101 -0
  33. package/dist/completion/review-cycle-budget/review-loop-detection.d.ts.map +1 -0
  34. package/dist/completion/review-cycle-budget/review-loop-detection.js +105 -0
  35. package/dist/completion/review-cycle-budget/review-loop-detection.js.map +1 -0
  36. package/dist/completion/review-cycle-budget/spent-budget-release.d.ts +70 -0
  37. package/dist/completion/review-cycle-budget/spent-budget-release.d.ts.map +1 -0
  38. package/dist/completion/review-cycle-budget/spent-budget-release.js +98 -0
  39. package/dist/completion/review-cycle-budget/spent-budget-release.js.map +1 -0
  40. package/dist/completion/review-exit/review-defect-detector.d.ts +71 -49
  41. package/dist/completion/review-exit/review-defect-detector.d.ts.map +1 -1
  42. package/dist/completion/review-exit/review-defect-detector.js +75 -69
  43. package/dist/completion/review-exit/review-defect-detector.js.map +1 -1
  44. package/dist/completion/review-exit/review-exit-attribution.d.ts +1 -1
  45. package/dist/completion/review-exit/review-exit-attribution.js +1 -1
  46. package/dist/completion/review-exit/review-exit-deps.d.ts +5 -2
  47. package/dist/completion/review-exit/review-exit-deps.d.ts.map +1 -1
  48. package/dist/completion/review-exit/review-exit-deps.js +1 -1
  49. package/dist/completion/review-exit/review-exit-evidence.d.ts +10 -1
  50. package/dist/completion/review-exit/review-exit-evidence.d.ts.map +1 -1
  51. package/dist/completion/review-exit/review-exit-evidence.js +17 -14
  52. package/dist/completion/review-exit/review-exit-evidence.js.map +1 -1
  53. package/dist/completion/review-exit/review-exit-foreign-findings.d.ts +1 -1
  54. package/dist/completion/review-exit/review-exit-foreign-findings.d.ts.map +1 -1
  55. package/dist/completion/review-exit/review-exit-phase.d.ts.map +1 -1
  56. package/dist/completion/review-exit/review-exit-phase.js +12 -8
  57. package/dist/completion/review-exit/review-exit-phase.js.map +1 -1
  58. package/dist/completion/state-cascade/review-next-step.d.ts +12 -3
  59. package/dist/completion/state-cascade/review-next-step.d.ts.map +1 -1
  60. package/dist/completion/state-cascade/review-next-step.js +10 -1
  61. package/dist/completion/state-cascade/review-next-step.js.map +1 -1
  62. package/dist/completion/state-cascade/standing-approval-convergence.d.ts +1 -1
  63. package/dist/completion/state-cascade/standing-approval-convergence.d.ts.map +1 -1
  64. package/dist/completion/state-cascade/standing-approval-convergence.js +10 -4
  65. package/dist/completion/state-cascade/standing-approval-convergence.js.map +1 -1
  66. package/dist/completion/state-cascade/state-cascade.d.ts +3 -0
  67. package/dist/completion/state-cascade/state-cascade.d.ts.map +1 -1
  68. package/dist/completion/state-cascade/state-cascade.js +16 -1
  69. package/dist/completion/state-cascade/state-cascade.js.map +1 -1
  70. package/dist/completion/team-exit/status-advance-phase.d.ts +1 -1
  71. package/dist/completion/team-exit/status-advance-phase.d.ts.map +1 -1
  72. package/dist/completion/team-exit/status-advance-phase.js +6 -4
  73. package/dist/completion/team-exit/status-advance-phase.js.map +1 -1
  74. package/dist/completion/team-outcome/apply-turn.d.ts.map +1 -1
  75. package/dist/completion/team-outcome/apply-turn.js +9 -4
  76. package/dist/completion/team-outcome/apply-turn.js.map +1 -1
  77. package/dist/completion/team-outcome/decide-turn-entry-rows.d.ts.map +1 -1
  78. package/dist/completion/team-outcome/decide-turn-entry-rows.js +28 -3
  79. package/dist/completion/team-outcome/decide-turn-entry-rows.js.map +1 -1
  80. package/dist/completion/team-outcome/decide.d.ts.map +1 -1
  81. package/dist/completion/team-outcome/decide.js +1 -0
  82. package/dist/completion/team-outcome/decide.js.map +1 -1
  83. package/dist/completion/team-outcome/exit-limits.d.ts +6 -0
  84. package/dist/completion/team-outcome/exit-limits.d.ts.map +1 -1
  85. package/dist/completion/team-outcome/exit-limits.js +6 -0
  86. package/dist/completion/team-outcome/exit-limits.js.map +1 -1
  87. package/dist/completion/team-outcome/exit-pipeline-state.d.ts +5 -0
  88. package/dist/completion/team-outcome/exit-pipeline-state.d.ts.map +1 -1
  89. package/dist/completion/team-outcome/exit-pipeline-state.js.map +1 -1
  90. package/dist/completion/team-teardown/session-hold-bounds.d.ts +10 -1
  91. package/dist/completion/team-teardown/session-hold-bounds.d.ts.map +1 -1
  92. package/dist/completion/team-teardown/session-hold-bounds.js +11 -0
  93. package/dist/completion/team-teardown/session-hold-bounds.js.map +1 -1
  94. package/dist/completion/team-teardown/session-hold.d.ts.map +1 -1
  95. package/dist/completion/team-teardown/session-hold.js +2 -0
  96. package/dist/completion/team-teardown/session-hold.js.map +1 -1
  97. package/dist/composition/engine-start-context.d.ts.map +1 -1
  98. package/dist/composition/engine-start-context.js +9 -1
  99. package/dist/composition/engine-start-context.js.map +1 -1
  100. package/dist/composition/execution-merge-context.d.ts +13 -0
  101. package/dist/composition/execution-merge-context.d.ts.map +1 -1
  102. package/dist/composition/execution-merge-context.js +76 -3
  103. package/dist/composition/execution-merge-context.js.map +1 -1
  104. package/dist/composition/execution-spawn-context.d.ts.map +1 -1
  105. package/dist/composition/execution-spawn-context.js +2 -0
  106. package/dist/composition/execution-spawn-context.js.map +1 -1
  107. package/dist/composition/focus-activity-live-sources.d.ts.map +1 -1
  108. package/dist/composition/focus-activity-live-sources.js +1 -0
  109. package/dist/composition/focus-activity-live-sources.js.map +1 -1
  110. package/dist/composition/judgement-contexts.d.ts.map +1 -1
  111. package/dist/composition/judgement-contexts.js +8 -2
  112. package/dist/composition/judgement-contexts.js.map +1 -1
  113. package/dist/composition/review-exit-context.d.ts.map +1 -1
  114. package/dist/composition/review-exit-context.js +2 -0
  115. package/dist/composition/review-exit-context.js.map +1 -1
  116. package/dist/composition/review-loop-context.d.ts +28 -0
  117. package/dist/composition/review-loop-context.d.ts.map +1 -0
  118. package/dist/composition/review-loop-context.js +147 -0
  119. package/dist/composition/review-loop-context.js.map +1 -0
  120. package/dist/composition/runtime-heartbeat-context.d.ts +11 -0
  121. package/dist/composition/runtime-heartbeat-context.d.ts.map +1 -1
  122. package/dist/composition/runtime-heartbeat-context.js +33 -2
  123. package/dist/composition/runtime-heartbeat-context.js.map +1 -1
  124. package/dist/composition/spawn-pass-deps.d.ts.map +1 -1
  125. package/dist/composition/spawn-pass-deps.js +3 -0
  126. package/dist/composition/spawn-pass-deps.js.map +1 -1
  127. package/dist/composition/state-cascade-context.d.ts.map +1 -1
  128. package/dist/composition/state-cascade-context.js +3 -1
  129. package/dist/composition/state-cascade-context.js.map +1 -1
  130. package/dist/composition/team-liveness-phase-sources.d.ts.map +1 -1
  131. package/dist/composition/team-liveness-phase-sources.js +1 -0
  132. package/dist/composition/team-liveness-phase-sources.js.map +1 -1
  133. package/dist/composition/tower-escalation-context.d.ts +12 -0
  134. package/dist/composition/tower-escalation-context.d.ts.map +1 -0
  135. package/dist/composition/tower-escalation-context.js +109 -0
  136. package/dist/composition/tower-escalation-context.js.map +1 -0
  137. package/dist/composition/verification-context.d.ts.map +1 -1
  138. package/dist/composition/verification-context.js +34 -4
  139. package/dist/composition/verification-context.js.map +1 -1
  140. package/dist/composition/workstation-intervals-context.d.ts +3 -0
  141. package/dist/composition/workstation-intervals-context.d.ts.map +1 -0
  142. package/dist/composition/workstation-intervals-context.js +33 -0
  143. package/dist/composition/workstation-intervals-context.js.map +1 -0
  144. package/dist/daemon-state/awaiting-slot.d.ts +18 -1
  145. package/dist/daemon-state/awaiting-slot.d.ts.map +1 -1
  146. package/dist/daemon-state/awaiting-slot.js +7 -0
  147. package/dist/daemon-state/awaiting-slot.js.map +1 -1
  148. package/dist/delivery/delivery-reconciler.d.ts +7 -7
  149. package/dist/delivery/recorded-concerns.d.ts +63 -28
  150. package/dist/delivery/recorded-concerns.d.ts.map +1 -1
  151. package/dist/delivery/recorded-concerns.js +72 -28
  152. package/dist/delivery/recorded-concerns.js.map +1 -1
  153. package/dist/directive/directive-queue.d.ts +8 -0
  154. package/dist/directive/directive-queue.d.ts.map +1 -1
  155. package/dist/directive/directive-queue.js +1 -1
  156. package/dist/directive/directive-queue.js.map +1 -1
  157. package/dist/focus/control-state.d.ts +6 -4
  158. package/dist/focus/control-state.d.ts.map +1 -1
  159. package/dist/focus/control-state.js +6 -4
  160. package/dist/focus/control-state.js.map +1 -1
  161. package/dist/focus/daemon-contexts-judgement.d.ts +6 -0
  162. package/dist/focus/daemon-contexts-judgement.d.ts.map +1 -1
  163. package/dist/focus/daemon-contexts.d.ts +6 -0
  164. package/dist/focus/daemon-contexts.d.ts.map +1 -1
  165. package/dist/focus/daemon-contexts.js.map +1 -1
  166. package/dist/focus/focus-engine.d.ts.map +1 -1
  167. package/dist/focus/focus-engine.js +3 -1
  168. package/dist/focus/focus-engine.js.map +1 -1
  169. package/dist/focus/focus-executor.d.ts.map +1 -1
  170. package/dist/focus/focus-executor.js +3 -2
  171. package/dist/focus/focus-executor.js.map +1 -1
  172. package/dist/focus/focus-loop-registry.d.ts.map +1 -1
  173. package/dist/focus/focus-loop-registry.js +42 -0
  174. package/dist/focus/focus-loop-registry.js.map +1 -1
  175. package/dist/focus/focus-poller-auto-advance.d.ts +4 -2
  176. package/dist/focus/focus-poller-auto-advance.d.ts.map +1 -1
  177. package/dist/focus/focus-poller-auto-advance.js +24 -18
  178. package/dist/focus/focus-poller-auto-advance.js.map +1 -1
  179. package/dist/focus/focus-poller-spawn.d.ts.map +1 -1
  180. package/dist/focus/focus-poller-spawn.js +8 -6
  181. package/dist/focus/focus-poller-spawn.js.map +1 -1
  182. package/dist/focus/heartbeat-metadata.d.ts +5 -0
  183. package/dist/focus/heartbeat-metadata.d.ts.map +1 -1
  184. package/dist/focus/heartbeat-metadata.js +12 -0
  185. package/dist/focus/heartbeat-metadata.js.map +1 -1
  186. package/dist/focus/heartbeat.d.ts +9 -2
  187. package/dist/focus/heartbeat.d.ts.map +1 -1
  188. package/dist/focus/heartbeat.js +10 -1
  189. package/dist/focus/heartbeat.js.map +1 -1
  190. package/dist/focus/host-pressure.d.ts +77 -0
  191. package/dist/focus/host-pressure.d.ts.map +1 -0
  192. package/dist/focus/host-pressure.js +83 -0
  193. package/dist/focus/host-pressure.js.map +1 -0
  194. package/dist/focus/pending-directive-gates.d.ts +14 -0
  195. package/dist/focus/pending-directive-gates.d.ts.map +1 -1
  196. package/dist/focus/pending-directive-gates.js +25 -1
  197. package/dist/focus/pending-directive-gates.js.map +1 -1
  198. package/dist/focus/pending-spawn-pass-deps.d.ts +7 -0
  199. package/dist/focus/pending-spawn-pass-deps.d.ts.map +1 -1
  200. package/dist/focus/pending-spawn-review-next-step.d.ts +1 -1
  201. package/dist/focus/pending-spawn-review-next-step.d.ts.map +1 -1
  202. package/dist/focus/pending-spawn-review-next-step.js +2 -0
  203. package/dist/focus/pending-spawn-review-next-step.js.map +1 -1
  204. package/dist/focus/ready-focus-team-work.d.ts +9 -4
  205. package/dist/focus/ready-focus-team-work.d.ts.map +1 -1
  206. package/dist/focus/ready-focus-team-work.js +14 -3
  207. package/dist/focus/ready-focus-team-work.js.map +1 -1
  208. package/dist/focus/verify-open-issues.d.ts +3 -2
  209. package/dist/focus/verify-open-issues.d.ts.map +1 -1
  210. package/dist/focus/verify-open-issues.js +6 -4
  211. package/dist/focus/verify-open-issues.js.map +1 -1
  212. package/dist/focus/workstation-intervals.d.ts +83 -0
  213. package/dist/focus/workstation-intervals.d.ts.map +1 -0
  214. package/dist/focus/workstation-intervals.js +81 -0
  215. package/dist/focus/workstation-intervals.js.map +1 -0
  216. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +5 -2
  217. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
  218. package/dist/focus-stage-lifecycle/wedge-watchdog.js +2 -2
  219. package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
  220. package/dist/git/types.js +1 -1
  221. package/dist/merge/candidate-ci-failures.d.ts +72 -0
  222. package/dist/merge/candidate-ci-failures.d.ts.map +1 -0
  223. package/dist/merge/candidate-ci-failures.js +240 -0
  224. package/dist/merge/candidate-ci-failures.js.map +1 -0
  225. package/dist/merge/candidate-red-record.d.ts +44 -0
  226. package/dist/merge/candidate-red-record.d.ts.map +1 -0
  227. package/dist/merge/candidate-red-record.js +98 -0
  228. package/dist/merge/candidate-red-record.js.map +1 -0
  229. package/dist/merge/candidate-rework.d.ts +4 -3
  230. package/dist/merge/candidate-rework.d.ts.map +1 -1
  231. package/dist/merge/candidate-rework.js +46 -14
  232. package/dist/merge/candidate-rework.js.map +1 -1
  233. package/dist/merge/candidate-tip-attribution.d.ts +135 -0
  234. package/dist/merge/candidate-tip-attribution.d.ts.map +1 -0
  235. package/dist/merge/candidate-tip-attribution.js +319 -0
  236. package/dist/merge/candidate-tip-attribution.js.map +1 -0
  237. package/dist/merge/completion-merge-driver.d.ts +49 -5
  238. package/dist/merge/completion-merge-driver.d.ts.map +1 -1
  239. package/dist/merge/completion-merge-driver.js +56 -2
  240. package/dist/merge/completion-merge-driver.js.map +1 -1
  241. package/dist/merge/completion-merge-gate.d.ts +4 -1
  242. package/dist/merge/completion-merge-gate.d.ts.map +1 -1
  243. package/dist/merge/completion-merge-gate.js +9 -8
  244. package/dist/merge/completion-merge-gate.js.map +1 -1
  245. package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
  246. package/dist/prompt-sections/persona-sections.js +4 -1
  247. package/dist/prompt-sections/persona-sections.js.map +1 -1
  248. package/dist/prompt-sections/qa-author-section.d.ts.map +1 -1
  249. package/dist/prompt-sections/qa-author-section.js +18 -1
  250. package/dist/prompt-sections/qa-author-section.js.map +1 -1
  251. package/dist/prompt-sections/scoping-sections.d.ts +0 -12
  252. package/dist/prompt-sections/scoping-sections.d.ts.map +1 -1
  253. package/dist/prompt-sections/scoping-sections.js +16 -2
  254. package/dist/prompt-sections/scoping-sections.js.map +1 -1
  255. package/dist/prompts/bounded-universals.d.ts +13 -0
  256. package/dist/prompts/bounded-universals.d.ts.map +1 -0
  257. package/dist/prompts/bounded-universals.js +32 -0
  258. package/dist/prompts/bounded-universals.js.map +1 -0
  259. package/dist/queries/api-client/shared.d.ts +2 -1
  260. package/dist/queries/api-client/shared.d.ts.map +1 -1
  261. package/dist/queries/api-client/shared.js +36 -1
  262. package/dist/queries/api-client/shared.js.map +1 -1
  263. package/dist/queries/candidate-ci-reds/candidate-ci-reds.d.ts +35 -0
  264. package/dist/queries/candidate-ci-reds/candidate-ci-reds.d.ts.map +1 -0
  265. package/dist/queries/candidate-ci-reds/candidate-ci-reds.js +42 -0
  266. package/dist/queries/candidate-ci-reds/candidate-ci-reds.js.map +1 -0
  267. package/dist/queries/candidate-ci-reds/gate-escape-files.d.ts +16 -0
  268. package/dist/queries/candidate-ci-reds/gate-escape-files.d.ts.map +1 -0
  269. package/dist/queries/candidate-ci-reds/gate-escape-files.js +51 -0
  270. package/dist/queries/candidate-ci-reds/gate-escape-files.js.map +1 -0
  271. package/dist/queries/deliveries/issues.d.ts.map +1 -1
  272. package/dist/queries/deliveries/issues.js +1 -0
  273. package/dist/queries/deliveries/issues.js.map +1 -1
  274. package/dist/queries/escalations/escalation-consumption.d.ts +13 -0
  275. package/dist/queries/escalations/escalation-consumption.d.ts.map +1 -1
  276. package/dist/queries/escalations/escalation-consumption.js +12 -2
  277. package/dist/queries/escalations/escalation-consumption.js.map +1 -1
  278. package/dist/queries/escalations/tower-escalations.d.ts +82 -0
  279. package/dist/queries/escalations/tower-escalations.d.ts.map +1 -0
  280. package/dist/queries/escalations/tower-escalations.js +97 -0
  281. package/dist/queries/escalations/tower-escalations.js.map +1 -0
  282. package/dist/queries/focus-review/recorded-concern-ids.d.ts +48 -11
  283. package/dist/queries/focus-review/recorded-concern-ids.d.ts.map +1 -1
  284. package/dist/queries/focus-review/recorded-concern-ids.js +42 -12
  285. package/dist/queries/focus-review/recorded-concern-ids.js.map +1 -1
  286. package/dist/queries/focus-review/review-criterion-verdicts.d.ts +37 -0
  287. package/dist/queries/focus-review/review-criterion-verdicts.d.ts.map +1 -0
  288. package/dist/queries/focus-review/review-criterion-verdicts.js +64 -0
  289. package/dist/queries/focus-review/review-criterion-verdicts.js.map +1 -0
  290. package/dist/queries/focus-review/review-finding-facts.d.ts +18 -6
  291. package/dist/queries/focus-review/review-finding-facts.d.ts.map +1 -1
  292. package/dist/queries/focus-review/review-finding-facts.js +21 -8
  293. package/dist/queries/focus-review/review-finding-facts.js.map +1 -1
  294. package/dist/queries/focuses/ended-arm.d.ts +56 -13
  295. package/dist/queries/focuses/ended-arm.d.ts.map +1 -1
  296. package/dist/queries/focuses/ended-arm.js +40 -14
  297. package/dist/queries/focuses/ended-arm.js.map +1 -1
  298. package/dist/queries/focuses/focus-criteria-standing.d.ts +12 -0
  299. package/dist/queries/focuses/focus-criteria-standing.d.ts.map +1 -1
  300. package/dist/queries/focuses/focus-criteria-standing.js +13 -0
  301. package/dist/queries/focuses/focus-criteria-standing.js.map +1 -1
  302. package/dist/queries/focuses/focus-discovery.d.ts +14 -3
  303. package/dist/queries/focuses/focus-discovery.d.ts.map +1 -1
  304. package/dist/queries/focuses/focus-discovery.js +2 -19
  305. package/dist/queries/focuses/focus-discovery.js.map +1 -1
  306. package/dist/queries/focuses/focuses.d.ts +15 -12
  307. package/dist/queries/focuses/focuses.d.ts.map +1 -1
  308. package/dist/queries/focuses/focuses.js +15 -13
  309. package/dist/queries/focuses/focuses.js.map +1 -1
  310. package/dist/queries/sessions/daemon-connection.d.ts.map +1 -1
  311. package/dist/queries/sessions/daemon-connection.js +1 -0
  312. package/dist/queries/sessions/daemon-connection.js.map +1 -1
  313. package/dist/queries/sessions/sessions.d.ts.map +1 -1
  314. package/dist/queries/sessions/sessions.js +2 -1
  315. package/dist/queries/sessions/sessions.js.map +1 -1
  316. package/dist/queries/tower-decisions/tower-decisions.d.ts +103 -0
  317. package/dist/queries/tower-decisions/tower-decisions.d.ts.map +1 -0
  318. package/dist/queries/tower-decisions/tower-decisions.js +138 -0
  319. package/dist/queries/tower-decisions/tower-decisions.js.map +1 -0
  320. package/dist/queries/verification/verification.js +1 -1
  321. package/dist/queries/wire-schemas/schemas.d.ts +2 -0
  322. package/dist/queries/wire-schemas/schemas.d.ts.map +1 -1
  323. package/dist/queries/wire-schemas/schemas.js +8 -2
  324. package/dist/queries/wire-schemas/schemas.js.map +1 -1
  325. package/dist/queries/workstation-intervals/workstation-intervals.d.ts +52 -0
  326. package/dist/queries/workstation-intervals/workstation-intervals.d.ts.map +1 -0
  327. package/dist/queries/workstation-intervals/workstation-intervals.js +49 -0
  328. package/dist/queries/workstation-intervals/workstation-intervals.js.map +1 -0
  329. package/dist/resolvers/escalation-answers.d.ts +31 -0
  330. package/dist/resolvers/escalation-answers.d.ts.map +1 -1
  331. package/dist/resolvers/escalation-answers.js +31 -17
  332. package/dist/resolvers/escalation-answers.js.map +1 -1
  333. package/dist/resolvers/focus-criteria-standing.d.ts.map +1 -1
  334. package/dist/resolvers/focus-criteria-standing.js +20 -0
  335. package/dist/resolvers/focus-criteria-standing.js.map +1 -1
  336. package/dist/shell/unified-engine-lifecycle.d.ts +11 -1
  337. package/dist/shell/unified-engine-lifecycle.d.ts.map +1 -1
  338. package/dist/shell/unified-engine-lifecycle.js +10 -1
  339. package/dist/shell/unified-engine-lifecycle.js.map +1 -1
  340. package/dist/shell/unified-shell.d.ts +25 -0
  341. package/dist/shell/unified-shell.d.ts.map +1 -1
  342. package/dist/shell/unified-shell.js +26 -80
  343. package/dist/shell/unified-shell.js.map +1 -1
  344. package/dist/shell/update-restart.d.ts +47 -0
  345. package/dist/shell/update-restart.d.ts.map +1 -0
  346. package/dist/shell/update-restart.js +124 -0
  347. package/dist/shell/update-restart.js.map +1 -0
  348. package/dist/spawn/directive-dispatch.d.ts.map +1 -1
  349. package/dist/spawn/directive-dispatch.js +1 -0
  350. package/dist/spawn/directive-dispatch.js.map +1 -1
  351. package/dist/spawn/lead-continuation.d.ts +4 -3
  352. package/dist/spawn/lead-continuation.d.ts.map +1 -1
  353. package/dist/spawn/lead-continuation.js.map +1 -1
  354. package/dist/spawn/live-answer-delivery.d.ts +53 -0
  355. package/dist/spawn/live-answer-delivery.d.ts.map +1 -0
  356. package/dist/spawn/live-answer-delivery.js +26 -0
  357. package/dist/spawn/live-answer-delivery.js.map +1 -0
  358. package/dist/spawn/routing-decider-spawn.d.ts +64 -2
  359. package/dist/spawn/routing-decider-spawn.d.ts.map +1 -1
  360. package/dist/spawn/routing-decider-spawn.js +65 -20
  361. package/dist/spawn/routing-decider-spawn.js.map +1 -1
  362. package/dist/spawn/worktree-session.d.ts +7 -5
  363. package/dist/spawn/worktree-session.d.ts.map +1 -1
  364. package/dist/spawn/worktree-session.js +11 -7
  365. package/dist/spawn/worktree-session.js.map +1 -1
  366. package/dist/supervision/escalation-suppression.js +1 -1
  367. package/dist/supervision/review-cycle-cap-hold.d.ts +11 -5
  368. package/dist/supervision/review-cycle-cap-hold.d.ts.map +1 -1
  369. package/dist/supervision/review-cycle-cap-hold.js +29 -11
  370. package/dist/supervision/review-cycle-cap-hold.js.map +1 -1
  371. package/dist/supervision/review-loop-detector.d.ts +48 -0
  372. package/dist/supervision/review-loop-detector.d.ts.map +1 -0
  373. package/dist/supervision/review-loop-detector.js +13 -0
  374. package/dist/supervision/review-loop-detector.js.map +1 -0
  375. package/dist/supervision/review-loop-hold.d.ts +29 -0
  376. package/dist/supervision/review-loop-hold.d.ts.map +1 -0
  377. package/dist/supervision/review-loop-hold.js +99 -0
  378. package/dist/supervision/review-loop-hold.js.map +1 -0
  379. package/dist/supervision/stall-detector-config.d.ts +8 -0
  380. package/dist/supervision/stall-detector-config.d.ts.map +1 -1
  381. package/dist/supervision/stall-detector-config.js +14 -3
  382. package/dist/supervision/stall-detector-config.js.map +1 -1
  383. package/dist/supervision/stop-registry.d.ts +3 -0
  384. package/dist/supervision/stop-registry.d.ts.map +1 -1
  385. package/dist/supervision/stop-registry.js +3 -1
  386. package/dist/supervision/stop-registry.js.map +1 -1
  387. package/dist/supervision/stop-rows-review-loop.d.ts +35 -0
  388. package/dist/supervision/stop-rows-review-loop.d.ts.map +1 -0
  389. package/dist/supervision/stop-rows-review-loop.js +150 -0
  390. package/dist/supervision/stop-rows-review-loop.js.map +1 -0
  391. package/dist/supervision/stop-rows-team-session.d.ts +1 -1
  392. package/dist/supervision/stop-rows-team-session.d.ts.map +1 -1
  393. package/dist/supervision/stop-rows-team-session.js.map +1 -1
  394. package/dist/supervision/unreviewed-settle-detector.d.ts +7 -2
  395. package/dist/supervision/unreviewed-settle-detector.d.ts.map +1 -1
  396. package/dist/supervision/unreviewed-settle-detector.js +15 -2
  397. package/dist/supervision/unreviewed-settle-detector.js.map +1 -1
  398. package/dist/templates/agents-md.d.ts.map +1 -1
  399. package/dist/templates/agents-md.js +1 -0
  400. package/dist/templates/agents-md.js.map +1 -1
  401. package/dist/templates/claude-md.d.ts +1 -1
  402. package/dist/templates/claude-md.d.ts.map +1 -1
  403. package/dist/templates/claude-md.js +12 -0
  404. package/dist/templates/claude-md.js.map +1 -1
  405. package/dist/testing/fixtures/api-client.js +1 -1
  406. package/dist/testing/fixtures/completion-judge-stubs.d.ts +7 -2
  407. package/dist/testing/fixtures/completion-judge-stubs.d.ts.map +1 -1
  408. package/dist/testing/fixtures/completion-judge-stubs.js +11 -1
  409. package/dist/testing/fixtures/completion-judge-stubs.js.map +1 -1
  410. package/dist/testing/fixtures/index.js +1 -1
  411. package/dist/testing/fixtures/merge-log-capture.d.ts.map +1 -1
  412. package/dist/testing/fixtures/merge-log-capture.js +1 -0
  413. package/dist/testing/fixtures/merge-log-capture.js.map +1 -1
  414. package/dist/testing/fixtures/pending-spawn-world.d.ts +4 -0
  415. package/dist/testing/fixtures/pending-spawn-world.d.ts.map +1 -1
  416. package/dist/testing/fixtures/pending-spawn-world.js +15 -2
  417. package/dist/testing/fixtures/pending-spawn-world.js.map +1 -1
  418. package/dist/testing/fixtures/recording-api-client.js +1 -1
  419. package/dist/testing/fixtures/review-exit-deps.d.ts.map +1 -1
  420. package/dist/testing/fixtures/review-exit-deps.js +3 -1
  421. package/dist/testing/fixtures/review-exit-deps.js.map +1 -1
  422. package/dist/testing/fixtures/review-loop.d.ts +19 -0
  423. package/dist/testing/fixtures/review-loop.d.ts.map +1 -0
  424. package/dist/testing/fixtures/review-loop.js +30 -0
  425. package/dist/testing/fixtures/review-loop.js.map +1 -0
  426. package/dist/testing/fixtures/shortfall-rework-hold-deps.d.ts.map +1 -1
  427. package/dist/testing/fixtures/shortfall-rework-hold-deps.js +1 -0
  428. package/dist/testing/fixtures/shortfall-rework-hold-deps.js.map +1 -1
  429. package/dist/testing/fixtures/tower-loop.d.ts +28 -0
  430. package/dist/testing/fixtures/tower-loop.d.ts.map +1 -0
  431. package/dist/testing/fixtures/tower-loop.js +83 -0
  432. package/dist/testing/fixtures/tower-loop.js.map +1 -0
  433. package/dist/testing/fixtures/verification-deps.d.ts +7 -0
  434. package/dist/testing/fixtures/verification-deps.d.ts.map +1 -1
  435. package/dist/testing/fixtures/verification-deps.js +17 -1
  436. package/dist/testing/fixtures/verification-deps.js.map +1 -1
  437. package/dist/testing/fixtures/vitest-failure-log.d.ts.map +1 -1
  438. package/dist/testing/fixtures/vitest-failure-log.js +2 -1
  439. package/dist/testing/fixtures/vitest-failure-log.js.map +1 -1
  440. package/dist/tower/tower-escalation-gather.d.ts +33 -0
  441. package/dist/tower/tower-escalation-gather.d.ts.map +1 -0
  442. package/dist/tower/tower-escalation-gather.js +38 -0
  443. package/dist/tower/tower-escalation-gather.js.map +1 -0
  444. package/dist/tower/tower-escalation-prompt.d.ts +62 -0
  445. package/dist/tower/tower-escalation-prompt.d.ts.map +1 -0
  446. package/dist/tower/tower-escalation-prompt.js +130 -0
  447. package/dist/tower/tower-escalation-prompt.js.map +1 -0
  448. package/dist/tower/tower-escalation-routing.d.ts +49 -0
  449. package/dist/tower/tower-escalation-routing.d.ts.map +1 -0
  450. package/dist/tower/tower-escalation-routing.js +53 -0
  451. package/dist/tower/tower-escalation-routing.js.map +1 -0
  452. package/dist/tower/tower-escalation-session.d.ts +149 -0
  453. package/dist/tower/tower-escalation-session.d.ts.map +1 -0
  454. package/dist/tower/tower-escalation-session.js +238 -0
  455. package/dist/tower/tower-escalation-session.js.map +1 -0
  456. package/dist/tower/tower-supervisor-history.d.ts +129 -0
  457. package/dist/tower/tower-supervisor-history.d.ts.map +1 -0
  458. package/dist/tower/tower-supervisor-history.js +217 -0
  459. package/dist/tower/tower-supervisor-history.js.map +1 -0
  460. package/dist/tower/tower-supervisor-prompt.d.ts +21 -0
  461. package/dist/tower/tower-supervisor-prompt.d.ts.map +1 -0
  462. package/dist/tower/tower-supervisor-prompt.js +205 -0
  463. package/dist/tower/tower-supervisor-prompt.js.map +1 -0
  464. package/dist/tower/tower-supervisor-session.d.ts +220 -0
  465. package/dist/tower/tower-supervisor-session.d.ts.map +1 -0
  466. package/dist/tower/tower-supervisor-session.js +307 -0
  467. package/dist/tower/tower-supervisor-session.js.map +1 -0
  468. package/dist/tower/tower-supervisor.d.ts +86 -0
  469. package/dist/tower/tower-supervisor.d.ts.map +1 -0
  470. package/dist/tower/tower-supervisor.js +8 -0
  471. package/dist/tower/tower-supervisor.js.map +1 -0
  472. package/dist/types/index.js +1 -1
  473. package/dist/update/auto-update.d.ts +11 -5
  474. package/dist/update/auto-update.d.ts.map +1 -1
  475. package/dist/update/auto-update.js +11 -5
  476. package/dist/update/auto-update.js.map +1 -1
  477. package/dist/update/restart-contract.d.ts +62 -0
  478. package/dist/update/restart-contract.d.ts.map +1 -0
  479. package/dist/update/restart-contract.js +137 -0
  480. package/dist/update/restart-contract.js.map +1 -0
  481. package/dist/verify/attribution/verification-baseline-run.d.ts.map +1 -1
  482. package/dist/verify/attribution/verification-baseline-run.js +1 -0
  483. package/dist/verify/attribution/verification-baseline-run.js.map +1 -1
  484. package/dist/verify/ci-gate/ci-gate-dispatch.d.ts +3 -0
  485. package/dist/verify/ci-gate/ci-gate-dispatch.d.ts.map +1 -1
  486. package/dist/verify/ci-gate/ci-gate-dispatch.js +31 -9
  487. package/dist/verify/ci-gate/ci-gate-dispatch.js.map +1 -1
  488. package/dist/verify/ci-gate/ci-gate-wait-record.d.ts +6 -0
  489. package/dist/verify/ci-gate/ci-gate-wait-record.d.ts.map +1 -1
  490. package/dist/verify/ci-gate/ci-gate-wait-record.js +1 -0
  491. package/dist/verify/ci-gate/ci-gate-wait-record.js.map +1 -1
  492. package/dist/verify/deterministic-gate/verification-checkout.d.ts +12 -2
  493. package/dist/verify/deterministic-gate/verification-checkout.d.ts.map +1 -1
  494. package/dist/verify/deterministic-gate/verification-checkout.js +18 -3
  495. package/dist/verify/deterministic-gate/verification-checkout.js.map +1 -1
  496. package/dist/verify/deterministic-gate/verification-deterministic.js +1 -1
  497. package/dist/verify/deterministic-gate/verification-failure-parser.d.ts +30 -9
  498. package/dist/verify/deterministic-gate/verification-failure-parser.d.ts.map +1 -1
  499. package/dist/verify/deterministic-gate/verification-failure-parser.js +52 -8
  500. package/dist/verify/deterministic-gate/verification-failure-parser.js.map +1 -1
  501. package/dist/verify/engine/verification-commit-sharing.d.ts.map +1 -1
  502. package/dist/verify/engine/verification-commit-sharing.js +6 -2
  503. package/dist/verify/engine/verification-commit-sharing.js.map +1 -1
  504. package/dist/verify/engine/verification-deps.d.ts +9 -0
  505. package/dist/verify/engine/verification-deps.d.ts.map +1 -1
  506. package/dist/verify/engine/verification-deps.js +1 -1
  507. package/dist/verify/engine/verification-engine.d.ts.map +1 -1
  508. package/dist/verify/engine/verification-engine.js +4 -1
  509. package/dist/verify/engine/verification-engine.js.map +1 -1
  510. package/dist/verify/escaped-tests/escaped-pass-store.d.ts +19 -0
  511. package/dist/verify/escaped-tests/escaped-pass-store.d.ts.map +1 -0
  512. package/dist/verify/escaped-tests/escaped-pass-store.js +90 -0
  513. package/dist/verify/escaped-tests/escaped-pass-store.js.map +1 -0
  514. package/dist/verify/escaped-tests/escaped-test-run.d.ts +39 -0
  515. package/dist/verify/escaped-tests/escaped-test-run.d.ts.map +1 -0
  516. package/dist/verify/escaped-tests/escaped-test-run.js +156 -0
  517. package/dist/verify/escaped-tests/escaped-test-run.js.map +1 -0
  518. package/dist/verify/escaped-tests/escaped-test-set.d.ts +65 -0
  519. package/dist/verify/escaped-tests/escaped-test-set.d.ts.map +1 -0
  520. package/dist/verify/escaped-tests/escaped-test-set.js +95 -0
  521. package/dist/verify/escaped-tests/escaped-test-set.js.map +1 -0
  522. package/dist/verify/escaped-tests/escaped-tests-source.d.ts +44 -0
  523. package/dist/verify/escaped-tests/escaped-tests-source.d.ts.map +1 -0
  524. package/dist/verify/escaped-tests/escaped-tests-source.js +142 -0
  525. package/dist/verify/escaped-tests/escaped-tests-source.js.map +1 -0
  526. package/dist/verify/gate-config/verification-manifest.d.ts +12 -1
  527. package/dist/verify/gate-config/verification-manifest.d.ts.map +1 -1
  528. package/dist/verify/gate-config/verification-manifest.js +12 -1
  529. package/dist/verify/gate-config/verification-manifest.js.map +1 -1
  530. package/dist/verify/gate-verdicts/commit-verdict-record.js +1 -1
  531. package/dist/verify/outcome-routing/verification-rework-issue.d.ts +4 -4
  532. package/dist/verify/outcome-routing/verification-rework-issue.d.ts.map +1 -1
  533. package/dist/verify/outcome-routing/verification-rework-issue.js +16 -6
  534. package/dist/verify/outcome-routing/verification-rework-issue.js.map +1 -1
  535. package/package.json +3 -3
  536. package/scripts/telora-daemon-wrapper.sh +16 -7
@@ -0,0 +1,33 @@
1
+ /**
2
+ * What the Tower supervisor is shown about a team escalation's focus: the
3
+ * assembled focus context (the focus, the criteria its arm stamped and where
4
+ * they stand), its deliveries labelled by whether the arm covers them, and the
5
+ * product's standing decisions (read from the product repo by the same
6
+ * convention the review-loop supervisor uses, tower-supervisor-history.ts
7
+ * readStandingDecisions). A failed read never fails the gathering: it is named
8
+ * in readErrors, which the prompt shows.
9
+ *
10
+ * @module tower/tower-escalation-gather
11
+ */
12
+ import type { DaemonConfig, FocusDeliveryInfo } from '../types/index.js';
13
+ import { type LoopHistoryDeps } from './tower-supervisor-history.js';
14
+ import type { EscalationContext, EscalationFocusDelivery } from './tower-escalation-prompt.js';
15
+ import type { TowerEscalationFocus } from './tower-escalation-session.js';
16
+ /** The context ladder an escalation supervisor reads: the focus, and its arm's stamped criteria and where they stand. */
17
+ export declare const TOWER_ESCALATION_CONTEXT_RECIPE: readonly string[];
18
+ /** The reads the gathering makes. Bound at the composition root. */
19
+ export interface EscalationGatherDeps {
20
+ getFocusDeliveries: (focusId: string) => Promise<FocusDeliveryInfo[]>;
21
+ assembleFocusContext: (focusId: string, productId: string, config: DaemonConfig) => Promise<string>;
22
+ readTextFile: LoopHistoryDeps['readTextFile'];
23
+ listDirectory: LoopHistoryDeps['listDirectory'];
24
+ }
25
+ /** Pure: a delivery labelled by the arm's baseline (null when the arm records none). */
26
+ export declare function labelDelivery(d: FocusDeliveryInfo, baseline: readonly string[] | null): EscalationFocusDelivery;
27
+ /** Gather everything the escalation supervisor is shown. Never throws. */
28
+ export declare function gatherEscalationContext(deps: EscalationGatherDeps, args: {
29
+ focus: TowerEscalationFocus;
30
+ config: DaemonConfig;
31
+ repoRoot: string;
32
+ }): Promise<EscalationContext>;
33
+ //# sourceMappingURL=tower-escalation-gather.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tower-escalation-gather.d.ts","sourceRoot":"","sources":["../../src/tower/tower-escalation-gather.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAyB,KAAK,eAAe,EAA0B,MAAM,+BAA+B,CAAC;AACpH,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC/F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,yHAAyH;AACzH,eAAO,MAAM,+BAA+B,EAAE,SAAS,MAAM,EAAiD,CAAC;AAE/G,oEAAoE;AACpE,MAAM,WAAW,oBAAoB;IACnC,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACtE,oBAAoB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACpG,YAAY,EAAE,eAAe,CAAC,cAAc,CAAC,CAAC;IAC9C,aAAa,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;CACjD;AAED,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,CAAC,EAAE,iBAAiB,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,uBAAuB,CAO/G;AAED,0EAA0E;AAC1E,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,oBAAoB,EAC1B,IAAI,EAAE;IAAE,KAAK,EAAE,oBAAoB,CAAC;IAAC,MAAM,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC5E,OAAO,CAAC,iBAAiB,CAAC,CAmB5B"}
@@ -0,0 +1,38 @@
1
+ // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
+ // Pinned by: packages/daemon/src/tower/tower-escalation-prompt.test.ts
3
+ // PINNED-BY-END
4
+ import { readStandingDecisions } from './tower-supervisor-history.js';
5
+ /** The context ladder an escalation supervisor reads: the focus, and its arm's stamped criteria and where they stand. */
6
+ export const TOWER_ESCALATION_CONTEXT_RECIPE = ['focus.context', 'focus.criteria_standing'];
7
+ /** Pure: a delivery labelled by the arm's baseline (null when the arm records none). */
8
+ export function labelDelivery(d, baseline) {
9
+ return {
10
+ deliveryId: d.id,
11
+ name: d.name,
12
+ executionStatus: d.executionStatus ?? 'unknown',
13
+ covered: baseline === null ? null : baseline.includes(d.id),
14
+ };
15
+ }
16
+ /** Gather everything the escalation supervisor is shown. Never throws. */
17
+ export async function gatherEscalationContext(deps, args) {
18
+ const { focus, config, repoRoot } = args;
19
+ const readErrors = [];
20
+ const [deliveries, focusContext] = await Promise.all([
21
+ deps.getFocusDeliveries(focus.focusId).catch((err) => { readErrors.push(`focus deliveries: ${err.message}`); return []; }),
22
+ deps.assembleFocusContext(focus.focusId, focus.productId, config).catch((err) => { readErrors.push(`focus context: ${err.message}`); return ''; }),
23
+ ]);
24
+ let standingDecisions = { source: null, text: '', truncated: false };
25
+ try {
26
+ standingDecisions = readStandingDecisions(repoRoot, deps);
27
+ }
28
+ catch (err) {
29
+ readErrors.push(`standing decisions: ${err.message}`);
30
+ }
31
+ return {
32
+ focusContext,
33
+ deliveries: deliveries.map((d) => labelDelivery(d, focus.armedBaselineDeliveryIds)),
34
+ standingDecisions,
35
+ readErrors,
36
+ };
37
+ }
38
+ //# sourceMappingURL=tower-escalation-gather.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tower-escalation-gather.js","sourceRoot":"","sources":["../../src/tower/tower-escalation-gather.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,uEAAuE;AACvE,gBAAgB;AAehB,OAAO,EAAE,qBAAqB,EAAgD,MAAM,+BAA+B,CAAC;AAIpH,yHAAyH;AACzH,MAAM,CAAC,MAAM,+BAA+B,GAAsB,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAAC;AAU/G,wFAAwF;AACxF,MAAM,UAAU,aAAa,CAAC,CAAoB,EAAE,QAAkC;IACpF,OAAO;QACL,UAAU,EAAE,CAAC,CAAC,EAAE;QAChB,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,SAAS;QAC/C,OAAO,EAAE,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5D,CAAC;AACJ,CAAC;AAED,0EAA0E;AAC1E,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,IAA0B,EAC1B,IAA6E;IAE7E,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IACzC,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnD,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,qBAAsB,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,EAAyB,CAAC,CAAC,CAAC,CAAC;QACrK,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,kBAAmB,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;KACvK,CAAC,CAAC;IACH,IAAI,iBAAiB,GAAsB,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IACxF,IAAI,CAAC;QACH,iBAAiB,GAAG,qBAAqB,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC5D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,UAAU,CAAC,IAAI,CAAC,uBAAwB,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IACD,OAAO;QACL,YAAY;QACZ,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;QACnF,iBAAiB;QACjB,UAAU;KACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * The Tower supervisor's ESCALATION prompt: a pure builder over one team
3
+ * escalation pending on it and what the daemon gathered about its focus.
4
+ *
5
+ * The operator ruled the scope: the supervisor decides what lies within the
6
+ * scope the team is solving for -- usually by authorizing the team's own
7
+ * recommendation -- WITHOUT the operator, and every decision is recorded on the
8
+ * focus. It defers to the operator a major new build, and anything it feels
9
+ * needs a human. (An escalation naming a human-only act never reaches it: the
10
+ * daemon hands those straight on, tower/tower-escalation-routing.ts.)
11
+ *
12
+ * What it is shown: the escalation (description, what was tried, the help
13
+ * asked for -- where the team's recommendation is), the focus and its assembled
14
+ * context, the ARM (the criteria it stamped and where they stand; the
15
+ * deliveries it covers and those recorded as new intent after it) and the
16
+ * product's standing decisions.
17
+ *
18
+ * What it is never given: a budget lever. The prompt carries no review-cycle
19
+ * count, no cap and no arm act, and says outright that none exist for it; the
20
+ * bound is the scoped `tower_supervisor` MCP profile, under which no tool can
21
+ * arm, unarm or grant review cycles (mcp/telora-products src/profile-scope.ts).
22
+ *
23
+ * @module tower/tower-escalation-prompt
24
+ */
25
+ import type { StandingDecisions } from './tower-supervisor-history.js';
26
+ import type { TowerPendingEscalation } from '../queries/escalations/tower-escalations.js';
27
+ /** The last line the session prints (informational; the record decides). */
28
+ export declare const TOWER_ESCALATION_LINE_PREFIX = "TOWER DECISION:";
29
+ /** One delivery of the focus, and whether the arm covers it. */
30
+ export interface EscalationFocusDelivery {
31
+ deliveryId: string;
32
+ name: string;
33
+ executionStatus: string;
34
+ /** true = in the arm's baseline; false = recorded as new intent after it; null = the arm records no baseline. */
35
+ covered: boolean | null;
36
+ }
37
+ /** What the daemon gathered for one escalation. */
38
+ export interface EscalationContext {
39
+ /** The assembled focus context ladder (the focus, its stamped criteria and where they stand). */
40
+ focusContext: string;
41
+ deliveries: EscalationFocusDelivery[];
42
+ standingDecisions: StandingDecisions;
43
+ readErrors: string[];
44
+ }
45
+ /** Inputs of one escalation prompt. */
46
+ export interface TowerEscalationPromptInput {
47
+ focus: {
48
+ focusId: string;
49
+ focusName: string;
50
+ focusDescription: string | null;
51
+ productId: string;
52
+ };
53
+ escalation: TowerPendingEscalation;
54
+ /** The id this session acts under: every act it takes carries it as agentSessionId. */
55
+ supervisorSessionId: string;
56
+ context: EscalationContext;
57
+ }
58
+ /** Pure: the whole escalation prompt. */
59
+ export declare function buildTowerEscalationPrompt(input: TowerEscalationPromptInput): string;
60
+ /** Pure: the decision the session's last line states, or null. Informational: the record decides. */
61
+ export declare function parseTowerEscalationLine(stdout: string): 'answered' | 'deferred' | null;
62
+ //# sourceMappingURL=tower-escalation-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tower-escalation-prompt.d.ts","sourceRoot":"","sources":["../../src/tower/tower-escalation-prompt.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAE1F,4EAA4E;AAC5E,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAE9D,gEAAgE;AAChE,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,iHAAiH;IACjH,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC,iGAAiG;IACjG,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,uBAAuB,EAAE,CAAC;IACtC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,uCAAuC;AACvC,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAClG,UAAU,EAAE,sBAAsB,CAAC;IACnC,uFAAuF;IACvF,mBAAmB,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AA2FD,yCAAyC;AACzC,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,0BAA0B,GAAG,MAAM,CAmBpF;AAED,qGAAqG;AACrG,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,CASvF"}
@@ -0,0 +1,130 @@
1
+ // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
+ // Pinned by: packages/daemon/src/tower/tower-escalation-prompt.test.ts
3
+ // PINNED-BY-END
4
+ /** The last line the session prints (informational; the record decides). */
5
+ export const TOWER_ESCALATION_LINE_PREFIX = 'TOWER DECISION:';
6
+ function fence(text) {
7
+ return ['```', text.replace(/```/g, "'''"), '```'].join('\n');
8
+ }
9
+ function escalationSection(input) {
10
+ const e = input.escalation;
11
+ const out = [
12
+ '## The escalation',
13
+ '',
14
+ `escalationId ${e.escalationId}, filed ${e.createdAt} by a team on this focus` +
15
+ `${e.deliveryId ? ` (deliveryId ${e.deliveryId})` : ''}${e.issueId ? ` (issueId ${e.issueId})` : ''}.`,
16
+ `Reason: ${e.reasonType}; disposition: ${e.disposition ?? 'unset'}.`,
17
+ '',
18
+ 'What happened and why the team escalated:',
19
+ fence(e.description.trim() === '' ? '(no description)' : e.description),
20
+ ];
21
+ if (e.whatWasTried)
22
+ out.push('', 'What the team tried:', fence(e.whatWasTried));
23
+ if (e.helpNeeded)
24
+ out.push('', 'What the team asks for (its recommendation, when it made one, is usually here):', fence(e.helpNeeded));
25
+ out.push('');
26
+ return out;
27
+ }
28
+ function deliveryLine(d) {
29
+ const arm = d.covered === null ? '' : d.covered ? ', covered by the arm' : ', recorded as new intent after the arm (not covered)';
30
+ return `- "${d.name}" (deliveryId ${d.deliveryId}, ${d.executionStatus}${arm})`;
31
+ }
32
+ function contextSection(ctx) {
33
+ const out = ['## The focus, and the arm (the criteria it stamped and where they stand)', ''];
34
+ out.push(ctx.focusContext.trim() === '' ? '(The focus context could not be assembled.)' : ctx.focusContext.trim(), '');
35
+ out.push('### Deliveries', '');
36
+ if (ctx.deliveries.length === 0)
37
+ out.push('(none readable)');
38
+ for (const d of ctx.deliveries)
39
+ out.push(deliveryLine(d));
40
+ out.push('', '## The product\'s standing decisions', '');
41
+ const sd = ctx.standingDecisions;
42
+ if (sd.source === null)
43
+ out.push('This product keeps no decisions log the daemon could find. Decide from the focus alone.');
44
+ else {
45
+ out.push(`From ${sd.source}${sd.truncated ? ' (newest entries; cut at the size cap -- read the file for older ones)' : ''}. What is ruled here is not re-decided.`, '', sd.text);
46
+ }
47
+ out.push('');
48
+ if (ctx.readErrors.length > 0)
49
+ out.push('## What you were NOT given (a read failed)', '', ...ctx.readErrors.map((e) => `- ${e}`), '');
50
+ return out;
51
+ }
52
+ function instructionsSection(input) {
53
+ const { escalation: e, supervisorSessionId: sid } = input;
54
+ const ids = `escalationId "${e.escalationId}", agentSessionId "${sid}"`;
55
+ return [
56
+ '## What you do, in order',
57
+ '',
58
+ '1. **Read the ask.** What does the team need decided, and what does it recommend? Read the code it names in',
59
+ ' this worktree if that is how you judge it (read only).',
60
+ '2. **Judge it against the scope the team is solving for**: the focus\'s intent, the criteria its arm stamped, the',
61
+ ' deliveries the arm covers, and the standing decisions above. A path is within scope when it serves that intent',
62
+ ' inside those criteria and decisions -- most escalations are: a fork the team could act on but would not decide',
63
+ ' alone. Prefer the team\'s own recommendation when it is within scope; when two paths are, prefer the one that',
64
+ ' is reversible.',
65
+ '3. **When you can recommend a path within that scope, ANSWER it** with `telora_agent` action "escalation_answer":',
66
+ ` ${ids}, answer (addressed to the team, imperative: what to do, and any condition), summary (WHAT you`,
67
+ ' decided), rationale (WHY it is within scope), decisionEvidence { recommendation: "team" | "supervisor",',
68
+ ' criteria: [the criteria it rests on], standingDecisions: [the entries it cites], alternatives: [what you',
69
+ ' rejected and why] }. That one call resolves the escalation, records escalation_answered on the focus, and',
70
+ ' the daemon hands your answer to the team (its live session now, or its next spawn).',
71
+ '4. **DEFER it to the operator** with `telora_agent` action "escalation_defer" (' + ids + ', summary,',
72
+ ' rationale) -- the escalation then stands in the operator\'s inbox -- when any of these holds:',
73
+ ' - it asks for a MAJOR NEW BUILD: a new capability, product surface or focus beyond what the arm covers;',
74
+ ' - the intent is genuinely open: the focus and the standing decisions leave two readings that change the',
75
+ ' outcome, and neither is clearly the team\'s scope;',
76
+ ' - it needs a human act after all (something irreversible, outward, or a credential no agent reaches);',
77
+ ' - you feel a human is needed. When in doubt between answering and deferring, DEFER.',
78
+ '',
79
+ ];
80
+ }
81
+ function boundariesSection() {
82
+ return [
83
+ '## What you never do',
84
+ '',
85
+ '- You hold NO budget lever. You cannot grant review cycles, extend a budget, re-arm, un-arm or stop the',
86
+ ' focus; your Telora tools do not offer it. An answer never widens the arm: new intent is the operator\'s.',
87
+ '- You do not amend a criterion, write code, commit, or file a new escalation for this one: answering or',
88
+ ' deferring THIS escalation is the whole act.',
89
+ '- You do not lower the bar to unblock the team: an answer that drops a stamped criterion is a deferral.',
90
+ '- You decide exactly once: one escalation_answer OR one escalation_defer.',
91
+ '',
92
+ `End with one line: \`${TOWER_ESCALATION_LINE_PREFIX} answered\` or \`${TOWER_ESCALATION_LINE_PREFIX} deferred\`.`,
93
+ ];
94
+ }
95
+ /** Pure: the whole escalation prompt. */
96
+ export function buildTowerEscalationPrompt(input) {
97
+ const { focus } = input;
98
+ return [
99
+ `# Tower supervisor: answer a team escalation on "${focus.focusName}"`,
100
+ '',
101
+ 'You are the Tower supervisor. A team working this armed focus escalated a question. The operator ruled that',
102
+ 'you answer what lies within the scope the team is solving for -- usually by authorizing the team\'s own',
103
+ 'recommendation -- WITHOUT the operator, and that every decision you make is recorded on the focus (what, why,',
104
+ 'and the evidence), where the dashboard shows it. Only what you cannot answer, or a major new build, goes to',
105
+ 'the operator.',
106
+ '',
107
+ `Focus: "${focus.focusName}" (focusId ${focus.focusId}, productId ${focus.productId})`,
108
+ ...(focus.focusDescription ? ['', fence(focus.focusDescription)] : []),
109
+ '',
110
+ ...escalationSection(input),
111
+ ...contextSection(input.context),
112
+ ...instructionsSection(input),
113
+ ...boundariesSection(),
114
+ ].join('\n');
115
+ }
116
+ /** Pure: the decision the session's last line states, or null. Informational: the record decides. */
117
+ export function parseTowerEscalationLine(stdout) {
118
+ for (const line of stdout.trim().split('\n').reverse()) {
119
+ const at = line.indexOf(TOWER_ESCALATION_LINE_PREFIX);
120
+ if (at === -1)
121
+ continue;
122
+ const word = line.slice(at + TOWER_ESCALATION_LINE_PREFIX.length).trim().replace(/[`*.]/g, '').toLowerCase();
123
+ if (word.startsWith('answered'))
124
+ return 'answered';
125
+ if (word.startsWith('deferred'))
126
+ return 'deferred';
127
+ }
128
+ return null;
129
+ }
130
+ //# sourceMappingURL=tower-escalation-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tower-escalation-prompt.js","sourceRoot":"","sources":["../../src/tower/tower-escalation-prompt.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,uEAAuE;AACvE,gBAAgB;AA8BhB,4EAA4E;AAC5E,MAAM,CAAC,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;AA6B9D,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAiC;IAC1D,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC;IAC3B,MAAM,GAAG,GAAG;QACV,mBAAmB;QACnB,EAAE;QACF,gBAAgB,CAAC,CAAC,YAAY,WAAW,CAAC,CAAC,SAAS,0BAA0B;YAC5E,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG;QACxG,WAAW,CAAC,CAAC,UAAU,kB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AAI,CAAC,CAAC;AACf,CAAC;AAED,qGAAqG;AACrG,MAAM,UAAU,wBAAwB,CAAC,MAAc;IACrD,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QACvD,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC;QACtD,IAAI,EAAE,KAAK,CAAC,CAAC;YAAE,SAAS;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC7G,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;YAAE,OAAO,UAAU,CAAC;QACnD,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;YAAE,OAAO,UAAU,CAAC;IACrD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * THE ROUTING TABLE for a team escalation pending on the Tower supervisor: does
3
+ * the supervisor decide it, or does the daemon hand it straight to the
4
+ * operator? Pure; the one place the rule is written (product-api stamps the
5
+ * candidates -- a team filing on an armed focus -- and this decides each).
6
+ *
7
+ * -> the OPERATOR, with no supervisor session, when
8
+ * human_act the filing names a human-only act (metadata.human_act
9
+ * kind irreversible | outward | unreachable_capability):
10
+ * no agent can perform it, so no agent should hold it;
11
+ * external_wait the filing waits on a third party: not a judgement call;
12
+ * unarmed the focus is no longer armed (no assigned agent role):
13
+ * the supervisor decides within the scope an ARM authorised;
14
+ * focus_closed the focus is not active on a product this daemon runs.
15
+ * -> the SUPERVISOR otherwise. Whether it then answers (a path within the
16
+ * scope the team is solving for) or defers (a major new build, or it feels
17
+ * a human is needed) is its judgement, told in tower/tower-escalation-prompt.ts.
18
+ *
19
+ * @module tower/tower-escalation-routing
20
+ */
21
+ /** The human-only act kinds (mcp telora_agent humanAct.kind). */
22
+ export declare const HUMAN_ACT_KINDS: readonly string[];
23
+ /** Why an escalation goes straight to the operator. */
24
+ export type OperatorRouteReason = 'human_act' | 'external_wait' | 'unarmed' | 'focus_closed';
25
+ /** Where one pending escalation goes. */
26
+ export type TowerEscalationRoute = {
27
+ route: 'supervisor';
28
+ } | {
29
+ route: 'operator';
30
+ reason: OperatorRouteReason;
31
+ detail: string;
32
+ };
33
+ /** The facts the routing reads. */
34
+ export interface RoutingFacts {
35
+ disposition: string | null;
36
+ metadata: Record<string, unknown>;
37
+ /** The escalation's focus as this daemon runs it: null when it is not an active focus of a configured product. */
38
+ focus: {
39
+ armed: boolean;
40
+ } | null;
41
+ }
42
+ /** Pure: the human-only act a filing names, or null. */
43
+ export declare function humanActOf(metadata: Record<string, unknown>): {
44
+ kind: string;
45
+ act: string;
46
+ } | null;
47
+ /** Pure: route one pending team escalation. */
48
+ export declare function routeTeamEscalation(facts: RoutingFacts): TowerEscalationRoute;
49
+ //# sourceMappingURL=tower-escalation-routing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tower-escalation-routing.d.ts","sourceRoot":"","sources":["../../src/tower/tower-escalation-routing.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,iEAAiE;AACjE,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAA0D,CAAC;AAExG,uDAAuD;AACvD,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,eAAe,GAAG,SAAS,GAAG,cAAc,CAAC;AAE7F,yCAAyC;AACzC,MAAM,MAAM,oBAAoB,GAC5B;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,GACvB;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvE,mCAAmC;AACnC,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,kHAAkH;IAClH,KAAK,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CAClC;AAED,wDAAwD;AACxD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAMlG;AAED,+CAA+C;AAC/C,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,oBAAoB,CAe7E"}
@@ -0,0 +1,53 @@
1
+ // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
+ // Pinned by: packages/daemon/src/tower/tower-escalation-prompt.test.ts
3
+ // PINNED-BY-END
4
+ /**
5
+ * THE ROUTING TABLE for a team escalation pending on the Tower supervisor: does
6
+ * the supervisor decide it, or does the daemon hand it straight to the
7
+ * operator? Pure; the one place the rule is written (product-api stamps the
8
+ * candidates -- a team filing on an armed focus -- and this decides each).
9
+ *
10
+ * -> the OPERATOR, with no supervisor session, when
11
+ * human_act the filing names a human-only act (metadata.human_act
12
+ * kind irreversible | outward | unreachable_capability):
13
+ * no agent can perform it, so no agent should hold it;
14
+ * external_wait the filing waits on a third party: not a judgement call;
15
+ * unarmed the focus is no longer armed (no assigned agent role):
16
+ * the supervisor decides within the scope an ARM authorised;
17
+ * focus_closed the focus is not active on a product this daemon runs.
18
+ * -> the SUPERVISOR otherwise. Whether it then answers (a path within the
19
+ * scope the team is solving for) or defers (a major new build, or it feels
20
+ * a human is needed) is its judgement, told in tower/tower-escalation-prompt.ts.
21
+ *
22
+ * @module tower/tower-escalation-routing
23
+ */
24
+ /** The human-only act kinds (mcp telora_agent humanAct.kind). */
25
+ export const HUMAN_ACT_KINDS = ['irreversible', 'outward', 'unreachable_capability'];
26
+ /** Pure: the human-only act a filing names, or null. */
27
+ export function humanActOf(metadata) {
28
+ const raw = metadata.human_act;
29
+ if (raw === null || typeof raw !== 'object' || Array.isArray(raw))
30
+ return null;
31
+ const { kind, act } = raw;
32
+ if (typeof kind !== 'string' || !HUMAN_ACT_KINDS.includes(kind))
33
+ return null;
34
+ return { kind, act: typeof act === 'string' ? act : '' };
35
+ }
36
+ /** Pure: route one pending team escalation. */
37
+ export function routeTeamEscalation(facts) {
38
+ const act = humanActOf(facts.metadata);
39
+ if (act) {
40
+ return { route: 'operator', reason: 'human_act', detail: `it names a human-only act (${act.kind}): ${act.act || '(unstated)'}` };
41
+ }
42
+ if (facts.disposition === 'external_wait') {
43
+ return { route: 'operator', reason: 'external_wait', detail: 'it waits on a third party, which no judgement answers' };
44
+ }
45
+ if (facts.focus === null) {
46
+ return { route: 'operator', reason: 'focus_closed', detail: 'its focus is not an active focus this daemon runs' };
47
+ }
48
+ if (!facts.focus.armed) {
49
+ return { route: 'operator', reason: 'unarmed', detail: 'its focus is no longer armed, so no arm bounds what the supervisor may decide' };
50
+ }
51
+ return { route: 'supervisor' };
52
+ }
53
+ //# sourceMappingURL=tower-escalation-routing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tower-escalation-routing.js","sourceRoot":"","sources":["../../src/tower/tower-escalation-routing.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,uEAAuE;AACvE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,iEAAiE;AACjE,MAAM,CAAC,MAAM,eAAe,GAAsB,CAAC,cAAc,EAAE,SAAS,EAAE,wBAAwB,CAAC,CAAC;AAkBxG,wDAAwD;AACxD,MAAM,UAAU,UAAU,CAAC,QAAiC;IAC1D,MAAM,GAAG,GAAG,QAAQ,CAAC,SAAS,CAAC;IAC/B,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAA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AK,EAAE,YAAY,EAAE,CAAC;AACjC,CAAC"}
@@ -0,0 +1,149 @@
1
+ /**
2
+ * THE TOWER SUPERVISOR FOR TEAM ESCALATIONS: a team's escalation is answered by
3
+ * the Tower supervisor, and reaches the operator only when the supervisor cannot
4
+ * answer it.
5
+ *
6
+ * WHO OWNS WHICH ESCALATION (the reconcile with the routing decider,
7
+ * supervision/agent-resolvable-promotion.ts). The routing decider keeps the
8
+ * DAEMON-filed observations (the machine lane). The supervisor takes the
9
+ * TEAM-filed escalations: product-api escalation_create stamps tower_state
10
+ * 'pending' on a team filing (agent_filed) on an armed focus, and both the coding
11
+ * spawn's ride-in and the decider's sweep skip a Tower-routed row
12
+ * (queries/escalations/escalation-consumption.ts isTowerRoutedRow). One owner
13
+ * per row, no second lane.
14
+ *
15
+ * ONE SWEEP (sweep(), registered in focus/focus-loop-registry.ts under the
16
+ * escalation-lane gate, not TELORA_FOCUS_LOOP: escalations are filed whether or
17
+ * not the differential loop runs) reads the org's pending rows of the products
18
+ * this daemon runs and, per row:
19
+ * - routes it (tower/tower-escalation-routing.ts): a human act, an
20
+ * external_wait, an un-armed or closed focus -> the daemon defers it to the
21
+ * operator with the reason (daemon_escalation_tower_defer records
22
+ * escalation_deferred), no session spent;
23
+ * - otherwise starts ONE one-shot supervisor session for it (the review-loop
24
+ * supervisor's process, spawn/routing-decider-spawn.ts
25
+ * spawnOneShotJudgementSession, opus, a governor slot, the scoped
26
+ * `tower_supervisor` MCP profile) in the background. The session answers it
27
+ * (telora_agent escalation_answer) or defers it (escalation_defer); each is
28
+ * one attributed edge act that records the decision on the focus.
29
+ *
30
+ * AFTER A SESSION the daemon reads the row:
31
+ * - answered -> the answer reaches the team: injected into its live session now
32
+ * (spawn/live-answer-delivery.ts), else read back at its next spawn through
33
+ * the answer re-arm signal the answer wrote; a decision record the edge
34
+ * failed to write is backstopped here (escalation_answered, by the daemon).
35
+ * - deferred -> it stands in the operator's inbox.
36
+ * - still pending: a session that CRASHED or timed out -> deferred at once
37
+ * ("crash -> the operator"); one that exited cleanly without deciding is an
38
+ * attempt, and after TOWER_ESCALATION_MAX_ATTEMPTS it is deferred. A session
39
+ * that never ran (no slot, the model unavailable, no scoped MCP) is not an
40
+ * attempt: the next sweep retries. Attempts are counted in memory.
41
+ *
42
+ * @module tower/tower-escalation-session
43
+ */
44
+ import type { ResourceGovernor } from '@telora/daemon-core';
45
+ import type { DaemonConfig } from '../types/index.js';
46
+ import type { TowerDecision, TowerDecisionInput } from '../queries/tower-decisions/tower-decisions.js';
47
+ import type { TowerDeferral, TowerEscalationState, TowerPendingEscalation } from '../queries/escalations/tower-escalations.js';
48
+ import { type TowerEscalationRoute } from './tower-escalation-routing.js';
49
+ import { type EscalationContext } from './tower-escalation-prompt.js';
50
+ import type { TowerSupervisorSpawnResult } from './tower-supervisor-session.js';
51
+ /** Sessions that ran cleanly without deciding, per escalation, before the daemon defers it. */
52
+ export declare const TOWER_ESCALATION_MAX_ATTEMPTS = 2;
53
+ /** Kill an escalation session that has not exited within this window. */
54
+ export declare const TOWER_ESCALATION_TIMEOUT_MS: number;
55
+ /** Governor engine for escalation sessions (bounded by the global session cap, as the loop supervisor's). */
56
+ export declare const TOWER_ESCALATION_GOVERNOR_ENGINE = "tower-supervisor";
57
+ /**
58
+ * Tools the escalation session is pre-approved for: reading the worktree, and
59
+ * the Telora reads plus the two acts it decides through (telora_agent
60
+ * escalation_answer / escalation_defer). Pre-approval only; the scoped MCP
61
+ * profile is the bound.
62
+ */
63
+ export declare const TOWER_ESCALATION_MCP_TOOLS: readonly string[];
64
+ /** A focus as the escalation supervisor reads it. */
65
+ export interface TowerEscalationFocus {
66
+ focusId: string;
67
+ focusName: string;
68
+ focusDescription: string | null;
69
+ productId: string;
70
+ armed: boolean;
71
+ /** The arm's baseline deliveries (product_focuses.armed_baseline_delivery_ids), or null when none is recorded. */
72
+ armedBaselineDeliveryIds: readonly string[] | null;
73
+ }
74
+ /** What one escalation session is spawned with. */
75
+ export interface TowerEscalationSpawnOptions {
76
+ config: DaemonConfig;
77
+ prompt: string;
78
+ cwd: string;
79
+ focusId: string;
80
+ escalationId: string;
81
+ model: string;
82
+ timeoutMs: number;
83
+ allowedTools: readonly string[];
84
+ }
85
+ /** The collaborators, all required, bound at the composition root. */
86
+ export interface TowerEscalationSupervisorDeps {
87
+ readConfig: () => DaemonConfig | null;
88
+ productConfig: (config: DaemonConfig, productId: string) => DaemonConfig | null;
89
+ readGovernor: () => Pick<ResourceGovernor, 'tryAcquireSlot' | 'releaseSlot'> | null;
90
+ listPending: () => Promise<TowerPendingEscalation[]>;
91
+ readEscalation: (escalationId: string) => Promise<TowerEscalationState>;
92
+ defer: (deferral: TowerDeferral) => Promise<{
93
+ towerDecisionId: string | null;
94
+ }>;
95
+ /** The active focuses of one product this daemon runs. */
96
+ listFocuses: (productId: string) => Promise<TowerEscalationFocus[]>;
97
+ focusWorktreePath: (focusId: string) => string | null;
98
+ gatherContext: (args: {
99
+ focus: TowerEscalationFocus;
100
+ config: DaemonConfig;
101
+ repoRoot: string;
102
+ }) => Promise<EscalationContext>;
103
+ spawn: (opts: TowerEscalationSpawnOptions) => Promise<TowerSupervisorSpawnResult>;
104
+ /** Inject the focus's unconsumed answers into its live team (spawn/live-answer-delivery.ts). */
105
+ deliverAnswer: (args: {
106
+ focusId: string;
107
+ rearmValues: readonly string[];
108
+ }) => Promise<{
109
+ delivered: boolean;
110
+ detail?: string;
111
+ }>;
112
+ listTowerDecisions: (focusId: string) => Promise<{
113
+ decisions: TowerDecision[];
114
+ openLoopDecisionIds: string[];
115
+ }>;
116
+ recordTowerDecision: (input: TowerDecisionInput) => Promise<{
117
+ decision: TowerDecision;
118
+ created: boolean;
119
+ }>;
120
+ newSessionId: () => string;
121
+ model: string;
122
+ }
123
+ /** What one sweep did. */
124
+ export interface TowerEscalationSweepCounts {
125
+ pending: number;
126
+ started: number;
127
+ inFlight: number;
128
+ deferred: number;
129
+ skipped: number;
130
+ unreadable: number;
131
+ }
132
+ /** Pure: whether a session that ran ended abnormally (crash or kill): straight to the operator. */
133
+ export declare function crashed(result: TowerSupervisorSpawnResult): boolean;
134
+ /** Pure: the deferral the daemon records for a route straight to the operator. */
135
+ export declare function operatorRouteDeferral(route: Extract<TowerEscalationRoute, {
136
+ route: 'operator';
137
+ }>): Pick<TowerDeferral, 'summary' | 'rationale' | 'evidence'>;
138
+ /** Pure: whether a pending row belongs to a product this daemon runs. */
139
+ export declare function ownedByThisDaemon(esc: Pick<TowerPendingEscalation, 'productId' | 'focusId'>, productIds: ReadonlySet<string>, focusIds: ReadonlySet<string>): boolean;
140
+ /** The escalation half of the Tower supervisor (one per process). */
141
+ export interface TowerEscalationSupervisor {
142
+ sweep(): Promise<TowerEscalationSweepCounts>;
143
+ }
144
+ /** Build it (the composition root binds one per process). */
145
+ export declare function createTowerEscalationSupervisor(deps: TowerEscalationSupervisorDeps): TowerEscalationSupervisor & {
146
+ /** Test seam: resolves once every session started so far has finished. */
147
+ settled(): Promise<void>;
148
+ };
149
+ //# sourceMappingURL=tower-escalation-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tower-escalation-session.d.ts","sourceRoot":"","sources":["../../src/tower/tower-escalation-session.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACvG,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAuB,KAAK,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC/F,OAAO,EAAwD,KAAK,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAC5H,OAAO,KAAK,EAA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