@overdeck/desktop 0.45.24 → 0.47.0

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 (528) hide show
  1. package/drizzle/overdeck/0000_overdeck_init.sql +36 -1
  2. package/package.json +1 -1
  3. package/server/{acceptance-criteria-DDCnXF58.js → acceptance-criteria-10Ur5Dne.js} +2 -2
  4. package/server/activity-logger-CMthG6Vd.js +3 -0
  5. package/server/{activity-logger-DDlOIAML.js → activity-logger-CyteR4JO.js} +24 -13
  6. package/server/{advancing-selfheal-BVwW4qRn.js → advancing-selfheal-BNwqxseD.js} +6 -6
  7. package/server/{agent-gc-CHcnvonI.js → agent-gc-C3h9Or3a.js} +5 -5
  8. package/server/agent-state-CYXJVG72.js +3 -0
  9. package/server/agent-state-service-C63p_ftq.js +2 -0
  10. package/server/{agent-state-service-BsgWxZuB.js → agent-state-service-Ds6OeFvo.js} +15 -9
  11. package/server/{agents-EbI0zCJl.js → agents-J5mEnekq.js} +23 -16
  12. package/server/agents-ePFVoZbu.js +3 -0
  13. package/server/archive-planning-B2XplFzT.js +2 -0
  14. package/server/{archive-planning-Du25Jtst.js → archive-planning-BwhxeP7C.js} +22 -26
  15. package/server/{artifact-index-jobs-CbEDfCDu.js → artifact-index-jobs-D1q_vR3V.js} +2 -2
  16. package/server/{assemble-J2ZZ2C15.js → assemble-Bgwqv-Ro.js} +2 -2
  17. package/server/auto-spawn-consent-CQ9Bi9q6.js +1141 -0
  18. package/server/{backlog-auto-trigger-2R2jog7n.js → backlog-auto-trigger-n1lzPgN4.js} +3 -3
  19. package/server/{behavior-B3exJ42O.js → behavior-td6-xhQk.js} +2 -2
  20. package/server/boot-reconciled-stop-events-C7gGe3oB.js +44 -0
  21. package/server/bridge-pool-patrol-CYH2OLb5.js +136 -0
  22. package/server/{briefing-freshness-D1wzUIWv.js → briefing-freshness-DRqZ8lAz.js} +2 -2
  23. package/server/{build-info-Ie_D0_BT.js → build-info-7yiEpl6u.js} +5 -3
  24. package/server/{build-info-CZk_TITh.js → build-info-CpG__c63.js} +1 -1
  25. package/server/{checkpoint-manager-DwbQoqrC.js → checkpoint-manager-CkKmB0wZ.js} +1 -1
  26. package/server/{checkpoint-manager-BI1Wxoku.js → checkpoint-manager-DBcyNR8w.js} +2 -2
  27. package/server/checkpoint-worker.js +1 -1
  28. package/server/{checkpoints-CQB1h765.js → checkpoints-D95apurL.js} +2 -2
  29. package/server/{checkpoints-BJIs5QIA.js → checkpoints-Wm963lm8.js} +1 -1
  30. package/server/{claude-hooks-provision-8Ngo8TpT.js → claude-hooks-provision-4RPxNkE8.js} +1 -1
  31. package/server/{claude-hooks-provision-D8GXF3_s.js → claude-hooks-provision-Bjitl9aI.js} +13 -2
  32. package/server/{claude-permissions-DNWEVV6z.js → claude-permissions-CpbpvUQ2.js} +2 -2
  33. package/server/{claude-settings-overlay-DWy-Bb4Y.js → claude-settings-overlay-BzkHYDwR.js} +1 -1
  34. package/server/{claude-settings-overlay-CEdaqpWI.js → claude-settings-overlay-_H9Yrzab.js} +2 -2
  35. package/server/cli-CjOCSnfj.js +3 -0
  36. package/server/{cli-RoOx5DUf.js → cli-Cte9ZFGn.js} +9 -9
  37. package/server/{cliproxy-C8a1vtTU.js → cliproxy-C5fMJ7rY.js} +2 -2
  38. package/server/{cliproxy-fHfIeiGd.js → cliproxy-DaAbWMjC.js} +1 -1
  39. package/server/{close-issue-DoOifFIK.js → close-issue-BPh1ARCF.js} +5 -5
  40. package/server/{closed-issue-reaper-CktPXo8m.js → closed-issue-reaper-DHRfRMrp.js} +1 -1
  41. package/server/{closed-issue-reaper-Bk3SU4RC.js → closed-issue-reaper-DoOZqGFK.js} +88 -17
  42. package/server/{codex-BZXGhUVB.js → codex-BzGDW_d3.js} +36 -7
  43. package/server/{codex-GcHuUF-k.js → codex-o8FJwzmy.js} +1 -1
  44. package/server/{codex-parser-CFZ1_1Jl.js → codex-parser-Dt-ycU8L.js} +2 -2
  45. package/server/compaction-continuation-CvXpbZ4w.js +200 -0
  46. package/server/{config-CKxYiCmX.js → config-Bi3u1VK7.js} +4 -3
  47. package/server/{config-BZ0sHTju.js → config-BvLe652W.js} +2 -2
  48. package/server/{config-DzV30TOm.js → config-CL3Gyvja.js} +1 -1
  49. package/server/{config-yaml-DySPNmKN.js → config-yaml-CxdwhAIA.js} +276 -14
  50. package/server/conflict-gate-CX80JYYS.js +3 -0
  51. package/server/{conflict-gate-BaCVrH-N.js → conflict-gate-E4nt7ZeS.js} +60 -14
  52. package/server/{context-layers-igZ4FI4_.js → context-layers-C_IIysnm.js} +3 -3
  53. package/server/{context-layers-BrPmE__h.js → context-layers-DAG83UZt.js} +2 -2
  54. package/server/{control-settings-BQp7_4uD.js → control-settings-CiqGxXnc.js} +56 -19
  55. package/server/{conversation-compaction-eQB5CkOe.js → conversation-compaction-BE3CNtHF.js} +1 -1
  56. package/server/{conversation-compaction-CgrR8YYp.js → conversation-compaction-D6-yLtqt.js} +8 -8
  57. package/server/{conversation-service-DPJ71F33.js → conversation-service-DBxoYMDl.js} +10 -8
  58. package/server/conversation-service-D_TS2b1r.js +3 -0
  59. package/server/{conversations-CAsJF9kh.js → conversations-BKDVpB-3.js} +1 -1
  60. package/server/{conversations-6AfUfbwc.js → conversations-D0UEdLtk.js} +4 -4
  61. package/server/{cost-R-m6Yi-W.js → cost-DS1s0DbG.js} +3 -3
  62. package/server/{cost-B2ddP6wq.js → cost-DpgYmYqR.js} +12 -2
  63. package/server/{cost-sync-BsN6ER0n.js → cost-sync-tOCCGnEt.js} +3 -3
  64. package/server/{dag-B1ucnjDU.js → dag-BtkgLeqY.js} +2 -2
  65. package/server/{dangerous-git-ops-BXqeWVSf.js → dangerous-git-ops-CFLykHWt.js} +1 -1
  66. package/server/dashboard-db-worker.js +7 -7
  67. package/server/deacon-BIblC-WX.js +4 -0
  68. package/server/{deacon-nudge-log-6wVqAaqz.js → deacon-nudge-log-B08gF0mh.js} +3 -3
  69. package/server/{deacon-CU_cAYSR.js → deacon-pLRLbPvR.js} +3308 -2707
  70. package/server/deacon-pending-lifecycle-B-Io84AP.js +33 -0
  71. package/server/deacon-swarm-B1XkIvfr.js +2 -0
  72. package/server/{deacon-swarm-BXZZ1Z2-.js → deacon-swarm-v5PMun-m.js} +15 -14
  73. package/server/deacon.js +14 -19
  74. package/server/dead-end-trip-D8A3msX9.js +13 -0
  75. package/server/delivery-BX9HR4wQ.js +3 -0
  76. package/server/{deploy-patrol-AiFoP8dw.js → deploy-patrol-sYgOxLeb.js} +69 -18
  77. package/server/deploy-queue-VfohaPN_.js +169 -0
  78. package/server/deploy-queue-gHJBycaF.js +3 -0
  79. package/server/deploy-window-CFRZ0-kt.js +3 -0
  80. package/server/{deploy-window-C3F-tihF.js → deploy-window-D4DQb8VP.js} +40 -16
  81. package/server/{dev-supervisor-bcOWqdQE.js → dev-supervisor-DiOBDM1c.js} +2 -2
  82. package/server/{devcontainer-renderer-_d6XhyND.js → devcontainer-renderer-BUOIlfgD.js} +3 -3
  83. package/server/dist-B3YPQa5A.js +3 -0
  84. package/server/{dist-Cb_0uvpS.js → dist-C3A8B8wM.js} +1 -1
  85. package/server/{dist-src-BSoS7mkd.js → dist-src-C0adpegX.js} +1 -1
  86. package/server/{docker-DcMTFTUC.js → docker-BJzlkqYB.js} +2 -2
  87. package/server/docker-Y3PElJb0.js +3 -0
  88. package/server/dod-DlNtcH6n.js +91 -0
  89. package/server/durable-review-pipeline-Cibps-Rg.js +20 -0
  90. package/server/durable-review-pipeline-DP6bIcOY.js +3 -0
  91. package/server/{ensure-devcontainer-DNi-ono3.js → ensure-devcontainer-BAofzBPv.js} +4 -4
  92. package/server/{ensure-devcontainer-BZgOhRo7.js → ensure-devcontainer-DMAbWqtQ.js} +1 -1
  93. package/server/{esm-shims-OSHAYaS1.js → esm-shims-BeObUkaw.js} +1 -1
  94. package/server/{event-store-EV2cMiXj.js → event-store-5UKzh9Jf.js} +1 -1
  95. package/server/{event-store-CQL6NeqB.js → event-store-CrHcVC5_.js} +23 -4
  96. package/server/{events-DTfAe4My.js → events-BNrvchBg.js} +3 -3
  97. package/server/{events-BTdrdEq8.js → events-CF8QDbuV.js} +1 -1
  98. package/server/{factory-CFibJuaw.js → factory-Cmm9Hsho.js} +5 -5
  99. package/server/{feature-registry-population-DKZFMbFt.js → feature-registry-population-B6HpNWRy.js} +4 -4
  100. package/server/{feature-registry-storage-BdPuLcBX.js → feature-registry-storage-DJEFx1Pf.js} +2 -2
  101. package/server/{features-ez2271oH.js → features-D5km80UI.js} +2 -2
  102. package/server/{feedback-target-CoFDHiM8.js → feedback-target-BJ5ZADsu.js} +1 -1
  103. package/server/{feedback-target-7mqqwrX6.js → feedback-target-DSxEL6lP.js} +8 -8
  104. package/server/{feedback-writer-CY5L1lB7.js → feedback-writer-C27Hak8a.js} +5 -5
  105. package/server/{feedback-writer-D3a22RCd.js → feedback-writer-CoB9Z6aU.js} +1 -1
  106. package/server/{flywheel-DHrgCphM.js → flywheel-BHx8XuMr.js} +47 -20
  107. package/server/{flywheel-SVF02Jpq.js → flywheel-DZZdtiOL.js} +1 -1
  108. package/server/{flywheel-DzGtWnJ1.js → flywheel-f662Q-y2.js} +16 -15
  109. package/server/flywheel-merge-order-D_xLMbJU.js +462 -0
  110. package/server/flywheel-merge-order-Dil0LmdN.js +2 -0
  111. package/server/forge-B5o319qI.js +3 -0
  112. package/server/forge-BaKGCya6.js +383 -0
  113. package/server/{from-kNxT0bZC.js → from-B3tZbB55.js} +1 -1
  114. package/server/fs-lock-Bre3sGoz.js +130 -0
  115. package/server/{fts-db-CE46vDkZ.js → fts-db-IVc4_M3f.js} +2 -2
  116. package/server/{fts-operations-CqY6zl-i.js → fts-operations-B9jG8wa3.js} +2 -2
  117. package/server/{git-utils-CRw2zLPC.js → git-utils-CsvYfJU3.js} +30 -5
  118. package/server/git-utils-Xg4PFN45.js +3 -0
  119. package/server/{github-app-ClZ2lk8D.js → github-app-Bmg4R9mv.js} +1 -1
  120. package/server/{github-app-C3QrAUd0.js → github-app-CmNk0zLU.js} +3 -3
  121. package/server/{github-client-DfQYVUaw.js → github-client-B6KM9_wA.js} +1 -1
  122. package/server/{github-client-BnIsSrEN.js → github-client-qazkPrg0.js} +3 -3
  123. package/server/github-pr-lookup-DAcVeRLK.js +58 -0
  124. package/server/{harness-binary-DPUi-Pv8.js → harness-binary-BSpiXaLw.js} +2 -2
  125. package/server/{harness-resolve-3lNZkyT4.js → harness-resolve-BAJu5MX8.js} +4 -4
  126. package/server/{health-events-BDOHby5Q.js → health-events-2Z6Wa9SM.js} +1 -1
  127. package/server/{health-events-BBcTYQKU.js → health-events-BwX32k8d.js} +2 -2
  128. package/server/{hooks-DPVX1rwQ.js → hooks-D1g1jKLI.js} +1 -1
  129. package/server/{hooks-CKZgXlJb.js → hooks-DbtbimEf.js} +2 -2
  130. package/server/{hume-Cz8igP9E.js → hume-DXNiu6nQ.js} +2 -2
  131. package/server/hume-VUCNbTgn.js +3 -0
  132. package/server/{idle-stack-reaper-CuLF0j2H.js → idle-stack-reaper-CRA1e0jr.js} +1 -1
  133. package/server/{idle-stack-reaper-DDIRwxUY.js → idle-stack-reaper-Cy-dQzW4.js} +99 -6
  134. package/server/in-flight-guard-D-sSkADM.js +45 -0
  135. package/server/{infra-BEqFxlJc.js → infra-BDQDRopn.js} +81 -5
  136. package/server/{injection-C8aiVJrF.js → injection-6AGnXxlj.js} +7 -7
  137. package/server/{injection-CPUIqNhI.js → injection-Bl8d_jHZ.js} +1 -1
  138. package/server/inspect-agent-CUwVmr2h.js +2 -0
  139. package/server/{inspect-agent-BLuJ1AkT.js → inspect-agent-nXdIptyh.js} +26 -25
  140. package/server/{internal-token-s0-oKybJ.js → internal-token-DzK385vD.js} +2 -2
  141. package/server/{internal-token-BrcU6qfe.js → internal-token-Ias7N8Kg.js} +1 -1
  142. package/server/{io-C9kF1wtJ.js → io-B00PBNku.js} +44 -27
  143. package/server/{issue-closed-CDJk4pIp.js → issue-closed-BehTG1be.js} +8 -8
  144. package/server/{issue-lifecycle-ojZAzDBP.js → issue-lifecycle-Birk-ifu.js} +42 -30
  145. package/server/{issue-lifecycle-B8sZHVHh.js → issue-lifecycle-BqSuQvbn.js} +1 -1
  146. package/server/{issue-service-singleton-BvJ09SaR.js → issue-service-singleton-B2wXiIlw.js} +1 -1
  147. package/server/{issue-service-singleton-Yx5DdmVJ.js → issue-service-singleton-C6ZduvuY.js} +10 -10
  148. package/server/{issues-BMmP_77e.js → issues-DQ5-LatB.js} +2 -2
  149. package/server/{jsonl-parser-BXSlHwEh.js → jsonl-parser-BDpnGFCl.js} +5 -4
  150. package/server/{label-cleanup-B0UJwnv5.js → label-cleanup-Dwnky8FG.js} +3 -3
  151. package/server/{lifecycle-xmBfK2GJ.js → lifecycle-B3s4sM1G.js} +6 -7
  152. package/server/{lifecycle-yPd___5E.js → lifecycle-B4Xdb4cY.js} +2 -2
  153. package/server/{lifecycle-io-DPo7x11I.js → lifecycle-io-CzTHEooc.js} +1 -1
  154. package/server/{lifecycle-io-BREGpnLk.js → lifecycle-io-DCo6s6ks.js} +5 -5
  155. package/server/{linear-client-BsuUvkdA.js → linear-client-9uq7fhiV.js} +3 -3
  156. package/server/{linear-client-CTskEeT_.js → linear-client-CnbtHiic.js} +1 -1
  157. package/server/linear-mcp-auth-BxUOzswy.js +280 -0
  158. package/server/linear-mcp-auth-D46fBCLf.js +2 -0
  159. package/server/memory-fts-worker.js +1 -1
  160. package/server/{merge-CefQNAnq.js → merge-DiW9RdSB.js} +13 -11
  161. package/server/{merge-agent-4WOWlSYA.js → merge-agent-BLUgRsz3.js} +234 -84
  162. package/server/{merge-agent-CKkgIBPB.js → merge-agent-DQTXZk8z.js} +1 -1
  163. package/server/{merge-batch-ClFn2T-y.js → merge-batch-Cp_j9BGk.js} +1 -1
  164. package/server/merge-completeness-B46KqhtY.js +277 -0
  165. package/server/merge-completeness-BLbB5-6n.js +3 -0
  166. package/server/merge-ops-1abz6O_P.js +2 -0
  167. package/server/merge-rebase-CJJVAJuz.js +2 -0
  168. package/server/{merge-rebase-BfaTyXsw.js → merge-rebase-DIkBjgwq.js} +3 -3
  169. package/server/{merge-set-DJ8-UErs.js → merge-set-CBgHfwM0.js} +11 -5
  170. package/server/merge-set-DeUxFsC3.js +3 -0
  171. package/server/{merge-B1DiziGU.js → merge-sr8Nrnmi.js} +1 -1
  172. package/server/merge-sync-CpGmk6Ch.js +3 -0
  173. package/server/{merge-sync-VPV28g0g.js → merge-sync-kr4vqyjM.js} +409 -153
  174. package/server/{merge-train-CHopycP0.js → merge-train-Dmrcus12.js} +18 -8
  175. package/server/{merge-train-deps-D1cOZzy2.js → merge-train-deps-D_uGX91G.js} +21 -15
  176. package/server/merge-verification-NvaAd8CZ.js +220 -0
  177. package/server/merged-docker-cleanup-worker-DH_hrGPI.js +3 -0
  178. package/server/merged-docker-cleanup-worker-Y1R06TEl.js +107 -0
  179. package/server/{multipart-parser-duPAfSBw.js → multipart-parser-R-oC8dQg.js} +2 -2
  180. package/server/{no-resume-mode-Nw29vaFb.js → no-resume-mode-BgD0JUmM.js} +1 -1
  181. package/server/node_modules/.package-lock.json +30 -30
  182. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/package.json +3 -3
  183. package/server/node_modules/@google-cloud/common/package.json +2 -2
  184. package/server/node_modules/@types/node/README.md +1 -1
  185. package/server/node_modules/@types/node/crypto.d.ts +1 -1
  186. package/server/node_modules/@types/node/package.json +2 -2
  187. package/server/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  188. package/server/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +1 -1
  189. package/server/node_modules/gaxios/package.json +1 -1
  190. package/server/node_modules/google-auth-library/build/src/auth/googleauth.js +24 -19
  191. package/server/node_modules/google-auth-library/package.json +1 -1
  192. package/server/node_modules/google-gax/build/protos/google/api/auth.proto +2 -1
  193. package/server/node_modules/google-gax/build/protos/google/api/backend.proto +12 -1
  194. package/server/node_modules/google-gax/build/protos/google/api/billing.proto +1 -1
  195. package/server/node_modules/google-gax/build/protos/google/api/client.proto +165 -53
  196. package/server/node_modules/google-gax/build/protos/google/api/cloudquotas/v1/resources.proto +1 -1
  197. package/server/node_modules/google-gax/build/protos/google/api/cloudquotas/v1beta/quota_adjuster_settings.proto +7 -3
  198. package/server/node_modules/google-gax/build/protos/google/api/cloudquotas/v1beta/resources.proto +1 -1
  199. package/server/node_modules/google-gax/build/protos/google/api/config_change.proto +1 -1
  200. package/server/node_modules/google-gax/build/protos/google/api/context.proto +1 -1
  201. package/server/node_modules/google-gax/build/protos/google/api/control.proto +3 -3
  202. package/server/node_modules/google-gax/build/protos/google/api/distribution.proto +1 -1
  203. package/server/node_modules/google-gax/build/protos/google/api/documentation.proto +1 -1
  204. package/server/node_modules/google-gax/build/protos/google/api/endpoint.proto +1 -1
  205. package/server/node_modules/google-gax/build/protos/google/api/error_reason.proto +186 -1
  206. package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/checked.proto +31 -3
  207. package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/eval.proto +8 -9
  208. package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/explain.proto +1 -2
  209. package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/syntax.proto +20 -22
  210. package/server/node_modules/google-gax/build/protos/google/api/expr/v1alpha1/value.proto +2 -3
  211. package/server/node_modules/google-gax/build/protos/google/api/field_behavior.proto +1 -1
  212. package/server/node_modules/google-gax/build/protos/google/api/field_info.proto +1 -1
  213. package/server/node_modules/google-gax/build/protos/google/api/http.proto +1 -1
  214. package/server/node_modules/google-gax/build/protos/google/api/httpbody.proto +1 -1
  215. package/server/node_modules/google-gax/build/protos/google/api/label.proto +1 -1
  216. package/server/node_modules/google-gax/build/protos/google/api/launch_stage.proto +1 -1
  217. package/server/node_modules/google-gax/build/protos/google/api/log.proto +1 -1
  218. package/server/node_modules/google-gax/build/protos/google/api/logging.proto +1 -1
  219. package/server/node_modules/google-gax/build/protos/google/api/metric.proto +1 -1
  220. package/server/node_modules/google-gax/build/protos/google/api/monitored_resource.proto +1 -1
  221. package/server/node_modules/google-gax/build/protos/google/api/monitoring.proto +1 -1
  222. package/server/node_modules/google-gax/build/protos/google/api/policy.proto +1 -1
  223. package/server/node_modules/google-gax/build/protos/google/api/quota.proto +1 -1
  224. package/server/node_modules/google-gax/build/protos/google/api/resource.proto +1 -1
  225. package/server/node_modules/google-gax/build/protos/google/api/routing.proto +8 -4
  226. package/server/node_modules/google-gax/build/protos/google/api/service.proto +2 -3
  227. package/server/node_modules/google-gax/build/protos/google/api/source_info.proto +1 -1
  228. package/server/node_modules/google-gax/build/protos/google/api/system_parameter.proto +1 -1
  229. package/server/node_modules/google-gax/build/protos/google/api/usage.proto +7 -27
  230. package/server/node_modules/google-gax/build/protos/google/api/visibility.proto +1 -1
  231. package/server/node_modules/google-gax/build/protos/google/longrunning/operations.proto +20 -1
  232. package/server/node_modules/google-gax/build/protos/google/protobuf/any.proto +52 -108
  233. package/server/node_modules/google-gax/build/protos/google/protobuf/compiler/ruby/ruby_generated_code.proto +2 -0
  234. package/server/node_modules/google-gax/build/protos/google/protobuf/cpp_features.proto +21 -1
  235. package/server/node_modules/google-gax/build/protos/google/protobuf/cpp_file_options.proto +24 -0
  236. package/server/node_modules/google-gax/build/protos/google/protobuf/cpp_options.proto +15 -0
  237. package/server/node_modules/google-gax/build/protos/google/protobuf/descriptor.proto +118 -30
  238. package/server/node_modules/google-gax/build/protos/google/protobuf/field_mask.proto +16 -18
  239. package/server/node_modules/google-gax/build/protos/google/protobuf/internal_options.proto +8 -1
  240. package/server/node_modules/google-gax/build/protos/google/protobuf/json/json_enumval_custom_string.proto +26 -0
  241. package/server/node_modules/google-gax/build/protos/google/protobuf/json_enumvalue_options.proto +29 -0
  242. package/server/node_modules/google-gax/build/protos/google/protobuf/json_options.proto +14 -0
  243. package/server/node_modules/google-gax/build/protos/google/protobuf/struct.proto +38 -22
  244. package/server/node_modules/google-gax/build/protos/google/protobuf/test_protos/forced_micro_string.proto +3 -0
  245. package/server/node_modules/google-gax/build/protos/google/protobuf/test_protos/repeated_field_proxy_import_message.proto +14 -0
  246. package/server/node_modules/google-gax/build/protos/google/protobuf/timestamp.proto +9 -8
  247. package/server/node_modules/google-gax/build/protos/google/protobuf/util/json_format_proto3.proto +18 -0
  248. package/server/node_modules/google-gax/build/protos/google/rpc/code.proto +1 -1
  249. package/server/node_modules/google-gax/build/protos/google/rpc/context/attribute_context.proto +7 -2
  250. package/server/node_modules/google-gax/build/protos/google/rpc/context/audit_context.proto +1 -1
  251. package/server/node_modules/google-gax/build/protos/google/rpc/error_details.proto +5 -5
  252. package/server/node_modules/google-gax/build/protos/google/rpc/http.proto +1 -1
  253. package/server/node_modules/google-gax/build/protos/google/rpc/status.proto +1 -2
  254. package/server/node_modules/google-gax/build/protos/google/type/calendar_period.proto +1 -1
  255. package/server/node_modules/google-gax/build/protos/google/type/color.proto +9 -10
  256. package/server/node_modules/google-gax/build/protos/google/type/date.proto +11 -9
  257. package/server/node_modules/google-gax/build/protos/google/type/datetime.proto +17 -17
  258. package/server/node_modules/google-gax/build/protos/google/type/dayofweek.proto +1 -1
  259. package/server/node_modules/google-gax/build/protos/google/type/decimal.proto +11 -13
  260. package/server/node_modules/google-gax/build/protos/google/type/expr.proto +1 -1
  261. package/server/node_modules/google-gax/build/protos/google/type/fraction.proto +1 -1
  262. package/server/node_modules/google-gax/build/protos/google/type/interval.proto +1 -2
  263. package/server/node_modules/google-gax/build/protos/google/type/latlng.proto +4 -5
  264. package/server/node_modules/google-gax/build/protos/google/type/localized_text.proto +3 -3
  265. package/server/node_modules/google-gax/build/protos/google/type/money.proto +1 -2
  266. package/server/node_modules/google-gax/build/protos/google/type/month.proto +1 -1
  267. package/server/node_modules/google-gax/build/protos/google/type/phone_number.proto +20 -15
  268. package/server/node_modules/google-gax/build/protos/google/type/postal_address.proto +39 -39
  269. package/server/node_modules/google-gax/build/protos/google/type/quaternion.proto +4 -4
  270. package/server/node_modules/google-gax/build/protos/google/type/timeofday.proto +11 -8
  271. package/server/node_modules/google-gax/package.json +5 -5
  272. package/server/node_modules/retry-request/package.json +4 -4
  273. package/server/node_modules/teeny-request/package.json +5 -5
  274. package/server/node_modules/undici/lib/cache/memory-cache-store.js +54 -9
  275. package/server/node_modules/undici/lib/cache/sqlite-cache-store.js +7 -1
  276. package/server/node_modules/undici/lib/core/request.js +12 -1
  277. package/server/node_modules/undici/lib/dispatcher/client-h1.js +11 -2
  278. package/server/node_modules/undici/lib/global.js +36 -16
  279. package/server/node_modules/undici/lib/handler/cache-handler.js +236 -116
  280. package/server/node_modules/undici/lib/handler/cache-revalidation-handler.js +3 -3
  281. package/server/node_modules/undici/lib/handler/retry-handler.js +24 -0
  282. package/server/node_modules/undici/lib/interceptor/cache.js +152 -62
  283. package/server/node_modules/undici/lib/interceptor/decompress.js +5 -2
  284. package/server/node_modules/undici/lib/util/cache.js +328 -66
  285. package/server/node_modules/undici/lib/util/date.js +23 -6
  286. package/server/node_modules/undici/lib/web/cookies/util.js +78 -8
  287. package/server/node_modules/undici/package.json +1 -1
  288. package/server/{orphan-proposed-reconciler-BvKkWMJQ.js → orphan-proposed-reconciler-B6vJHxtX.js} +242 -34
  289. package/server/{orphan-proposed-reconciler-CTSGcK8p.js → orphan-proposed-reconciler-DcgTPPFY.js} +1 -1
  290. package/server/package-lock.json +31 -31
  291. package/server/package.json +1 -1
  292. package/server/{pan-dir-B0c3w0Ya.js → pan-dir-DMzF5wne.js} +25 -11
  293. package/server/{paths-D-xWGHdh.js → paths-sJBSb7Ul.js} +2 -2
  294. package/server/pending-lifecycle-claim-DilzGfgk.js +110 -0
  295. package/server/persistent-logger-H_VjuOu7.js +57 -0
  296. package/server/{pickup-DUCLWrJY.js → pickup-DWhqzliO.js} +4 -3
  297. package/server/pipeline-membership-C88VBnhJ.js +3 -0
  298. package/server/pipeline-membership-D9SBvItj.js +57 -0
  299. package/server/pipeline-membership-gather-4eR-7Tqy.js +3 -0
  300. package/server/pipeline-membership-gather-CeVGnNJ2.js +593 -0
  301. package/server/{pipeline-notifier-BXkJzDC4.js → pipeline-notifier-D0ALV6Nw.js} +2 -2
  302. package/server/{pipeline-notifier-BJr8gQX6.js → pipeline-notifier-DT6xLFao.js} +1 -1
  303. package/server/post-merge-lifecycle-worker-8HIeS_J6.js +50 -0
  304. package/server/{project-pipelines-C0MWUeCU.js → project-pipelines-9SKt2bEc.js} +2 -2
  305. package/server/{project-repos-B6GycDh9.js → project-repos-B5pIphKg.js} +7 -3
  306. package/server/project-repos-DPjOdfPa.js +3 -0
  307. package/server/projects-_n3Zui6K.js +3 -0
  308. package/server/{prompts-DxzFXuLl.js → prompts-CgzMBvQF.js} +2 -2
  309. package/server/{providers-u4Ga0jOr.js → providers-BI1mOBQ4.js} +1 -1
  310. package/server/{providers-qQAwGQDW.js → providers-BJQSnAAp.js} +7 -7
  311. package/server/public/assets/{chunk-BO2N2NFS-BamJdinX.js → chunk-BO2N2NFS-D_pGACYN.js} +4 -4
  312. package/server/public/assets/{diagram-OG6HWLK6-DfOB8-w4.js → diagram-OG6HWLK6-BO6fe3hH.js} +1 -1
  313. package/server/public/assets/{dist-ByIuzMQW.js → dist-5zingMiA.js} +3 -3
  314. package/server/public/assets/{dist-D7zYSEA6.js → dist-CVxhbI2E.js} +1 -1
  315. package/server/public/assets/{ganttDiagram-6RSMTGT7-EdmRyXL3.js → ganttDiagram-6RSMTGT7-Bgj4A7kp.js} +1 -1
  316. package/server/public/assets/{highlighted-body-OFNGDK62-MerOfTX8.js → highlighted-body-OFNGDK62-DNPK7_cm.js} +1 -1
  317. package/server/public/assets/index-DEpY-D1O.js +807 -0
  318. package/server/public/assets/index-Ddkcz3WT.css +1 -0
  319. package/server/public/assets/{linear-BBbArIcK.js → linear-BB0jQT16.js} +1 -1
  320. package/server/public/assets/mermaid-GHXKKRXX-BzPfaQJ1.js +1 -0
  321. package/server/public/assets/{pieDiagram-4H26LBE5-BKIddiJN.js → pieDiagram-4H26LBE5-DeGIzzpZ.js} +1 -1
  322. package/server/public/assets/{prod-B8vYiu52.js → prod-XBLvikex.js} +4 -4
  323. package/server/public/assets/{quadrantDiagram-W4KKPZXB-D6RtoULk.js → quadrantDiagram-W4KKPZXB-BV9SLeWz.js} +1 -1
  324. package/server/public/assets/{sankeyDiagram-5OEKKPKP-CLrCedZX.js → sankeyDiagram-5OEKKPKP-Dwja0gj8.js} +1 -1
  325. package/server/public/assets/{xychartDiagram-2RQKCTM6-hznR8DYl.js → xychartDiagram-2RQKCTM6-DCB4qvfw.js} +1 -1
  326. package/server/public/index.html +2 -2
  327. package/server/{pull-requests-_lHueOHW.js → pull-requests-7BgLDsIo.js} +19 -10
  328. package/server/{pull-requests-7N8WKseP.js → pull-requests-Dq0y6IxE.js} +1 -1
  329. package/server/{queries-CjNIf-Ub.js → queries-C-MUZaIy.js} +824 -192
  330. package/server/{rally-CyWT_lNO.js → rally-CPysR4T_.js} +3 -3
  331. package/server/rally-D_VW4bJv.js +3 -0
  332. package/server/{rally-api-C8e_1JRi.js → rally-api-8Ptlp2os.js} +2 -2
  333. package/server/{rally-api-ClOSd-Tt.js → rally-api-CgosKdKL.js} +1 -1
  334. package/server/{rally-client-sgtVqzNU.js → rally-client-CCX0hADj.js} +1 -1
  335. package/server/{rally-client-lc-nokqr.js → rally-client-iYMHWQD7.js} +5 -5
  336. package/server/{reap-terminal-sessions-7KeHv1R1.js → reap-terminal-sessions-4Xg9NGA8.js} +2 -2
  337. package/server/{reap-terminal-sessions-BtHPo6Xc.js → reap-terminal-sessions-Qf-9LVQc.js} +2 -2
  338. package/server/{rebuild-stack-lwtsW0GO.js → rebuild-stack-CMdgaylx.js} +16 -7
  339. package/server/{rebuild-stack-CFvcBHsS.js → rebuild-stack-DqcOVmJO.js} +2 -2
  340. package/server/{reconstruct-cache-C3Ui7ojV.js → reconstruct-cache-CMZJ_Vjq.js} +9 -7
  341. package/server/record-BTwWhtBb.js +3 -0
  342. package/server/{record-update-dE1Aw83j.js → record-update-DaOKS7Wb.js} +124 -157
  343. package/server/record-update-DhI7eySG.js +3 -0
  344. package/server/{recovery-trip-BvRWfUXM.js → recovery-trip-DDH-02ng.js} +2 -2
  345. package/server/{release-engine-Cx48W7z8.js → release-engine-B2X9AfFC.js} +5 -5
  346. package/server/{release-set-CQfuN9-v.js → release-set-G4XKyQ8K.js} +3 -3
  347. package/server/{remote-C_2hasl7.js → remote-BXarMvqf.js} +3 -3
  348. package/server/{remote-ChgimyYa.js → remote-CUhyqjXk.js} +3 -3
  349. package/server/{remote-agents-By1ige5O.js → remote-agents-Bba-MgSA.js} +311 -48
  350. package/server/{remote-agents-CA3Ihlxj.js → remote-agents-CLZB3Coc.js} +2 -2
  351. package/server/{remote-completion-fVe9e_3u.js → remote-completion-CwAp79EC.js} +13 -13
  352. package/server/resume-mOREjlYu.js +3 -0
  353. package/server/{review-agent-CIGOQYBD.js → review-agent--pOptAEV.js} +65 -50
  354. package/server/{review-agent-DNboMyW4.js → review-agent-BTCNkq2h.js} +1 -1
  355. package/server/{review-artifacts-nRDPuMxd.js → review-artifacts-BNmw8dWE.js} +7 -6
  356. package/server/{review-context-2uj-YQ8J.js → review-context-DFxYOOJW.js} +9 -9
  357. package/server/{in-flight-guard-CAAkqPLu.js → review-convoy-liveness-BgU_1jJf.js} +3 -44
  358. package/server/review-status-CGvlA4o_.js +7737 -0
  359. package/server/review-status-Dma9SFaN.js +3 -0
  360. package/server/review-status-emit-DURrmGYX.js +50 -0
  361. package/server/{review-status-enrichment-Dci-ZwEt.js → review-status-enrichment-8NiNXi5W.js} +4 -4
  362. package/server/review-status-source-BLx_1siH.js +3 -0
  363. package/server/{review-status-source-CxuEjLGg.js → review-status-source-DIk1JSow.js} +24 -3
  364. package/server/{review-status-sync-BTOpxtTC.js → review-status-sync-0GxOqeqF.js} +11 -6
  365. package/server/{review-status-sync-DSDK3OMy.js → review-status-sync-muT-EBp2.js} +1 -1
  366. package/server/{review-verdict-feedback-CTd4QMBu.js → review-verdict-feedback-HwF6ODFy.js} +1 -1
  367. package/server/{review-verdict-feedback-CCjVA7Uk.js → review-verdict-feedback-xJNdqBnX.js} +65 -11
  368. package/server/{rollup-FGsKki9R.js → rollup-BQaol5TX.js} +8 -8
  369. package/server/{rollup-BKQC7jp4.js → rollup-BR4t_wck.js} +1 -1
  370. package/server/{scanner-CnqEZeDy.js → scanner-C-D2cFdX.js} +8 -7
  371. package/server/{sequence-io-D909zgeH.js → sequence-io-Bmf1EZM5.js} +4 -4
  372. package/server/{sequencer-agent-CzkcK6P5.js → sequencer-agent-CigMyKh2.js} +7 -6
  373. package/server/server.js +2005 -614
  374. package/server/{service-CLeAoU6G.js → service-CD0DvFvD.js} +114 -68
  375. package/server/{session-fork-CHI1XvL9.js → session-fork-B6cQ5eya.js} +2 -2
  376. package/server/{session-history-BT3IvqhC.js → session-history-3ON_IJjm.js} +7 -55
  377. package/server/settings-CVmWiJ-r.js +2 -0
  378. package/server/{settings-C0zgxOGf.js → settings-PilbFZAM.js} +3 -2
  379. package/server/{settings-BTMvpNFU.js → settings-VN0qOh4U.js} +3 -3
  380. package/server/{shadow-engineering-BJfgm-hX.js → shadow-engineering-DXvx77oE.js} +3 -3
  381. package/server/{shadow-state-7a-524T8.js → shadow-state-BBk_zacw.js} +2 -2
  382. package/server/{shadow-state-DnDyjujH.js → shadow-state-CZBp7pwq.js} +1 -1
  383. package/server/{shadow-utils-Db3oroFG.js → shadow-utils-DdZ05AJS.js} +2 -2
  384. package/server/{ship-log-D9MlVzYU.js → ship-log-7kJfjUX2.js} +1 -1
  385. package/server/{smart-compaction-CV2ukKND.js → smart-compaction-8fA5k5XN.js} +1 -1
  386. package/server/{smart-compaction-KCYScAU1.js → smart-compaction-ByhL9cRS.js} +8 -7
  387. package/server/{spawn-planning-session-DKpdFyOC.js → spawn-planning-session-pcF-YeFE.js} +38 -50
  388. package/server/spawn-planning-session-vLUJoFjy.js +3 -0
  389. package/server/{specialist-completion-Ky9wCDpb.js → specialist-completion-B07XjWD2.js} +1 -1
  390. package/server/{specialist-context-Bn3dCGS2.js → specialist-context-DJ-zFyL3.js} +5 -5
  391. package/server/{specialist-handoff-logger-CMEwYxa2.js → specialist-handoff-logger-aKSxbIgD.js} +2 -2
  392. package/server/{specialist-logs-C5p8G7tx.js → specialist-logs-Dae-n52_.js} +3 -3
  393. package/server/{specialists-CC4r-c2s.js → specialists-6PWdtWcg.js} +1177 -311
  394. package/server/{specialists-DM6bWjsi.js → specialists-Bz-wFT7R.js} +1 -1
  395. package/server/{specialists-jiuuyVkp.js → specialists-DUiExaxb.js} +18 -18
  396. package/server/{specialists-CShuVGWT.js → specialists-KR3pKulN.js} +1 -1
  397. package/server/specs--enInima.js +3 -0
  398. package/server/src-B948bGVR.js +11452 -0
  399. package/server/{src-CXmtj0im.js → src-rac0Mepv.js} +6 -6
  400. package/server/{src-CdmnTM2m.js → src-vHy2-oCv.js} +3 -3
  401. package/server/{stack-health-Bn3o8FBX.js → stack-health-BikqHSjn.js} +1 -1
  402. package/server/{stack-health-DxSdG9cW.js → stack-health-DqLTiEu4.js} +7 -5
  403. package/server/{stale-task-claims-KJKxxiiQ.js → stale-task-claims-Cab_Fo_Z.js} +5 -4
  404. package/server/{staleness-DPm7ClwA.js → staleness-C-a5rBxF.js} +1 -1
  405. package/server/{staleness-CT34nwr9.js → staleness-CGTZyp6V.js} +1 -1
  406. package/server/{state-home-Cn_Qu8IX.js → state-home-722Dkx92.js} +2 -2
  407. package/server/{state-mapping-BL_-3Yt8.js → state-mapping-CybR81Uf.js} +1 -1
  408. package/server/{state-migrate-BGg2ZaOt.js → state-migrate-2u8wIpoL.js} +4 -4
  409. package/server/{stuck-remediation-DYuPRYYw.js → stuck-remediation-CC6q3eqQ.js} +84 -26
  410. package/server/{stuck-remediation-s9_2qfi6.js → stuck-remediation-r1TJu68G.js} +1 -1
  411. package/server/{substrate-bug-weights-service-B-FwCs5V.js → substrate-bug-weights-service-CzIyyWFT.js} +3 -3
  412. package/server/{summary-fork-DpcxN9tf.js → summary-fork-BqgmgPDt.js} +2 -2
  413. package/server/{summary-fork-D1RAk9rJ.js → summary-fork-Df2WFijM.js} +8 -8
  414. package/server/supervisor/{injection-budget-Csw5tqfJ.js → injection-budget-Cg_KIb3o.js} +1 -1
  415. package/server/supervisor/{paths-DehGY2Fj.js → paths-BBOnCYlO.js} +10 -2
  416. package/server/supervisor/pty-supervisor.js +50 -4
  417. package/server/supervisor/{pty-token-x-ea28Us.js → pty-token-BbjwEUUM.js} +3 -3
  418. package/server/supervisor-B4anCCSm.js +2 -0
  419. package/server/{supervisor-wM4ooB5O.js → supervisor-BxqSpjcN.js} +3 -3
  420. package/server/{swarm-readiness-DlP_UjHq.js → swarm-readiness-DfFxa9-n.js} +3 -3
  421. package/server/{system-prerequisites-DUDj1YHf.js → system-prerequisites-ICLSkhhZ.js} +2 -2
  422. package/server/{teardown-workspace-DeTTImn-.js → teardown-workspace-DRdi_CPa.js} +15 -16
  423. package/server/{test-agent-queue-MbxX5vqq.js → test-agent-queue-A_-p-i0I.js} +8 -7
  424. package/server/{test-verdict-gscuksPv.js → test-verdict-BHgTAwIG.js} +1 -1
  425. package/server/{test-verdict-bWYBtqBg.js → test-verdict-C4i9aqEP.js} +1 -1
  426. package/server/{tldr-daemon-BYFkts95.js → tldr-daemon-CvWXBhX1.js} +1 -1
  427. package/server/{tldr-daemon-C-69c3OI.js → tldr-daemon-wvsU6bKv.js} +2 -2
  428. package/server/{tmux-R7N7y-Mh.js → tmux-CfDHob9M.js} +174 -4
  429. package/server/{tmux-B6z7h_vZ.js → tmux-Ctk6RV5l.js} +1 -1
  430. package/server/{token-BK6t8BIT.js → token-DrxwytsZ.js} +2 -2
  431. package/server/{token-util-DxXu-vd1.js → token-util-B48BlCba.js} +1 -1
  432. package/server/token-util-D411CAq9.js +3 -0
  433. package/server/{tracker-config-G6latr8C.js → tracker-config-BcPMElRB.js} +2 -2
  434. package/server/{tracker-utils-DHv5pSDT.js → tracker-utils-CJ6BHjcD.js} +3 -3
  435. package/server/{traefik-connect-Df2uXPsQ.js → traefik-connect-DZ6nMYMj.js} +1 -1
  436. package/server/{tunnel-DGdUkGoZ.js → tunnel-Bp-dRHZz.js} +1 -1
  437. package/server/{tunnel-CDVKJpRv.js → tunnel-DUbUPElU.js} +3 -3
  438. package/server/{typed-errors-BHhE85Ul.js → typed-errors-CKeoDdU3.js} +1 -1
  439. package/server/{typed-errors-2BTMxkZq.js → typed-errors-DyjseiB6.js} +1 -1
  440. package/server/{types-hraoaQIp.js → types-Cm5ASJbq.js} +1 -1
  441. package/server/{types-5M0lupud.js → types-Di8wdakq.js} +1 -1
  442. package/server/uat-promote-verification-CoJuh7XO.js +92 -0
  443. package/server/uat-train-4Q0k06CQ.js +0 -0
  444. package/server/uat-train-Dewoatps.js +2 -0
  445. package/server/{validate-IfDGkaVR.js → validate-B0C8p66t.js} +8 -6
  446. package/server/{validation-Dw1pzDzr.js → validation-B_kIRfNe.js} +4 -4
  447. package/server/{validation-CC9OPqJZ.js → validation-hVOwQk8T.js} +1 -1
  448. package/server/{verification-artifact-B3itKTxu.js → verification-artifact-BxlxTiYK.js} +1 -1
  449. package/server/{verification-artifact-TVFSz_q1.js → verification-artifact-D70AtckY.js} +1 -1
  450. package/server/{verification-runner-BW4HOKAz.js → verification-runner-Bc3cJvpC.js} +1 -1
  451. package/server/{verification-runner-CkgX6EtI.js → verification-runner-KZTz6u72.js} +40 -18
  452. package/server/{vtt-parser-DYPbKcIJ.js → vtt-parser-CE_i3Bcw.js} +1 -1
  453. package/server/{work-agent-prompt-Du8Vh2aJ.js → work-agent-prompt-ByrPAzOy.js} +20 -9
  454. package/server/{workflows-mbQzh6mQ.js → workflows-D0vP1WrK.js} +252 -99
  455. package/server/workflows-DtDX08ed.js +2 -0
  456. package/server/{workspace--8tnhDI0.js → workspace-COWvdibH.js} +1 -1
  457. package/server/{workspace-BPUws1-_.js → workspace-DQkRPLlQ.js} +3 -3
  458. package/server/workspace-anchor-drift-DXYIAHzr.js +224 -0
  459. package/server/workspace-anchor-drift-pwz23TI1.js +3 -0
  460. package/server/{workspace-config-CIVWZOQr.js → workspace-config-BdZM4PvZ.js} +1 -1
  461. package/server/{workspace-manager-CBhNdzE4.js → workspace-manager-BPgTrG66.js} +157 -118
  462. package/server/workspace-manager-C1F3XsnS.js +3 -0
  463. package/server/{workspace-metadata-BzHnwwX4.js → workspace-metadata-CdjzAP8x.js} +1 -1
  464. package/server/{workspace-metadata-_WygnyoX.js → workspace-metadata-DkO_iTLo.js} +2 -2
  465. package/server/{workspaces-Do_9J0LQ.js → workspaces-CRBJikLp.js} +749 -299
  466. package/sync-sources/dev-skills/pan-dashboard-restart/SKILL.md +34 -10
  467. package/sync-sources/hooks/linear-mcp-auth-hook +97 -0
  468. package/sync-sources/rules/ask-user-question-self-contained.md +9 -0
  469. package/sync-sources/skills/pan-close/SKILL.md +5 -3
  470. package/sync-sources/skills/pan-merge/SKILL.md +7 -5
  471. package/sync-sources/skills/pan-peer-review/SKILL.md +195 -0
  472. package/sync-sources/skills/pan-release/SKILL.md +57 -0
  473. package/sync-sources/skills/pan-reload/SKILL.md +3 -3
  474. package/sync-sources/skills/pan-restart/SKILL.md +5 -4
  475. package/sync-sources/skills/pan-review/SKILL.md +7 -1
  476. package/sync-sources/skills/pan-sync-main/SKILL.md +9 -8
  477. package/sync-sources/skills/pipeline-status/SKILL.md +10 -1
  478. package/sync-sources/skills/workspace-add-repo/SKILL.md +16 -1
  479. package/server/activity-logger-OEUBdfZ8.js +0 -3
  480. package/server/agent-state-Bc3tzUC8.js +0 -3
  481. package/server/agent-state-service-D5UGKIJL.js +0 -2
  482. package/server/agents-wi9NWzs2.js +0 -3
  483. package/server/archive-planning-BZDgzoEj.js +0 -3
  484. package/server/cli-B86rejVV.js +0 -3
  485. package/server/conflict-gate-BhAY7TUd.js +0 -3
  486. package/server/conversation-service-BLd3MYsG.js +0 -3
  487. package/server/deacon-kiQrb4ZT.js +0 -4
  488. package/server/deacon-swarm-C-GwfjJy.js +0 -2
  489. package/server/deploy-window-DkZraDyj.js +0 -3
  490. package/server/dist-Bzy0y69j.js +0 -3
  491. package/server/dod-C6n9RV3G.js +0 -66
  492. package/server/flywheel-merge-order-UU0tiUld.js +0 -245
  493. package/server/flywheel-merge-order-UUcsCDb6.js +0 -2
  494. package/server/forge-CNFnyqps.js +0 -270
  495. package/server/forge-DXnS_YFH.js +0 -2
  496. package/server/git-utils-D0_yhCgF.js +0 -3
  497. package/server/github-pr-lookup-D16NGsSO.js +0 -44
  498. package/server/hume-ccTf4wTX.js +0 -3
  499. package/server/inspect-agent-Brtz0URj.js +0 -2
  500. package/server/label-reconciler-B4iOAjlC.js +0 -113
  501. package/server/launcher-generator-BBWG_SiS.js +0 -473
  502. package/server/merge-ops-CR44oU9-.js +0 -2
  503. package/server/merge-set-bUqbm3yc.js +0 -3
  504. package/server/merge-sync-BJYeOODr.js +0 -3
  505. package/server/merge-verification-BkaOqPsw.js +0 -124
  506. package/server/pipeline-membership-mY3GprlK.js +0 -420
  507. package/server/project-repos-DXKQsc_m.js +0 -3
  508. package/server/projects-vjjcmiN8.js +0 -3
  509. package/server/public/assets/index-CWeMerGO.js +0 -804
  510. package/server/public/assets/index-CenuJ3Cw.css +0 -1
  511. package/server/public/assets/mermaid-GHXKKRXX-CpPWAFwE.js +0 -1
  512. package/server/rally-zhhtXuDP.js +0 -3
  513. package/server/record-CN0pj4_5.js +0 -3
  514. package/server/record-update-bLJxAXH4.js +0 -3
  515. package/server/resume-BFv1PGpA.js +0 -3
  516. package/server/review-status-btEYlaxA.js +0 -3
  517. package/server/review-status-kZj_KyCk.js +0 -1470
  518. package/server/settings-66A6uvIA.js +0 -2
  519. package/server/spawn-planning-session-qUC2VWu3.js +0 -2
  520. package/server/specs-C8Wsn2XO.js +0 -3
  521. package/server/src-DtcUOZCq.js +0 -4826
  522. package/server/supervisor-FTJAIsAK.js +0 -2
  523. package/server/token-util-DuPuNriz.js +0 -3
  524. package/server/tracker-utils-B4ylXZQK.js +0 -3
  525. package/server/uat-train-B05BWkp-.js +0 -2
  526. package/server/uat-train-DDSrSoV1.js +0 -2152
  527. package/server/workflows-BQu4RFQ-.js +0 -2
  528. package/server/workspace-manager-CWT55qeI.js +0 -3
@@ -1,1470 +0,0 @@
1
- import { n as __esmMin } from "./rolldown-runtime-DNCzzKnI.js";
2
- import { Et as getIssueWorkspacePath, Nt as readIssueRecordSync, Ot as init_record, Tn as init_projects, fn as findProjectByPathSync, jt as readIssueRecord, nn as init_state_read_home, rn as resolveStateReadHomeSync, yn as getProjectSync, zn as resolveProjectFromIssueSync } from "./config-yaml-DySPNmKN.js";
3
- import { a as init_activity_logger, n as emitActivityEntrySync, r as emitActivityTtsSync } from "./activity-logger-DDlOIAML.js";
4
- import { d as getOverdeckDatabaseSync, f as init_infra } from "./infra-BEqFxlJc.js";
5
- import { n as updateIssueRecord, t as init_record_update } from "./record-update-dE1Aw83j.js";
6
- import { d as init_cost_sync, i as getCostBreakdownByStageAndModelSync, o as getCostForIssueSync } from "./cost-sync-BsN6ER0n.js";
7
- import { r as notifyPipelineSync, t as init_pipeline_notifier } from "./pipeline-notifier-BXkJzDC4.js";
8
- import { c as init_review_status_sync, d as init_review_status_normalize, f as normalizeReviewStatusSync, l as markWorkspaceStuck$1, n as deleteReviewStatus, o as getReviewStatusFromDbSync, r as getAllReviewStatusesFromDb, s as getReviewStatusesFromDb, t as clearWorkspaceStuck$1, u as upsertReviewStatusSync } from "./review-status-sync-BTOpxtTC.js";
9
- import { a as registerReviewStatusMapReader, n as init_review_status_source } from "./review-status-source-CxuEjLGg.js";
10
- import { a as PAN_DIRNAME, p as init_types, r as PAN_CONTINUES_DIRNAME } from "./types-hraoaQIp.js";
11
- import { i as init_merge_set, r as getMergeSetSync } from "./merge-set-DJ8-UErs.js";
12
- import { o as init_lifecycle, r as XBRIEF_FILENAME_SUFFIX, t as LEGACY_VBRIEF_FILENAME_SUFFIX } from "./lifecycle-yPd___5E.js";
13
- import { dirname, join } from "node:path";
14
- import { Data, Effect } from "effect";
15
- import { join as join$1 } from "path";
16
- import { homedir } from "os";
17
- import { hostname } from "node:os";
18
- import { existsSync, mkdirSync, promises, readFileSync, writeFileSync } from "node:fs";
19
- //#region ../../lib/overdeck/agent-state-sync.ts
20
- function isoFromMillis(value) {
21
- return value == null ? void 0 : new Date(value).toISOString();
22
- }
23
- function millisFromIso(value) {
24
- if (!value) return null;
25
- const millis = Date.parse(value);
26
- return Number.isFinite(millis) ? millis : null;
27
- }
28
- function boolFromInteger(value) {
29
- return value == null ? void 0 : Boolean(value);
30
- }
31
- function hostOverrideFromRow(value) {
32
- if (value == null) return void 0;
33
- return value === "1" || value === "true" || value === "yes";
34
- }
35
- function hostOverrideToRow(value) {
36
- return value === true ? "true" : null;
37
- }
38
- function overdeckRowToAgentState(row) {
39
- const deliveryMethod = row.delivery_method;
40
- return {
41
- id: row.id,
42
- issueId: row.issue_id,
43
- workspace: row.workspace,
44
- role: row.role,
45
- model: row.model ?? "",
46
- status: row.status,
47
- startedAt: isoFromMillis(row.started_at) ?? isoFromMillis(row.updated_at) ?? (/* @__PURE__ */ new Date()).toISOString(),
48
- harness: row.harness ? row.harness : void 0,
49
- lastResumeAt: isoFromMillis(row.last_resume_at),
50
- stoppedByUser: boolFromInteger(row.stopped_by_user),
51
- stoppedByPause: boolFromInteger(row.stopped_by_pause),
52
- kickoffDelivered: boolFromInteger(row.kickoff_delivered),
53
- paused: boolFromInteger(row.paused),
54
- pausedReason: row.paused_reason ?? void 0,
55
- yieldedByScheduler: boolFromInteger(row.yielded_by_scheduler),
56
- yieldedAt: isoFromMillis(row.yielded_at),
57
- lastYieldResumeAt: isoFromMillis(row.last_yield_resume_at),
58
- troubled: boolFromInteger(row.troubled),
59
- consecutiveFailures: row.consecutive_failures ?? void 0,
60
- firstFailureInRunAt: isoFromMillis(row.first_failure_in_run_at),
61
- lastFailureNextRetryAt: isoFromMillis(row.last_failure_next_retry_at),
62
- sessionId: row.session_id ?? void 0,
63
- channelsEnabled: boolFromInteger(row.channels_enabled),
64
- supervisorEnabled: deliveryMethod === "supervisor" ? true : void 0,
65
- deliveryMethod: deliveryMethod ?? void 0,
66
- hostOverride: hostOverrideFromRow(row.host_override),
67
- stoppedAt: isoFromMillis(row.stopped_at),
68
- pausedAt: isoFromMillis(row.paused_at),
69
- troubledAt: isoFromMillis(row.troubled_at),
70
- lastActivity: isoFromMillis(row.last_activity),
71
- lastFailureReason: row.last_failure_reason ?? void 0,
72
- phase: row.phase == null ? void 0 : row.phase,
73
- roleRunHead: row.role_run_head ?? void 0,
74
- flywheelRunId: row.flywheel_run_id ?? void 0,
75
- costSoFar: row.cost_so_far ?? void 0,
76
- reviewSubRole: row.review_sub_role ?? void 0,
77
- reviewRunId: row.review_run_id ?? void 0,
78
- reviewSynthesisAgentId: row.review_synthesis_agent_id ?? void 0,
79
- reviewOutputPath: row.review_output_path ?? void 0,
80
- reviewDeadlineAt: isoFromMillis(row.review_deadline_at),
81
- reviewMonitorSignaled: row.review_monitor_signaled ?? void 0,
82
- reviewRetryAttempt: row.review_retry_attempt ?? void 0,
83
- reviewDiscoveryPending: boolFromInteger(row.review_discovery_pending),
84
- reviewContextManifestPath: row.review_context_manifest_path ?? void 0,
85
- reviewDiscoveryReadyAt: isoFromMillis(row.review_discovery_ready_at) ?? void 0,
86
- reviewConvoyForkedAt: isoFromMillis(row.review_convoy_forked_at) ?? void 0,
87
- reviewForkCacheChecked: boolFromInteger(row.review_fork_cache_checked),
88
- reviewForkedFromParent: boolFromInteger(row.review_forked_from_parent)
89
- };
90
- }
91
- /** Exported for agent-projection.ts transactional writes. */
92
- function stateToOverdeckParamsForDb(state, updatedAt) {
93
- const deliveryMethod = state.deliveryMethod ?? (state.supervisorEnabled === true ? "supervisor" : null);
94
- return [
95
- state.id,
96
- state.issueId,
97
- state.role,
98
- state.status,
99
- state.workspace,
100
- state.sessionId ?? null,
101
- state.harness ?? "",
102
- state.model ?? "",
103
- hostOverrideToRow(state.hostOverride),
104
- deliveryMethod,
105
- millisFromIso(state.startedAt),
106
- millisFromIso(state.lastResumeAt),
107
- state.stoppedByUser == null ? null : state.stoppedByUser ? 1 : 0,
108
- state.stoppedByPause == null ? null : state.stoppedByPause ? 1 : 0,
109
- state.kickoffDelivered == null ? null : state.kickoffDelivered ? 1 : 0,
110
- state.paused == null ? null : state.paused ? 1 : 0,
111
- state.pausedReason ?? null,
112
- state.yieldedByScheduler == null ? null : state.yieldedByScheduler ? 1 : 0,
113
- millisFromIso(state.yieldedAt),
114
- millisFromIso(state.lastYieldResumeAt),
115
- state.troubled == null ? null : state.troubled ? 1 : 0,
116
- state.channelsEnabled == null ? null : state.channelsEnabled ? 1 : 0,
117
- state.consecutiveFailures ?? null,
118
- millisFromIso(state.firstFailureInRunAt),
119
- millisFromIso(state.lastFailureNextRetryAt),
120
- millisFromIso(state.stoppedAt),
121
- millisFromIso(state.pausedAt),
122
- millisFromIso(state.troubledAt),
123
- millisFromIso(state.lastActivity),
124
- state.lastFailureReason ?? null,
125
- state.phase ?? null,
126
- state.roleRunHead ?? null,
127
- state.flywheelRunId ?? null,
128
- state.costSoFar ?? null,
129
- state.reviewSubRole ?? null,
130
- state.reviewRunId ?? null,
131
- state.reviewSynthesisAgentId ?? null,
132
- state.reviewOutputPath ?? null,
133
- millisFromIso(state.reviewDeadlineAt),
134
- state.reviewMonitorSignaled ?? null,
135
- state.reviewRetryAttempt ?? null,
136
- state.reviewDiscoveryPending == null ? null : state.reviewDiscoveryPending ? 1 : 0,
137
- state.reviewContextManifestPath ?? null,
138
- millisFromIso(state.reviewDiscoveryReadyAt),
139
- millisFromIso(state.reviewConvoyForkedAt),
140
- state.reviewForkCacheChecked == null ? null : state.reviewForkCacheChecked ? 1 : 0,
141
- state.reviewForkedFromParent == null ? null : state.reviewForkedFromParent ? 1 : 0,
142
- updatedAt
143
- ];
144
- }
145
- function getOverdeckAgentStateSync(agentId) {
146
- const row = getOverdeckDatabaseSync().prepare(`${SELECT_AGENT_SQL} WHERE id = ?`).get(agentId);
147
- return row ? overdeckRowToAgentState(row) : null;
148
- }
149
- function listOverdeckAgentStatesSync() {
150
- return getOverdeckDatabaseSync().prepare(SELECT_AGENT_SQL).all().map(overdeckRowToAgentState);
151
- }
152
- function saveOverdeckAgentStateSync(state) {
153
- const db = getOverdeckDatabaseSync();
154
- const updatedAt = Date.now();
155
- db.prepare(`INSERT OR IGNORE INTO issues (id, stage, updated_at) VALUES (?, 'working', ?)`).run(state.issueId, updatedAt);
156
- db.prepare(`INSERT OR REPLACE INTO agents (${AGENT_COLUMNS_FOR_DB.join(", ")}) VALUES (${AGENT_COLUMNS_FOR_DB.map(() => "?").join(", ")})`).run(...stateToOverdeckParamsForDb(state, updatedAt));
157
- }
158
- var AGENT_COLUMNS_FOR_DB, SELECT_AGENT_SQL;
159
- var init_agent_state_sync = __esmMin((() => {
160
- init_infra();
161
- AGENT_COLUMNS_FOR_DB = [
162
- "id",
163
- "issue_id",
164
- "role",
165
- "status",
166
- "workspace",
167
- "session_id",
168
- "harness",
169
- "model",
170
- "host_override",
171
- "delivery_method",
172
- "started_at",
173
- "last_resume_at",
174
- "stopped_by_user",
175
- "stopped_by_pause",
176
- "kickoff_delivered",
177
- "paused",
178
- "paused_reason",
179
- "yielded_by_scheduler",
180
- "yielded_at",
181
- "last_yield_resume_at",
182
- "troubled",
183
- "channels_enabled",
184
- "consecutive_failures",
185
- "first_failure_in_run_at",
186
- "last_failure_next_retry_at",
187
- "stopped_at",
188
- "paused_at",
189
- "troubled_at",
190
- "last_activity",
191
- "last_failure_reason",
192
- "phase",
193
- "role_run_head",
194
- "flywheel_run_id",
195
- "cost_so_far",
196
- "review_sub_role",
197
- "review_run_id",
198
- "review_synthesis_agent_id",
199
- "review_output_path",
200
- "review_deadline_at",
201
- "review_monitor_signaled",
202
- "review_retry_attempt",
203
- "review_discovery_pending",
204
- "review_context_manifest_path",
205
- "review_discovery_ready_at",
206
- "review_convoy_forked_at",
207
- "review_fork_cache_checked",
208
- "review_forked_from_parent",
209
- "updated_at"
210
- ];
211
- SELECT_AGENT_SQL = `SELECT ${AGENT_COLUMNS_FOR_DB.join(", ")} FROM agents`;
212
- }));
213
- //#endregion
214
- //#region ../../lib/pan-dir/records.ts
215
- /**
216
- * PAN-1908 / PAN-1919: per-issue permanent-record builder.
217
- *
218
- * Builds a single JSON record per issue from SQLite (pipeline verdicts, usage,
219
- * merges) plus the legacy project-side continue file. The actual read/write/path
220
- * helpers live in `record.ts` (PAN-1919 single-writer module) and write the
221
- * record onto the feature branch at `<workspace>/.pan/records/<issue>.json`.
222
- */
223
- function projectContinue(raw) {
224
- return {
225
- decisions: raw?.decisions,
226
- hazards: raw?.hazards,
227
- resumePoint: raw?.resumePoint,
228
- sessionHistory: raw?.sessionHistory,
229
- feedback: raw?.feedback ?? [],
230
- scopeDrift: raw?.scopeDrift
231
- };
232
- }
233
- function projectPipeline(issueId, status, existing) {
234
- const base = {
235
- issueId,
236
- reviewStatus: status?.reviewStatus ?? "pending",
237
- testStatus: status?.testStatus ?? "pending",
238
- verificationStatus: status?.verificationStatus,
239
- inspectStatus: status?.inspectStatus,
240
- mergeStatus: status?.mergeStatus,
241
- releaseStatus: status?.releaseStatus ?? "pending",
242
- readyForMerge: status?.readyForMerge ?? false,
243
- closedOut: existing?.closedOut,
244
- closedOutAt: existing?.closedOutAt,
245
- panDoneRecoveredAt: existing?.panDoneRecoveredAt,
246
- updatedAt: status?.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString()
247
- };
248
- if (!status) return base;
249
- return {
250
- ...base,
251
- reviewNotes: status.reviewNotes,
252
- testNotes: status.testNotes,
253
- verificationNotes: status.verificationNotes,
254
- inspectNotes: status.inspectNotes,
255
- mergeNotes: status.mergeNotes,
256
- blockerReasons: status.blockerReasons,
257
- prUrl: status.prUrl,
258
- prNumber: status.prNumber,
259
- prHeadSha: status.prHeadSha,
260
- reviewedAtCommit: status.reviewedAtCommit,
261
- lastVerifiedCommit: status.lastVerifiedCommit,
262
- reviewRequestedAt: status.reviewRequestedAt,
263
- reviewSpawnedAt: typeof status.reviewSpawnedAt === "number" ? new Date(status.reviewSpawnedAt).toISOString() : status.reviewSpawnedAt,
264
- scopeDrift: status.scopeDrift,
265
- autoMerge: status.autoMerge,
266
- deaconIgnored: status.deaconIgnored,
267
- deaconIgnoredAt: status.deaconIgnoredAt,
268
- deaconIgnoredReason: status.deaconIgnoredReason,
269
- reviewerVerdicts: status.reviewerVerdicts,
270
- strikeReadyHead: status.strikeReadyHead,
271
- strikeReadyAt: status.strikeReadyAt,
272
- strikeLandingState: status.strikeLandingState,
273
- strikeRecoveryCount: status.strikeRecoveryCount,
274
- strikeTransportRetryCount: status.strikeTransportRetryCount,
275
- strikeNextAttemptAt: status.strikeNextAttemptAt,
276
- strikeLandingAttempts: status.strikeLandingAttempts
277
- };
278
- }
279
- function projectUsage(issueId) {
280
- const { byStage, totals } = getCostBreakdownByStageAndModelSync(issueId);
281
- return {
282
- byStage,
283
- totals,
284
- costAtCloseOut: {
285
- usd: getCostForIssueSync(issueId)?.totalCost ?? 0,
286
- pricingAsOf: (/* @__PURE__ */ new Date()).toISOString()
287
- }
288
- };
289
- }
290
- function projectMerges(issueId) {
291
- const mergeSet = getMergeSetSync(issueId);
292
- if (!mergeSet) return [];
293
- return mergeSet.repos.map((r) => r.artifactUrl).filter((url) => typeof url === "string" && url.length > 0);
294
- }
295
- function resolveContinuePath(projectRoot, issueId) {
296
- const stateHome = resolveStateReadHomeSync(findProjectByPathSync(projectRoot) ?? {
297
- name: projectRoot,
298
- path: projectRoot
299
- });
300
- const basePath = join(stateHome.migrated ? join(stateHome.root, PAN_CONTINUES_DIRNAME) : join(stateHome.root, PAN_DIRNAME, PAN_CONTINUES_DIRNAME), issueId.toLowerCase());
301
- const canonicalPath = `${basePath}${XBRIEF_FILENAME_SUFFIX}`;
302
- const legacyPath = `${basePath}${LEGACY_VBRIEF_FILENAME_SUFFIX}`;
303
- if (existsSync(canonicalPath)) return canonicalPath;
304
- if (existsSync(legacyPath)) return legacyPath;
305
- return canonicalPath;
306
- }
307
- async function readLegacyContinueText(projectRoot, issueId) {
308
- try {
309
- return await promises.readFile(resolveContinuePath(projectRoot, issueId), "utf-8");
310
- } catch {
311
- return null;
312
- }
313
- }
314
- /** Read workspace continue.json and return its statusOverrides (if any). */
315
- async function readWorkspaceContinueStatusOverrides(issueId) {
316
- const workspacePath = getIssueWorkspacePath(issueId);
317
- if (!workspacePath || !existsSync(workspacePath)) return void 0;
318
- const continuePath = join(workspacePath, ".pan", "continue.json");
319
- try {
320
- const text = await promises.readFile(continuePath, "utf-8");
321
- return JSON.parse(text).statusOverrides ?? void 0;
322
- } catch {
323
- return;
324
- }
325
- }
326
- /** Read harness/model for an issue from the overdeck agents table (most recent work agent). */
327
- function projectAgentHarnessModel(issueId) {
328
- try {
329
- const agents = listOverdeckAgentStatesSync().filter((a) => a.issueId?.toUpperCase() === issueId.toUpperCase());
330
- const workAgent = agents.filter((a) => a.role === "work").sort((a, b) => (b.startedAt ?? "").localeCompare(a.startedAt ?? ""))[0] ?? agents[agents.length - 1];
331
- if (workAgent?.model === "pending-work-spawn") return {};
332
- return {
333
- harness: workAgent?.harness,
334
- model: workAgent?.model ?? void 0
335
- };
336
- } catch {
337
- return {};
338
- }
339
- }
340
- async function buildIssueRecord(project, issueId, opts = {}) {
341
- const existing = await readIssueRecord(project, issueId);
342
- const legacyContinueText = await readLegacyContinueText(project.path, issueId);
343
- const continueSubset = projectContinue(legacyContinueText ? JSON.parse(legacyContinueText) : null);
344
- const pipelineRecord = projectPipeline(issueId, opts.reviewStatus ?? null, existing?.pipeline);
345
- const usageRecord = projectUsage(issueId);
346
- const merges = projectMerges(issueId);
347
- const workspaceStatusOverrides = await readWorkspaceContinueStatusOverrides(issueId);
348
- const mergedStatusOverrides = workspaceStatusOverrides ? {
349
- ...existing?.statusOverrides ?? {},
350
- ...workspaceStatusOverrides
351
- } : existing?.statusOverrides;
352
- const liveHM = projectAgentHarnessModel(issueId);
353
- const agentHM = {
354
- harness: liveHM.harness ?? existing?.harness,
355
- model: liveHM.model ?? existing?.model
356
- };
357
- return {
358
- issueId: issueId.toUpperCase(),
359
- schemaVersion: 2,
360
- ...continueSubset,
361
- ...existing,
362
- harness: agentHM.harness,
363
- model: agentHM.model,
364
- statusOverrides: mergedStatusOverrides,
365
- pipeline: pipelineRecord,
366
- closeOut: {
367
- usage: usageRecord,
368
- merges,
369
- ranOn: hostname(),
370
- closedAt: opts.closedAt
371
- },
372
- owner: opts.owner ?? existing?.owner
373
- };
374
- }
375
- /**
376
- * PAN-2587: never regress the pipeline block during a whole-record rebuild. A
377
- * concurrent writer (e.g. a reviewer's verdict landing between the rebuild's
378
- * `existing` snapshot and its write) may have put a NEWER pipeline on disk than
379
- * the status the rebuild projects — observed clobbering PAN-399's passed
380
- * verdict back to a pre-verdict snapshot. Same newer-wins rule (ISO `updatedAt`
381
- * comparison) the journal readers use.
382
- */
383
- function pickNewerPipeline(rebuilt, fresh) {
384
- if (!fresh?.updatedAt || !rebuilt?.updatedAt) return rebuilt;
385
- return rebuilt.updatedAt < fresh.updatedAt ? fresh : rebuilt;
386
- }
387
- /**
388
- * PAN-1908 / PAN-1919: rebuild and queue the per-issue permanent record for a
389
- * given issue. Fire-and-forget: failures are logged, never thrown, so
390
- * review-status writes stay synchronous and fast.
391
- *
392
- * PAN-2583: returns whether the durable write actually landed, so the caller
393
- * can fall back to a sandbox-writable verdict drop when it did not (a sandboxed
394
- * reviewer cannot write ${OVERDECK_HOME}/state, and swallowing that here was
395
- * how blocked review verdicts silently vanished).
396
- */
397
- async function updateIssueRecordForIssue(issueId, reviewStatus) {
398
- try {
399
- const resolved = resolveProjectFromIssueSync(issueId);
400
- if (!resolved) return false;
401
- const project = getProjectSync(resolved.projectKey);
402
- if (!project) return false;
403
- const record = await buildIssueRecord(project, issueId, { reviewStatus });
404
- await updateIssueRecord(project, issueId, (fresh) => {
405
- if (fresh?.swarm) record.swarm = fresh.swarm;
406
- if (fresh?.statusOverrides && Object.keys(fresh.statusOverrides).length > 0) record.statusOverrides = {
407
- ...record.statusOverrides,
408
- ...fresh.statusOverrides
409
- };
410
- record.pipeline = pickNewerPipeline(record.pipeline, fresh?.pipeline);
411
- return record;
412
- });
413
- return true;
414
- } catch (err) {
415
- console.warn(`[pan-dir/records] Failed to update record for ${issueId}: ${err.message}`);
416
- return false;
417
- }
418
- }
419
- var init_records = __esmMin((() => {
420
- init_types();
421
- init_cost_sync();
422
- init_merge_set();
423
- init_projects();
424
- init_state_read_home();
425
- init_lifecycle();
426
- init_agent_state_sync();
427
- init_record();
428
- init_record_update();
429
- }));
430
- //#endregion
431
- //#region ../../lib/overdeck/review-status-record-sync.ts
432
- function updateIssueRecordForReviewStatusSync(issueId, status) {
433
- const write = Promise.resolve(updateIssueRecordForIssue(issueId, status)).then((landed) => {
434
- if (landed === false) writeWorkspaceVerdictFallbackSync(issueId, status);
435
- }).catch(() => writeWorkspaceVerdictFallbackSync(issueId, status));
436
- pendingJournalWrites.add(write);
437
- write.finally(() => pendingJournalWrites.delete(write));
438
- }
439
- /** Resolve and read the per-issue journal record's pipeline block, or null. Best-effort. */
440
- function readPipelineSync(issueId) {
441
- try {
442
- const resolved = resolveProjectFromIssueSync(issueId);
443
- if (!resolved) return null;
444
- const project = getProjectSync(resolved.projectKey);
445
- if (!project) return null;
446
- return readIssueRecordSync(project, issueId)?.pipeline ?? null;
447
- } catch {
448
- return null;
449
- }
450
- }
451
- /**
452
- * PAN-1988: feedback TEXT (review / test / merge / inspect / verification notes) is durable
453
- * JOURNAL state, not DB-cache state. The SQLite row holds only the queryable status flags;
454
- * the human-readable notes live in the per-issue git record (`<workspace>/.pan/records/<issue>.json`,
455
- * PAN-1908). This overlays those notes onto a DB-sourced status so every reader (deacon
456
- * CI-failure detection, dashboard panels) stays transparent while the DB stops storing them.
457
- */
458
- function enrichReviewNotesFromRecordSync(issueId, status) {
459
- const pipeline = readPipelineSync(issueId);
460
- if (!pipeline) return status;
461
- return {
462
- ...status,
463
- reviewNotes: pipeline.reviewNotes ?? status.reviewNotes,
464
- testNotes: pipeline.testNotes ?? status.testNotes,
465
- mergeNotes: pipeline.mergeNotes ?? status.mergeNotes,
466
- inspectNotes: pipeline.inspectNotes ?? status.inspectNotes,
467
- verificationNotes: pipeline.verificationNotes ?? status.verificationNotes,
468
- scopeDrift: pipeline.scopeDrift ?? status.scopeDrift,
469
- reviewRequestedAt: pipeline.reviewRequestedAt ?? status.reviewRequestedAt
470
- };
471
- }
472
- /**
473
- * The durable field subset shared by the journal record's pipeline block and the
474
- * workspace verdict fallback (PAN-2583). Derived/live columns (readyForMerge,
475
- * blockerReasons) are intentionally omitted — the reader recomputes them.
476
- */
477
- function durableSubset(p) {
478
- return {
479
- reviewStatus: p.reviewStatus,
480
- testStatus: p.testStatus,
481
- mergeStatus: p.mergeStatus ?? void 0,
482
- inspectStatus: p.inspectStatus ?? void 0,
483
- verificationStatus: p.verificationStatus ?? void 0,
484
- reviewNotes: p.reviewNotes,
485
- testNotes: p.testNotes,
486
- mergeNotes: p.mergeNotes,
487
- inspectNotes: p.inspectNotes,
488
- verificationNotes: p.verificationNotes,
489
- scopeDrift: p.scopeDrift,
490
- prUrl: p.prUrl,
491
- prNumber: p.prNumber,
492
- prHeadSha: p.prHeadSha,
493
- reviewedAtCommit: p.reviewedAtCommit,
494
- lastVerifiedCommit: p.lastVerifiedCommit,
495
- reviewRequestedAt: p.reviewRequestedAt,
496
- reviewSpawnedAt: p.reviewSpawnedAt,
497
- reviewerVerdicts: p.reviewerVerdicts,
498
- autoMerge: p.autoMerge,
499
- deaconIgnored: p.deaconIgnored,
500
- deaconIgnoredAt: p.deaconIgnoredAt,
501
- deaconIgnoredReason: p.deaconIgnoredReason,
502
- strikeReadyHead: p.strikeReadyHead,
503
- strikeReadyAt: p.strikeReadyAt,
504
- strikeLandingState: p.strikeLandingState,
505
- strikeRecoveryCount: p.strikeRecoveryCount,
506
- strikeTransportRetryCount: p.strikeTransportRetryCount,
507
- strikeNextAttemptAt: p.strikeNextAttemptAt,
508
- strikeLandingAttempts: p.strikeLandingAttempts,
509
- closedOut: p.closedOut,
510
- closedOutAt: p.closedOutAt
511
- };
512
- }
513
- function workspaceVerdictFallbackPath(issueId) {
514
- try {
515
- const resolved = resolveProjectFromIssueSync(issueId);
516
- if (!resolved) return null;
517
- return join(resolved.projectPath, "workspaces", `feature-${issueId.toLowerCase()}`, ".overdeck", "pipeline-verdict.json");
518
- } catch {
519
- return null;
520
- }
521
- }
522
- function writeWorkspaceVerdictFallbackSync(issueId, status) {
523
- try {
524
- const path = workspaceVerdictFallbackPath(issueId);
525
- if (!path) {
526
- console.error(`[review-status] PAN-2583: journal write failed for ${issueId} and no workspace could be resolved — the verdict is NOT durable`);
527
- return;
528
- }
529
- mkdirSync(dirname(path), { recursive: true });
530
- const clearedFields = FALLBACK_CLEARABLE_FIELDS.filter((field) => status[field] === void 0);
531
- const payload = {
532
- issueId: issueId.toUpperCase(),
533
- updatedAt: status.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
534
- pipeline: durableSubset(status),
535
- ...clearedFields.length > 0 ? { clearedFields } : {}
536
- };
537
- writeFileSync(path, JSON.stringify(payload, null, 2));
538
- console.warn(`[review-status] journal write failed for ${issueId} — durable verdict written to workspace fallback ${path}; the host sweeps it on the next status read (PAN-2583)`);
539
- } catch (err) {
540
- console.error(`[review-status] PAN-2583: could not persist verdict for ${issueId} anywhere durable: ${err.message}`);
541
- }
542
- }
543
- function readWorkspaceVerdictFallbackSync(issueId) {
544
- try {
545
- const path = workspaceVerdictFallbackPath(issueId);
546
- if (!path || !existsSync(path)) return null;
547
- const parsed = JSON.parse(readFileSync(path, "utf-8"));
548
- if (!parsed?.updatedAt || !parsed.pipeline) return null;
549
- const clearedFields = Array.isArray(parsed.clearedFields) ? parsed.clearedFields.filter((field) => typeof field === "string" && FALLBACK_CLEARABLE_FIELDS.includes(field)) : [];
550
- return {
551
- ...parsed,
552
- clearedFields
553
- };
554
- } catch {
555
- return null;
556
- }
557
- }
558
- /**
559
- * PAN-1988: read the journal record's durable verdict for an issue — the SOURCE OF TRUTH.
560
- * Returns the record `updatedAt` (used to decide whether the journal is newer than the DB
561
- * cache) plus the durable status fields (flags + feedback notes). Derived/live columns
562
- * (readyForMerge, blockerReasons) are intentionally omitted — the reader recomputes them.
563
- *
564
- * This is what makes verdict writes host-owned: a sandboxed agent can always write the journal
565
- * (workspace-local) even when it cannot write `~/.overdeck/overdeck.db`. The host reconciles
566
- * the cache from this on read, so no agent has to escalate out of its sandbox to record a verdict.
567
- *
568
- * PAN-2583: since the records migration (PAN-2541) the journal itself lives in
569
- * ${OVERDECK_HOME}/state, which a sandboxed reviewer cannot write either. When such a
570
- * writer dropped its verdict into the workspace fallback instead, overlay it here —
571
- * a strictly newer fallback wins over the record, and the host's own next journal
572
- * write folds it back into the canonical record.
573
- */
574
- function readJournalStatusSync(issueId) {
575
- const p = readPipelineSync(issueId);
576
- const fallback = readWorkspaceVerdictFallbackSync(issueId);
577
- const fallbackNewer = !!fallback && (!p || (p.updatedAt ?? "") < fallback.updatedAt);
578
- if (fallback && fallbackNewer) {
579
- const base = p ? durableSubset(p) : {};
580
- const overlay = Object.fromEntries(Object.entries(fallback.pipeline).filter(([, value]) => value !== void 0));
581
- const durable = {
582
- ...base,
583
- ...overlay
584
- };
585
- for (const field of fallback.clearedFields ?? []) delete durable[field];
586
- return {
587
- updatedAt: fallback.updatedAt,
588
- durable,
589
- ...fallback.clearedFields?.length ? { clearedFields: fallback.clearedFields } : {}
590
- };
591
- }
592
- if (!p) return null;
593
- return {
594
- updatedAt: p.updatedAt,
595
- durable: durableSubset(p)
596
- };
597
- }
598
- var pendingJournalWrites, FALLBACK_CLEARABLE_FIELDS;
599
- var init_review_status_record_sync = __esmMin((() => {
600
- init_records();
601
- init_record();
602
- init_projects();
603
- pendingJournalWrites = /* @__PURE__ */ new Set();
604
- FALLBACK_CLEARABLE_FIELDS = ["strikeTransportRetryCount", "strikeNextAttemptAt"];
605
- }));
606
- //#endregion
607
- //#region ../../lib/review-dispatch-decision.ts
608
- /**
609
- * PAN-1988 auto-heal — decide whether a review needs to be (re-)dispatched from the durable
610
- * journal intent, as a PURE function so it is locked by tests.
611
- *
612
- * The work agent's `pan done` writes a durable `reviewRequestedAt` into the journal/record (always
613
- * writable, even sandboxed) BEFORE it tries to reach the dashboard. If that reactive trigger is
614
- * dropped — the dashboard was mid-reload, the network blipped, the deacon is frozen — the intent
615
- * survives in the journal. The host reconciles on read: when a request is newer than the last
616
- * dispatch and nothing is currently reviewing, it dispatches review. This heals with NO deacon and
617
- * NO live dashboard event, on the next status read.
618
- *
619
- * Returns true when a review dispatch is owed:
620
- * - a request exists (`reviewRequestedAt` set), AND
621
- * - it is newer than the last spawn (or there was never a spawn) — i.e. a genuinely un-serviced
622
- * request, not the request that produced the current review, AND
623
- * - a review is not already in progress (`reviewing`), AND
624
- * - the issue is not already merged.
625
- */
626
- function needsReviewDispatch(params) {
627
- if (!params.reviewRequestedAt) return false;
628
- if (params.reviewStatus === "reviewing") return false;
629
- if (params.mergeStatus === "merged") return false;
630
- return !params.reviewSpawnedAt || Date.parse(params.reviewRequestedAt) > new Date(params.reviewSpawnedAt).getTime();
631
- }
632
- var init_review_dispatch_decision = __esmMin((() => {}));
633
- //#endregion
634
- //#region ../../lib/review-status.ts
635
- function emitReactiveLifecycleEvent(type, issueId) {
636
- try {
637
- notifyPipelineSync({
638
- type,
639
- issueId
640
- });
641
- } catch (error) {
642
- console.warn(`[review-status] Failed to emit ${type} for ${issueId}:`, error);
643
- }
644
- }
645
- function verificationSatisfied(status) {
646
- return status.verificationStatus !== "failed";
647
- }
648
- /**
649
- * PAN-1988: the merge-gate predicate (review passed, test passed/skipped, verification not
650
- * failed, UAT ok, merge not started). Extracted so both setReviewStatusSync and the
651
- * journal→DB reconcile in getReviewStatusSync derive readyForMerge identically.
652
- */
653
- function reviewGatesPassedSync(s) {
654
- return (s.reviewStatus === "passed" || s.reviewStatus === "skipped") && (s.testStatus === "passed" || s.testStatus === "skipped") && verificationSatisfied(s) && (s.uatStatus === void 0 || s.uatStatus === "passed") && (s.mergeStatus === "pending" || s.mergeStatus === "queued" || s.mergeStatus === void 0 || s.mergeStatus === null);
655
- }
656
- /**
657
- * Authoritative "allowed to merge" predicate (PAN-1759). The flywheel
658
- * orchestrator's pipeline verb says it INTENDS to merge an issue; this record
659
- * says the pipeline ALLOWS it. Both must hold before an issue enters the merge
660
- * queue or a UAT batch — RUN-20 tagged a mid-review issue with a merge verb
661
- * and it rode into a promotable batch. Same criteria as the
662
- * fixStuckReadyForMerge repair sweep: review passed, test passed/skipped,
663
- * verification not failed, not already merged.
664
- */
665
- function mergeGateEligibility(status) {
666
- if (!status) return {
667
- eligible: false,
668
- reason: "no review record"
669
- };
670
- if (status.reviewStatus !== "passed" && status.reviewStatus !== "skipped") return {
671
- eligible: false,
672
- reason: `review is ${status.reviewStatus}`
673
- };
674
- if (status.testStatus !== "passed" && status.testStatus !== "skipped") return {
675
- eligible: false,
676
- reason: `test is ${status.testStatus}`
677
- };
678
- if (!verificationSatisfied(status)) return {
679
- eligible: false,
680
- reason: "verification failed"
681
- };
682
- if (status.mergeStatus === "merged") return {
683
- eligible: false,
684
- reason: "already merged"
685
- };
686
- return { eligible: true };
687
- }
688
- function loadReviewStatuses(filePath = DEFAULT_STATUS_FILE) {
689
- if (filePath !== DEFAULT_STATUS_FILE) throw new Error("Non-default review-status paths are not supported in review-status.ts. Import from review-status-json.ts for JSON file operations.");
690
- return getAllReviewStatusesFromDb();
691
- }
692
- function loadReviewStatusesForIssues(issueIds) {
693
- return getReviewStatusesFromDb(issueIds);
694
- }
695
- function loadReadyForMergeFlags(issueIds) {
696
- const normalizedIds = [...new Set(issueIds.map((id) => id.toUpperCase()).filter(Boolean))];
697
- const dbStatuses = loadReviewStatusesForIssues(normalizedIds);
698
- const flags = /* @__PURE__ */ new Map();
699
- for (const issueId of normalizedIds) {
700
- const dbStatus = dbStatuses[issueId] ?? null;
701
- const journal = readJournalStatusSync(issueId);
702
- let status = dbStatus;
703
- if (journal) {
704
- if (journal.durable.closedOut === true) {
705
- flags.set(issueId, false);
706
- continue;
707
- }
708
- if (!dbStatus || (dbStatus.updatedAt ?? "") < journal.updatedAt) {
709
- const merged = { ...dbStatus ?? {
710
- issueId,
711
- reviewStatus: "pending",
712
- testStatus: "pending",
713
- updatedAt: journal.updatedAt,
714
- readyForMerge: false
715
- } };
716
- for (const [key, value] of Object.entries(journal.durable)) if (value !== void 0) merged[key] = value;
717
- for (const key of journal.clearedFields ?? []) delete merged[key];
718
- merged.issueId = issueId;
719
- merged.updatedAt = journal.updatedAt;
720
- merged.readyForMerge = (merged.blockerReasons?.length ?? 0) > 0 ? false : reviewGatesPassedSync(merged);
721
- status = normalizeReviewStatusSync(merged);
722
- }
723
- }
724
- flags.set(issueId, status?.readyForMerge ?? false);
725
- }
726
- return flags;
727
- }
728
- function setReviewStatusSync(issueId, update, existing) {
729
- if (/^\d+$/.test(issueId)) {
730
- console.warn(`[review-status] Rejecting setReviewStatus for bare numeric ID "${issueId}" — issue IDs must include a project prefix (e.g. PAN-${issueId}).`);
731
- return {
732
- issueId,
733
- reviewStatus: "pending",
734
- testStatus: "pending",
735
- updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
736
- readyForMerge: false
737
- };
738
- }
739
- issueId = issueId.toUpperCase();
740
- const status = existing ?? getReviewStatusSync(issueId) ?? {
741
- issueId,
742
- reviewStatus: "pending",
743
- testStatus: "pending",
744
- updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
745
- readyForMerge: false
746
- };
747
- if (update.reviewStatus === "reviewing" && status.reviewStatus === "passed" && update.mergeStatus === void 0) {
748
- console.warn(`[review-status] Rejecting reviewStatus regression from 'passed' to 'reviewing' for ${issueId} (mergeStatus not being reset)`);
749
- notifyPipelineSync({
750
- type: "status_changed",
751
- issueId,
752
- status
753
- });
754
- return status;
755
- }
756
- if (update.reviewStatus === "reviewing" && (status.reviewStatus === "blocked" || status.reviewStatus === "failed") && update.reviewSpawnedAt === void 0) {
757
- console.warn(`[review-status] Rejecting stale 'reviewing' write for ${issueId} — a terminal '${status.reviewStatus}' verdict is already recorded for this review cycle. Only a new dispatch (carrying reviewSpawnedAt) may re-enter 'reviewing'.`);
758
- notifyPipelineSync({
759
- type: "status_changed",
760
- issueId,
761
- status
762
- });
763
- return status;
764
- }
765
- if ((update.testStatus === "dispatch_failed" || update.testStatus === "failed") && status.testStatus === "passed") {
766
- console.warn(`[review-status] Rejecting testStatus regression from 'passed' to '${update.testStatus}' for ${issueId}`);
767
- delete update.testStatus;
768
- delete update.testNotes;
769
- }
770
- const merged = {
771
- ...status,
772
- ...update
773
- };
774
- if (update.reviewerVerdicts && status.reviewerVerdicts) merged.reviewerVerdicts = {
775
- ...status.reviewerVerdicts,
776
- ...update.reviewerVerdicts
777
- };
778
- const history = [...status.history || []];
779
- const now = (/* @__PURE__ */ new Date()).toISOString();
780
- if (update.reviewStatus && update.reviewStatus !== status.reviewStatus) history.push({
781
- type: "review",
782
- status: update.reviewStatus,
783
- timestamp: now,
784
- notes: update.reviewNotes
785
- });
786
- if (update.testStatus && update.testStatus !== status.testStatus) history.push({
787
- type: "test",
788
- status: update.testStatus,
789
- timestamp: now,
790
- notes: update.testNotes
791
- });
792
- if (update.uatStatus && update.uatStatus !== status.uatStatus) history.push({
793
- type: "uat",
794
- status: update.uatStatus,
795
- timestamp: now,
796
- notes: update.uatNotes
797
- });
798
- if (update.mergeStatus && update.mergeStatus !== status.mergeStatus) history.push({
799
- type: "merge",
800
- status: update.mergeStatus,
801
- timestamp: now
802
- });
803
- if (update.releaseStatus && update.releaseStatus !== status.releaseStatus) history.push({
804
- type: "release",
805
- status: update.releaseStatus,
806
- timestamp: now,
807
- notes: update.releaseNotes
808
- });
809
- while (history.length > 10) history.shift();
810
- const readyForMerge = (merged.blockerReasons?.length ?? 0) > 0 ? false : update.readyForMerge !== void 0 ? update.readyForMerge : reviewGatesPassedSync(merged);
811
- const updated = normalizeReviewStatusSync({
812
- ...merged,
813
- issueId,
814
- updatedAt: now,
815
- readyForMerge,
816
- history
817
- });
818
- if (readyForMerge && !status.readyForMerge && updated.prUrl) (async () => {
819
- try {
820
- const { isGitHubAppConfigured, reportCommitStatus } = await import("./github-app-ClZ2lk8D.js");
821
- if (!isGitHubAppConfigured()) return;
822
- const prMatch = updated.prUrl.match(/github\.com\/([^/]+)\/([^/]+)\/pull/);
823
- if (!prMatch) return;
824
- const [, owner, repo] = prMatch;
825
- const { exec } = await import("child_process");
826
- const { promisify } = await import("util");
827
- const { stdout } = await promisify(exec)(`gh pr view ${updated.prUrl.match(/\/pull\/(\d+)/)?.[1]} --json headRefOid --jq .headRefOid`, {
828
- encoding: "utf-8",
829
- timeout: 1e4
830
- });
831
- const sha = stdout.trim();
832
- if (sha) {
833
- await reportCommitStatus(owner, repo, sha, "success", "overdeck/review", "Review passed");
834
- console.log(`[review-status] Reported overdeck/review for ${issueId} (${sha.slice(0, 8)})`);
835
- }
836
- } catch (err) {
837
- console.warn(`[review-status] Failed to report commit status: ${err.message}`);
838
- }
839
- })();
840
- updateIssueRecordForReviewStatusSync(issueId, updated);
841
- try {
842
- upsertReviewStatusSync(updated);
843
- } catch (err) {
844
- const msg = err instanceof Error ? err.message : String(err);
845
- console.warn(`[review-status] DB cache write skipped for ${issueId} (${msg}); journal holds the verdict, host will reconcile on read.`);
846
- }
847
- notifyPipelineSync({
848
- type: "status_changed",
849
- issueId,
850
- status: updated
851
- });
852
- if (update.verificationStatus && update.verificationStatus !== status.verificationStatus) {
853
- const entry = {
854
- running: {
855
- level: "info",
856
- msg: `${issueId} — verification running`,
857
- tts: `${issueId} verification running`
858
- },
859
- passed: {
860
- level: "success",
861
- msg: `${issueId} — verification passed`,
862
- tts: `${issueId} verification passed`
863
- },
864
- failed: {
865
- level: "error",
866
- msg: `${issueId} — verification failed`,
867
- tts: `${issueId} verification failed`
868
- },
869
- skipped: {
870
- level: "info",
871
- msg: `${issueId} — verification skipped`,
872
- tts: `${issueId} verification skipped`,
873
- ttsPriority: 2
874
- }
875
- }[update.verificationStatus];
876
- if (entry) emitActivityEntrySync({
877
- source: "cloister",
878
- level: entry.level,
879
- message: entry.msg,
880
- details: update.verificationNotes,
881
- issueId
882
- });
883
- if (entry?.tts) emitActivityTtsSync({
884
- utterance: entry.tts,
885
- priority: entry.ttsPriority ?? (entry.level === "error" ? 0 : 1),
886
- issueId,
887
- source: "cloister",
888
- eventType: `verificationStatus.${update.verificationStatus}`
889
- });
890
- }
891
- if (update.reviewStatus && update.reviewStatus !== status.reviewStatus) {
892
- let reviewMsg = `${issueId} — review started`;
893
- if (update.reviewStatus === "reviewing") {
894
- const retryCount = updated.reviewRetryCount ?? 0;
895
- reviewMsg = retryCount > 0 ? `${issueId} — review re-dispatched (retry ${retryCount})` : `${issueId} — review started`;
896
- }
897
- const entry = {
898
- reviewing: {
899
- level: "info",
900
- msg: reviewMsg,
901
- tts: `${issueId} review started`
902
- },
903
- passed: {
904
- level: "success",
905
- msg: `${issueId} — review passed`,
906
- tts: `${issueId} review passed`
907
- },
908
- failed: {
909
- level: "error",
910
- msg: `${issueId} — review failed`,
911
- tts: `${issueId} review failed`
912
- },
913
- blocked: {
914
- level: "warn",
915
- msg: `${issueId} — review blocked (changes requested)`,
916
- tts: `${issueId} review blocked`
917
- }
918
- }[update.reviewStatus];
919
- if (entry) emitActivityEntrySync({
920
- source: "review",
921
- level: entry.level,
922
- message: entry.msg,
923
- details: update.reviewNotes,
924
- issueId
925
- });
926
- if (entry?.tts) emitActivityTtsSync({
927
- utterance: entry.tts,
928
- priority: entry.level === "error" ? 0 : 1,
929
- issueId,
930
- source: "review-specialist",
931
- eventType: `reviewStatus.${update.reviewStatus}`
932
- });
933
- }
934
- if (update.testStatus && update.testStatus !== status.testStatus) {
935
- const entry = {
936
- testing: {
937
- level: "info",
938
- msg: `${issueId} — tests running`,
939
- tts: `${issueId} tests running`,
940
- ttsPriority: 2
941
- },
942
- passed: {
943
- level: "success",
944
- msg: `${issueId} — tests passed`,
945
- tts: `${issueId} tests passed`
946
- },
947
- failed: {
948
- level: "error",
949
- msg: `${issueId} — tests failed`,
950
- tts: `${issueId} tests failed`
951
- },
952
- skipped: {
953
- level: "info",
954
- msg: `${issueId} — tests skipped`,
955
- tts: `${issueId} tests skipped`,
956
- ttsPriority: 2
957
- },
958
- dispatch_failed: {
959
- level: "warn",
960
- msg: `${issueId} — test dispatch failed`,
961
- tts: `${issueId} test dispatch failed`,
962
- ttsPriority: 1
963
- }
964
- }[update.testStatus];
965
- if (entry) emitActivityEntrySync({
966
- source: "test",
967
- level: entry.level,
968
- message: entry.msg,
969
- details: update.testNotes,
970
- issueId
971
- });
972
- if (entry?.tts) emitActivityTtsSync({
973
- utterance: entry.tts,
974
- priority: entry.ttsPriority ?? (entry.level === "error" ? 0 : 1),
975
- issueId,
976
- source: "test-specialist",
977
- eventType: `testStatus.${update.testStatus}`
978
- });
979
- }
980
- if (update.mergeStatus && update.mergeStatus !== status.mergeStatus) {
981
- const entry = {
982
- queued: {
983
- level: "info",
984
- msg: `${issueId} — queued for merge`,
985
- tts: `${issueId} queued for merge`,
986
- ttsPriority: 2
987
- },
988
- merging: {
989
- level: "info",
990
- msg: `${issueId} — merge in progress`,
991
- tts: `${issueId} merge in progress`,
992
- ttsPriority: 2
993
- },
994
- verifying: {
995
- level: "info",
996
- msg: `${issueId} — post-merge verification`,
997
- tts: `${issueId} post-merge verification running`,
998
- ttsPriority: 2
999
- },
1000
- merged: {
1001
- level: "success",
1002
- msg: `${issueId} — merged`,
1003
- tts: `${issueId} merged to main`
1004
- },
1005
- failed: {
1006
- level: "error",
1007
- msg: `${issueId} — merge failed`,
1008
- tts: `${issueId} merge failed`
1009
- }
1010
- }[update.mergeStatus];
1011
- if (entry) emitActivityEntrySync({
1012
- source: "ship",
1013
- level: entry.level,
1014
- message: entry.msg,
1015
- details: update.mergeNotes,
1016
- issueId
1017
- });
1018
- if (entry?.tts) emitActivityTtsSync({
1019
- utterance: entry.tts,
1020
- priority: entry.ttsPriority ?? (entry.level === "error" ? 0 : 1),
1021
- issueId,
1022
- source: "merge-agent",
1023
- eventType: `mergeStatus.${update.mergeStatus}`
1024
- });
1025
- }
1026
- if (update.readyForMerge === true && !status.readyForMerge) {
1027
- emitActivityEntrySync({
1028
- source: "cloister",
1029
- level: "success",
1030
- message: `${issueId} — ready for merge`,
1031
- issueId
1032
- });
1033
- emitActivityTtsSync({
1034
- utterance: `${issueId} ready for merge`,
1035
- priority: 1,
1036
- issueId,
1037
- source: "cloister",
1038
- eventType: "readyForMerge"
1039
- });
1040
- }
1041
- if ((update.reviewStatus === "passed" || update.reviewStatus === "skipped") && status.reviewStatus !== "passed" && status.reviewStatus !== "skipped" && updated.testStatus === "pending") if (updated.reviewedAtCommit && updated.lastVerifiedCommit && updated.reviewedAtCommit === updated.lastVerifiedCommit) {
1042
- console.log(`[review-status] Skipping test role for ${issueId} — no code drift since verification (HEAD=${updated.reviewedAtCommit.slice(0, 8)})`);
1043
- emitActivityEntrySync({
1044
- source: "cloister",
1045
- level: "info",
1046
- message: `${issueId} — tests skipped (no code change since verification gate)`,
1047
- issueId
1048
- });
1049
- setReviewStatusSync(issueId, {
1050
- testStatus: "passed",
1051
- testNotes: "Skipped: no code changed since pre-review verification gate",
1052
- verificationStatus: "passed",
1053
- verificationNotes: "Pre-review verification already covered the reviewed commit"
1054
- });
1055
- emitReactiveLifecycleEvent("test.passed", issueId);
1056
- } else emitReactiveLifecycleEvent("review.approved", issueId);
1057
- if (update.testStatus === "passed" && status.testStatus !== "passed") emitReactiveLifecycleEvent("test.passed", issueId);
1058
- if ((update.testStatus === "failed" || update.testStatus === "dispatch_failed") && status.testStatus !== "failed" && status.testStatus !== "dispatch_failed") deliverTestFailureToWorkAgentHostSide(issueId, updated);
1059
- return updated;
1060
- }
1061
- function resetPipelineVerdictsForWorkStartSync(issueId, options = {}) {
1062
- const status = getReviewStatusSync(issueId);
1063
- if (!status) return null;
1064
- if (status.reviewStatus === "pending" && status.testStatus === "pending" && (status.mergeStatus === void 0 || status.mergeStatus === "pending") && (status.verificationStatus === void 0 || status.verificationStatus === "pending") && !status.readyForMerge && status.autoRequeueCount === 0 && status.verificationCycleCount === 0 && status.reviewRetryCount === 0 && status.testRetryCount === 0 && status.mergeRetryCount === 0 && status.recoveryStartedAt === void 0 && status.reviewedAtCommit === void 0 && status.lastVerifiedCommit === void 0 && !options.force) return null;
1065
- return setReviewStatusSync(issueId, {
1066
- reviewStatus: "pending",
1067
- testStatus: "pending",
1068
- mergeStatus: "pending",
1069
- reviewNotes: void 0,
1070
- testNotes: void 0,
1071
- mergeNotes: void 0,
1072
- readyForMerge: false,
1073
- autoRequeueCount: 0,
1074
- verificationStatus: "pending",
1075
- verificationNotes: void 0,
1076
- verificationCycleCount: 0,
1077
- stuck: false,
1078
- stuckReason: void 0,
1079
- stuckAt: void 0,
1080
- stuckDetails: void 0,
1081
- reviewRetryCount: 0,
1082
- testRetryCount: 0,
1083
- mergeRetryCount: 0,
1084
- recoveryStartedAt: void 0,
1085
- reviewedAtCommit: void 0,
1086
- lastVerifiedCommit: void 0,
1087
- reviewRequestedAt: void 0,
1088
- reviewSpawnedAt: void 0,
1089
- conflictResolutionDispatchedAt: void 0,
1090
- blockerReasons: void 0,
1091
- reviewerVerdicts: void 0
1092
- });
1093
- }
1094
- /**
1095
- * PAN-1988 — deliver review feedback to the work agent from the HOST when a blocked/failed
1096
- * verdict is reconciled from the journal. Dynamic import to avoid a static import cycle
1097
- * (review-verdict-feedback → review-status). Fully best-effort: in a sandboxed agent process the
1098
- * delivery fails (host paths blocked) and is swallowed; the host process performs the real
1099
- * notification. Never throws into the read path.
1100
- */
1101
- async function deliverReviewVerdictFeedbackHostSide(issueId, status) {
1102
- try {
1103
- const { deliverReviewVerdictFeedback } = await import("./review-verdict-feedback-CTd4QMBu.js");
1104
- if ((await Effect.runPromise(deliverReviewVerdictFeedback({
1105
- issueId,
1106
- verdict: status.reviewStatus === "failed" ? "failed" : "blocked",
1107
- notes: status.reviewNotes,
1108
- prUrl: status.prUrl
1109
- }))).agentMessageSent) console.log(`[review-status] delivered review feedback to the work agent for ${issueId} (host-side)`);
1110
- } catch (err) {
1111
- console.warn(`[review-status] host-side review feedback delivery for ${issueId} did not complete (non-fatal): ${err instanceof Error ? err.message : String(err)}`);
1112
- }
1113
- }
1114
- /**
1115
- * PAN-1988 auto-heal — the host re-dispatches review from the durable journal intent. When the
1116
- * work agent's `pan done` recorded a `reviewRequestedAt` but the reactive dashboard trigger never
1117
- * landed (dashboard reloading, dropped event, frozen deacon), the next status read notices the
1118
- * un-serviced request and dispatches review here. {@link needsReviewDispatch} gates it,
1119
- * spawnReviewRoleForIssue is idempotent (it skips a live review), and a 30s throttle bounds retries
1120
- * for a gated issue. Fire-and-forget; in a sandboxed reader the dispatch is a best-effort no-op.
1121
- */
1122
- function maybeAutoDispatchReviewHostSide(issueId, status) {
1123
- if (!needsReviewDispatch({
1124
- reviewRequestedAt: status.reviewRequestedAt,
1125
- reviewSpawnedAt: status.reviewSpawnedAt,
1126
- reviewStatus: status.reviewStatus,
1127
- mergeStatus: status.mergeStatus
1128
- })) return;
1129
- const last = reviewDispatchAttemptAt.get(issueId) ?? 0;
1130
- if (Date.now() - last < REVIEW_AUTO_DISPATCH_THROTTLE_MS) return;
1131
- reviewDispatchAttemptAt.set(issueId, Date.now());
1132
- dispatchReviewHostSide(issueId, status.prUrl);
1133
- }
1134
- async function dispatchReviewHostSide(issueId, prUrl) {
1135
- try {
1136
- const { resolveProjectFromIssueSync } = await import("./projects-vjjcmiN8.js");
1137
- const resolved = resolveProjectFromIssueSync(issueId);
1138
- if (!resolved) return;
1139
- const { existsSync } = await import("fs");
1140
- const workspace = join$1(resolved.projectPath, "workspaces", `feature-${issueId.toLowerCase()}`);
1141
- if (!existsSync(workspace)) return;
1142
- let branch = `feature/${issueId.toLowerCase()}`;
1143
- try {
1144
- const { promisify } = await import("util");
1145
- const { exec } = await import("child_process");
1146
- const { stdout } = await promisify(exec)("git branch --show-current", {
1147
- cwd: workspace,
1148
- encoding: "utf-8"
1149
- });
1150
- branch = stdout.trim() || branch;
1151
- } catch {}
1152
- const { spawnReviewRoleForIssue } = await import("./review-agent-DNboMyW4.js");
1153
- const result = await Effect.runPromise(spawnReviewRoleForIssue({
1154
- issueId,
1155
- workspace,
1156
- branch,
1157
- ...prUrl ? { prUrl } : {}
1158
- }));
1159
- if (result.success) if (result.message?.startsWith("Review already in progress")) console.log(`[review-status] review dispatch for ${issueId}: already in progress — no-op (host-side)`);
1160
- else console.log(`[review-status] auto-dispatched review for ${issueId} from durable journal intent (host-side)`);
1161
- } catch (err) {
1162
- console.warn(`[review-status] host-side review auto-dispatch for ${issueId} did not complete (non-fatal): ${err instanceof Error ? err.message : String(err)}`);
1163
- }
1164
- }
1165
- function maybeRecoverTestVerdictHostSide(issueId, status) {
1166
- if (status.reviewStatus !== "passed") return;
1167
- if (status.mergeStatus === "merged" || status.readyForMerge) return;
1168
- if (status.testStatus !== "testing" && status.testStatus !== "pending" && status.testStatus !== "dispatch_failed") return;
1169
- const last = testVerdictRecoveryAt.get(issueId) ?? 0;
1170
- if (Date.now() - last < TEST_VERDICT_RECOVERY_THROTTLE_MS) return;
1171
- testVerdictRecoveryAt.set(issueId, Date.now());
1172
- recoverTestVerdictHostSide(issueId);
1173
- }
1174
- async function recoverTestVerdictHostSide(issueId) {
1175
- try {
1176
- const { resolveProjectFromIssueSync } = await import("./projects-vjjcmiN8.js");
1177
- const resolved = resolveProjectFromIssueSync(issueId);
1178
- if (!resolved) return;
1179
- const { existsSync } = await import("fs");
1180
- const workspace = join$1(resolved.projectPath, "workspaces", `feature-${issueId.toLowerCase()}`);
1181
- if (!existsSync(workspace)) return;
1182
- const { readTestVerdictArtifact } = await import("./test-verdict-gscuksPv.js");
1183
- const artifact = readTestVerdictArtifact(workspace);
1184
- if (!artifact) return;
1185
- setReviewStatusSync(issueId, {
1186
- testStatus: artifact.status,
1187
- testNotes: artifact.notes ?? `Recovered from .pan/test/result.json (${artifact.status}) — the test agent wrote the verdict but never signaled`
1188
- });
1189
- console.log(`[review-status] recovered unsignaled test verdict for ${issueId}: ${artifact.status} (host-side, from .pan/test/result.json)`);
1190
- } catch (err) {
1191
- console.warn(`[review-status] host-side test verdict recovery for ${issueId} did not complete (non-fatal): ${err instanceof Error ? err.message : String(err)}`);
1192
- }
1193
- }
1194
- async function deliverTestFailureToWorkAgentHostSide(issueId, status) {
1195
- try {
1196
- const { resolveProjectFromIssueSync } = await import("./projects-vjjcmiN8.js");
1197
- const resolved = resolveProjectFromIssueSync(issueId);
1198
- const workspace = resolved ? join$1(resolved.projectPath, "workspaces", `feature-${issueId.toLowerCase()}`) : void 0;
1199
- const notes = status.testNotes;
1200
- let feedbackPath;
1201
- try {
1202
- const { writeFeedbackFile } = await import("./feedback-writer-D3a22RCd.js");
1203
- const r = await Effect.runPromise(writeFeedbackFile({
1204
- issueId,
1205
- workspacePath: workspace,
1206
- specialist: "test-agent",
1207
- outcome: "failed",
1208
- summary: `Tests FAILED for ${issueId}`,
1209
- markdownBody: `# Test failure\n\n${notes ?? "The test gate reported failures. See .pan/test/result.json and re-run the project test suite."}\n\n## Required\nFix the failing tests, commit and push, then re-run \`pan done ${issueId}\`.`
1210
- }));
1211
- if (r.success) feedbackPath = r.filePath;
1212
- } catch {}
1213
- const message = `SPECIALIST FEEDBACK: test-agent reported FAILED for ${issueId}.\n\n${feedbackPath ? `MUST READ: ${feedbackPath}\n\n` : ""}${notes ? `${notes.slice(0, 400)}\n\n` : ""}Fix the failing tests, commit and push, then re-run pan done ${issueId}. Do NOT stop at the prompt.`;
1214
- const { resolveIssueFeedbackTarget, surfaceIssueFeedbackNeedsYou } = await import("./feedback-target-CoFDHiM8.js");
1215
- const target = await resolveIssueFeedbackTarget(issueId);
1216
- if ("agentId" in target) {
1217
- const { messageAgent } = await import("./agents-wi9NWzs2.js");
1218
- await messageAgent(target.agentId, message, "internal", { owesRework: true });
1219
- console.log(`[review-status] delivered test failure to ${target.agentId} for ${issueId} (host-side)`);
1220
- } else await surfaceIssueFeedbackNeedsYou(issueId, target.reason, {
1221
- specialist: "test-agent",
1222
- feedbackPath
1223
- });
1224
- } catch (err) {
1225
- console.warn(`[review-status] host-side test-failure delivery for ${issueId} did not complete (non-fatal): ${err instanceof Error ? err.message : String(err)}`);
1226
- }
1227
- }
1228
- function getReviewStatusSync(issueId) {
1229
- const dbStatus = getReviewStatusFromDbSync(issueId);
1230
- const journal = readJournalStatusSync(issueId);
1231
- if (!journal) return dbStatus ?? null;
1232
- if (journal.durable.closedOut === true) {
1233
- try {
1234
- deleteReviewStatus(issueId);
1235
- } catch {}
1236
- return null;
1237
- }
1238
- if (!dbStatus || (dbStatus.updatedAt ?? "") < journal.updatedAt) {
1239
- const merged = { ...dbStatus ?? {
1240
- issueId,
1241
- reviewStatus: "pending",
1242
- testStatus: "pending",
1243
- updatedAt: journal.updatedAt,
1244
- readyForMerge: false
1245
- } };
1246
- for (const [key, value] of Object.entries(journal.durable)) if (value !== void 0) merged[key] = value;
1247
- for (const key of journal.clearedFields ?? []) delete merged[key];
1248
- merged.issueId = issueId;
1249
- merged.updatedAt = journal.updatedAt;
1250
- merged.readyForMerge = (merged.blockerReasons?.length ?? 0) > 0 ? false : reviewGatesPassedSync(merged);
1251
- const reconciled = normalizeReviewStatusSync(merged);
1252
- try {
1253
- upsertReviewStatusSync(reconciled);
1254
- } catch {}
1255
- const wasBlocked = dbStatus?.reviewStatus === "blocked" || dbStatus?.reviewStatus === "failed";
1256
- if ((reconciled.reviewStatus === "blocked" || reconciled.reviewStatus === "failed") && !wasBlocked) deliverReviewVerdictFeedbackHostSide(issueId, reconciled);
1257
- const wasReviewPassed = dbStatus?.reviewStatus === "passed";
1258
- if (reconciled.reviewStatus === "passed" && !wasReviewPassed && reconciled.testStatus === "pending") {
1259
- console.log(`[review-status] reconcile: review.approved for ${issueId} (host-owned handoff — sandboxed agent verdict from journal)`);
1260
- emitReactiveLifecycleEvent("review.approved", issueId);
1261
- }
1262
- const wasTestPassed = dbStatus?.testStatus === "passed";
1263
- if (reconciled.testStatus === "passed" && !wasTestPassed) {
1264
- console.log(`[review-status] reconcile: test.passed for ${issueId} (host-owned handoff — sandboxed agent verdict from journal)`);
1265
- emitReactiveLifecycleEvent("test.passed", issueId);
1266
- }
1267
- maybeAutoDispatchReviewHostSide(issueId, reconciled);
1268
- maybeRecoverTestVerdictHostSide(issueId, reconciled);
1269
- return reconciled;
1270
- }
1271
- const enriched = enrichReviewNotesFromRecordSync(issueId, dbStatus);
1272
- maybeAutoDispatchReviewHostSide(issueId, enriched);
1273
- maybeRecoverTestVerdictHostSide(issueId, enriched);
1274
- return enriched;
1275
- }
1276
- /**
1277
- * On server startup, clear any mergeStatus stuck at 'merging'.
1278
- * Pending merge operations are in-memory only — they don't survive a restart.
1279
- * Any 'merging' status after boot is definitionally stuck (PAN-490).
1280
- */
1281
- function clearStuckMergeStatuses() {
1282
- const statuses = loadReviewStatuses();
1283
- const stuck = Object.values(statuses).filter((s) => s.mergeStatus === "merging" || s.mergeStatus === "verifying");
1284
- if (stuck.length === 0) return;
1285
- console.log(`[review-status] Clearing ${stuck.length} stuck merge status(es) on startup (merging/verifying)`);
1286
- for (const s of stuck) {
1287
- const shouldBeReady = s.reviewStatus === "passed" && (s.testStatus === "passed" || s.testStatus === "skipped") && verificationSatisfied(s) && (s.uatStatus === void 0 || s.uatStatus === "passed");
1288
- setReviewStatusSync(s.issueId, {
1289
- mergeStatus: "pending",
1290
- ...shouldBeReady ? { readyForMerge: true } : {}
1291
- });
1292
- }
1293
- }
1294
- /**
1295
- * On server startup, fix any issues where review+test both passed and
1296
- * verificationStatus is not 'failed', but readyForMerge is stuck at false.
1297
- *
1298
- * This happens when:
1299
- * 1. A merge attempt was made (merging → verifying)
1300
- * 2. The server restarted while verifying — clearStuckMergeStatuses reset mergeStatus to 'pending'
1301
- * 3. At restart time, verificationStatus was 'pending' (reset by the request-review cycle)
1302
- * 4. The old verificationSatisfied check blocked readyForMerge because of 'pending' status
1303
- *
1304
- * With verificationSatisfied now only blocking on 'failed', these issues should be
1305
- * re-evaluated and readyForMerge restored so they reappear on the Awaiting Merge page.
1306
- */
1307
- function fixStuckReadyForMerge() {
1308
- const statuses = loadReviewStatuses();
1309
- const stuck = Object.values(statuses).filter((s) => s.readyForMerge === false && s.reviewStatus === "passed" && (s.testStatus === "passed" || s.testStatus === "skipped") && verificationSatisfied(s) && (s.mergeStatus === "pending" || s.mergeStatus === "queued" || s.mergeStatus === void 0 || s.mergeStatus === null) && (s.uatStatus === void 0 || s.uatStatus === "passed"));
1310
- if (stuck.length === 0) return;
1311
- console.log(`[review-status] Restoring readyForMerge for ${stuck.length} issue(s) with passed review+test`);
1312
- for (const s of stuck) {
1313
- console.log(`[review-status] Restoring readyForMerge=true for ${s.issueId} (verif=${s.verificationStatus}, merge=${s.mergeStatus})`);
1314
- setReviewStatusSync(s.issueId, { readyForMerge: true });
1315
- }
1316
- }
1317
- /**
1318
- * PAN-869: On server startup, fix any issues where reviewStatus was incorrectly
1319
- * set to 'failed' due to the old COMMENTED → 'failed' mapping bug.
1320
- *
1321
- * This identifies records where:
1322
- * - reviewStatus = 'failed'
1323
- * - testStatus = 'passed' (CI green, so review wasn't genuinely bad)
1324
- * - mergeStatus is not terminal ('merged', 'failed')
1325
- * - readyForMerge = false
1326
- * - The last review history entry is type='review', status='failed'
1327
- *
1328
- * The old reviewResultToReviewStatus() mapped COMMENTED (regardless of success)
1329
- * to 'failed', so the history stores 'failed' for old COMMENTED reviews.
1330
- * We use testStatus='passed' as the signal that this was a successful review
1331
- * (CI was green), distinguishing it from genuinely failed reviews.
1332
- */
1333
- function fixStuckCommentedReviews() {
1334
- const statuses = loadReviewStatuses();
1335
- const candidates = Object.values(statuses).filter((s) => s.reviewStatus === "failed" && (s.testStatus === "passed" || s.testStatus === "skipped") && s.mergeStatus !== "merged" && s.mergeStatus !== "failed" && s.readyForMerge === false && s.verificationStatus !== "failed");
1336
- if (candidates.length === 0) return;
1337
- const toFix = [];
1338
- for (const s of candidates) if ([...s.history || []].reverse().find((h) => h.type === "review")?.status === "failed") toFix.push(s.issueId);
1339
- if (toFix.length === 0) return;
1340
- console.log(`[review-status] Restoring reviewStatus='passed' for ${toFix.length} issue(s) with COMMENTED reviews (PAN-869 backfill)`);
1341
- for (const issueId of toFix) {
1342
- console.log(`[review-status] Restoring reviewStatus='passed' for ${issueId}`);
1343
- setReviewStatusSync(issueId, { reviewStatus: "passed" });
1344
- }
1345
- }
1346
- function clearReviewStatus(issueId) {
1347
- try {
1348
- deleteReviewStatus(issueId);
1349
- } catch (err) {
1350
- console.error("[review-status] SQLite delete failed:", err);
1351
- }
1352
- }
1353
- /**
1354
- * Mark a workspace as stuck with a reason and optional JSON details.
1355
- * Persists across dashboard restarts. Deacon will skip stuck workspaces.
1356
- *
1357
- * @param issueId - Issue ID (e.g. "PAN-653")
1358
- * @param reason - Short reason code (e.g. "main_diverged")
1359
- * @param details - Optional structured details (e.g. {localSha, remoteSha})
1360
- */
1361
- function markWorkspaceStuck(issueId, reason, details) {
1362
- try {
1363
- markWorkspaceStuck$1(issueId, reason, details);
1364
- console.log(`[review-status] Marked ${issueId} as stuck: ${reason}`);
1365
- const updated = getReviewStatusSync(issueId);
1366
- if (updated) notifyPipelineSync({
1367
- type: "status_changed",
1368
- issueId,
1369
- status: updated
1370
- });
1371
- } catch (err) {
1372
- console.error(`[review-status] Failed to mark ${issueId} as stuck:`, err);
1373
- }
1374
- }
1375
- /**
1376
- * Clear the stuck flag for a workspace.
1377
- * Called when the human clicks "Unstick" in the dashboard.
1378
- * Re-enables Deacon patrol for this workspace.
1379
- */
1380
- function clearWorkspaceStuck(issueId) {
1381
- try {
1382
- clearWorkspaceStuck$1(issueId);
1383
- console.log(`[review-status] Cleared stuck state for ${issueId}`);
1384
- const updated = getReviewStatusSync(issueId);
1385
- if (updated) notifyPipelineSync({
1386
- type: "status_changed",
1387
- issueId,
1388
- status: updated
1389
- });
1390
- } catch (err) {
1391
- console.error(`[review-status] Failed to clear stuck state for ${issueId}:`, err);
1392
- }
1393
- }
1394
- /**
1395
- * Set or clear the operator-requested deacon-ignore flag. When set, Deacon
1396
- * patrol skips the issue entirely on every cycle. Distinct from `stuck`, which
1397
- * is a system-set failure marker that also suppresses patrol.
1398
- */
1399
- function setDeaconIgnored(issueId, ignored, reason) {
1400
- try {
1401
- setReviewStatusSync(issueId, {
1402
- deaconIgnored: ignored,
1403
- deaconIgnoredAt: ignored ? (/* @__PURE__ */ new Date()).toISOString() : void 0,
1404
- deaconIgnoredReason: ignored ? reason : void 0
1405
- });
1406
- console.log(`[review-status] deaconIgnored=${ignored} for ${issueId}${reason ? ` (${reason})` : ""}`);
1407
- } catch (err) {
1408
- console.error(`[review-status] Failed to set deaconIgnored for ${issueId}:`, err);
1409
- }
1410
- }
1411
- /**
1412
- * PAN-1691: set the per-issue auto-merge routing key and broadcast the change.
1413
- * `autoMerge === null` clears it back to the project default. Emits a
1414
- * status_changed pipeline event so open dashboards reflect the toggle live.
1415
- */
1416
- function setAutoMerge(issueId, autoMerge) {
1417
- try {
1418
- setReviewStatusSync(issueId, { autoMerge: autoMerge === null ? void 0 : autoMerge });
1419
- console.log(`[review-status] autoMerge=${autoMerge === null ? "default" : autoMerge} for ${issueId}`);
1420
- } catch (err) {
1421
- console.error(`[review-status] Failed to set autoMerge for ${issueId}:`, err);
1422
- }
1423
- }
1424
- var DEFAULT_STATUS_FILE, reviewDispatchAttemptAt, REVIEW_AUTO_DISPATCH_THROTTLE_MS, testVerdictRecoveryAt, TEST_VERDICT_RECOVERY_THROTTLE_MS, ReviewStatusError, setReviewStatus, getReviewStatus;
1425
- var init_review_status = __esmMin((() => {
1426
- init_pipeline_notifier();
1427
- init_activity_logger();
1428
- init_review_status_sync();
1429
- init_review_status_source();
1430
- init_review_status_normalize();
1431
- init_review_status_record_sync();
1432
- init_review_dispatch_decision();
1433
- registerReviewStatusMapReader(() => getAllReviewStatusesFromDb());
1434
- DEFAULT_STATUS_FILE = join$1(homedir(), ".overdeck", "review-status.json");
1435
- reviewDispatchAttemptAt = /* @__PURE__ */ new Map();
1436
- REVIEW_AUTO_DISPATCH_THROTTLE_MS = 3e4;
1437
- testVerdictRecoveryAt = /* @__PURE__ */ new Map();
1438
- TEST_VERDICT_RECOVERY_THROTTLE_MS = 6e4;
1439
- ReviewStatusError = class extends Data.TaggedError("ReviewStatusError") {};
1440
- setReviewStatus = (issueId, update, existing) => Effect.tryPromise({
1441
- try: () => new Promise((resolve, reject) => {
1442
- setImmediate(() => {
1443
- try {
1444
- resolve(setReviewStatusSync(issueId, update, existing));
1445
- } catch (err) {
1446
- reject(err);
1447
- }
1448
- });
1449
- }),
1450
- catch: (cause) => new ReviewStatusError({
1451
- issueId,
1452
- operation: "setReviewStatus",
1453
- message: cause instanceof Error ? cause.message : String(cause),
1454
- cause
1455
- })
1456
- });
1457
- getReviewStatus = (issueId) => Effect.try({
1458
- try: () => getReviewStatusFromDbSync(issueId),
1459
- catch: (cause) => new ReviewStatusError({
1460
- issueId,
1461
- operation: "getReviewStatus",
1462
- message: cause instanceof Error ? cause.message : String(cause),
1463
- cause
1464
- })
1465
- });
1466
- }));
1467
- //#endregion
1468
- export { needsReviewDispatch as C, listOverdeckAgentStatesSync as D, init_agent_state_sync as E, saveOverdeckAgentStateSync as O, init_review_dispatch_decision as S, getOverdeckAgentStateSync as T, setAutoMerge as _, fixStuckCommentedReviews as a, setReviewStatusSync as b, getReviewStatusSync as c, loadReviewStatuses as d, loadReviewStatusesForIssues as f, reviewGatesPassedSync as g, resetPipelineVerdictsForWorkStartSync as h, clearWorkspaceStuck as i, stateToOverdeckParamsForDb as k, init_review_status as l, mergeGateEligibility as m, clearReviewStatus as n, fixStuckReadyForMerge as o, markWorkspaceStuck as p, clearStuckMergeStatuses as r, getReviewStatus as s, ReviewStatusError as t, loadReadyForMergeFlags as u, setDeaconIgnored as v, AGENT_COLUMNS_FOR_DB as w, verificationSatisfied as x, setReviewStatus as y };
1469
-
1470
- //# sourceMappingURL=review-status-kZj_KyCk.js.map