@overdeck/core 0.45.10 → 0.45.11

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 (219) hide show
  1. package/dist/{agent-state-KVbJEG5f.js → agent-state-RLhS7ckO.js} +1 -1
  2. package/dist/{agents-pp8FO7Uj.js → agents-By3u_fQ8.js} +1 -1
  3. package/dist/{agents-CQHK0CSA.js → agents-CgVr77Qq.js} +12 -12
  4. package/dist/{agents-CQHK0CSA.js.map → agents-CgVr77Qq.js.map} +1 -1
  5. package/dist/{backlog-auto-trigger-CyuoS0nl.js → backlog-auto-trigger-B_-1tk4e.js} +5 -5
  6. package/dist/{backlog-auto-trigger-CyuoS0nl.js.map → backlog-auto-trigger-B_-1tk4e.js.map} +1 -1
  7. package/dist/cli/index.js +45 -45
  8. package/dist/{cli-Cewlu3yU.js → cli-DGeSW85B.js} +2 -2
  9. package/dist/{cli-Cewlu3yU.js.map → cli-DGeSW85B.js.map} +1 -1
  10. package/dist/cli-MTB9IOoR.js +3 -0
  11. package/dist/{close-issue-BJGX9_z7.js → close-issue-Djajb6Sv.js} +2 -2
  12. package/dist/{close-issue-BJGX9_z7.js.map → close-issue-Djajb6Sv.js.map} +1 -1
  13. package/dist/{concurrency-Ca-fC7tA.js → concurrency-4rzjHAQA.js} +1 -1
  14. package/dist/{conversation-compaction-B_6s9EvM.js → conversation-compaction-BQvZh09I.js} +4 -4
  15. package/dist/{conversation-compaction-B_6s9EvM.js.map → conversation-compaction-BQvZh09I.js.map} +1 -1
  16. package/dist/dashboard/{advancing-selfheal-CMlGznKv.js → advancing-selfheal-BezNfM3P.js} +3 -3
  17. package/dist/dashboard/{advancing-selfheal-CMlGznKv.js.map → advancing-selfheal-BezNfM3P.js.map} +1 -1
  18. package/dist/dashboard/{agent-state-xk_G8t90.js → agent-state-BUANcaA7.js} +1 -1
  19. package/dist/dashboard/{agent-state-service-C1iUF9Ft.js → agent-state-service-DmFpIMbP.js} +1 -1
  20. package/dist/dashboard/{agent-state-service-5ge9xxhx.js → agent-state-service-tXUdp6UF.js} +2 -2
  21. package/dist/dashboard/{agent-state-service-5ge9xxhx.js.map → agent-state-service-tXUdp6UF.js.map} +1 -1
  22. package/dist/dashboard/{agents-BIggLvi_.js → agents-C-vqmKDi.js} +1 -1
  23. package/dist/dashboard/{agents-DHvsjsuP.js → agents-C7V4odQ6.js} +11 -11
  24. package/dist/dashboard/{agents-DHvsjsuP.js.map → agents-C7V4odQ6.js.map} +1 -1
  25. package/dist/dashboard/{backlog-auto-trigger-COm_R96V.js → backlog-auto-trigger-Cb8PR-5w.js} +2 -2
  26. package/dist/dashboard/{backlog-auto-trigger-COm_R96V.js.map → backlog-auto-trigger-Cb8PR-5w.js.map} +1 -1
  27. package/dist/dashboard/{cli-CvK9xuSS.js → cli-BgzbB6h3.js} +2 -2
  28. package/dist/dashboard/{cli-CvK9xuSS.js.map → cli-BgzbB6h3.js.map} +1 -1
  29. package/dist/dashboard/cli-DCqy_wFa.js +3 -0
  30. package/dist/dashboard/{close-issue-BnpErnD1.js → close-issue-BWf3pxn4.js} +2 -2
  31. package/dist/dashboard/{close-issue-BnpErnD1.js.map → close-issue-BWf3pxn4.js.map} +1 -1
  32. package/dist/dashboard/{closed-issue-reaper-DRqK5k39.js → closed-issue-reaper-D7XPq5pY.js} +4 -4
  33. package/dist/dashboard/{closed-issue-reaper-DRqK5k39.js.map → closed-issue-reaper-D7XPq5pY.js.map} +1 -1
  34. package/dist/dashboard/{closed-issue-reaper-BLCQwTpF.js → closed-issue-reaper-VSTSTROK.js} +1 -1
  35. package/dist/dashboard/{conflict-gate-JdFuhKuF.js → conflict-gate-DwOslTij.js} +1 -1
  36. package/dist/dashboard/{conflict-gate-BhKvrPxn.js → conflict-gate-FFEvTDVA.js} +3 -3
  37. package/dist/dashboard/{conflict-gate-BhKvrPxn.js.map → conflict-gate-FFEvTDVA.js.map} +1 -1
  38. package/dist/dashboard/{conversation-compaction-C5o_eKEm.js → conversation-compaction-CCqN4hWk.js} +4 -4
  39. package/dist/dashboard/{conversation-compaction-C5o_eKEm.js.map → conversation-compaction-CCqN4hWk.js.map} +1 -1
  40. package/dist/dashboard/{conversation-compaction-Ba5aZdrb.js → conversation-compaction-CL5Ti4j4.js} +1 -1
  41. package/dist/dashboard/{deacon-j3qSZ7--.js → deacon-CGHl90eC.js} +107 -50
  42. package/dist/dashboard/{deacon-j3qSZ7--.js.map → deacon-CGHl90eC.js.map} +1 -1
  43. package/dist/dashboard/{deacon-Cv2RMfHs.js → deacon-DMPh40Im.js} +2 -2
  44. package/dist/dashboard/deacon-swarm-CVTiNL0N.js +2 -0
  45. package/dist/dashboard/{deacon-swarm-DadWNi5J.js → deacon-swarm-aMMJTq6t.js} +4 -4
  46. package/dist/dashboard/{deacon-swarm-DadWNi5J.js.map → deacon-swarm-aMMJTq6t.js.map} +1 -1
  47. package/dist/dashboard/deacon.js +4 -4
  48. package/dist/dashboard/{feedback-target-oE4-Esxl.js → feedback-target-dJjFfITP.js} +4 -4
  49. package/dist/dashboard/{feedback-target-oE4-Esxl.js.map → feedback-target-dJjFfITP.js.map} +1 -1
  50. package/dist/dashboard/{feedback-target-C4DaDSZ8.js → feedback-target-nQSM6ygL.js} +1 -1
  51. package/dist/dashboard/{flywheel-ClMjGW_u.js → flywheel-BLoVNtJV.js} +6 -6
  52. package/dist/dashboard/{flywheel-ClMjGW_u.js.map → flywheel-BLoVNtJV.js.map} +1 -1
  53. package/dist/dashboard/{flywheel-DefHRzY4.js → flywheel-Cqf8vu7N.js} +6 -6
  54. package/dist/dashboard/{flywheel-DefHRzY4.js.map → flywheel-Cqf8vu7N.js.map} +1 -1
  55. package/dist/dashboard/{flywheel-BqDdGvrQ.js → flywheel-PJsbrXNY.js} +1 -1
  56. package/dist/dashboard/{flywheel-merge-order-CuDcqTRJ.js → flywheel-merge-order-B7BH8mZ3.js} +2 -2
  57. package/dist/dashboard/{flywheel-merge-order-CuDcqTRJ.js.map → flywheel-merge-order-B7BH8mZ3.js.map} +1 -1
  58. package/dist/dashboard/{flywheel-merge-order-B6YDSElh.js → flywheel-merge-order-CCwF60b-.js} +1 -1
  59. package/dist/dashboard/{harness-resolve-DKeSVsJL.js → harness-resolve-B3f9G1Kp.js} +2 -2
  60. package/dist/dashboard/{harness-resolve-DKeSVsJL.js.map → harness-resolve-B3f9G1Kp.js.map} +1 -1
  61. package/dist/dashboard/{inspect-agent-BKKc0XnB.js → inspect-agent-CKF5-SJr.js} +3 -3
  62. package/dist/dashboard/{inspect-agent-BKKc0XnB.js.map → inspect-agent-CKF5-SJr.js.map} +1 -1
  63. package/dist/dashboard/inspect-agent-CqpEWGWy.js +2 -0
  64. package/dist/dashboard/{issue-lifecycle-DnhQgddB.js → issue-lifecycle-5LbOcATP.js} +7 -7
  65. package/dist/dashboard/{issue-lifecycle-DnhQgddB.js.map → issue-lifecycle-5LbOcATP.js.map} +1 -1
  66. package/dist/dashboard/{issue-lifecycle-nY4esZn8.js → issue-lifecycle-CjYqQ669.js} +1 -1
  67. package/dist/dashboard/{issue-service-singleton-Bnqv1uaa.js → issue-service-singleton-B8iu_TKV.js} +1 -1
  68. package/dist/dashboard/{issue-service-singleton-_AquSBTl.js → issue-service-singleton-CDGt__oQ.js} +2 -2
  69. package/dist/dashboard/{issue-service-singleton-_AquSBTl.js.map → issue-service-singleton-CDGt__oQ.js.map} +1 -1
  70. package/dist/dashboard/{lifecycle-CGKm7doE.js → lifecycle-CEg4sHZH.js} +4 -4
  71. package/dist/dashboard/{lifecycle-CGKm7doE.js.map → lifecycle-CEg4sHZH.js.map} +1 -1
  72. package/dist/dashboard/{merge-agent-Dh8Y9PDO.js → merge-agent-7nBiCytp.js} +1 -1
  73. package/dist/dashboard/{merge-agent-BcgAYStl.js → merge-agent-C81xPIGd.js} +6 -6
  74. package/dist/dashboard/{merge-agent-BcgAYStl.js.map → merge-agent-C81xPIGd.js.map} +1 -1
  75. package/dist/dashboard/merge-ops-DE_6CnmZ.js +2 -0
  76. package/dist/dashboard/{merge-train-DmxlYbEo.js → merge-train-D3qzRccL.js} +2 -2
  77. package/dist/dashboard/{merge-train-DmxlYbEo.js.map → merge-train-D3qzRccL.js.map} +1 -1
  78. package/dist/dashboard/{merge-train-deps-DBHsOWt9.js → merge-train-deps-Be5ElC_P.js} +2 -2
  79. package/dist/dashboard/{merge-train-deps-DBHsOWt9.js.map → merge-train-deps-Be5ElC_P.js.map} +1 -1
  80. package/dist/dashboard/{orphan-proposed-reconciler-Db8tUhce.js → orphan-proposed-reconciler-Boq_XaRe.js} +3 -3
  81. package/dist/dashboard/{orphan-proposed-reconciler-Db8tUhce.js.map → orphan-proposed-reconciler-Boq_XaRe.js.map} +1 -1
  82. package/dist/dashboard/{orphan-proposed-reconciler-mXV--tcB.js → orphan-proposed-reconciler-C0sPnDq_.js} +1 -1
  83. package/dist/dashboard/{reconstruct-cache-_tDZ2D72.js → reconstruct-cache-C2pCltOq.js} +3 -3
  84. package/dist/dashboard/{reconstruct-cache-_tDZ2D72.js.map → reconstruct-cache-C2pCltOq.js.map} +1 -1
  85. package/dist/dashboard/{remote-completion-Bklh6loJ.js → remote-completion-BmxD5UMQ.js} +3 -3
  86. package/dist/dashboard/{remote-completion-Bklh6loJ.js.map → remote-completion-BmxD5UMQ.js.map} +1 -1
  87. package/dist/dashboard/resume-C-nxu9Y4.js +3 -0
  88. package/dist/dashboard/{review-agent-phzqNqIs.js → review-agent-D6P6d3pz.js} +26 -17
  89. package/dist/dashboard/review-agent-D6P6d3pz.js.map +1 -0
  90. package/dist/dashboard/review-agent-DTINEffB.js +3 -0
  91. package/dist/dashboard/{review-context-CCq56O_Y.js → review-context-Dyo0tsBa.js} +2 -2
  92. package/dist/dashboard/{review-context-CCq56O_Y.js.map → review-context-Dyo0tsBa.js.map} +1 -1
  93. package/dist/dashboard/{review-status-BQjqQXZG.js → review-status-B5ZASOo4.js} +18 -5
  94. package/dist/dashboard/review-status-B5ZASOo4.js.map +1 -0
  95. package/dist/dashboard/{review-status-bBkqUj5i.js → review-status-h7BXIA4z.js} +1 -1
  96. package/dist/dashboard/{review-verdict-feedback-wqnikhMK.js → review-verdict-feedback-B70VbfRL.js} +4 -4
  97. package/dist/dashboard/{review-verdict-feedback-wqnikhMK.js.map → review-verdict-feedback-B70VbfRL.js.map} +1 -1
  98. package/dist/dashboard/{review-verdict-feedback-cZh9Wi9G.js → review-verdict-feedback-CorgH49f.js} +1 -1
  99. package/dist/dashboard/{sequence-io-B2GmilSI.js → sequence-io-6YP8fVpH.js} +2 -2
  100. package/dist/dashboard/{sequence-io-B2GmilSI.js.map → sequence-io-6YP8fVpH.js.map} +1 -1
  101. package/dist/dashboard/{sequencer-agent-D8pW2aU_.js → sequencer-agent-ja-nkEc1.js} +5 -5
  102. package/dist/dashboard/{sequencer-agent-D8pW2aU_.js.map → sequencer-agent-ja-nkEc1.js.map} +1 -1
  103. package/dist/dashboard/server.js +66 -55
  104. package/dist/dashboard/server.js.map +1 -1
  105. package/dist/dashboard/{service-CILd-uOt.js → service-HKDrIy0h.js} +24 -24
  106. package/dist/dashboard/{service-CILd-uOt.js.map → service-HKDrIy0h.js.map} +1 -1
  107. package/dist/dashboard/{smart-compaction-Bgp_gwcA.js → smart-compaction-L0LSnF0_.js} +1 -1
  108. package/dist/dashboard/{smart-compaction-CrP90OFE.js → smart-compaction-uke1npUz.js} +2 -2
  109. package/dist/dashboard/{smart-compaction-CrP90OFE.js.map → smart-compaction-uke1npUz.js.map} +1 -1
  110. package/dist/dashboard/{spawn-planning-session-D15KbPOy.js → spawn-planning-session-CSMWco8B.js} +1 -1
  111. package/dist/dashboard/{spawn-planning-session-BmJWHSCu.js → spawn-planning-session-CXc0NkwV.js} +3 -3
  112. package/dist/dashboard/{spawn-planning-session-BmJWHSCu.js.map → spawn-planning-session-CXc0NkwV.js.map} +1 -1
  113. package/dist/dashboard/{specialist-context-CwKkcXL9.js → specialist-context-BGCJ24LH.js} +3 -3
  114. package/dist/dashboard/{specialist-context-CwKkcXL9.js.map → specialist-context-BGCJ24LH.js.map} +1 -1
  115. package/dist/dashboard/{specialist-logs-CvDxquV_.js → specialist-logs--Uz-r8ia.js} +2 -2
  116. package/dist/dashboard/{specialist-logs-CvDxquV_.js.map → specialist-logs--Uz-r8ia.js.map} +1 -1
  117. package/dist/dashboard/{specialists-BCjcG4uE.js → specialists-Ca9XSBCS.js} +1 -1
  118. package/dist/dashboard/{specialists-D07ybnam.js → specialists-DEfrAbWs.js} +36 -36
  119. package/dist/dashboard/{specialists-D07ybnam.js.map → specialists-DEfrAbWs.js.map} +1 -1
  120. package/dist/dashboard/{specialists-F2uMO4QS.js → specialists-DeZx9xom.js} +1 -1
  121. package/dist/dashboard/{specialists-BYi0k8CZ.js → specialists-nZ0mRwpZ.js} +12 -12
  122. package/dist/dashboard/{specialists-BYi0k8CZ.js.map → specialists-nZ0mRwpZ.js.map} +1 -1
  123. package/dist/dashboard/{summary-fork-DedqguZb.js → summary-fork-2a1L2DIU.js} +2 -2
  124. package/dist/dashboard/{summary-fork-EjvOkEPl.js → summary-fork-Xn0QUNmb.js} +3 -3
  125. package/dist/dashboard/{summary-fork-EjvOkEPl.js.map → summary-fork-Xn0QUNmb.js.map} +1 -1
  126. package/dist/dashboard/{teardown-workspace-5LCVbjfq.js → teardown-workspace-DhA6oAIK.js} +2 -2
  127. package/dist/dashboard/{teardown-workspace-5LCVbjfq.js.map → teardown-workspace-DhA6oAIK.js.map} +1 -1
  128. package/dist/dashboard/{test-agent-queue-qfsq6uaC.js → test-agent-queue-B_ukPyIK.js} +3 -3
  129. package/dist/dashboard/{test-agent-queue-qfsq6uaC.js.map → test-agent-queue-B_ukPyIK.js.map} +1 -1
  130. package/dist/dashboard/{uat-train-CtNGgXxj.js → uat-train-BLBAbJ8Y.js} +10 -10
  131. package/dist/dashboard/{uat-train-CtNGgXxj.js.map → uat-train-BLBAbJ8Y.js.map} +1 -1
  132. package/dist/dashboard/{uat-train-C3hWXtip.js → uat-train-DPfGR9_I.js} +1 -1
  133. package/dist/dashboard/{verification-runner-DuZRHjPU.js → verification-runner-KTGTNugM.js} +1 -1
  134. package/dist/dashboard/{verification-runner-BPAhPWR7.js → verification-runner-R2-4XgMO.js} +4 -4
  135. package/dist/dashboard/{verification-runner-BPAhPWR7.js.map → verification-runner-R2-4XgMO.js.map} +1 -1
  136. package/dist/dashboard/{workflows-H-COJ84X.js → workflows-CSKX5MhC.js} +7 -7
  137. package/dist/dashboard/{workflows-H-COJ84X.js.map → workflows-CSKX5MhC.js.map} +1 -1
  138. package/dist/dashboard/workflows-DVwXauef.js +2 -0
  139. package/dist/dashboard/{workspaces-CRU9_vRn.js → workspaces-DXLDgXo2.js} +32 -32
  140. package/dist/dashboard/{workspaces-CRU9_vRn.js.map → workspaces-DXLDgXo2.js.map} +1 -1
  141. package/dist/docs-index.sqlite +0 -0
  142. package/dist/{feedback-target-DTGAhFkM.js → feedback-target-BsKN4Tr_.js} +4 -4
  143. package/dist/{feedback-target-DTGAhFkM.js.map → feedback-target-BsKN4Tr_.js.map} +1 -1
  144. package/dist/{feedback-target-DutF088V.js → feedback-target-DM1WzOKy.js} +1 -1
  145. package/dist/{harness-resolve-Bz1prk6B.js → harness-resolve-B-YDNwNW.js} +2 -2
  146. package/dist/{harness-resolve-Bz1prk6B.js.map → harness-resolve-B-YDNwNW.js.map} +1 -1
  147. package/dist/{issue-lifecycle-fVqvCdKM.js → issue-lifecycle-Bc1l3U9f.js} +7 -7
  148. package/dist/{issue-lifecycle-fVqvCdKM.js.map → issue-lifecycle-Bc1l3U9f.js.map} +1 -1
  149. package/dist/{issue-service-singleton-CZm8p6Rj.js → issue-service-singleton-D-8Q6tdT.js} +1 -1
  150. package/dist/{issue-service-singleton-Cr73JAaR.js → issue-service-singleton-D1433I7n.js} +2 -2
  151. package/dist/{issue-service-singleton-Cr73JAaR.js.map → issue-service-singleton-D1433I7n.js.map} +1 -1
  152. package/dist/{lifecycle-CR6tZfl1.js → lifecycle-SmrqysDf.js} +7 -7
  153. package/dist/{lifecycle-CR6tZfl1.js.map → lifecycle-SmrqysDf.js.map} +1 -1
  154. package/dist/{lifecycle-D_EWiUjk.js → lifecycle-mRMyiIXs.js} +2 -2
  155. package/dist/{merge-agent-LM4avOtA.js → merge-agent-B9hIZ6Z0.js} +6 -6
  156. package/dist/{merge-agent-LM4avOtA.js.map → merge-agent-B9hIZ6Z0.js.map} +1 -1
  157. package/dist/{merge-agent-Bj046HE1.js → merge-agent-DUj22cXL.js} +1 -1
  158. package/dist/{merge-fulfillment-DrnC1Kmg.js → merge-fulfillment-__P4WE-T.js} +3 -3
  159. package/dist/{merge-fulfillment-DrnC1Kmg.js.map → merge-fulfillment-__P4WE-T.js.map} +1 -1
  160. package/dist/{reconstruct-cache-NPqoAUg-.js → reconstruct-cache-9SWp82SQ.js} +3 -3
  161. package/dist/{reconstruct-cache-NPqoAUg-.js.map → reconstruct-cache-9SWp82SQ.js.map} +1 -1
  162. package/dist/{records-BIkN1LQ4.js → records-CTmvuRzz.js} +14 -1
  163. package/dist/{records-BIkN1LQ4.js.map → records-CTmvuRzz.js.map} +1 -1
  164. package/dist/records-backfill-BQcmTmwF.js +2 -0
  165. package/dist/{records-backfill-HM0Pln6N.js → records-backfill-BrNsv_zT.js} +2 -2
  166. package/dist/{records-backfill-HM0Pln6N.js.map → records-backfill-BrNsv_zT.js.map} +1 -1
  167. package/dist/resume-Bn4kDk9x.js +3 -0
  168. package/dist/{review-agent-DFosQzCG.js → review-agent-PhqOhpx3.js} +24 -16
  169. package/dist/{review-agent-DFosQzCG.js.map → review-agent-PhqOhpx3.js.map} +1 -1
  170. package/dist/review-agent-hLbRRxZF.js +3 -0
  171. package/dist/{review-status-iJwfEoNX.js → review-status-B_XXomV0.js} +6 -6
  172. package/dist/{review-status-iJwfEoNX.js.map → review-status-B_XXomV0.js.map} +1 -1
  173. package/dist/{review-status-BbNVlXh1.js → review-status-Bo-EFVKh.js} +1 -1
  174. package/dist/{review-verdict-feedback-BGPw3z1X.js → review-verdict-feedback-CXHkoiKZ.js} +1 -1
  175. package/dist/{review-verdict-feedback-CCZ05atV.js → review-verdict-feedback-DGV13LDb.js} +4 -4
  176. package/dist/{review-verdict-feedback-CCZ05atV.js.map → review-verdict-feedback-DGV13LDb.js.map} +1 -1
  177. package/dist/{sequence-io-CcxZNHcD.js → sequence-io-Cg4NHAco.js} +1 -1
  178. package/dist/{sequence-io-Cx1usxG3.js → sequence-io-CyxvNHfA.js} +2 -2
  179. package/dist/{sequence-io-Cx1usxG3.js.map → sequence-io-CyxvNHfA.js.map} +1 -1
  180. package/dist/{smart-compaction-ByUEgQkF.js → smart-compaction-ByKXTQNy.js} +2 -2
  181. package/dist/{smart-compaction-ByUEgQkF.js.map → smart-compaction-ByKXTQNy.js.map} +1 -1
  182. package/dist/{smart-compaction-DfLe_CtH.js → smart-compaction-U6e_uB1E.js} +1 -1
  183. package/dist/{specialist-context-McuGkaeR.js → specialist-context-BUTadO-U.js} +3 -3
  184. package/dist/{specialist-context-McuGkaeR.js.map → specialist-context-BUTadO-U.js.map} +1 -1
  185. package/dist/{specialist-logs-CUUJ4eiB.js → specialist-logs-pEMCTtGZ.js} +2 -2
  186. package/dist/{specialist-logs-CUUJ4eiB.js.map → specialist-logs-pEMCTtGZ.js.map} +1 -1
  187. package/dist/{specialists-BSrylD1S.js → specialists-BGFnrQ8n.js} +1 -1
  188. package/dist/{specialists-B0elgInc.js → specialists-DeTkkp8b.js} +12 -12
  189. package/dist/{specialists-B0elgInc.js.map → specialists-DeTkkp8b.js.map} +1 -1
  190. package/dist/{summary-fork-DskMRnyb.js → summary-fork-CgzThE2-.js} +2 -2
  191. package/dist/{summary-fork-CPUTKcAT.js → summary-fork-Dx1RMuvU.js} +3 -3
  192. package/dist/{summary-fork-CPUTKcAT.js.map → summary-fork-Dx1RMuvU.js.map} +1 -1
  193. package/dist/{sync-BiNVQHBf.js → sync-Bsww9tuj.js} +2 -2
  194. package/dist/{sync-BiNVQHBf.js.map → sync-Bsww9tuj.js.map} +1 -1
  195. package/dist/sync-CylE_SjB.js +2 -0
  196. package/dist/{verdict-restore-DQiV7_fe.js → verdict-restore-DGpX0ZOJ.js} +5 -5
  197. package/dist/{verdict-restore-DQiV7_fe.js.map → verdict-restore-DGpX0ZOJ.js.map} +1 -1
  198. package/dist/{webhook-handlers-DHBSEDEm.js → webhook-handlers-BjsfIL7u.js} +3 -3
  199. package/dist/{webhook-handlers-DHBSEDEm.js.map → webhook-handlers-BjsfIL7u.js.map} +1 -1
  200. package/dist/{workspace-migrate-duUsWNpd.js → workspace-migrate-BBQ8nAnP.js} +2 -2
  201. package/dist/{workspace-migrate-duUsWNpd.js.map → workspace-migrate-BBQ8nAnP.js.map} +1 -1
  202. package/dist/{workspace-reap-DLCIoJmn.js → workspace-reap-12O9354k.js} +2 -2
  203. package/dist/{workspace-reap-DLCIoJmn.js.map → workspace-reap-12O9354k.js.map} +1 -1
  204. package/package.json +1 -1
  205. package/scripts/file-size-baseline.txt +1 -1
  206. package/dist/cli-DBWG12XK.js +0 -3
  207. package/dist/dashboard/cli-CJDWXE_Y.js +0 -3
  208. package/dist/dashboard/deacon-swarm-D1iAUX-P.js +0 -2
  209. package/dist/dashboard/inspect-agent-vm88mLYr.js +0 -2
  210. package/dist/dashboard/merge-ops-QdBiQ8XB.js +0 -2
  211. package/dist/dashboard/resume-DnIsmIgC.js +0 -3
  212. package/dist/dashboard/review-agent-DgySDb-G.js +0 -3
  213. package/dist/dashboard/review-agent-phzqNqIs.js.map +0 -1
  214. package/dist/dashboard/review-status-BQjqQXZG.js.map +0 -1
  215. package/dist/dashboard/workflows-Cz8OtiB4.js +0 -2
  216. package/dist/records-backfill-DEgtRyKL.js +0 -2
  217. package/dist/resume-DGymuXZM.js +0 -3
  218. package/dist/review-agent-DjVadURa.js +0 -3
  219. package/dist/sync-4jqukkxz.js +0 -2
@@ -1,9 +1,9 @@
1
1
  import { i as __toCommonJS, t as __esmMin } from "./chunk-ruWRV7i3.js";
2
- import { I as spawnRun, Mt as determineModel, t as init_agents } from "./agents-CQHK0CSA.js";
3
- import { a as init_review_status, i as getReviewStatusSync } from "./review-status-iJwfEoNX.js";
2
+ import { I as spawnRun, Mt as determineModel, t as init_agents } from "./agents-CgVr77Qq.js";
3
+ import { a as init_review_status, i as getReviewStatusSync } from "./review-status-B_XXomV0.js";
4
4
  import { r as isNoResumeValueEnabled, t as init_no_resume_mode } from "./no-resume-mode-DqYtgE7g.js";
5
- import { n as init_issue_service_singleton, r as issue_service_singleton_exports } from "./issue-service-singleton-Cr73JAaR.js";
6
- import { n as parseSequenceMd, t as init_sequence_io } from "./sequence-io-Cx1usxG3.js";
5
+ import { n as init_issue_service_singleton, r as issue_service_singleton_exports } from "./issue-service-singleton-D1433I7n.js";
6
+ import { n as parseSequenceMd, t as init_sequence_io } from "./sequence-io-CyxvNHfA.js";
7
7
  import "effect";
8
8
  import { existsSync, readFileSync, readdirSync } from "node:fs";
9
9
  import { dirname, join } from "node:path";
@@ -342,4 +342,4 @@ __esmMin((() => {
342
342
  }))();
343
343
  export { triggerDebouncedIncrementalPass };
344
344
 
345
- //# sourceMappingURL=backlog-auto-trigger-CyuoS0nl.js.map
345
+ //# sourceMappingURL=backlog-auto-trigger-B_-1tk4e.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"backlog-auto-trigger-CyuoS0nl.js","names":[],"sources":["../src/lib/backlog/backlog-input.ts","../src/lib/backlog/sequencer-agent.ts","../src/lib/backlog/backlog-auto-trigger.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { existsSync, readFileSync, readdirSync } from 'node:fs';\nimport type { Issue, IssueState, TrackerType } from '../tracker/interface.js';\nimport { getReviewStatusSync } from '../review-status.js';\nimport { parseSequenceMd } from './sequence-io.js';\nimport type { SequenceDoc } from './types.js';\n\nexport type BacklogManifestEntry = {\n id: string;\n title: string;\n labels: string[];\n priority: number | undefined;\n ageMs: number;\n inPipeline: boolean;\n hasPrd: boolean;\n ready: boolean;\n updatedAt: string;\n /** Epic container (`[EPIC]` title prefix or `epic` label) — not directly workable. */\n isEpic: boolean;\n /** Epic this issue declares membership in via \"Part of #N\" in its body, if any. */\n partOf?: string;\n};\n\nexport type BatchedBodyAccessor = {\n count: number;\n getBatch(batchIndex: number, batchSize: number): Array<{ id: string; body: string }>;\n};\n\nexport type CollectOpenBacklogResult = {\n manifest: BacklogManifestEntry[];\n bodies: BatchedBodyAccessor;\n priorSequence: SequenceDoc | null;\n};\n\nconst SEQUENCE_MD_PATH = '.pan/backlog/sequence.md';\nconst CLOSED_STATES = new Set(['closed', 'cancelled']);\n\n/**\n * Map a dashboard canonical status (or a raw tracker status) onto the\n * tracker-library {@link IssueState} union that {@link collectOpenBacklog}\n * expects. Dashboard read-model issues carry `canonicalStatus`/`state` values\n * like `done`/`canceled`/`verifying_on_main`; the backlog library only knows\n * `open`/`in_progress`/`in_review`/`closed`.\n */\nfunction canonicalToIssueState(raw: string): IssueState {\n const c = raw.toLowerCase();\n if (['done', 'closed', 'completed', 'canceled', 'cancelled', 'duplicate', 'wontfix'].includes(c)) return 'closed';\n if (['in_review', 'in review', 'review', 'qa', 'testing'].includes(c)) return 'in_review';\n if (['in_progress', 'in progress', 'started', 'active', 'verifying', 'verifying_on_main', 'verifying on main'].includes(c)) return 'in_progress';\n return 'open'; // backlog, todo, ready, triage, unknown, ''\n}\n\n/**\n * Adapt the dashboard read-model issue objects returned by\n * `getSharedIssueService().getIssues()` into tracker-library {@link Issue}\n * objects. The two shapes diverge: the dashboard keys the human ref as\n * `identifier` (e.g. \"PAN-302\") with no `ref` field, and its `state` is a\n * canonical dashboard status, not an {@link IssueState}. Feeding the raw\n * dashboard objects straight into {@link collectOpenBacklog} made\n * `getReviewStatusSync(issue.ref)` receive `undefined` and crash on\n * `undefined.toUpperCase()` — so every sequencer pass died before spawning.\n *\n * Issues without a usable human ref are dropped (they cannot be ranked).\n */\nexport function normalizeBacklogIssues(\n raw: ReadonlyArray<Record<string, unknown>>,\n): Issue[] {\n const out: Issue[] = [];\n for (const r of raw) {\n const ref = String(r['identifier'] ?? r['ref'] ?? '').trim();\n if (!ref) continue;\n const stateRaw = String(r['canonicalStatus'] ?? r['state'] ?? r['status'] ?? '');\n out.push({\n id: String(r['id'] ?? ref),\n ref,\n title: String(r['title'] ?? ''),\n description: String(r['description'] ?? ''),\n state: canonicalToIssueState(stateRaw),\n labels: Array.isArray(r['labels']) ? (r['labels'] as string[]) : [],\n url: String(r['url'] ?? ''),\n tracker: (typeof r['source'] === 'string' ? r['source'] : 'github') as TrackerType,\n priority: typeof r['priority'] === 'number' ? r['priority'] : undefined,\n createdAt: String(r['createdAt'] ?? ''),\n updatedAt: String(r['updatedAt'] ?? ''),\n });\n }\n return out;\n}\n\nconst EPIC_TITLE_RE = /^\\s*\\[EPIC\\]/i;\n\n/** An issue is an epic if its title is prefixed `[EPIC]` or it carries the `epic` label. */\nexport function detectIsEpic(title: string, labels: readonly string[]): boolean {\n return EPIC_TITLE_RE.test(title) || labels.some((l) => l.toLowerCase() === 'epic');\n}\n\n/**\n * Parse an explicit epic-membership declaration (\"Part of #N\") from an issue body.\n * Returns the epic's ref using the child's own prefix (PAN-2076 body \"Part of #2075\"\n * → \"PAN-2075\"), or undefined if none is declared or it points at the issue itself.\n */\nexport function detectPartOf(childRef: string, body: string): string | undefined {\n const m = /\\bpart of\\s+#(\\d+)\\b/i.exec(body);\n if (!m) return undefined;\n const prefix = childRef.split('-')[0];\n if (!prefix) return undefined;\n const epicRef = `${prefix}-${m[1]}`;\n return epicRef === childRef.toUpperCase() ? undefined : epicRef;\n}\n\nexport async function collectOpenBacklog(\n projectRoot: string,\n issues: Issue[],\n opts?: {\n hasPrdFn?: (issueId: string) => boolean;\n hasSpecFn?: (issueId: string) => boolean;\n },\n): Promise<CollectOpenBacklogResult> {\n const now = Date.now();\n\n const openIssues = issues.filter((issue) => !CLOSED_STATES.has(issue.state));\n\n // Build per-issue lookup sets once (filesystem scans are cheap when batched).\n const specsDir = join(projectRoot, '.pan', 'specs');\n const workspacesDir = join(projectRoot, 'workspaces');\n const issuesWithSpecs = new Set<string>();\n const issuesWithBeads = new Set<string>();\n if (!opts?.hasSpecFn) {\n if (existsSync(specsDir)) {\n for (const f of readdirSync(specsDir)) {\n const match = /^[\\d-]+-([A-Z]+-\\d+)-/i.exec(f);\n if (match) issuesWithSpecs.add(match[1]!.toUpperCase());\n }\n }\n if (existsSync(workspacesDir)) {\n for (const dir of readdirSync(workspacesDir)) {\n const match = /^feature-([a-z]+-\\d+)$/i.exec(dir);\n if (match) {\n if (existsSync(join(workspacesDir, dir, '.beads', 'issues.jsonl'))) {\n issuesWithBeads.add(match[1]!.toUpperCase());\n }\n }\n }\n }\n }\n\n const manifest: BacklogManifestEntry[] = openIssues.map((issue) => {\n const reviewStatus = getReviewStatusSync(issue.ref);\n const inPipeline =\n (reviewStatus !== null && reviewStatus.reviewStatus !== 'pending') ||\n existsSync(join(workspacesDir, `feature-${issue.ref.toLowerCase()}`));\n\n const hasPrd = opts?.hasPrdFn\n ? opts.hasPrdFn(issue.ref)\n : existsSync(join(projectRoot, '.pan', 'drafts', `${issue.ref.toUpperCase()}.md`));\n\n const ready = opts?.hasSpecFn\n ? opts.hasSpecFn(issue.ref)\n : (issuesWithSpecs.has(issue.ref.toUpperCase()) &&\n issuesWithBeads.has(issue.ref.toUpperCase()));\n\n const createdMs = issue.createdAt ? new Date(issue.createdAt).getTime() : now;\n\n return {\n id: issue.ref,\n title: issue.title,\n labels: issue.labels,\n priority: issue.priority,\n ageMs: now - createdMs,\n inPipeline,\n hasPrd,\n ready,\n updatedAt: issue.updatedAt,\n isEpic: detectIsEpic(issue.title, issue.labels),\n partOf: detectPartOf(issue.ref, issue.description),\n };\n });\n\n const bodies: BatchedBodyAccessor = {\n count: openIssues.length,\n getBatch(batchIndex: number, batchSize: number) {\n const start = batchIndex * batchSize;\n const batch = openIssues.slice(start, start + batchSize);\n return batch.map((issue) => ({ id: issue.ref, body: issue.description }));\n },\n };\n\n const sequencePath = join(projectRoot, SEQUENCE_MD_PATH);\n let priorSequence: SequenceDoc | null = null;\n if (existsSync(sequencePath)) {\n const md = readFileSync(sequencePath, 'utf-8');\n const result = parseSequenceMd(md);\n if (result.ok) {\n priorSequence = result.doc;\n }\n }\n\n return { manifest, bodies, priorSequence };\n}\n","import { existsSync, statSync } from 'node:fs';\nimport { mkdir, writeFile } from 'node:fs/promises';\nimport { join, dirname } from 'node:path';\nimport type { AgentState } from '../agents.js';\nimport { Effect } from 'effect';\nimport {\n spawnRun,\n determineModel,\n listRunningAgentsSync,\n getAgentStateSync,\n getAgentRuntimeStateSync,\n stopAgent,\n} from '../agents.js';\nimport { collectOpenBacklog, normalizeBacklogIssues } from './backlog-input.js';\nimport type { PassMode } from './types.js';\nimport type { CollectOpenBacklogResult } from './backlog-input.js';\n\nexport const SEQUENCER_AGENT_ID = 'sequencer-runner';\n\nexport type SequencerRunStatus = {\n alive: boolean;\n running: boolean;\n done: boolean;\n startedAt: string | null;\n doneReason: 'fresh-sequence' | 'idle' | null;\n};\n\nexport type SpawnSequencerOptions = {\n projectRoot?: string;\n projectKey?: string;\n model?: string;\n workspace?: string;\n batchSize?: number;\n /**\n * Raw dashboard read-model issues (from `getSharedIssueService().getIssues()`).\n * Normalized to tracker `Issue` objects via {@link normalizeBacklogIssues}\n * before ranking — callers must NOT pre-cast to `Issue[]` (the shapes differ).\n */\n issues?: ReadonlyArray<Record<string, unknown>>;\n};\n\nexport function getSequencerRunStatus(projectRoot: string): SequencerRunStatus {\n const alive = listRunningAgentsSync().some((a) => a.id === SEQUENCER_AGENT_ID && a.tmuxActive);\n const startedAt = alive ? (getAgentStateSync(SEQUENCER_AGENT_ID)?.startedAt ?? null) : null;\n const seqPath = join(projectRoot, '.pan', 'backlog', 'sequence.md');\n\n let freshSequence = false;\n if (alive && startedAt && existsSync(seqPath)) {\n try {\n freshSequence = statSync(seqPath).mtimeMs >= new Date(startedAt).getTime();\n } catch {\n /* stat failed */\n }\n }\n\n const runtimeState = alive ? getAgentRuntimeStateSync(SEQUENCER_AGENT_ID)?.state ?? null : null;\n const idle = runtimeState === 'idle' || runtimeState === 'stopped' || runtimeState === 'suspended';\n const doneReason = freshSequence ? 'fresh-sequence' : idle ? 'idle' : null;\n const done = alive && doneReason !== null;\n\n return {\n alive,\n running: alive && !done,\n done,\n startedAt,\n doneReason,\n };\n}\n\nexport async function clearFinishedSequencerRun(\n projectRoot: string,\n stop: () => Promise<void> = () => Effect.runPromise(stopAgent(SEQUENCER_AGENT_ID)),\n): Promise<SequencerRunStatus> {\n const status = getSequencerRunStatus(projectRoot);\n if (status.done) {\n await stop();\n }\n return status;\n}\n\nexport async function spawnSequencerAgent(\n pass: PassMode | 'auto',\n opts: SpawnSequencerOptions = {},\n): Promise<AgentState> {\n const projectRoot = opts.projectRoot ?? process.cwd();\n const projectKey = opts.projectKey ?? 'overdeck';\n const batchSize = opts.batchSize ?? 20;\n\n const seqPath = join(projectRoot, '.pan', 'backlog', 'sequence.md');\n const resolvedPass: PassMode =\n pass !== 'auto' ? pass : existsSync(seqPath) ? 'incremental' : 'creation';\n\n let rawIssues = opts.issues;\n if (!rawIssues) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const { getSharedIssueService } = require('../../dashboard/server/services/issue-service-singleton.js') as\n typeof import('../../dashboard/server/services/issue-service-singleton.js');\n rawIssues = getSharedIssueService().getIssues() as Array<Record<string, unknown>>;\n } catch {\n rawIssues = [];\n }\n }\n // Dashboard read-model issues key the human ref as `identifier` (not `ref`)\n // and carry canonical statuses; normalize to tracker `Issue` objects so the\n // backlog ranking pipeline can read `issue.ref`/`issue.state` (PAN-1866 fix).\n const allIssues = normalizeBacklogIssues(rawIssues);\n // Scope to Panopticon/overdeck issues only for now. The sequencer is a single\n // global runner; ranking every connected project's open issues (MIN/KRUX/TIN/…)\n // bloats the manifest and isn't meaningful for an overdeck-only sequence.\n // PAN-1999 generalizes this to one sequencer per project — drop the filter then.\n const issues = allIssues.filter((issue) => issue.ref.toUpperCase().startsWith('PAN-'));\n const input = await collectOpenBacklog(projectRoot, issues);\n\n // Write the manifest to a file and reference it from the prompt instead of\n // inlining hundreds of KB of JSON. Inlining produced a single multi-hundred-KB\n // chat message that froze the dashboard conversation panel and blew past\n // small-context models (PAN-1866). The agent reads the file with the Read tool.\n const manifestPath = join(projectRoot, '.pan', 'backlog', 'manifest.json');\n await mkdir(dirname(manifestPath), { recursive: true });\n await writeFile(manifestPath, JSON.stringify(input.manifest, null, 2), 'utf-8');\n\n const model = determineModel({ role: 'sequencer', model: opts.model, spawnKey: 'sequencer:global' });\n const prompt = buildSequencerPrompt(resolvedPass, { projectRoot, projectKey, input, batchSize });\n\n return spawnRun(SEQUENCER_AGENT_ID, 'sequencer', {\n agentId: SEQUENCER_AGENT_ID,\n workspace: opts.workspace ?? projectRoot,\n prompt,\n model,\n allowHost: true,\n registerConversation: true,\n });\n}\n\nexport type SequencerPromptInput = {\n projectRoot: string;\n projectKey: string;\n input: CollectOpenBacklogResult;\n batchSize?: number;\n};\n\nexport function buildSequencerPrompt(pass: PassMode, opts: SequencerPromptInput): string {\n const { projectRoot, projectKey, input, batchSize = 20 } = opts;\n const { manifest, bodies, priorSequence } = input;\n const hasPrior = priorSequence !== null;\n const priorSequencePath = `${projectRoot}/.pan/backlog/sequence.md`;\n\n const passInstructions = {\n creation: `\nThis is a CREATION pass — there is no prior sequence.md. You must rank the entire open backlog from scratch.\n\n1. Read all issue bodies in batches of ${batchSize}. NEVER request all bodies at once — do NOT inline the entire backlog in a single prompt or tool call. Read batch 0, update your running shortlist, then batch 1, and so on.\n2. Assign rank, size, importance, score, condition, gate, and planning to every issue.\n3. Derive the dependency DAG from GitHub cross-references and your analysis.\n4. Write the result via \\`pan backlog write-sequence\\` (see Output section below — do NOT write the file directly).\n`,\n incremental: `\nThis is an INCREMENTAL pass — a prior sequence.md exists at ${hasPrior ? priorSequencePath : '(not found)'}. Preserve existing ranks, scores, conditions, operator-owned fields, and operator-sourced edges VERBATIM unless a delta justifies a change.\n\nRules:\n- An issue changed since the prior run if its manifest \\`updatedAt\\` is LATER than the prior sequence \\`generatedAt\\` (${hasPrior ? priorSequence!.generatedAt : 'N/A'}). Read bodies ONLY for those issues. Batch these (${batchSize} at a time).\n- A delta justifies a rank change when: body changed materially, new cross-references appeared, a dependency was closed/merged, or condition changed.\n- For each changed issue: set a rationale field (one sentence) explaining why the rank changed.\n- Re-derive github-ref edges. Recompute ai-inferred edges as advisory. Preserve operator edges verbatim.\n- Preserve operator-owned gate and planning fields verbatim.\n`,\n review: `\nThis is a REVIEW pass — re-rank the full backlog on demand. A prior sequence.md is available at ${hasPrior ? priorSequencePath : '(not found)'} for reference.\n\n1. Re-read all issue bodies in batches of ${batchSize}. NEVER inline the entire backlog in one prompt. Do NOT concatenate all bodies — read them batch by batch against your running shortlist.\n2. Re-derive all ai-inferred and github-ref edges.\n3. Preserve operator edges verbatim.\n4. Never re-rank in-pipeline issues (inPipeline=true); pin them at rank 1 or their prior rank. Leave gate=auto — do NOT set gate=ready (the gate is operator-only; in-pipeline is detected automatically).\n`,\n };\n\n const commonRules = `\n## Ranking rules (all passes)\n\n- Rank by IMPACT toward shipping, not raw priority signal. GitHub priority and issue age are inputs, not determinants.\n- Substrate-hardening first: an issue labeled \\`substrate-improvement\\`, \\`architecture\\`, or \\`v1.0-required\\` is at least \\`high\\` importance (\\`critical\\` if it unblocks the pipeline or other substrate work) and ranks ahead of routine feature work of equal impact — a stable substrate is the prerequisite for everything else (vision.mdx). When a substrate epic ranks high, lift its CHILDREN's ranks together (the children are what get picked). Do not rank such an issue \\`low\\` just because it reads as cleanup.\n- NEVER re-rank in-pipeline issues (inPipeline: true in the manifest). Pin them at their rank; leave gate=auto (do NOT set gate=ready — gate is operator-only).\n- Assign condition to every issue: ok / needs-refinement / stale.\n- Every node's why field must be ≤ 140 characters (displayed in the ranked table).\n- Write full-paragraph rationale only for the active top tier (~top 80 nodes).\n- Preserve operator-owned gate and planning fields verbatim across all passes.\n- Keep operator-sourced edges verbatim. Re-derive github-ref edges. Recompute ai-inferred edges as advisory with a confidence value 0.0–1.0.\n- Stamp pass=\"${pass}\" and generatedAt=<current ISO timestamp> in the output JSON.\n\n## Epics & parent-child\n\n- An EPIC is a container of child issues, not directly workable. The manifest flags epics with \\`isEpic: true\\` (derived from an \\`[EPIC]\\` title prefix or an \\`epic\\` label). On an epic's node set \\`isEpic: true\\`, and rank/score it by the aggregate impact of its CHILDREN — never as standalone work. Never mark an epic ready/promoted; it must not be picked up.\n- Express membership with a \\`contains\\` edge from the epic to each child: \\`{ from: <epic>, to: <child>, type: \"contains\", source: \"github-ref\", confidence: 1 }\\`. Membership sources: a child's manifest \\`partOf\\` field (\"Part of #N\" in its body) AND the epic body's task-list of child issue numbers (read the epic body to confirm). Emit one \\`contains\\` edge per child.\n- \\`contains\\` edges are membership, NOT ordering. Keep the children's intended BUILD ORDER in their \\`dependsOn\\` (and \\`unblocks\\` edges) as usual — an epic body often states the order explicitly.\n\n## Reading issue bodies\n\nFetch issue bodies in batches of ${batchSize} using the GitHub CLI:\n gh issue view <NUMBER> --json number,title,body\n\nDerive NUMBER from the manifest id (e.g. PAN-42 → 42). Do NOT fetch all bodies at once; read one batch, update your running shortlist, then the next.\n\n## Output\n\nAfter completing your analysis, write the SequenceDoc JSON to a temp file and submit it via:\n\n pan backlog write-sequence /tmp/sequence-result.json\n\nThe \\`pan backlog write-sequence\\` command validates the JSON, writes the formatted\n\\`.pan/backlog/sequence.md\\`, and queues an auto-commit — so DO NOT write the file\ndirectly with the Write tool. Always go through this command.\n\nThe SequenceDoc JSON must conform to the schema:\n { version (number, e.g. 1), project, generatedAt (ISO), model, pass, openCount, nodes[], edges[] }\n\nwhere each node has: issue, rank, size (XS/S/M/L/XL), importance (critical/high/medium/low),\nscore (0-100), condition (ok/needs-refinement/stale), dependsOn (string[]), why (≤140 chars),\nrationale (optional), gate (auto/ready/blocked), planning (skip/auto/interactive),\nisEpic (optional boolean — true for epic containers).\n\nEach edge has: from, to, type (unblocks/informs/contains), source (github-ref/operator/ai-inferred),\nconfidence (0.0–1.0). Use type=\"contains\" only for epic→child membership.\n\nDo not ask for operator input. If an issue is ambiguous, assign condition=needs-refinement and move on.\n`;\n\n const priorContext = hasPrior\n ? `\\n## Prior sequence\\n\\nProject: ${priorSequence!.project}, pass: ${priorSequence!.pass}, ${priorSequence!.nodes.length} nodes, generated: ${priorSequence!.generatedAt}\\n`\n : '\\n## Prior sequence\\n\\nNo prior sequence.md found — this is the first run.\\n';\n\n return `# Sequencer run: ${pass.toUpperCase()} pass for ${projectKey}\n\nYou are the Overdeck Sequencer. Your job is to rank the open backlog for project \"${projectKey}\" and write .pan/backlog/sequence.md.\n\n## Pass\n${passInstructions[pass]}\n${priorContext}\n## Backlog manifest (${manifest.length} open issues, ${bodies.count} bodies available in ${Math.ceil(bodies.count / batchSize)} batches of ${batchSize})\n\nThe manifest is written to \\`.pan/backlog/manifest.json\\` (relative to the project root) — it is NOT inlined here. Read it FIRST (the Read tool, or \\`cat .pan/backlog/manifest.json\\`) to load every open issue's { id, title, labels, priority, ageMs, inPipeline, hasPrd, ready, updatedAt, isEpic, partOf }. Do NOT ask for it to be pasted into the prompt.\n${commonRules}`;\n}\n","import { isNoResumeValueEnabled } from '../cloister/no-resume-mode.js';\nimport { spawnSequencerAgent } from './sequencer-agent.js';\n\n/**\n * PAN-2396: --no-resume is the operator's full-quiescence escape hatch —\n * \"human-driven only\". When the boot carries OVERDECK_NO_RESUME, no\n * autonomous sequencer pass may spawn; only explicit operator actions\n * (the dashboard's start-sequencer button, `pan` commands) remain allowed.\n * Checked at FIRE time so an already-scheduled timer respects the gate too.\n */\nfunction autonomousSpawnSuppressed(mode: 'incremental' | 'review'): boolean {\n if (!isNoResumeValueEnabled(process.env.OVERDECK_NO_RESUME)) return false;\n console.warn(`[backlog-auto-trigger] suppressed ${mode} sequencer pass: boot is --no-resume (human-driven only)`);\n return true;\n}\n\nlet _incrementalTimer: ReturnType<typeof setTimeout> | null = null;\nlet _reviewTimer: ReturnType<typeof setInterval> | null = null;\n\nconst DEBOUNCE_MS = 30_000;\n\n/**\n * PAN-1866: Call on every backlog delta (issue opened/closed/edited).\n * Debounces: multiple changes within DEBOUNCE_MS collapse into a single\n * incremental sequencer pass.\n */\nexport function triggerDebouncedIncrementalPass(projectRoot: string): void {\n if (_incrementalTimer !== null) clearTimeout(_incrementalTimer);\n _incrementalTimer = setTimeout(() => {\n _incrementalTimer = null;\n if (autonomousSpawnSuppressed('incremental')) return;\n spawnSequencerAgent('incremental', { projectRoot }).catch((err: unknown) =>\n console.warn('[backlog-auto-trigger] incremental pass failed:', err),\n );\n }, DEBOUNCE_MS);\n}\n\n/**\n * PAN-1866: Start a periodic review-pass cadence. Safe to call multiple times\n * (clears the previous interval first). Pass 0 to disable.\n */\nexport function startPeriodicReviewPass(projectRoot: string, intervalMs: number): void {\n if (_reviewTimer !== null) {\n clearInterval(_reviewTimer);\n _reviewTimer = null;\n }\n if (intervalMs <= 0) return;\n _reviewTimer = setInterval(() => {\n if (autonomousSpawnSuppressed('review')) return;\n spawnSequencerAgent('review', { projectRoot }).catch((err: unknown) =>\n console.warn('[backlog-auto-trigger] periodic review pass failed:', err),\n );\n }, intervalMs);\n}\n\nexport function stopPeriodicReviewPass(): void {\n if (_reviewTimer !== null) {\n clearInterval(_reviewTimer);\n _reviewTimer = null;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4CA,SAAS,sBAAsB,KAAyB;CACtD,MAAM,IAAI,IAAI,aAAa;AAC3B,KAAI;EAAC;EAAQ;EAAU;EAAa;EAAY;EAAa;EAAa;EAAU,CAAC,SAAS,EAAE,CAAE,QAAO;AACzG,KAAI;EAAC;EAAa;EAAa;EAAU;EAAM;EAAU,CAAC,SAAS,EAAE,CAAE,QAAO;AAC9E,KAAI;EAAC;EAAe;EAAe;EAAW;EAAU;EAAa;EAAqB;EAAoB,CAAC,SAAS,EAAE,CAAE,QAAO;AACnI,QAAO;;;;;;;;;;;;;;AAeT,SAAgB,uBACd,KACS;CACT,MAAM,MAAe,EAAE;AACvB,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,sBAAqB;;;;;;;;;;;ACPlC,SAAS,0BAA0B,MAAyC;AAC1E,KAAI,CAAC,uBAAuB,QAAQ,IAAI,mBAAmB,CAAE,QAAO;AACpE,SAAQ,KAAK,qCAAqC,KAAK,0DAA0D;AACjH,QAAO;;;;;;;AAaT,SAAgB,gCAAgC,aAA2B;AACzE,KAAI,sBAAsB,KAAM,cAAa,kBAAkB;AAC/D,qBAAoB,iBAAiB;AACnC,sBAAoB;AACpB,MAAI,0BAA0B,cAAc,CAAE;AAC9C,sBAAoB,eAAe,EAAE,aAAa,CAAC,CAAC,OAAO,QACzD,QAAQ,KAAK,mDAAmD,IAAI,CACrE;IACA,YAAY;;;;;sBAlCsD;uBACZ;AAevD,qBAA0D;AAGxD,eAAc"}
1
+ {"version":3,"file":"backlog-auto-trigger-B_-1tk4e.js","names":[],"sources":["../src/lib/backlog/backlog-input.ts","../src/lib/backlog/sequencer-agent.ts","../src/lib/backlog/backlog-auto-trigger.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { existsSync, readFileSync, readdirSync } from 'node:fs';\nimport type { Issue, IssueState, TrackerType } from '../tracker/interface.js';\nimport { getReviewStatusSync } from '../review-status.js';\nimport { parseSequenceMd } from './sequence-io.js';\nimport type { SequenceDoc } from './types.js';\n\nexport type BacklogManifestEntry = {\n id: string;\n title: string;\n labels: string[];\n priority: number | undefined;\n ageMs: number;\n inPipeline: boolean;\n hasPrd: boolean;\n ready: boolean;\n updatedAt: string;\n /** Epic container (`[EPIC]` title prefix or `epic` label) — not directly workable. */\n isEpic: boolean;\n /** Epic this issue declares membership in via \"Part of #N\" in its body, if any. */\n partOf?: string;\n};\n\nexport type BatchedBodyAccessor = {\n count: number;\n getBatch(batchIndex: number, batchSize: number): Array<{ id: string; body: string }>;\n};\n\nexport type CollectOpenBacklogResult = {\n manifest: BacklogManifestEntry[];\n bodies: BatchedBodyAccessor;\n priorSequence: SequenceDoc | null;\n};\n\nconst SEQUENCE_MD_PATH = '.pan/backlog/sequence.md';\nconst CLOSED_STATES = new Set(['closed', 'cancelled']);\n\n/**\n * Map a dashboard canonical status (or a raw tracker status) onto the\n * tracker-library {@link IssueState} union that {@link collectOpenBacklog}\n * expects. Dashboard read-model issues carry `canonicalStatus`/`state` values\n * like `done`/`canceled`/`verifying_on_main`; the backlog library only knows\n * `open`/`in_progress`/`in_review`/`closed`.\n */\nfunction canonicalToIssueState(raw: string): IssueState {\n const c = raw.toLowerCase();\n if (['done', 'closed', 'completed', 'canceled', 'cancelled', 'duplicate', 'wontfix'].includes(c)) return 'closed';\n if (['in_review', 'in review', 'review', 'qa', 'testing'].includes(c)) return 'in_review';\n if (['in_progress', 'in progress', 'started', 'active', 'verifying', 'verifying_on_main', 'verifying on main'].includes(c)) return 'in_progress';\n return 'open'; // backlog, todo, ready, triage, unknown, ''\n}\n\n/**\n * Adapt the dashboard read-model issue objects returned by\n * `getSharedIssueService().getIssues()` into tracker-library {@link Issue}\n * objects. The two shapes diverge: the dashboard keys the human ref as\n * `identifier` (e.g. \"PAN-302\") with no `ref` field, and its `state` is a\n * canonical dashboard status, not an {@link IssueState}. Feeding the raw\n * dashboard objects straight into {@link collectOpenBacklog} made\n * `getReviewStatusSync(issue.ref)` receive `undefined` and crash on\n * `undefined.toUpperCase()` — so every sequencer pass died before spawning.\n *\n * Issues without a usable human ref are dropped (they cannot be ranked).\n */\nexport function normalizeBacklogIssues(\n raw: ReadonlyArray<Record<string, unknown>>,\n): Issue[] {\n const out: Issue[] = [];\n for (const r of raw) {\n const ref = String(r['identifier'] ?? r['ref'] ?? '').trim();\n if (!ref) continue;\n const stateRaw = String(r['canonicalStatus'] ?? r['state'] ?? r['status'] ?? '');\n out.push({\n id: String(r['id'] ?? ref),\n ref,\n title: String(r['title'] ?? ''),\n description: String(r['description'] ?? ''),\n state: canonicalToIssueState(stateRaw),\n labels: Array.isArray(r['labels']) ? (r['labels'] as string[]) : [],\n url: String(r['url'] ?? ''),\n tracker: (typeof r['source'] === 'string' ? r['source'] : 'github') as TrackerType,\n priority: typeof r['priority'] === 'number' ? r['priority'] : undefined,\n createdAt: String(r['createdAt'] ?? ''),\n updatedAt: String(r['updatedAt'] ?? ''),\n });\n }\n return out;\n}\n\nconst EPIC_TITLE_RE = /^\\s*\\[EPIC\\]/i;\n\n/** An issue is an epic if its title is prefixed `[EPIC]` or it carries the `epic` label. */\nexport function detectIsEpic(title: string, labels: readonly string[]): boolean {\n return EPIC_TITLE_RE.test(title) || labels.some((l) => l.toLowerCase() === 'epic');\n}\n\n/**\n * Parse an explicit epic-membership declaration (\"Part of #N\") from an issue body.\n * Returns the epic's ref using the child's own prefix (PAN-2076 body \"Part of #2075\"\n * → \"PAN-2075\"), or undefined if none is declared or it points at the issue itself.\n */\nexport function detectPartOf(childRef: string, body: string): string | undefined {\n const m = /\\bpart of\\s+#(\\d+)\\b/i.exec(body);\n if (!m) return undefined;\n const prefix = childRef.split('-')[0];\n if (!prefix) return undefined;\n const epicRef = `${prefix}-${m[1]}`;\n return epicRef === childRef.toUpperCase() ? undefined : epicRef;\n}\n\nexport async function collectOpenBacklog(\n projectRoot: string,\n issues: Issue[],\n opts?: {\n hasPrdFn?: (issueId: string) => boolean;\n hasSpecFn?: (issueId: string) => boolean;\n },\n): Promise<CollectOpenBacklogResult> {\n const now = Date.now();\n\n const openIssues = issues.filter((issue) => !CLOSED_STATES.has(issue.state));\n\n // Build per-issue lookup sets once (filesystem scans are cheap when batched).\n const specsDir = join(projectRoot, '.pan', 'specs');\n const workspacesDir = join(projectRoot, 'workspaces');\n const issuesWithSpecs = new Set<string>();\n const issuesWithBeads = new Set<string>();\n if (!opts?.hasSpecFn) {\n if (existsSync(specsDir)) {\n for (const f of readdirSync(specsDir)) {\n const match = /^[\\d-]+-([A-Z]+-\\d+)-/i.exec(f);\n if (match) issuesWithSpecs.add(match[1]!.toUpperCase());\n }\n }\n if (existsSync(workspacesDir)) {\n for (const dir of readdirSync(workspacesDir)) {\n const match = /^feature-([a-z]+-\\d+)$/i.exec(dir);\n if (match) {\n if (existsSync(join(workspacesDir, dir, '.beads', 'issues.jsonl'))) {\n issuesWithBeads.add(match[1]!.toUpperCase());\n }\n }\n }\n }\n }\n\n const manifest: BacklogManifestEntry[] = openIssues.map((issue) => {\n const reviewStatus = getReviewStatusSync(issue.ref);\n const inPipeline =\n (reviewStatus !== null && reviewStatus.reviewStatus !== 'pending') ||\n existsSync(join(workspacesDir, `feature-${issue.ref.toLowerCase()}`));\n\n const hasPrd = opts?.hasPrdFn\n ? opts.hasPrdFn(issue.ref)\n : existsSync(join(projectRoot, '.pan', 'drafts', `${issue.ref.toUpperCase()}.md`));\n\n const ready = opts?.hasSpecFn\n ? opts.hasSpecFn(issue.ref)\n : (issuesWithSpecs.has(issue.ref.toUpperCase()) &&\n issuesWithBeads.has(issue.ref.toUpperCase()));\n\n const createdMs = issue.createdAt ? new Date(issue.createdAt).getTime() : now;\n\n return {\n id: issue.ref,\n title: issue.title,\n labels: issue.labels,\n priority: issue.priority,\n ageMs: now - createdMs,\n inPipeline,\n hasPrd,\n ready,\n updatedAt: issue.updatedAt,\n isEpic: detectIsEpic(issue.title, issue.labels),\n partOf: detectPartOf(issue.ref, issue.description),\n };\n });\n\n const bodies: BatchedBodyAccessor = {\n count: openIssues.length,\n getBatch(batchIndex: number, batchSize: number) {\n const start = batchIndex * batchSize;\n const batch = openIssues.slice(start, start + batchSize);\n return batch.map((issue) => ({ id: issue.ref, body: issue.description }));\n },\n };\n\n const sequencePath = join(projectRoot, SEQUENCE_MD_PATH);\n let priorSequence: SequenceDoc | null = null;\n if (existsSync(sequencePath)) {\n const md = readFileSync(sequencePath, 'utf-8');\n const result = parseSequenceMd(md);\n if (result.ok) {\n priorSequence = result.doc;\n }\n }\n\n return { manifest, bodies, priorSequence };\n}\n","import { existsSync, statSync } from 'node:fs';\nimport { mkdir, writeFile } from 'node:fs/promises';\nimport { join, dirname } from 'node:path';\nimport type { AgentState } from '../agents.js';\nimport { Effect } from 'effect';\nimport {\n spawnRun,\n determineModel,\n listRunningAgentsSync,\n getAgentStateSync,\n getAgentRuntimeStateSync,\n stopAgent,\n} from '../agents.js';\nimport { collectOpenBacklog, normalizeBacklogIssues } from './backlog-input.js';\nimport type { PassMode } from './types.js';\nimport type { CollectOpenBacklogResult } from './backlog-input.js';\n\nexport const SEQUENCER_AGENT_ID = 'sequencer-runner';\n\nexport type SequencerRunStatus = {\n alive: boolean;\n running: boolean;\n done: boolean;\n startedAt: string | null;\n doneReason: 'fresh-sequence' | 'idle' | null;\n};\n\nexport type SpawnSequencerOptions = {\n projectRoot?: string;\n projectKey?: string;\n model?: string;\n workspace?: string;\n batchSize?: number;\n /**\n * Raw dashboard read-model issues (from `getSharedIssueService().getIssues()`).\n * Normalized to tracker `Issue` objects via {@link normalizeBacklogIssues}\n * before ranking — callers must NOT pre-cast to `Issue[]` (the shapes differ).\n */\n issues?: ReadonlyArray<Record<string, unknown>>;\n};\n\nexport function getSequencerRunStatus(projectRoot: string): SequencerRunStatus {\n const alive = listRunningAgentsSync().some((a) => a.id === SEQUENCER_AGENT_ID && a.tmuxActive);\n const startedAt = alive ? (getAgentStateSync(SEQUENCER_AGENT_ID)?.startedAt ?? null) : null;\n const seqPath = join(projectRoot, '.pan', 'backlog', 'sequence.md');\n\n let freshSequence = false;\n if (alive && startedAt && existsSync(seqPath)) {\n try {\n freshSequence = statSync(seqPath).mtimeMs >= new Date(startedAt).getTime();\n } catch {\n /* stat failed */\n }\n }\n\n const runtimeState = alive ? getAgentRuntimeStateSync(SEQUENCER_AGENT_ID)?.state ?? null : null;\n const idle = runtimeState === 'idle' || runtimeState === 'stopped' || runtimeState === 'suspended';\n const doneReason = freshSequence ? 'fresh-sequence' : idle ? 'idle' : null;\n const done = alive && doneReason !== null;\n\n return {\n alive,\n running: alive && !done,\n done,\n startedAt,\n doneReason,\n };\n}\n\nexport async function clearFinishedSequencerRun(\n projectRoot: string,\n stop: () => Promise<void> = () => Effect.runPromise(stopAgent(SEQUENCER_AGENT_ID)),\n): Promise<SequencerRunStatus> {\n const status = getSequencerRunStatus(projectRoot);\n if (status.done) {\n await stop();\n }\n return status;\n}\n\nexport async function spawnSequencerAgent(\n pass: PassMode | 'auto',\n opts: SpawnSequencerOptions = {},\n): Promise<AgentState> {\n const projectRoot = opts.projectRoot ?? process.cwd();\n const projectKey = opts.projectKey ?? 'overdeck';\n const batchSize = opts.batchSize ?? 20;\n\n const seqPath = join(projectRoot, '.pan', 'backlog', 'sequence.md');\n const resolvedPass: PassMode =\n pass !== 'auto' ? pass : existsSync(seqPath) ? 'incremental' : 'creation';\n\n let rawIssues = opts.issues;\n if (!rawIssues) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const { getSharedIssueService } = require('../../dashboard/server/services/issue-service-singleton.js') as\n typeof import('../../dashboard/server/services/issue-service-singleton.js');\n rawIssues = getSharedIssueService().getIssues() as Array<Record<string, unknown>>;\n } catch {\n rawIssues = [];\n }\n }\n // Dashboard read-model issues key the human ref as `identifier` (not `ref`)\n // and carry canonical statuses; normalize to tracker `Issue` objects so the\n // backlog ranking pipeline can read `issue.ref`/`issue.state` (PAN-1866 fix).\n const allIssues = normalizeBacklogIssues(rawIssues);\n // Scope to Panopticon/overdeck issues only for now. The sequencer is a single\n // global runner; ranking every connected project's open issues (MIN/KRUX/TIN/…)\n // bloats the manifest and isn't meaningful for an overdeck-only sequence.\n // PAN-1999 generalizes this to one sequencer per project — drop the filter then.\n const issues = allIssues.filter((issue) => issue.ref.toUpperCase().startsWith('PAN-'));\n const input = await collectOpenBacklog(projectRoot, issues);\n\n // Write the manifest to a file and reference it from the prompt instead of\n // inlining hundreds of KB of JSON. Inlining produced a single multi-hundred-KB\n // chat message that froze the dashboard conversation panel and blew past\n // small-context models (PAN-1866). The agent reads the file with the Read tool.\n const manifestPath = join(projectRoot, '.pan', 'backlog', 'manifest.json');\n await mkdir(dirname(manifestPath), { recursive: true });\n await writeFile(manifestPath, JSON.stringify(input.manifest, null, 2), 'utf-8');\n\n const model = determineModel({ role: 'sequencer', model: opts.model, spawnKey: 'sequencer:global' });\n const prompt = buildSequencerPrompt(resolvedPass, { projectRoot, projectKey, input, batchSize });\n\n return spawnRun(SEQUENCER_AGENT_ID, 'sequencer', {\n agentId: SEQUENCER_AGENT_ID,\n workspace: opts.workspace ?? projectRoot,\n prompt,\n model,\n allowHost: true,\n registerConversation: true,\n });\n}\n\nexport type SequencerPromptInput = {\n projectRoot: string;\n projectKey: string;\n input: CollectOpenBacklogResult;\n batchSize?: number;\n};\n\nexport function buildSequencerPrompt(pass: PassMode, opts: SequencerPromptInput): string {\n const { projectRoot, projectKey, input, batchSize = 20 } = opts;\n const { manifest, bodies, priorSequence } = input;\n const hasPrior = priorSequence !== null;\n const priorSequencePath = `${projectRoot}/.pan/backlog/sequence.md`;\n\n const passInstructions = {\n creation: `\nThis is a CREATION pass — there is no prior sequence.md. You must rank the entire open backlog from scratch.\n\n1. Read all issue bodies in batches of ${batchSize}. NEVER request all bodies at once — do NOT inline the entire backlog in a single prompt or tool call. Read batch 0, update your running shortlist, then batch 1, and so on.\n2. Assign rank, size, importance, score, condition, gate, and planning to every issue.\n3. Derive the dependency DAG from GitHub cross-references and your analysis.\n4. Write the result via \\`pan backlog write-sequence\\` (see Output section below — do NOT write the file directly).\n`,\n incremental: `\nThis is an INCREMENTAL pass — a prior sequence.md exists at ${hasPrior ? priorSequencePath : '(not found)'}. Preserve existing ranks, scores, conditions, operator-owned fields, and operator-sourced edges VERBATIM unless a delta justifies a change.\n\nRules:\n- An issue changed since the prior run if its manifest \\`updatedAt\\` is LATER than the prior sequence \\`generatedAt\\` (${hasPrior ? priorSequence!.generatedAt : 'N/A'}). Read bodies ONLY for those issues. Batch these (${batchSize} at a time).\n- A delta justifies a rank change when: body changed materially, new cross-references appeared, a dependency was closed/merged, or condition changed.\n- For each changed issue: set a rationale field (one sentence) explaining why the rank changed.\n- Re-derive github-ref edges. Recompute ai-inferred edges as advisory. Preserve operator edges verbatim.\n- Preserve operator-owned gate and planning fields verbatim.\n`,\n review: `\nThis is a REVIEW pass — re-rank the full backlog on demand. A prior sequence.md is available at ${hasPrior ? priorSequencePath : '(not found)'} for reference.\n\n1. Re-read all issue bodies in batches of ${batchSize}. NEVER inline the entire backlog in one prompt. Do NOT concatenate all bodies — read them batch by batch against your running shortlist.\n2. Re-derive all ai-inferred and github-ref edges.\n3. Preserve operator edges verbatim.\n4. Never re-rank in-pipeline issues (inPipeline=true); pin them at rank 1 or their prior rank. Leave gate=auto — do NOT set gate=ready (the gate is operator-only; in-pipeline is detected automatically).\n`,\n };\n\n const commonRules = `\n## Ranking rules (all passes)\n\n- Rank by IMPACT toward shipping, not raw priority signal. GitHub priority and issue age are inputs, not determinants.\n- Substrate-hardening first: an issue labeled \\`substrate-improvement\\`, \\`architecture\\`, or \\`v1.0-required\\` is at least \\`high\\` importance (\\`critical\\` if it unblocks the pipeline or other substrate work) and ranks ahead of routine feature work of equal impact — a stable substrate is the prerequisite for everything else (vision.mdx). When a substrate epic ranks high, lift its CHILDREN's ranks together (the children are what get picked). Do not rank such an issue \\`low\\` just because it reads as cleanup.\n- NEVER re-rank in-pipeline issues (inPipeline: true in the manifest). Pin them at their rank; leave gate=auto (do NOT set gate=ready — gate is operator-only).\n- Assign condition to every issue: ok / needs-refinement / stale.\n- Every node's why field must be ≤ 140 characters (displayed in the ranked table).\n- Write full-paragraph rationale only for the active top tier (~top 80 nodes).\n- Preserve operator-owned gate and planning fields verbatim across all passes.\n- Keep operator-sourced edges verbatim. Re-derive github-ref edges. Recompute ai-inferred edges as advisory with a confidence value 0.0–1.0.\n- Stamp pass=\"${pass}\" and generatedAt=<current ISO timestamp> in the output JSON.\n\n## Epics & parent-child\n\n- An EPIC is a container of child issues, not directly workable. The manifest flags epics with \\`isEpic: true\\` (derived from an \\`[EPIC]\\` title prefix or an \\`epic\\` label). On an epic's node set \\`isEpic: true\\`, and rank/score it by the aggregate impact of its CHILDREN — never as standalone work. Never mark an epic ready/promoted; it must not be picked up.\n- Express membership with a \\`contains\\` edge from the epic to each child: \\`{ from: <epic>, to: <child>, type: \"contains\", source: \"github-ref\", confidence: 1 }\\`. Membership sources: a child's manifest \\`partOf\\` field (\"Part of #N\" in its body) AND the epic body's task-list of child issue numbers (read the epic body to confirm). Emit one \\`contains\\` edge per child.\n- \\`contains\\` edges are membership, NOT ordering. Keep the children's intended BUILD ORDER in their \\`dependsOn\\` (and \\`unblocks\\` edges) as usual — an epic body often states the order explicitly.\n\n## Reading issue bodies\n\nFetch issue bodies in batches of ${batchSize} using the GitHub CLI:\n gh issue view <NUMBER> --json number,title,body\n\nDerive NUMBER from the manifest id (e.g. PAN-42 → 42). Do NOT fetch all bodies at once; read one batch, update your running shortlist, then the next.\n\n## Output\n\nAfter completing your analysis, write the SequenceDoc JSON to a temp file and submit it via:\n\n pan backlog write-sequence /tmp/sequence-result.json\n\nThe \\`pan backlog write-sequence\\` command validates the JSON, writes the formatted\n\\`.pan/backlog/sequence.md\\`, and queues an auto-commit — so DO NOT write the file\ndirectly with the Write tool. Always go through this command.\n\nThe SequenceDoc JSON must conform to the schema:\n { version (number, e.g. 1), project, generatedAt (ISO), model, pass, openCount, nodes[], edges[] }\n\nwhere each node has: issue, rank, size (XS/S/M/L/XL), importance (critical/high/medium/low),\nscore (0-100), condition (ok/needs-refinement/stale), dependsOn (string[]), why (≤140 chars),\nrationale (optional), gate (auto/ready/blocked), planning (skip/auto/interactive),\nisEpic (optional boolean — true for epic containers).\n\nEach edge has: from, to, type (unblocks/informs/contains), source (github-ref/operator/ai-inferred),\nconfidence (0.0–1.0). Use type=\"contains\" only for epic→child membership.\n\nDo not ask for operator input. If an issue is ambiguous, assign condition=needs-refinement and move on.\n`;\n\n const priorContext = hasPrior\n ? `\\n## Prior sequence\\n\\nProject: ${priorSequence!.project}, pass: ${priorSequence!.pass}, ${priorSequence!.nodes.length} nodes, generated: ${priorSequence!.generatedAt}\\n`\n : '\\n## Prior sequence\\n\\nNo prior sequence.md found — this is the first run.\\n';\n\n return `# Sequencer run: ${pass.toUpperCase()} pass for ${projectKey}\n\nYou are the Overdeck Sequencer. Your job is to rank the open backlog for project \"${projectKey}\" and write .pan/backlog/sequence.md.\n\n## Pass\n${passInstructions[pass]}\n${priorContext}\n## Backlog manifest (${manifest.length} open issues, ${bodies.count} bodies available in ${Math.ceil(bodies.count / batchSize)} batches of ${batchSize})\n\nThe manifest is written to \\`.pan/backlog/manifest.json\\` (relative to the project root) — it is NOT inlined here. Read it FIRST (the Read tool, or \\`cat .pan/backlog/manifest.json\\`) to load every open issue's { id, title, labels, priority, ageMs, inPipeline, hasPrd, ready, updatedAt, isEpic, partOf }. Do NOT ask for it to be pasted into the prompt.\n${commonRules}`;\n}\n","import { isNoResumeValueEnabled } from '../cloister/no-resume-mode.js';\nimport { spawnSequencerAgent } from './sequencer-agent.js';\n\n/**\n * PAN-2396: --no-resume is the operator's full-quiescence escape hatch —\n * \"human-driven only\". When the boot carries OVERDECK_NO_RESUME, no\n * autonomous sequencer pass may spawn; only explicit operator actions\n * (the dashboard's start-sequencer button, `pan` commands) remain allowed.\n * Checked at FIRE time so an already-scheduled timer respects the gate too.\n */\nfunction autonomousSpawnSuppressed(mode: 'incremental' | 'review'): boolean {\n if (!isNoResumeValueEnabled(process.env.OVERDECK_NO_RESUME)) return false;\n console.warn(`[backlog-auto-trigger] suppressed ${mode} sequencer pass: boot is --no-resume (human-driven only)`);\n return true;\n}\n\nlet _incrementalTimer: ReturnType<typeof setTimeout> | null = null;\nlet _reviewTimer: ReturnType<typeof setInterval> | null = null;\n\nconst DEBOUNCE_MS = 30_000;\n\n/**\n * PAN-1866: Call on every backlog delta (issue opened/closed/edited).\n * Debounces: multiple changes within DEBOUNCE_MS collapse into a single\n * incremental sequencer pass.\n */\nexport function triggerDebouncedIncrementalPass(projectRoot: string): void {\n if (_incrementalTimer !== null) clearTimeout(_incrementalTimer);\n _incrementalTimer = setTimeout(() => {\n _incrementalTimer = null;\n if (autonomousSpawnSuppressed('incremental')) return;\n spawnSequencerAgent('incremental', { projectRoot }).catch((err: unknown) =>\n console.warn('[backlog-auto-trigger] incremental pass failed:', err),\n );\n }, DEBOUNCE_MS);\n}\n\n/**\n * PAN-1866: Start a periodic review-pass cadence. Safe to call multiple times\n * (clears the previous interval first). Pass 0 to disable.\n */\nexport function startPeriodicReviewPass(projectRoot: string, intervalMs: number): void {\n if (_reviewTimer !== null) {\n clearInterval(_reviewTimer);\n _reviewTimer = null;\n }\n if (intervalMs <= 0) return;\n _reviewTimer = setInterval(() => {\n if (autonomousSpawnSuppressed('review')) return;\n spawnSequencerAgent('review', { projectRoot }).catch((err: unknown) =>\n console.warn('[backlog-auto-trigger] periodic review pass failed:', err),\n );\n }, intervalMs);\n}\n\nexport function stopPeriodicReviewPass(): void {\n if (_reviewTimer !== null) {\n clearInterval(_reviewTimer);\n _reviewTimer = null;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4CA,SAAS,sBAAsB,KAAyB;CACtD,MAAM,IAAI,IAAI,aAAa;AAC3B,KAAI;EAAC;EAAQ;EAAU;EAAa;EAAY;EAAa;EAAa;EAAU,CAAC,SAAS,EAAE,CAAE,QAAO;AACzG,KAAI;EAAC;EAAa;EAAa;EAAU;EAAM;EAAU,CAAC,SAAS,EAAE,CAAE,QAAO;AAC9E,KAAI;EAAC;EAAe;EAAe;EAAW;EAAU;EAAa;EAAqB;EAAoB,CAAC,SAAS,EAAE,CAAE,QAAO;AACnI,QAAO;;;;;;;;;;;;;;AAeT,SAAgB,uBACd,KACS;CACT,MAAM,MAAe,EAAE;AACvB,MAAK,MAAM,KAAK,KAAK;EACnB,MAAM,MAAM,OAAO,EAAE,iBAAiB,EAAE,UAAU,GAAG,CAAC,MAAM;AAC5D,MAAI,CAAC,IAAK;EACV,MAAM,WAAW,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,aAAa,GAAG;AAChF,MAAI,KAAK;GACP,IAAI,OAAO,EAAE,SAAS,IAAI;GAC1B;GACA,OAAO,OAAO,EAAE,YAAY,GAAG;GA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ACpB,MAAI,0BAA0B,cAAc,CAAE;AAC9C,sBAAoB,eAAe,EAAE,aAAa,CAAC,CAAC,OAAO,QACzD,QAAQ,KAAK,mDAAmD,IAAI,CACrE;IACA,YAAY;;;;;sBAlCsD;uBACZ;AAevD,qBAA0D;AAGxD,eAAc"}
package/dist/cli/index.js CHANGED
@@ -17,12 +17,12 @@ import { a as resolveGitHubIssueSync, n as init_tracker_utils, o as resolveTrack
17
17
  import { A as refreshCacheSync, G as cleanOldBackupsSync, P as syncContextLayersSync, Q as restoreBackupSync, X as listBackupsSync } from "../settings-BdvA9r5k.js";
18
18
  import { _ as validateTemplate, i as assembleWorkspaceContext, l as renderGlobalLayer, r as migrateDevroot, t as init_context_layers } from "../context-layers-CjNfhRaQ.js";
19
19
  import { a as ensureProjectLayer, c as globalContextFile, i as ensureGlobalLayer, m as projectContextFile, v as workspaceContextFile } from "../layers-b8Bbomgu.js";
20
- import { a as needsMigrationSync, i as migrateConfigSync, n as cleanupClosedIssueAgentDirectories, r as hasLegacySettingsSync, t as syncCommand } from "../sync-BiNVQHBf.js";
20
+ import { a as needsMigrationSync, i as migrateConfigSync, n as cleanupClosedIssueAgentDirectories, r as hasLegacySettingsSync, t as syncCommand } from "../sync-Bsww9tuj.js";
21
21
  import { A as sessionExists, C as listPaneValues, D as listSessionsSync, T as listSessionNamesSync, _ as getTmuxCommand, a as createSession, b as isPaneDead, j as sessionExistsSync, p as getAgentSessionsSync, r as capturePane, w as listSessionNames, x as killSession, y as init_tmux } from "../tmux-Ceg1ulra.js";
22
- import { Cn as findConversationForCostSessionSync, Ct as resolveTier, D as appendOperatorInterventionEvent, E as messageAgent, F as spawnAgent, Gt as getAgentDir, H as listRunningAgentsSync, Ht as clearAgentPausedSync, I as spawnRun, J as releaseSwarmSlot, Jt as getAgentStateSync, K as getConcurrencyLimits, Kt as getAgentResumeGateBlockReason, L as init_termination, M as init_ohmypi_parser, N as parseOhmypiSessionCostResultSync, Nt as getProviderEnvForModel, O as init_operator_interventions, P as init_spawn, Q as init_config$1, R as stopAgent, S as resumeAgent, Sn as unarchiveConversation, St as init_resolve_tier, T as init_messaging, Tn as init_agent_runtime, Ut as clearAgentTroubledSync, W as countRunningSwarmSlotsForIssue, Wt as decideResumeGate, X as getCachedMemoryVerdict, Y as tryReserveSwarmSlot, Yt as init_agent_state, Z as init_memory_verdict_cache, _ as autoRecoverAgents, _n as getConversationByName, a as shouldSupervise, at as clearHookSync, bn as listArchivedConversations, c as broadcastCommit, cn as isQualifiedAgentId, ct as popFromHookSync, d as listSlotAgents, dt as formatCVSync, et as loadCloisterConfigSync, f as listSlotAssignments, ft as getAgentCVSync, g as init_swarm_readiness, gn as getConversationById, h as computeIssueFootprint, hn as saveAgentRuntimeState, ht as readAgentCVSync, i as loadPrdDraft, in as setAgentPausedSync, it as checkHookSync, k as getLatestSessionIdSync, l as init_tier_feed, ln as normalizeAgentId, lt as pushToHookSync, m as analyzeSwarmReadiness, mn as getAgentRuntimeStateSync, mt as init_cv, n as deliverCommitForReview, o as spawnTierSupervisor, ot as generateFixedPointPromptSync, p as reconcileSlotState, pn as getAgentRuntimeState, pt as getAgentRankingsSync, q as init_concurrency, r as init_tier_supervisor, s as supervisorAgentId, st as init_hooks, t as init_agents, tn as saveAgentState, u as init_slot_reconcile, un as resolveAgentTargetSync, ut as sendMailSync, v as detectCrashedAgents, vn as getConversationByTmuxSession, vt as defaultRunWorkspace, wn as getAgentRuntimeSnapshot, xn as listConversations, y as recoverAgent, yn as init_conversations, yt as init_spawn_prep, z as stopAgentSync } from "../agents-CQHK0CSA.js";
22
+ import { Cn as findConversationForCostSessionSync, Ct as resolveTier, D as appendOperatorInterventionEvent, E as messageAgent, F as spawnAgent, Gt as getAgentDir, H as listRunningAgentsSync, Ht as clearAgentPausedSync, I as spawnRun, J as releaseSwarmSlot, Jt as getAgentStateSync, K as getConcurrencyLimits, Kt as getAgentResumeGateBlockReason, L as init_termination, M as init_ohmypi_parser, N as parseOhmypiSessionCostResultSync, Nt as getProviderEnvForModel, O as init_operator_interventions, P as init_spawn, Q as init_config$1, R as stopAgent, S as resumeAgent, Sn as unarchiveConversation, St as init_resolve_tier, T as init_messaging, Tn as init_agent_runtime, Ut as clearAgentTroubledSync, W as countRunningSwarmSlotsForIssue, Wt as decideResumeGate, X as getCachedMemoryVerdict, Y as tryReserveSwarmSlot, Yt as init_agent_state, Z as init_memory_verdict_cache, _ as autoRecoverAgents, _n as getConversationByName, a as shouldSupervise, at as clearHookSync, bn as listArchivedConversations, c as broadcastCommit, cn as isQualifiedAgentId, ct as popFromHookSync, d as listSlotAgents, dt as formatCVSync, et as loadCloisterConfigSync, f as listSlotAssignments, ft as getAgentCVSync, g as init_swarm_readiness, gn as getConversationById, h as computeIssueFootprint, hn as saveAgentRuntimeState, ht as readAgentCVSync, i as loadPrdDraft, in as setAgentPausedSync, it as checkHookSync, k as getLatestSessionIdSync, l as init_tier_feed, ln as normalizeAgentId, lt as pushToHookSync, m as analyzeSwarmReadiness, mn as getAgentRuntimeStateSync, mt as init_cv, n as deliverCommitForReview, o as spawnTierSupervisor, ot as generateFixedPointPromptSync, p as reconcileSlotState, pn as getAgentRuntimeState, pt as getAgentRankingsSync, q as init_concurrency, r as init_tier_supervisor, s as supervisorAgentId, st as init_hooks, t as init_agents, tn as saveAgentState, u as init_slot_reconcile, un as resolveAgentTargetSync, ut as sendMailSync, v as detectCrashedAgents, vn as getConversationByTmuxSession, vt as defaultRunWorkspace, wn as getAgentRuntimeSnapshot, xn as listConversations, y as recoverAgent, yn as init_conversations, yt as init_spawn_prep, z as stopAgentSync } from "../agents-CgVr77Qq.js";
23
23
  import { n as openDatabase, t as init_driver } from "../driver-DkSUBJdb.js";
24
24
  import { a as EventBus, i as DbLive, l as getOverdeckDatabaseSync, n as CostArchiveLive, o as EventBusLive, r as Db, t as CostArchive, u as init_infra } from "../infra-SH1L_MHI.js";
25
- import { s as getAllReviewStatusesFromDb, u as init_review_status_sync } from "../records-BIkN1LQ4.js";
25
+ import { s as getAllReviewStatusesFromDb, u as init_review_status_sync } from "../records-CTmvuRzz.js";
26
26
  import { a as getInternalTokenSync, i as ensureInternalTokenSync, o as init_internal_token, r as INTERNAL_TOKEN_HEADER } from "../pipeline-notifier-vODgXteQ.js";
27
27
  import { i as init_activity_logger, n as emitActivityEntrySync, r as emitActivityTtsSync } from "../activity-logger-DR4VJx-J.js";
28
28
  import { _ as updateEnrichment, a as findDiscoveredSessions, c as getDiscoveredSessionByJsonlPath, d as init_discovered_sessions, f as insertEmbedding, i as findDiscoveredSessionIds, l as getDiscoveredStats, m as markEnrichmentFailed, o as findEnrichedSessionIdsMissingEmbedding, s as getDiscoveredSessionById, v as upsertDiscoveredSession } from "../discovered-sessions-BAwzziDQ.js";
@@ -43,8 +43,8 @@ import { i as init_stack_health, n as getWorkspaceStackHealth, r as inferIssueId
43
43
  import { a as PAN_DIRNAME, c as PAN_SESSIONS_FILENAME, f as init_types$1, i as PAN_CONTINUE_FILENAME, n as PAN_CONTEXT_FILENAME, s as PAN_FEEDBACK_DIRNAME } from "../types-BjVYEbAq.js";
44
44
  import { a as getDispatchableItems, c as init_dag, i as createActiveSlice, n as blockingParentCount, r as compileGlob, t as applyTaskOperationToPlanFile } from "../dag-BL9vB9_9.js";
45
45
  import { i as runBdWithRetry, n as init_bd_process_lock, r as isTransientBdError, t as BdTransientFailure } from "../bd-process-lock-CKK0Ptga.js";
46
- import { a as init_review_status, f as setDeaconIgnored, i as getReviewStatusSync, l as mergeGateEligibility, m as setReviewStatusSync } from "../review-status-iJwfEoNX.js";
47
- import { n as resolveHarness, t as init_harness_resolve } from "../harness-resolve-Bz1prk6B.js";
46
+ import { a as init_review_status, f as setDeaconIgnored, i as getReviewStatusSync, l as mergeGateEligibility, m as setReviewStatusSync } from "../review-status-B_XXomV0.js";
47
+ import { n as resolveHarness, t as init_harness_resolve } from "../harness-resolve-B-YDNwNW.js";
48
48
  import { a as getIssueDraftPath, i as checkPrdGateSync, o as hasIssueDraft, t as init_pan_dir, u as getReadableWorkspacePanPaths } from "../pan-dir-QGdE4IAd.js";
49
49
  import { a as init_lifecycle_io, c as updatePlanStatus, i as findVBriefByIssueSync, s as transitionVBriefOnMain, t as appendContinueSessionEntryForIssue } from "../lifecycle-io-DDiMYH0_.js";
50
50
  import { d as init_skills_merge, f as mergeSkillsIntoWorkspaceSync, i as init_workspace_manager, n as createWorkspace, o as removeWorkspace, p as copyOverdeckSettingsToWorkspaceSync, s as stopWorkspaceDocker, t as addReposToWorkspace, u as applyProjectTemplateOverlaySync } from "../workspace-manager-CxoFBq_Y.js";
@@ -56,7 +56,7 @@ import { a as formatBootGateState, i as applyBootGateEnv, n as isNoResumeCliOpti
56
56
  import { i as init_tldr_daemon, n as getTldrDaemonServiceSync, r as getTldrMetricsSync } from "../tldr-daemon-DITOmgqp.js";
57
57
  import { a as readRestartStatus, i as readRestartEvents, n as readRestartLockHolder, o as writeRestartStatus, r as detectConcurrentRestartWriters, t as acquireRestartLock } from "../restart-lock-IWZwxYxG.js";
58
58
  import { n as restoreTrackedBeadsExport } from "../beads-restore-DU1wppIp.js";
59
- import { l as syncMainIntoWorkspace, r as init_merge_agent } from "../merge-agent-LM4avOtA.js";
59
+ import { l as syncMainIntoWorkspace, r as init_merge_agent } from "../merge-agent-B9hIZ6Z0.js";
60
60
  import { d as listOpenIssuesWithLabels, l as init_github_app, s as getMergeBackendStatus, u as isGitHubAppConfigured } from "../github-app-gWjUXbe7.js";
61
61
  import { i as getVBriefACStatusSync, r as createBeadsFromVBrief, s as syncBeadStatusToVBrief } from "../beads-DhgmToso.js";
62
62
  import { a as saveWorkspaceMetadataSync, i as loadWorkspaceMetadataSync, r as findRemoteWorkspaceMetadataSync, t as WORKSPACES_DIR } from "../workspace-metadata-pUa822FS.js";
@@ -64,20 +64,20 @@ import { d as killRemoteAgent, f as listActiveRemoteAgentStates, g as spawnRemot
64
64
  import { n as isRemoteAvailable, t as createFlyProviderFromConfig } from "../remote-CdEJRgQ_.js";
65
65
  import { a as init_work_agent_prompt, c as readPlanningContext, i as getTrackerContext, n as buildWorkAgentPrompt, o as readBeadsTasks } from "../work-agent-prompt-F7YGLiGe.js";
66
66
  import { a as init_archive_planning, i as findWorkspacePath } from "../archive-planning-6uw521Do.js";
67
- import { a as CacheService, c as findLinearStateByName, d as mapGitHubStateToCanonical, l as getLinearStateName, n as init_issue_service_singleton, o as init_cache_service, r as issue_service_singleton_exports, s as cleanupWorkflowLabels, u as init_state_mapping } from "../issue-service-singleton-Cr73JAaR.js";
67
+ import { a as CacheService, c as findLinearStateByName, d as mapGitHubStateToCanonical, l as getLinearStateName, n as init_issue_service_singleton, o as init_cache_service, r as issue_service_singleton_exports, s as cleanupWorkflowLabels, u as init_state_mapping } from "../issue-service-singleton-D1433I7n.js";
68
68
  import { n as init_issue_closed, r as isIssueClosed, t as clearIssueClosedCache } from "../issue-closed-Cq-aezyl.js";
69
- import { t as closeOut } from "../lifecycle-CR6tZfl1.js";
70
- import { d as spawnReviewSubRoleForIssue, h as reviewerOutputPath, m as init_review_monitor, p as REVIEW_SUB_ROLES, t as init_review_agent } from "../review-agent-DFosQzCG.js";
69
+ import { t as closeOut } from "../lifecycle-SmrqysDf.js";
70
+ import { f as spawnReviewSubRoleForIssue, g as reviewerOutputPath, h as init_review_monitor, m as REVIEW_SUB_ROLES, n as init_review_agent } from "../review-agent-PhqOhpx3.js";
71
71
  import { a as generateTlsConfigSync, i as generateOverdeckTraefikConfigSync, n as cleanupTemplateFilesSync, r as ensureProjectCertsSync } from "../traefik-Dh6rODM1.js";
72
72
  import { m as installTtsDaemonDependencies } from "../tts-daemon-CRQTQ_1T.js";
73
- import { O as init_specialists, f as getAllSpecialistStatus } from "../specialists-B0elgInc.js";
73
+ import { O as init_specialists, f as getAllSpecialistStatus } from "../specialists-DeTkkp8b.js";
74
74
  import { i as embed, n as parseRelativeTime, r as searchSessions } from "../search-DpJa70IF.js";
75
75
  import { n as recordBackgroundAiCost, t as init_cost$1 } from "../cost-DLimmd2_.js";
76
76
  import { a as writeDevSupervisorMarker, t as clearDevSupervisorMarker } from "../dev-supervisor-C4gFHi8S.js";
77
77
  import { a as restartCliproxy, c as startTraefik, d as waitForDashboardHealth, i as readPlatformConfigSync, l as stopDashboard, n as StageError, o as restartDashboard, r as openDashboardLogStdio, s as restartTraefik, u as stopTraefik } from "../platform-lifecycle-B-ZBomru.js";
78
- import { a as readMemorySettingsSummary, i as init_cli, n as generateDailySummary, o as runMemoryDoctor, r as getMemoryStatus, s as searchMemory, t as createResetMarker } from "../cli-Cewlu3yU.js";
78
+ import { a as readMemorySettingsSummary, i as init_cli, n as generateDailySummary, o as runMemoryDoctor, r as getMemoryStatus, s as searchMemory, t as createResetMarker } from "../cli-DGeSW85B.js";
79
79
  import { n as init_briefing_assembler, t as assembleLiveBriefingMarkdown } from "../briefing-assembler-BdNcscQe.js";
80
- import { n as parseSequenceMd, t as init_sequence_io } from "../sequence-io-Cx1usxG3.js";
80
+ import { n as parseSequenceMd, t as init_sequence_io } from "../sequence-io-CyxvNHfA.js";
81
81
  import { i as writeSwarmFinalizedAt, n as createMinimalIssueRecord, t as clearSwarmSlotCompletion } from "../deacon-swarm-record-C1HoB3Ya.js";
82
82
  import { Context, Data, Duration, Effect, FileSystem, Layer, Schema, Stream } from "effect";
83
83
  import { appendFileSync, chmodSync, closeSync, copyFileSync, cpSync, createReadStream, existsSync, fstatSync, lstatSync, mkdirSync, mkdtempSync, openSync, promises, readFileSync, readSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "fs";
@@ -1553,7 +1553,7 @@ async function resolveExplicitHarnessFlag(harness, model) {
1553
1553
  }
1554
1554
  if (model) {
1555
1555
  const { canUseHarnessSync } = await import("../harness-policy-7jmctUQL.js");
1556
- const { getProviderAuthMode } = await import("../agents-pp8FO7Uj.js");
1556
+ const { getProviderAuthMode } = await import("../agents-By3u_fQ8.js");
1557
1557
  const decision = canUseHarnessSync(harness, model, await getProviderAuthMode(model));
1558
1558
  if (!decision.allowed) {
1559
1559
  process.stderr.write(`${decision.reason}\n`);
@@ -2146,7 +2146,7 @@ async function issueCommand(id, options) {
2146
2146
  if (!isRemote && !workspacePath && !options.local && locationPreference !== "local") {
2147
2147
  const overflowConfig = loadConfigSync$1().remote;
2148
2148
  if (overflowConfig?.enabled && overflowConfig.overflow_to_remote) {
2149
- const { getConcurrencyLimits, countRunningAgents } = await import("../concurrency-Ca-fC7tA.js");
2149
+ const { getConcurrencyLimits, countRunningAgents } = await import("../concurrency-4rzjHAQA.js");
2150
2150
  const limits = getConcurrencyLimits();
2151
2151
  const counts = countRunningAgents();
2152
2152
  if (counts.work >= limits.maxWorkAgents) {
@@ -2216,7 +2216,7 @@ async function issueCommand(id, options) {
2216
2216
  console.error(chalk.red(`Agent ${agentIdForFresh} has a live tmux session. Run 'pan kill ${id}' first, then retry --fresh.`));
2217
2217
  process.exit(1);
2218
2218
  }
2219
- const { wipeAgentStateDirs } = await import("../agents-pp8FO7Uj.js");
2219
+ const { wipeAgentStateDirs } = await import("../agents-By3u_fQ8.js");
2220
2220
  const wipeResult = await wipeAgentStateDirs(id);
2221
2221
  console.log(chalk.dim(` --fresh: wiped ${wipeResult.removed.length} agent state director${wipeResult.removed.length === 1 ? "y" : "ies"} for ${id} (path: ${wipeResult.path})`));
2222
2222
  }
@@ -4391,7 +4391,7 @@ async function verifyStrikeBranchMergedIntoMain(issueId, projectPath) {
4391
4391
  return `${branchName} is contained in origin/main`;
4392
4392
  }
4393
4393
  async function resolveDoneWorkspace(issueId, agentId) {
4394
- const { getAgentStateSync } = await import("../agents-pp8FO7Uj.js");
4394
+ const { getAgentStateSync } = await import("../agents-By3u_fQ8.js");
4395
4395
  const agentState = getAgentStateSync(agentId) ?? null;
4396
4396
  const agentWorkspace = agentState?.workspace;
4397
4397
  if (agentWorkspace && existsSync(agentWorkspace)) return {
@@ -4410,7 +4410,7 @@ async function resolveDoneWorkspace(issueId, agentId) {
4410
4410
  };
4411
4411
  }
4412
4412
  async function resolveSlotCompletionContext(issueId, agentId, slotInput) {
4413
- const { getAgentStateSync } = await import("../agents-pp8FO7Uj.js");
4413
+ const { getAgentStateSync } = await import("../agents-By3u_fQ8.js");
4414
4414
  if (slotInput) {
4415
4415
  const agentState = getAgentStateSync(slotInput.agentId) ?? null;
4416
4416
  return {
@@ -4447,7 +4447,7 @@ async function resolveSlotCompletionContext(issueId, agentId, slotInput) {
4447
4447
  }
4448
4448
  async function completeSlotWork(issueId, slot, comment) {
4449
4449
  const now = (/* @__PURE__ */ new Date()).toISOString();
4450
- const { saveAgentStateSync } = await import("../agents-pp8FO7Uj.js");
4450
+ const { saveAgentStateSync } = await import("../agents-By3u_fQ8.js");
4451
4451
  const { persistAndVerifySwarmSlotCompletion } = await import("../deacon-swarm-record-Dg-_u6eC.js");
4452
4452
  if (!persistAndVerifySwarmSlotCompletion(slot.workspacePath ?? process.cwd(), issueId, {
4453
4453
  slotIndex: slot.slotIndex,
@@ -4496,7 +4496,7 @@ async function doneCommand$1(id, options = {}) {
4496
4496
  try {
4497
4497
  const reason = await verifyStrikeBranchMergedIntoMain(issueId, resolved.projectPath);
4498
4498
  console.log(chalk.green(`✓ Verified strike merge: ${reason}`));
4499
- const { postMergeLifecycle } = await import("../merge-agent-Bj046HE1.js");
4499
+ const { postMergeLifecycle } = await import("../merge-agent-DUj22cXL.js");
4500
4500
  await postMergeLifecycle(issueId, resolved.projectPath, branchName, {
4501
4501
  skipDeploy: true,
4502
4502
  allowVerifiedNoPrMerge: true,
@@ -4689,13 +4689,13 @@ async function doneCommand$1(id, options = {}) {
4689
4689
  else console.log(chalk.yellow(` ⚠ Failed to update Linear status`));
4690
4690
  } else console.log(chalk.dim(" LINEAR_API_KEY not set - skipping status update"));
4691
4691
  }
4692
- const { saveAgentStateSync } = await import("../agents-pp8FO7Uj.js");
4692
+ const { saveAgentStateSync } = await import("../agents-By3u_fQ8.js");
4693
4693
  const { agentState: existingState, workspacePath } = await resolveDoneWorkspace(issueId, agentId);
4694
4694
  if (!workspacePath || !existsSync(workspacePath)) throw new Error(`Workspace not found for ${issueId}; cannot create review artifact set`);
4695
4695
  const scopeDrift = await recordScopeDriftForDone(issueId, workspacePath);
4696
4696
  spinner.text = "Creating review artifacts...";
4697
4697
  const { createReviewArtifactsForIssue } = await import("../review-artifacts-CVxfwKRZ.js");
4698
- const { setReviewStatusSync } = await import("../review-status-BbNVlXh1.js");
4698
+ const { setReviewStatusSync } = await import("../review-status-Bo-EFVKh.js");
4699
4699
  let artifactResult;
4700
4700
  try {
4701
4701
  artifactResult = await Effect.runPromise(createReviewArtifactsForIssue(issueId, workspacePath));
@@ -4759,7 +4759,7 @@ async function doneCommand$1(id, options = {}) {
4759
4759
  } catch (continueErr) {
4760
4760
  console.warn(`[pan done] Failed to append end entry to record (non-fatal): ${continueErr?.message ?? continueErr}`);
4761
4761
  }
4762
- const { getReviewStatusSync } = await import("../review-status-BbNVlXh1.js");
4762
+ const { getReviewStatusSync } = await import("../review-status-Bo-EFVKh.js");
4763
4763
  const currentStatus = getReviewStatusSync(issueId);
4764
4764
  if (currentStatus?.mergeStatus === "merged") {
4765
4765
  if (await isMergeSetMergedIntoTargets(workspacePath, artifactResult.mergeSet)) {
@@ -5376,7 +5376,7 @@ async function resetWorkspaceState(id, options) {
5376
5376
  }
5377
5377
  async function printNextSteps(id) {
5378
5378
  try {
5379
- const { getAgentStateSync } = await import("../agents-pp8FO7Uj.js");
5379
+ const { getAgentStateSync } = await import("../agents-By3u_fQ8.js");
5380
5380
  const agentState = getAgentStateSync(`agent-${id.toLowerCase()}`);
5381
5381
  if (agentState?.status === "running" || agentState?.status === "starting") {
5382
5382
  console.log(chalk.dim("Agent is still running. Send it context about the re-work:"));
@@ -5445,7 +5445,7 @@ async function wipeCommand(issueId, options) {
5445
5445
  projectName = workspaceConfig.projectName || "";
5446
5446
  if (workspaceConfig.github?.owner && workspaceConfig.github?.repo && workspaceConfig.github?.number) githubMeta = workspaceConfig.github;
5447
5447
  } catch {}
5448
- const { resetToTodo } = await import("../lifecycle-D_EWiUjk.js");
5448
+ const { resetToTodo } = await import("../lifecycle-mRMyiIXs.js");
5449
5449
  const result = await Effect.runPromise(resetToTodo({
5450
5450
  issueId,
5451
5451
  projectPath,
@@ -7656,7 +7656,7 @@ async function migrateCommand(issueId, options) {
7656
7656
  console.error(chalk.red("Invalid --to value. Use \"remote\" or \"local\"."));
7657
7657
  process.exit(1);
7658
7658
  }
7659
- const { migrateWorkspace } = await import("../workspace-migrate-duUsWNpd.js");
7659
+ const { migrateWorkspace } = await import("../workspace-migrate-BBQ8nAnP.js");
7660
7660
  await migrateWorkspace(issueId, {
7661
7661
  toRemote: options.to === "remote",
7662
7662
  toLocal: options.to === "local",
@@ -8453,7 +8453,7 @@ function registerWorkspaceCommands(program) {
8453
8453
  await workspaceRebuildCommand(issueId);
8454
8454
  });
8455
8455
  workspace.command("reap").description("List or remove orphaned unhealthy workspace Docker stacks").option("--days <days>", "Minimum age in days", "7").option("--apply", "Run docker compose down -v --remove-orphans for candidates").option("--yes", "Skip confirmation when using --apply").action(async (opts) => {
8456
- const { workspaceReapCommand } = await import("../workspace-reap-DLCIoJmn.js");
8456
+ const { workspaceReapCommand } = await import("../workspace-reap-12O9354k.js");
8457
8457
  await workspaceReapCommand(opts);
8458
8458
  });
8459
8459
  workspace.command("update <issueId>").description("Update skills/agents/rules in an existing workspace").option("--force", "Overwrite user-modified files").action(updateCommand$1);
@@ -10664,7 +10664,7 @@ async function doneCommand(specialist, issueId, options) {
10664
10664
  if (specialist === "review" && (options.status === "blocked" || options.status === "failed")) {
10665
10665
  const FEEDBACK_DELIVERY_TIMEOUT_MS = 3e4;
10666
10666
  try {
10667
- const { deliverReviewVerdictFeedback } = await import("../review-verdict-feedback-BGPw3z1X.js");
10667
+ const { deliverReviewVerdictFeedback } = await import("../review-verdict-feedback-CXHkoiKZ.js");
10668
10668
  const delivery = Effect.runPromise(deliverReviewVerdictFeedback({
10669
10669
  issueId: normalizedIssueId,
10670
10670
  verdict: options.status,
@@ -10727,7 +10727,7 @@ const execAsync$20 = promisify$1(exec);
10727
10727
  */
10728
10728
  async function listLogsCommand(project, type, options) {
10729
10729
  try {
10730
- const { listRunLogsSync } = await import("../specialist-logs-CUUJ4eiB.js");
10730
+ const { listRunLogsSync } = await import("../specialist-logs-pEMCTtGZ.js");
10731
10731
  const runs = listRunLogsSync(project, type, { limit: options.limit ? parseInt(options.limit) : 10 });
10732
10732
  if (options.json) {
10733
10733
  console.log(JSON.stringify(runs, null, 2));
@@ -10766,7 +10766,7 @@ async function listLogsCommand(project, type, options) {
10766
10766
  */
10767
10767
  async function viewLogCommand(project, type, runId, options) {
10768
10768
  try {
10769
- const { getRunLogSync, parseLogMetadata, getRunLogPath } = await import("../specialist-logs-CUUJ4eiB.js");
10769
+ const { getRunLogSync, parseLogMetadata, getRunLogPath } = await import("../specialist-logs-pEMCTtGZ.js");
10770
10770
  const content = getRunLogSync(project, type, runId);
10771
10771
  if (!content) {
10772
10772
  console.error(`❌ Run log not found: ${runId}`);
@@ -10797,8 +10797,8 @@ async function viewLogCommand(project, type, runId, options) {
10797
10797
  */
10798
10798
  async function tailLogCommand(project, type) {
10799
10799
  try {
10800
- const { getRunLogPath } = await import("../specialist-logs-CUUJ4eiB.js");
10801
- const { getProjectSpecialistMetadata } = await import("../specialists-BSrylD1S.js");
10800
+ const { getRunLogPath } = await import("../specialist-logs-pEMCTtGZ.js");
10801
+ const { getProjectSpecialistMetadata } = await import("../specialists-BGFnrQ8n.js");
10802
10802
  const metadata = getProjectSpecialistMetadata(project, type);
10803
10803
  if (!metadata.currentRun) {
10804
10804
  console.error(`❌ No active run for ${project}/${type}`);
@@ -10865,7 +10865,7 @@ async function cleanupLogsCommand(projectOrAll, type, options) {
10865
10865
  console.log(" Use --force to confirm.");
10866
10866
  process.exit(1);
10867
10867
  }
10868
- const { cleanupAllLogsSync } = await import("../specialist-logs-CUUJ4eiB.js");
10868
+ const { cleanupAllLogsSync } = await import("../specialist-logs-pEMCTtGZ.js");
10869
10869
  console.log("🧹 Cleaning up old logs for all projects...\n");
10870
10870
  const results = cleanupAllLogsSync();
10871
10871
  console.log(`\n✅ Cleanup complete: deleted ${results.totalDeleted} old logs\n`);
@@ -10886,7 +10886,7 @@ async function cleanupLogsCommand(projectOrAll, type, options) {
10886
10886
  console.log(" Use --force to confirm.");
10887
10887
  process.exit(1);
10888
10888
  }
10889
- const { cleanupOldLogsSync } = await import("../specialist-logs-CUUJ4eiB.js");
10889
+ const { cleanupOldLogsSync } = await import("../specialist-logs-pEMCTtGZ.js");
10890
10890
  const { getSpecialistRetention } = await import("../projects-DbssjAtz.js");
10891
10891
  const retention = getSpecialistRetention(projectOrAll);
10892
10892
  console.log(`🧹 Cleaning up old logs for ${projectOrAll}/${type}...`);
@@ -10913,7 +10913,7 @@ function registerSpecialistsCommands(program) {
10913
10913
  console.error(`discovery-ready only applies to the review specialist (got '${type}')`);
10914
10914
  process.exit(1);
10915
10915
  }
10916
- const { handleReviewDiscoveryReady } = await import("../review-agent-DjVadURa.js");
10916
+ const { handleReviewDiscoveryReady } = await import("../review-agent-hLbRRxZF.js");
10917
10917
  const result = await handleReviewDiscoveryReady(issueId, { source: "cli-signal" });
10918
10918
  console.log(result.message);
10919
10919
  process.exit(result.success ? 0 : 1);
@@ -11538,7 +11538,7 @@ async function reapCompletedRemoteAgents(opts = {}) {
11538
11538
  } catch {
11539
11539
  details.push("No continue.json retrieved from VM (skipped)");
11540
11540
  }
11541
- const { getAgentStateSync, saveAgentStateSync } = await import("../agents-pp8FO7Uj.js");
11541
+ const { getAgentStateSync, saveAgentStateSync } = await import("../agents-By3u_fQ8.js");
11542
11542
  const existing = getAgentStateSync(agentId);
11543
11543
  if (existing) {
11544
11544
  existing.workspace = existing.workspace || workspacePath;
@@ -11557,7 +11557,7 @@ async function reapCompletedRemoteAgents(opts = {}) {
11557
11557
  lastActivity: (/* @__PURE__ */ new Date()).toISOString()
11558
11558
  });
11559
11559
  const { createReviewArtifactsForIssue } = await import("../review-artifacts-CVxfwKRZ.js");
11560
- const { setReviewStatusSync } = await import("../review-status-BbNVlXh1.js");
11560
+ const { setReviewStatusSync } = await import("../review-status-Bo-EFVKh.js");
11561
11561
  const primaryArtifact = (await Effect.runPromise(createReviewArtifactsForIssue(issueId, workspacePath))).mergeSet?.repos.find((repo) => !!repo.artifactUrl);
11562
11562
  if (primaryArtifact?.artifactUrl) {
11563
11563
  setReviewStatusSync(issueId, { prUrl: primaryArtifact.artifactUrl });
@@ -12359,10 +12359,10 @@ async function rebuildAgentsCommand(options) {
12359
12359
  async function rebuildCommand(options) {
12360
12360
  const spinner = ora("Reconstructing cache from git + GitHub sources...").start();
12361
12361
  try {
12362
- const { reconstructCacheAuto } = await import("../reconstruct-cache-NPqoAUg-.js");
12362
+ const { reconstructCacheAuto } = await import("../reconstruct-cache-9SWp82SQ.js");
12363
12363
  const r = await reconstructCacheAuto({ verbose: options.verbose });
12364
12364
  const phases = Object.entries(r.phaseCounts).map(([p, n]) => `${p}=${n}`).join(" ");
12365
- const { restoreReviewStatusFromRecords } = await import("../verdict-restore-DQiV7_fe.js");
12365
+ const { restoreReviewStatusFromRecords } = await import("../verdict-restore-DGpX0ZOJ.js");
12366
12366
  const verdictResult = await restoreReviewStatusFromRecords({ verbose: options.verbose });
12367
12367
  spinner.succeed(`Reconstructed: ${r.issuesEnumerated} in-flight issue(s), ${r.agentsRebuilt} agent(s), ${verdictResult.restored} verdict(s) restored; phases ${phases}`);
12368
12368
  } catch (error) {
@@ -12373,7 +12373,7 @@ async function rebuildCommand(options) {
12373
12373
  async function backfillRecordsCommand(options) {
12374
12374
  const spinner = ora("Backfilling per-issue permanent records...").start();
12375
12375
  try {
12376
- const { backfillIssueRecords } = await import("../records-backfill-DEgtRyKL.js");
12376
+ const { backfillIssueRecords } = await import("../records-backfill-BQcmTmwF.js");
12377
12377
  const result = await backfillIssueRecords({
12378
12378
  issueId: options.issueId,
12379
12379
  force: options.force,
@@ -12392,7 +12392,7 @@ async function backfillRecordsCommand(options) {
12392
12392
  async function restoreVerdictsCommand(options) {
12393
12393
  const spinner = ora("Restoring review_status verdicts from per-issue records...").start();
12394
12394
  try {
12395
- const { restoreReviewStatusFromRecords } = await import("../verdict-restore-DQiV7_fe.js");
12395
+ const { restoreReviewStatusFromRecords } = await import("../verdict-restore-DGpX0ZOJ.js");
12396
12396
  const result = await restoreReviewStatusFromRecords({
12397
12397
  issueId: options.issueId,
12398
12398
  dryRun: options.dryRun,
@@ -12415,7 +12415,7 @@ async function restoreVerdictsAndExitCommand(options) {
12415
12415
  async function reconcileMergesCommand(options) {
12416
12416
  const spinner = ora("Reconciling fulfilled merges from durable records...").start();
12417
12417
  try {
12418
- const { reconcileMergeFulfillment } = await import("../merge-fulfillment-DrnC1Kmg.js");
12418
+ const { reconcileMergeFulfillment } = await import("../merge-fulfillment-__P4WE-T.js");
12419
12419
  const result = await reconcileMergeFulfillment({
12420
12420
  issueId: options.issueId,
12421
12421
  dryRun: options.dryRun,
@@ -23666,7 +23666,7 @@ async function devCommand(options) {
23666
23666
  const origWrite = process.stdout.write;
23667
23667
  const origErrWrite = process.stderr.write;
23668
23668
  try {
23669
- const { syncCommand } = await import("../sync-4jqukkxz.js");
23669
+ const { syncCommand } = await import("../sync-CylE_SjB.js");
23670
23670
  process.stdout.write = () => true;
23671
23671
  process.stderr.write = () => true;
23672
23672
  await syncCommand({});
@@ -27030,7 +27030,7 @@ async function defaultRequestIssueReview(issueId, workspacePath) {
27030
27030
  autoRequeueCount: 0,
27031
27031
  reviewRequestedAt: (/* @__PURE__ */ new Date()).toISOString()
27032
27032
  });
27033
- const { spawnReviewRoleForIssue } = await import("../review-agent-DjVadURa.js");
27033
+ const { spawnReviewRoleForIssue } = await import("../review-agent-hLbRRxZF.js");
27034
27034
  return Effect.runPromise(spawnReviewRoleForIssue({
27035
27035
  issueId,
27036
27036
  workspace: workspacePath,
@@ -28644,7 +28644,7 @@ review.command("spawn-reviewer <id>", { hidden: true }).description("Internal: s
28644
28644
  program.command("backlog").description("Backlog sequencer management").command("write-sequence <file>").description("Validate a SequenceDoc JSON file and write it to .pan/backlog/sequence.md (triggers auto-commit)").option("--project-root <path>", "Project root (default: cwd)").action(async (file, opts) => {
28645
28645
  const { readFileSync } = await import("node:fs");
28646
28646
  const { parseSequenceJson } = await import("../types-BKqHtKLx.js");
28647
- const { writeSequenceMd } = await import("../sequence-io-CcxZNHcD.js");
28647
+ const { writeSequenceMd } = await import("../sequence-io-Cg4NHAco.js");
28648
28648
  const projectRoot = opts.projectRoot ?? process.cwd();
28649
28649
  let raw;
28650
28650
  try {
@@ -29074,7 +29074,7 @@ program.command("down").description("Stop dashboard (and Traefik if enabled)").o
29074
29074
  }
29075
29075
  console.log(chalk.dim("Stopping review sessions..."));
29076
29076
  try {
29077
- const { killAllReviewSessions } = await import("../review-agent-DjVadURa.js");
29077
+ const { killAllReviewSessions } = await import("../review-agent-hLbRRxZF.js");
29078
29078
  const { killed, failed } = await Effect.runPromise(killAllReviewSessions());
29079
29079
  if (killed.length > 0) console.log(chalk.green(`✓ Stopped ${killed.length} review session(s)`));
29080
29080
  if (failed.length > 0) console.log(chalk.yellow(`⚠ Failed to stop ${failed.length} review session(s)`));
@@ -1,6 +1,6 @@
1
1
  import { t as __esmMin } from "./chunk-ruWRV7i3.js";
2
2
  import { $ as getOverdeckHome, et as init_paths } from "./paths-3R6b989k.js";
3
- import { Jt as getAgentStateSync, t as init_agents } from "./agents-CQHK0CSA.js";
3
+ import { Jt as getAgentStateSync, t as init_agents } from "./agents-CgVr77Qq.js";
4
4
  import { t as init_src } from "./src-U_5LlV2C.js";
5
5
  import { n as getMemoryRollupPendingThreshold, o as loadMemorySettings, r as init_settings } from "./settings-CDGbMNkl.js";
6
6
  import { a as resolveExtractionProviderSelection, i as init_health, r as getMemoryHealthPath, t as init_providers } from "./providers-BobeFDXv.js";
@@ -430,4 +430,4 @@ var init_cli = __esmMin((() => {
430
430
  //#endregion
431
431
  export { readMemorySettingsSummary as a, init_cli as i, generateDailySummary as n, runMemoryDoctor as o, getMemoryStatus as r, searchMemory as s, createResetMarker as t };
432
432
 
433
- //# sourceMappingURL=cli-Cewlu3yU.js.map
433
+ //# sourceMappingURL=cli-DGeSW85B.js.map