@overdeck/desktop 0.46.0 → 0.47.1

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 (388) hide show
  1. package/drizzle/overdeck/0000_overdeck_init.sql +4 -1
  2. package/package.json +1 -1
  3. package/server/{acceptance-criteria-CCwFGICj.js → acceptance-criteria-Cd7ZGZCq.js} +2 -2
  4. package/server/{advancing-selfheal-De1L-Sb4.js → advancing-selfheal-DieFp3qi.js} +6 -6
  5. package/server/{agent-gc-CBULruzm.js → agent-gc-BMcgTDl7.js} +5 -5
  6. package/server/{agent-state-VQk8fY9F.js → agent-state-DyZJia9f.js} +1 -1
  7. package/server/{agent-state-service-BlnSkRFA.js → agent-state-service-BOzQhLjU.js} +15 -9
  8. package/server/agent-state-service-DFO6qvHp.js +2 -0
  9. package/server/agent-state-source-Ca_zCaII.js +21 -0
  10. package/server/{agents-C5rWYhb6.js → agents-CtACUuVG.js} +23 -16
  11. package/server/{agents-BKKkxKgK.js → agents-Dnn4XgdB.js} +1 -1
  12. package/server/archive-planning-BHCd_eL5.js +2 -0
  13. package/server/{archive-planning-C0lAbNB_.js → archive-planning-Binfb99i.js} +10 -6
  14. package/server/{artifact-index-jobs-ug6ZxIP5.js → artifact-index-jobs-Jn7BGOtV.js} +2 -2
  15. package/server/{assemble-DnffNpOo.js → assemble-DsqK9OAq.js} +2 -2
  16. package/server/{tmux-dedup-DbN6MGzM.js → auto-spawn-consent-BooqhC3L.js} +262 -13
  17. package/server/{backlog-auto-trigger-Dh-i9PQf.js → backlog-auto-trigger-BADGPxov.js} +3 -3
  18. package/server/{behavior-CfIg6pKp.js → behavior-B7biGtFT.js} +2 -2
  19. package/server/boot-reconciled-stop-events-bQUzU8ns.js +44 -0
  20. package/server/{bridge-pool-patrol-CUFmjVDN.js → bridge-pool-patrol-DsPj6F7t.js} +1 -1
  21. package/server/{briefing-freshness-DHmCSLar.js → briefing-freshness-CUerZqWd.js} +2 -2
  22. package/server/{build-info-CuFfxZxp.js → build-info-D0q_i8WM.js} +3 -3
  23. package/server/{build-info-BP160gU7.js → build-info-Du74MKiP.js} +1 -1
  24. package/server/{checkpoint-manager-Dxh0FYsv.js → checkpoint-manager-Cu-R5Uzg.js} +1 -1
  25. package/server/{checkpoint-manager-DEWD82qK.js → checkpoint-manager-R5tnaxEY.js} +2 -2
  26. package/server/checkpoint-worker.js +1 -1
  27. package/server/{checkpoints-CZvbtLnr.js → checkpoints-DYtLu-PB.js} +2 -2
  28. package/server/{checkpoints-DMTgXuLG.js → checkpoints-wF84ubZ8.js} +1 -1
  29. package/server/{claude-hooks-provision-fvy4RD2b.js → claude-hooks-provision-DXI3Wqlm.js} +2 -2
  30. package/server/{claude-hooks-provision-CN-xo-do.js → claude-hooks-provision-UKxCeOyj.js} +1 -1
  31. package/server/{claude-permissions-CN0cSCPp.js → claude-permissions-DYVLnX9t.js} +2 -2
  32. package/server/{claude-settings-overlay-CJn35FHQ.js → claude-settings-overlay-DsbpIq2d.js} +2 -2
  33. package/server/{claude-settings-overlay-Dabi9slj.js → claude-settings-overlay-DxP2F_gY.js} +1 -1
  34. package/server/cli-D6mRfUE6.js +3 -0
  35. package/server/{cli-oCWYA1pE.js → cli-DzRKxxP_.js} +9 -9
  36. package/server/{cliproxy-C8mB3KuB.js → cliproxy-CG4meRFc.js} +2 -2
  37. package/server/{cliproxy-PGwTX_o8.js → cliproxy-Cwzw39yN.js} +1 -1
  38. package/server/{close-issue-D5MF5GqF.js → close-issue-BX1bATJy.js} +5 -5
  39. package/server/{closed-issue-reaper-CJ24u0Zt.js → closed-issue-reaper-DvnTSN6a.js} +1 -1
  40. package/server/{closed-issue-reaper-Cltx86x5.js → closed-issue-reaper-hLt0W86J.js} +62 -12
  41. package/server/{codex-Drlf5Xhf.js → codex-BYwi1uyW.js} +6 -6
  42. package/server/{codex-parser-DpB89Vqa.js → codex-parser-Poyz29GE.js} +2 -2
  43. package/server/{codex-BdEsUFWh.js → codex-rnJN3v3_.js} +1 -1
  44. package/server/{compaction-continuation-K2AxQX4H.js → compaction-continuation-DtMfHN0f.js} +3 -3
  45. package/server/{config-Dr3pW6w6.js → config-CX4vk1CV.js} +2 -2
  46. package/server/{config-DV-grfQc.js → config-R793W0yA.js} +1 -1
  47. package/server/{config-B2IMcBxx.js → config-ktAVnp4s.js} +2 -2
  48. package/server/{config-yaml-CmOPzmBb.js → config-yaml-CxdwhAIA.js} +10 -2
  49. package/server/{conflict-gate-B9cN3SBi.js → conflict-gate-BNv6UolH.js} +59 -13
  50. package/server/conflict-gate-BSTlwCtF.js +3 -0
  51. package/server/{context-layers-D6LZo3l1.js → context-layers-DCdaGsRG.js} +2 -2
  52. package/server/{context-layers-dR5YxHYB.js → context-layers-DlWsDiRF.js} +3 -3
  53. package/server/{control-settings-C7DUehE1.js → control-settings-qYYHrIqy.js} +13 -6
  54. package/server/{conversation-compaction-Dj4FAKoZ.js → conversation-compaction-BxUKObHb.js} +1 -1
  55. package/server/{conversation-compaction-BoqdDXWF.js → conversation-compaction-CXQrN3I_.js} +8 -8
  56. package/server/{conversation-service-BCxl4f8Z.js → conversation-service-CDnQ3ayN.js} +1 -1
  57. package/server/{conversation-service-5aCnq1zR.js → conversation-service-CZiUE8Uw.js} +8 -7
  58. package/server/{conversations-BUpYsOZg.js → conversations-D7lR670u.js} +4 -4
  59. package/server/{conversations-C34dyIb9.js → conversations-DXl5YTf4.js} +1 -1
  60. package/server/{cost-Bgcub5kW.js → cost-Aat8HfO_.js} +2 -2
  61. package/server/{cost-CvxRrucd.js → cost-CWvN9FP2.js} +3 -3
  62. package/server/{cost-sync-Dv3LUaNW.js → cost-sync-DiUBXwl6.js} +3 -3
  63. package/server/{dag-ombYYt4s.js → dag-5QlmH0oC.js} +2 -2
  64. package/server/{dangerous-git-ops-BcJPC5Rr.js → dangerous-git-ops-DWX6Og8c.js} +1 -1
  65. package/server/dashboard-db-worker.js +7 -7
  66. package/server/{deacon-hi9KLPLT.js → deacon-B1LD5cJU.js} +741 -211
  67. package/server/{deacon-DrXqT9LQ.js → deacon-PW_bg4uL.js} +3 -3
  68. package/server/{deacon-nudge-log-BNBebzeL.js → deacon-nudge-log-DPHsO14z.js} +3 -3
  69. package/server/{deacon-pending-lifecycle-Cpk0k7Hi.js → deacon-pending-lifecycle-2ZflPxgo.js} +3 -3
  70. package/server/deacon-swarm-BkKR7SXu.js +2 -0
  71. package/server/{deacon-swarm-DBxUaO-A.js → deacon-swarm-DwGUgSVp.js} +15 -14
  72. package/server/deacon.js +8 -8
  73. package/server/{dead-end-trip-CQcP70ND.js → dead-end-trip-B06RFIr2.js} +3 -3
  74. package/server/{delivery-Da0zEMY4.js → delivery-C2M73sBg.js} +1 -1
  75. package/server/{deploy-patrol-Df-Tmaq0.js → deploy-patrol-BNjeCL8u.js} +8 -8
  76. package/server/{deploy-queue-UjKGYsDe.js → deploy-queue-CKT_Ia9p.js} +2 -2
  77. package/server/{deploy-queue-9SrhZR63.js → deploy-queue-DMMYhFC8.js} +1 -1
  78. package/server/{deploy-window-rpqpWqHA.js → deploy-window-DC8lze3d.js} +6 -6
  79. package/server/{deploy-window-jOiPRHL0.js → deploy-window-D_AimdNN.js} +1 -1
  80. package/server/{dev-supervisor-CC46Ig8q.js → dev-supervisor-C4F0vbno.js} +2 -2
  81. package/server/{devcontainer-renderer-68CSCRnu.js → devcontainer-renderer-66sqMQIi.js} +3 -3
  82. package/server/{dist-CJy72uEg.js → dist-C5FT9lTG.js} +1 -1
  83. package/server/dist-qcf9gAP0.js +3 -0
  84. package/server/{dist-src-Bik83hFi.js → dist-src-B-AlGWSl.js} +1 -1
  85. package/server/{docker-BMVTSFL5.js → docker-BxrFhTZ_.js} +1 -1
  86. package/server/{docker-Dam7mbIB.js → docker-CoAT8R0J.js} +2 -2
  87. package/server/{dod-Dar-yheg.js → dod-Bg6wsKTV.js} +26 -5
  88. package/server/durable-review-pipeline-D_DcfIGP.js +3 -0
  89. package/server/{durable-review-pipeline-CGZ5QBxh.js → durable-review-pipeline-HkAgnx0L.js} +5 -2
  90. package/server/{ensure-devcontainer-C98V8yW-.js → ensure-devcontainer-Bg5HJAcO.js} +1 -1
  91. package/server/{ensure-devcontainer-B057YA81.js → ensure-devcontainer-DTxChVuA.js} +4 -4
  92. package/server/{esm-shims-Br9BPdkR.js → esm-shims-CaBWIR7f.js} +1 -1
  93. package/server/{event-store-ELqkVOn0.js → event-store-5UKzh9Jf.js} +1 -1
  94. package/server/{event-store-zY5MJHgF.js → event-store-CrHcVC5_.js} +3 -3
  95. package/server/{events-D6pyqhzM.js → events-ChEFB7Jp.js} +1 -1
  96. package/server/{events-D9PR1IC0.js → events-DhRN-6vM.js} +3 -3
  97. package/server/{factory-CRoOpGsF.js → factory-BezSPaTd.js} +5 -5
  98. package/server/{feature-registry-population--YUXU999.js → feature-registry-population-DhswNiXx.js} +4 -4
  99. package/server/{feature-registry-storage-BORBTo0y.js → feature-registry-storage-CUVNpAso.js} +2 -2
  100. package/server/{features--nFkJY8v.js → features-B2CfNPFw.js} +2 -2
  101. package/server/{feedback-target-C0ZzyHvU.js → feedback-target-CMrEAoeA.js} +1 -1
  102. package/server/{feedback-target-Dt9BsapX.js → feedback-target-VBr9gKgX.js} +18 -7
  103. package/server/{feedback-writer-D1fm-5Z8.js → feedback-writer-CY91ckuw.js} +1 -1
  104. package/server/{feedback-writer-BG0RUZiu.js → feedback-writer-xpFgU632.js} +5 -5
  105. package/server/{flywheel-BiT3odRb.js → flywheel-CTVY3yCG.js} +38 -19
  106. package/server/{flywheel-CLVB55Be.js → flywheel-DQqsSm7P.js} +14 -14
  107. package/server/{flywheel-BekukH4i.js → flywheel-DsICCjTR.js} +1 -1
  108. package/server/{flywheel-merge-order-BKw9o6ku.js → flywheel-merge-order-C-TI4JGu.js} +1 -1
  109. package/server/{flywheel-merge-order-BJv1DZz1.js → flywheel-merge-order-CMGz-imq.js} +7 -7
  110. package/server/forge-D647IMNa.js +3 -0
  111. package/server/{forge-CZbSg6Ds.js → forge-RTNqJe6a.js} +2 -2
  112. package/server/{from-D_4_dk7i.js → from-DxGcivc9.js} +1 -1
  113. package/server/fs-lock-Bre3sGoz.js +130 -0
  114. package/server/{fts-db-BeOomFa-.js → fts-db-wROfFfje.js} +2 -2
  115. package/server/{fts-operations-BdewJ_g9.js → fts-operations-BuTdlZFA.js} +2 -2
  116. package/server/{git-utils-CI6cwyyC.js → git-utils-CedsVume.js} +1 -1
  117. package/server/{git-utils-ameCgDdy.js → git-utils-DtdoEXJk.js} +4 -4
  118. package/server/{github-app-DtAsvwzK.js → github-app-DIE8BkHI.js} +1 -1
  119. package/server/{github-app-CQ1Lo6LA.js → github-app-gVnZcP9B.js} +2 -2
  120. package/server/{github-client-BfyDxuRN.js → github-client-BrAC6ELh.js} +3 -3
  121. package/server/{github-client-Cj0yl_07.js → github-client-CBOkvBUl.js} +1 -1
  122. package/server/{github-pr-lookup-BDq6Wznz.js → github-pr-lookup-CgMULTPf.js} +2 -2
  123. package/server/{harness-binary-DqkftwTb.js → harness-binary-CnBHpd57.js} +2 -2
  124. package/server/{harness-resolve-CqMqM1Mb.js → harness-resolve-BVj6sI8m.js} +4 -4
  125. package/server/{health-events-CazRxJUS.js → health-events-BBWO_Dh9.js} +2 -2
  126. package/server/{health-events-_xfTaOUs.js → health-events-Der6bOkm.js} +1 -1
  127. package/server/{hooks-BnJsxlSq.js → hooks-BJNal-bs.js} +1 -1
  128. package/server/{hooks-BO3QT1sn.js → hooks-BOavco-e.js} +2 -2
  129. package/server/{hume-CDYJxqx-.js → hume-DBocJFkA.js} +2 -2
  130. package/server/hume-DtWN8oV5.js +3 -0
  131. package/server/{idle-stack-reaper-BYqERdkE.js → idle-stack-reaper-CyGxXOfC.js} +1 -1
  132. package/server/{idle-stack-reaper-CnGx_PO_.js → idle-stack-reaper-DQFh8rDh.js} +2 -2
  133. package/server/{in-flight-guard-Bq3epG58.js → in-flight-guard-nXEKoxI7.js} +1 -1
  134. package/server/{infra-BjuxvjdS.js → infra-BDQDRopn.js} +15 -4
  135. package/server/{injection-UCf8EsjX.js → injection-CCopdUKz.js} +7 -7
  136. package/server/{injection-DZxlV2al.js → injection-DfFFEMKL.js} +1 -1
  137. package/server/inspect-agent-CPqXI81t.js +2 -0
  138. package/server/{inspect-agent-6kylZnrm.js → inspect-agent-FCDlNT_i.js} +12 -12
  139. package/server/{internal-token-DvMTQSOS.js → internal-token-BG6yQKNL.js} +2 -2
  140. package/server/{internal-token-M9omeXM1.js → internal-token-BJZa40Ld.js} +1 -1
  141. package/server/{io-VHvc0Ssp.js → io-C0NV7y6C.js} +4 -4
  142. package/server/{issue-closed-B6KJkmHZ.js → issue-closed-CNNGbhWm.js} +8 -8
  143. package/server/{issue-lifecycle-C4Zj0WmE.js → issue-lifecycle-BXfzxFCD.js} +29 -23
  144. package/server/{issue-lifecycle-9gk3fnXN.js → issue-lifecycle-DSH0GpWC.js} +1 -1
  145. package/server/{issue-service-singleton-DmCh7EHj.js → issue-service-singleton-F3A5VP6M.js} +10 -10
  146. package/server/{issue-service-singleton-PMx8F1jr.js → issue-service-singleton-lwFJ4dHk.js} +1 -1
  147. package/server/{issues-CgnQ1OGQ.js → issues-DA-U_MpR.js} +2 -2
  148. package/server/{jsonl-parser-DJOH_O-w.js → jsonl-parser-BXiGANOh.js} +3 -3
  149. package/server/{label-cleanup-Dv7AV_R1.js → label-cleanup-BnxRk0Eo.js} +3 -3
  150. package/server/{lifecycle-CTdOWYMi.js → lifecycle-DOgGnpIv.js} +2 -2
  151. package/server/{lifecycle-DDN8ApVY.js → lifecycle-Di48-w4x.js} +6 -6
  152. package/server/{lifecycle-io-D-lGdzK3.js → lifecycle-io-1XSeczTr.js} +5 -5
  153. package/server/{lifecycle-io-D_zTLvP1.js → lifecycle-io-eVG6v_8-.js} +1 -1
  154. package/server/{linear-client-BQU36QqE.js → linear-client-CYZRrcjp.js} +3 -3
  155. package/server/{linear-client-CY4O_Tu3.js → linear-client-CvGo9n7M.js} +1 -1
  156. package/server/{linear-mcp-auth-BnU4TYfY.js → linear-mcp-auth-Cp0XaP96.js} +5 -5
  157. package/server/{linear-mcp-auth-NYBq_oHZ.js → linear-mcp-auth-DoJnjdPZ.js} +1 -1
  158. package/server/memory-fts-worker.js +1 -1
  159. package/server/{merge-Bpx4jjht.js → merge-DO14mOr3.js} +3 -3
  160. package/server/{merge-idOG--29.js → merge-ZF99ig6A.js} +1 -1
  161. package/server/{merge-agent-DrXa1CpW.js → merge-agent-C1-9zbP_.js} +1 -1
  162. package/server/{merge-agent-DdMVSV2Y.js → merge-agent-gpiRkcvj.js} +31 -31
  163. package/server/{merge-batch-C5q1c1GX.js → merge-batch-C11ocNkO.js} +1 -1
  164. package/server/{merge-completeness-BMm8tMyZ.js → merge-completeness-BUzPZy0E.js} +4 -4
  165. package/server/{merge-completeness-D0ljXbk3.js → merge-completeness-CghMbyX7.js} +1 -1
  166. package/server/merge-ops-7QqziXAh.js +2 -0
  167. package/server/merge-rebase-B4pgzvQJ.js +2 -0
  168. package/server/{merge-rebase-xLnMlw5h.js → merge-rebase-iwlUzZjr.js} +2 -2
  169. package/server/{merge-set-DzsOTBg5.js → merge-set-BymrheTj.js} +1 -1
  170. package/server/{merge-set-DH7ot3yz.js → merge-set-Dbnx4chw.js} +4 -4
  171. package/server/{merge-sync-CQ-LgZ1_.js → merge-sync-CM978zez.js} +7 -4
  172. package/server/merge-sync-CqEtqjI2.js +3 -0
  173. package/server/{merge-train-DTEMyIu4.js → merge-train-DvLcAn1G.js} +4 -4
  174. package/server/{merge-train-deps-CNPJzepw.js → merge-train-deps-Cl_kcRbO.js} +21 -15
  175. package/server/{merge-verification-x3JO8Dtz.js → merge-verification-c9Y9mllw.js} +6 -6
  176. package/server/{merged-docker-cleanup-worker-CTpC27Bs.js → merged-docker-cleanup-worker-CGiDOdv8.js} +3 -3
  177. package/server/{merged-docker-cleanup-worker-Cdi9apm-.js → merged-docker-cleanup-worker-DgsLOx3E.js} +1 -1
  178. package/server/{multipart-parser-IMSBfePV.js → multipart-parser-D0twwRjz.js} +2 -2
  179. package/server/{no-resume-mode-C5ULAXwO.js → no-resume-mode-DZvP0M_S.js} +1 -1
  180. package/server/node_modules/.package-lock.json +4 -4
  181. package/server/node_modules/@types/node/README.md +1 -1
  182. package/server/node_modules/@types/node/crypto.d.ts +1 -1
  183. package/server/node_modules/@types/node/package.json +2 -2
  184. package/server/{orphan-proposed-reconciler-CWmOdM9-.js → orphan-proposed-reconciler-6r2OEfYd.js} +1 -1
  185. package/server/{orphan-proposed-reconciler-Dg6U4ADZ.js → orphan-proposed-reconciler-DtQP6oE_.js} +230 -31
  186. package/server/package-lock.json +5 -5
  187. package/server/package.json +1 -1
  188. package/server/{pan-dir-ubraCiUg.js → pan-dir-DAOb1V2-.js} +4 -4
  189. package/server/{paths-cXmOwSbh.js → paths-DuATV5iE.js} +2 -2
  190. package/server/{pending-lifecycle-claim-DEteYdS9.js → pending-lifecycle-claim-DQUHIDfX.js} +2 -2
  191. package/server/persistent-logger-CBj016pT.js +57 -0
  192. package/server/{pickup-D8xtG1J2.js → pickup-zXZl5lQI.js} +4 -3
  193. package/server/{pipeline-membership-CrAPLYtf.js → pipeline-membership-B2yUcBz7.js} +1 -1
  194. package/server/{pipeline-membership-BGSvkT2M.js → pipeline-membership-DHOXmvba.js} +1 -1
  195. package/server/{pipeline-membership-gather-CET40frr.js → pipeline-membership-gather-BIcJ-N0W.js} +114 -9
  196. package/server/{pipeline-membership-gather-DTfcgxLl.js → pipeline-membership-gather-OkLXuvxR.js} +1 -1
  197. package/server/{pipeline-notifier-ImNXknf0.js → pipeline-notifier-BmwrVKsO.js} +1 -1
  198. package/server/{pipeline-notifier-BuQ0e4hF.js → pipeline-notifier-CxMes51i.js} +2 -2
  199. package/server/{post-merge-lifecycle-worker-DbO10pum.js → post-merge-lifecycle-worker-3u_rA4R0.js} +3 -3
  200. package/server/{project-pipelines-Bim6bThI.js → project-pipelines-C3SPFJ38.js} +2 -2
  201. package/server/{project-repos-C0nuoBGv.js → project-repos-BOpBzkO6.js} +2 -2
  202. package/server/{project-repos-CRE6Ykow.js → project-repos-BgW4lcIa.js} +1 -1
  203. package/server/{projects-B03Wr-xc.js → projects-_n3Zui6K.js} +1 -1
  204. package/server/{prompts-BEx08AIu.js → prompts-B0TtboFm.js} +2 -2
  205. package/server/{providers-D7IluJe0.js → providers-BI1mOBQ4.js} +1 -1
  206. package/server/{providers-evXhiQeg.js → providers-O2smCvSz.js} +7 -7
  207. package/server/public/assets/{chunk-BO2N2NFS-D1s4-Sqp.js → chunk-BO2N2NFS-D_pGACYN.js} +4 -4
  208. package/server/public/assets/{diagram-OG6HWLK6-1gdMoSF7.js → diagram-OG6HWLK6-BO6fe3hH.js} +1 -1
  209. package/server/public/assets/{dist-DqDRYW6P.js → dist-5zingMiA.js} +3 -3
  210. package/server/public/assets/{dist-CxAOHbil.js → dist-CVxhbI2E.js} +1 -1
  211. package/server/public/assets/{ganttDiagram-6RSMTGT7-BYex-Ec7.js → ganttDiagram-6RSMTGT7-Bgj4A7kp.js} +1 -1
  212. package/server/public/assets/{highlighted-body-OFNGDK62-DlVkiG0S.js → highlighted-body-OFNGDK62-DNPK7_cm.js} +1 -1
  213. package/server/public/assets/{index-K0hAYCgV.js → index-DEpY-D1O.js} +148 -148
  214. package/server/public/assets/index-Ddkcz3WT.css +1 -0
  215. package/server/public/assets/{linear-B4cuEFmO.js → linear-BB0jQT16.js} +1 -1
  216. package/server/public/assets/mermaid-GHXKKRXX-BzPfaQJ1.js +1 -0
  217. package/server/public/assets/{pieDiagram-4H26LBE5-CBHNBIJQ.js → pieDiagram-4H26LBE5-DeGIzzpZ.js} +1 -1
  218. package/server/public/assets/{prod-CN2nHBvX.js → prod-XBLvikex.js} +4 -4
  219. package/server/public/assets/{quadrantDiagram-W4KKPZXB-Bom87VOQ.js → quadrantDiagram-W4KKPZXB-BV9SLeWz.js} +1 -1
  220. package/server/public/assets/{sankeyDiagram-5OEKKPKP-UrBeyLxk.js → sankeyDiagram-5OEKKPKP-Dwja0gj8.js} +1 -1
  221. package/server/public/assets/{xychartDiagram-2RQKCTM6-DhkbrIxR.js → xychartDiagram-2RQKCTM6-DCB4qvfw.js} +1 -1
  222. package/server/public/index.html +2 -2
  223. package/server/{pull-requests-DHWiKxo7.js → pull-requests-BonZ4WVG.js} +3 -3
  224. package/server/{pull-requests-Cv7LxzUN.js → pull-requests-DNcJUVWA.js} +1 -1
  225. package/server/{queries-DHJm7bTd.js → queries-DCX27GRr.js} +266 -155
  226. package/server/{rally-B71M9f4o.js → rally-Cxe7lKYX.js} +3 -3
  227. package/server/{rally-api-D5uXN08-.js → rally-api-Cp50exEi.js} +1 -1
  228. package/server/{rally-api-Dkqmok65.js → rally-api-CzkKenoi.js} +2 -2
  229. package/server/{rally-client-CxsA6ExK.js → rally-client-Bu3Cekkw.js} +1 -1
  230. package/server/{rally-client-Bfqm6XI4.js → rally-client-CyBBEDHu.js} +5 -5
  231. package/server/rally-x6ztTQo4.js +3 -0
  232. package/server/{reap-terminal-sessions-CvmwaqKv.js → reap-terminal-sessions-CtAhr6L0.js} +2 -2
  233. package/server/{reap-terminal-sessions-BQ23nriz.js → reap-terminal-sessions-DvFqQUnq.js} +2 -2
  234. package/server/{rebuild-stack-qeRqHZxH.js → rebuild-stack-BKYpIPDL.js} +2 -2
  235. package/server/{rebuild-stack-0EEYReVZ.js → rebuild-stack-hCQtprWC.js} +7 -7
  236. package/server/{reconstruct-cache-BbYFsqLa.js → reconstruct-cache-CF2avArx.js} +9 -8
  237. package/server/{record-CtroO946.js → record-BTwWhtBb.js} +1 -1
  238. package/server/{record-update-Z0QCxmMp.js → record-update-DaOKS7Wb.js} +5 -128
  239. package/server/{record-update-DH6dLJID.js → record-update-DhI7eySG.js} +1 -1
  240. package/server/{recovery-trip-eJe26h-f.js → recovery-trip-D-wM9EfB.js} +2 -2
  241. package/server/{release-engine-lPUp-MTd.js → release-engine-_eO3VFth.js} +5 -5
  242. package/server/{release-set-BwGeyZKX.js → release-set-vxgZwwZV.js} +3 -3
  243. package/server/{remote-BCd02Es1.js → remote-BienmcrZ.js} +3 -3
  244. package/server/{remote-CVGUhXMV.js → remote-CVPCc7Vy.js} +3 -3
  245. package/server/{remote-agents-C1bssi41.js → remote-agents-kwsEZvXu.js} +1 -1
  246. package/server/{remote-agents-C_VxssLU.js → remote-agents-kxraOCGT.js} +17 -8
  247. package/server/{remote-completion-DAB0P706.js → remote-completion-BtmZ42aP.js} +13 -13
  248. package/server/resume-DXIIfJNk.js +3 -0
  249. package/server/{review-agent-CHhI66UP.js → review-agent-CIRr0yYt.js} +31 -29
  250. package/server/{review-agent-CD4RCI0Y.js → review-agent-UpAM4DmT.js} +1 -1
  251. package/server/{review-artifacts-DSMRIfuJ.js → review-artifacts-BCODM9ww.js} +5 -5
  252. package/server/{review-context-oFuBbiEE.js → review-context-BBsNrDri.js} +9 -9
  253. package/server/{review-convoy-liveness-CpzrcJ5F.js → review-convoy-liveness-l06_LYCt.js} +2 -2
  254. package/server/review-status-CacDM78F.js +3 -0
  255. package/server/{review-status-yljtTd-q.js → review-status-CwhA9wmd.js} +329 -110
  256. package/server/{review-status-emit-CUExtHd5.js → review-status-emit-BPJwYcRy.js} +3 -3
  257. package/server/{review-status-enrichment-QV_hQkgS.js → review-status-enrichment-DvyZAbGR.js} +3 -3
  258. package/server/{review-status-source-ylw5QZUR.js → review-status-source-B70ekARK.js} +1 -1
  259. package/server/{review-status-source-CpvJnvnQ.js → review-status-source-DWnFE0b6.js} +1 -1
  260. package/server/{review-status-sync-NaWvI9Xf.js → review-status-sync-B0IS6Beh.js} +1 -1
  261. package/server/{review-status-sync-483sujRo.js → review-status-sync-h2CJX6ju.js} +11 -6
  262. package/server/{review-verdict-feedback-BPDn4li_.js → review-verdict-feedback-qRohbFG2.js} +1 -1
  263. package/server/{review-verdict-feedback-CELeUinh.js → review-verdict-feedback-yrrmgps_.js} +91 -15
  264. package/server/{rollup-DTNvelz9.js → rollup-CUoav0Op.js} +8 -8
  265. package/server/{rollup-DYZfq1c4.js → rollup-DxCjJaAM.js} +1 -1
  266. package/server/{scanner-CV35oSn4.js → scanner-ChURu_b-.js} +7 -7
  267. package/server/{sequence-io-DF_8iuhV.js → sequence-io-D9ITDxzq.js} +4 -4
  268. package/server/{sequencer-agent-B2WeCtGi.js → sequencer-agent-m7gmaakW.js} +7 -6
  269. package/server/server.js +435 -418
  270. package/server/{service-Br9rpBNA.js → service-BzFG0Us_.js} +88 -59
  271. package/server/{session-fork-D0LY152N.js → session-fork-KBq4HIHF.js} +2 -2
  272. package/server/{session-history-BUyK29eq.js → session-history-C_EMhIIF.js} +7 -55
  273. package/server/settings-9jSGHBPY.js +2 -0
  274. package/server/{settings-Bse1Pdcj.js → settings-BLbcDqUp.js} +3 -3
  275. package/server/{settings-CvVGqNEs.js → settings-DejgzzLs.js} +2 -2
  276. package/server/{shadow-engineering-BWLa8ODz.js → shadow-engineering-D8R9I8Yl.js} +3 -3
  277. package/server/{shadow-state-FV6PHfEW.js → shadow-state-C0Af4clN.js} +1 -1
  278. package/server/{shadow-state-B4fpKxOO.js → shadow-state-fzIqIMDD.js} +2 -2
  279. package/server/{shadow-utils-D7asqxOZ.js → shadow-utils-Ugca_9ND.js} +2 -2
  280. package/server/{ship-log-xplJ8t75.js → ship-log-VAv-lHrF.js} +1 -1
  281. package/server/{smart-compaction-D3U_79f-.js → smart-compaction-B2Xu5XEb.js} +7 -7
  282. package/server/{smart-compaction-CPp2Ykf6.js → smart-compaction-BcYY_Suf.js} +1 -1
  283. package/server/{spawn-planning-session-DGfZ5B8D.js → spawn-planning-session-DhCoBPct.js} +38 -50
  284. package/server/spawn-planning-session-Dsv-350T.js +3 -0
  285. package/server/{specialist-completion-Br48eiDP.js → specialist-completion-z6v3ZqJE.js} +1 -1
  286. package/server/{specialist-context-cVbGnTa3.js → specialist-context-CrA5azkJ.js} +5 -5
  287. package/server/{specialist-handoff-logger-DK-GTz4s.js → specialist-handoff-logger-CmpZYJMB.js} +2 -2
  288. package/server/{specialist-logs-Cl5-hqT8.js → specialist-logs-BorrIu0x.js} +3 -3
  289. package/server/{specialists-CNfYO3G2.js → specialists-2yLmqph9.js} +298 -180
  290. package/server/{specialists-Tdezg_6N.js → specialists-CH6ah6D-.js} +1 -1
  291. package/server/{specialists-Cicieuzu.js → specialists-Dfx9_Wzb.js} +18 -18
  292. package/server/{specialists-JHsdU3pA.js → specialists-ZdrifiKx.js} +1 -1
  293. package/server/specs-DKV3jIEs.js +3 -0
  294. package/server/{src-Ck028hjO.js → src-B2e5rGu2.js} +6 -6
  295. package/server/{src-CRmCHlma.js → src-B948bGVR.js} +57 -13
  296. package/server/{src-UWcGe0Ix.js → src-Dm_NV7f6.js} +3 -3
  297. package/server/{stack-health-DqSqx0zv.js → stack-health-Bf2WdG4E.js} +2 -2
  298. package/server/{stack-health-CJLMrLBl.js → stack-health-CoWAhA99.js} +1 -1
  299. package/server/{stale-task-claims-CYFOUNlT.js → stale-task-claims-D1Ll8fI5.js} +5 -4
  300. package/server/{staleness-D47CUJok.js → staleness-45qZ_a60.js} +1 -1
  301. package/server/{staleness-BQ-0gMYK.js → staleness-CuED1Psm.js} +1 -1
  302. package/server/{state-home-BYV7qZTW.js → state-home-B4EWfIxF.js} +2 -2
  303. package/server/{state-mapping-BVldLhBf.js → state-mapping-BEONzr8P.js} +1 -1
  304. package/server/{state-migrate-CvvBtS0Y.js → state-migrate-Cd8BH33U.js} +4 -4
  305. package/server/{stuck-remediation-Wt0UVvu1.js → stuck-remediation-ChcooZuk.js} +1 -1
  306. package/server/{stuck-remediation-mkLC6G_t.js → stuck-remediation-DmY5UJLg.js} +24 -23
  307. package/server/{substrate-bug-weights-service-XfLAKnmK.js → substrate-bug-weights-service-BvTWrFUz.js} +3 -3
  308. package/server/{summary-fork-CD7GOts0.js → summary-fork--Jr8duYh.js} +2 -2
  309. package/server/{summary-fork-xiXBnWG9.js → summary-fork-Ct514_Jl.js} +8 -8
  310. package/server/supervisor/{injection-budget-B5SbvDx2.js → injection-budget-B3UyEONL.js} +1 -1
  311. package/server/supervisor/{paths-K3noE4N_.js → paths-BBOnCYlO.js} +10 -2
  312. package/server/supervisor/pty-supervisor.js +4 -4
  313. package/server/supervisor/{pty-token-B7lp0ElT.js → pty-token-CWRffcCa.js} +3 -3
  314. package/server/{supervisor-DL788vos.js → supervisor-B7BHGcNA.js} +3 -3
  315. package/server/supervisor-CyR_mW5B.js +2 -0
  316. package/server/{swarm-readiness-BV14DF5N.js → swarm-readiness-MNE5O8hn.js} +3 -3
  317. package/server/{system-prerequisites-pdWG6ZQs.js → system-prerequisites-Cin9ZgDx.js} +2 -2
  318. package/server/{teardown-workspace-l2F4_zim.js → teardown-workspace-CvBpvc85.js} +15 -15
  319. package/server/{test-agent-queue-qakFIIGz.js → test-agent-queue-DmSIqays.js} +8 -7
  320. package/server/{test-verdict-Gw-btEfb.js → test-verdict-BieVDAV1.js} +1 -1
  321. package/server/{test-verdict-BJYDggMm.js → test-verdict-Cy2jJGTe.js} +1 -1
  322. package/server/{tldr-daemon-BKOYB616.js → tldr-daemon-Ca0eovh3.js} +1 -1
  323. package/server/{tldr-daemon-CBaWkV9k.js → tldr-daemon-IOssGwg7.js} +2 -2
  324. package/server/{tmux-B1Wbxz5o.js → tmux-CfDHob9M.js} +174 -4
  325. package/server/{tmux-DQ6jB76i.js → tmux-Ctk6RV5l.js} +1 -1
  326. package/server/{token-Cxbk023d.js → token-B10VFNOD.js} +2 -2
  327. package/server/{token-util-CLq2MmQt.js → token-util-CZ8WPtdk.js} +1 -1
  328. package/server/token-util-CrfQ2FKf.js +3 -0
  329. package/server/{tracker-config-DZ8Zn2nQ.js → tracker-config-CHbrjg6m.js} +2 -2
  330. package/server/{tracker-utils-L0FKtjq2.js → tracker-utils-DZZq_C0R.js} +2 -2
  331. package/server/{traefik-connect-bNX6jKkb.js → traefik-connect-GHomyBaD.js} +1 -1
  332. package/server/{tunnel-BAm1XgjG.js → tunnel-Bdyb-sNq.js} +3 -3
  333. package/server/{tunnel-CjSnHdTc.js → tunnel-Dz7y434T.js} +1 -1
  334. package/server/{typed-errors-BHhE85Ul.js → typed-errors-BR_RmPS_.js} +1 -1
  335. package/server/{typed-errors-2BTMxkZq.js → typed-errors-Bn_2WRU7.js} +1 -1
  336. package/server/{types-hraoaQIp.js → types-D2ETIB8T.js} +1 -1
  337. package/server/{types-q67TYYg5.js → types-Dh6RI5Vj.js} +1 -1
  338. package/server/{uat-promote-verification-CKB9ZrKC.js → uat-promote-verification-DyvQXvIn.js} +5 -5
  339. package/server/{uat-train-D5UjcyAa.js → uat-train-Dv0Bxer7.js} +0 -0
  340. package/server/{uat-train-Cu-4nvbf.js → uat-train-diX_7shd.js} +1 -1
  341. package/server/{validate-Cxsx5Uz1.js → validate-606KcYZC.js} +3 -3
  342. package/server/{validation-DEaTZafj.js → validation-Cf7aaV5A.js} +1 -1
  343. package/server/{validation-VZgJxmqc.js → validation-CnrDul1x.js} +4 -4
  344. package/server/{verification-artifact-g3yuxQDL.js → verification-artifact-D4b-bio9.js} +1 -1
  345. package/server/{verification-artifact-C85cRTc_.js → verification-artifact-GOaj8u2s.js} +1 -1
  346. package/server/{verification-runner-KDZIsBj4.js → verification-runner-B5MVxDvU.js} +19 -19
  347. package/server/{verification-runner-DlZI8yhw.js → verification-runner-DiPaUP-C.js} +1 -1
  348. package/server/{vtt-parser-Jr94BF3Y.js → vtt-parser-CMU5EZ5R.js} +1 -1
  349. package/server/{work-agent-prompt-C-vuP3_J.js → work-agent-prompt-Csb3fbVR.js} +9 -9
  350. package/server/{workflows-D0oip4eV.js → workflows-D87ajwV6.js} +113 -43
  351. package/server/workflows-DN6NyVGd.js +2 -0
  352. package/server/{workspace-BqFg__wH.js → workspace-AIOM7n00.js} +1 -1
  353. package/server/{workspace-anchor-drift-B4gMRHl4.js → workspace-anchor-drift-19cJ1bH5.js} +1 -1
  354. package/server/{workspace-anchor-drift-CZKofakh.js → workspace-anchor-drift-C3mK5wNI.js} +4 -4
  355. package/server/{workspace-config-B123aZl-.js → workspace-config-CJ7RqQiP.js} +1 -1
  356. package/server/{workspace-C0fH3aek.js → workspace-iD8oULqu.js} +3 -3
  357. package/server/{workspace-manager-CDTKjjdU.js → workspace-manager-B38rFWA1.js} +1 -1
  358. package/server/{workspace-manager-CwO-Hek7.js → workspace-manager-CXfrw4rR.js} +13 -13
  359. package/server/{workspace-metadata-D4M8BM4W.js → workspace-metadata-BuMRco5P.js} +1 -1
  360. package/server/{workspace-metadata-CQv00QwK.js → workspace-metadata-eHSj_NsP.js} +2 -2
  361. package/server/{workspaces-j1e_6aAT.js → workspaces-DbtMX2TM.js} +136 -113
  362. package/sync-sources/skills/pan-merge/SKILL.md +7 -5
  363. package/sync-sources/skills/pan-release/SKILL.md +57 -0
  364. package/server/agent-state-service-hZpxIw1E.js +0 -2
  365. package/server/archive-planning-0FJ6Xd3b.js +0 -2
  366. package/server/cli-DmXETsw-.js +0 -3
  367. package/server/conflict-gate-Dh754uyA.js +0 -3
  368. package/server/deacon-swarm-I2JfX5Tg.js +0 -2
  369. package/server/dist-DSlxIU1H.js +0 -3
  370. package/server/durable-review-pipeline-jpgCJZFp.js +0 -3
  371. package/server/forge-DK3blQb_.js +0 -3
  372. package/server/hume-Dq--7rOQ.js +0 -3
  373. package/server/inspect-agent-BVwDrVrz.js +0 -2
  374. package/server/label-reconciler--F85rufp.js +0 -113
  375. package/server/merge-ops-DdpTiEMt.js +0 -2
  376. package/server/merge-rebase-DGQpYJU3.js +0 -2
  377. package/server/merge-sync-Ca7F5JnQ.js +0 -3
  378. package/server/public/assets/index-Cc7cnFC4.css +0 -1
  379. package/server/public/assets/mermaid-GHXKKRXX-DyDHFXHV.js +0 -1
  380. package/server/rally-YDjU513q.js +0 -3
  381. package/server/resume-u9byntrq.js +0 -3
  382. package/server/review-status-BZH8h-6W.js +0 -3
  383. package/server/settings-CdvIF84R.js +0 -2
  384. package/server/spawn-planning-session-1nFi3gfk.js +0 -2
  385. package/server/specs-Bt7WJDoC.js +0 -3
  386. package/server/supervisor-UWiQNK-y.js +0 -2
  387. package/server/token-util-zlz9U0ki.js +0 -3
  388. package/server/workflows-CHrx_hcW.js +0 -2
@@ -1,46 +1,46 @@
1
1
  import { a as __toCommonJS } from "./rolldown-runtime-DNCzzKnI.js";
2
- import { A as canUseHarnessSync, Cn as resolveStateReadHomeSync, D as resolveTieredExecutionEnabled, Fr as init_errors, Gn as init_projects, H as init_providers, I as UnknownModelError, M as init_harness_policy, Mn as findProjectByPathSync, O as resolveTieredExecutionEnabledForIssue, Sn as init_state_read_home, T as init_tier_table, Tr as FsError, U as piProviderForModel, V as getProviderForModelSync, Yn as listProjectsSync, ar as resolveProjectFromIssueSync, c as isClaudeCodeChannelsEnabled, ci as init_paths, di as resolveOhmypiExtensionPath, ei as encodeClaudeProjectDir, f as loadConfigSync, gr as init_issue_id, h as jsYaml, hn as init_state_plane, hr as extractPrefixSync, m as init_js_yaml, si as getOverdeckHome, t as init_config_yaml, tt as resolveModel, ui as packageRoot, vn as parsePorcelainStatusPaths, vr as parseIssueIdSync, wn as shouldCommitLegacyWorkspaceArtifacts, zn as getProjectSync } from "./config-yaml-CmOPzmBb.js";
2
+ import { A as canUseHarnessSync, Cn as resolveStateReadHomeSync, D as resolveTieredExecutionEnabled, Fr as init_errors, Gn as init_projects, H as init_providers, I as UnknownModelError, M as init_harness_policy, Mn as findProjectByPathSync, O as resolveTieredExecutionEnabledForIssue, Sn as init_state_read_home, T as init_tier_table, Tr as FsError, U as piProviderForModel, V as getProviderForModelSync, Yn as listProjectsSync, ar as resolveProjectFromIssueSync, c as isClaudeCodeChannelsEnabled, ci as getOverdeckHome, di as packageRoot, ei as claudeSessionTranscriptExists, f as loadConfigSync, fi as resolveOhmypiExtensionPath, gr as init_issue_id, h as jsYaml, hn as init_state_plane, hr as extractPrefixSync, li as init_paths, m as init_js_yaml, t as init_config_yaml, ti as encodeClaudeProjectDir, tt as resolveModel, vn as parsePorcelainStatusPaths, vr as parseIssueIdSync, wn as shouldCommitLegacyWorkspaceArtifacts, zn as getProjectSync } from "./config-yaml-CxdwhAIA.js";
3
3
  import { n as emitActivityEntryDurable, o as init_activity_logger, r as emitActivityEntrySync } from "./activity-logger-CyteR4JO.js";
4
- import { d as getOverdeckDatabaseSync, f as init_infra } from "./infra-BjuxvjdS.js";
5
- import { B as sendKeysAsync, D as killSession, H as sessionExists, M as listSessionNames, N as listSessions, Q as BLANKED_PROVIDER_ENV, T as isHarnessProcessAlive, U as sessionExistsSync, V as sendRawKeystroke, W as setOption, et as buildChildEnvWithoutTmuxSync, g as findManagedServerPidSync, i as capturePane, m as exactPaneTarget, o as capturePaneText, s as createSession, tt as init_child_env, w as init_tmux } from "./tmux-B1Wbxz5o.js";
6
- import { a as init_event_store, n as getEventStore } from "./event-store-zY5MJHgF.js";
7
- import { N as normalizeChannelReplyPayload, T as DomainEvent, n as COMPOSER_COMMAND_MANIFEST, s as getHarnessBehavior, t as init_src } from "./src-CRmCHlma.js";
8
- import { K as stateToOverdeckParamsForDb, S as setReviewStatusSync, U as init_agent_state_sync, V as AGENT_COLUMNS_FOR_DB, f as init_review_status, m as loadReviewStatuses, o as clearWorkspaceStuck, u as getReviewStatusSync } from "./review-status-yljtTd-q.js";
9
- import { a as EventStoreService, c as ReadModelService, d as getClosedIssueIdsForReadSource, f as init_read_model, i as init_issue_lifecycle, s as init_domain_services, t as IssueLifecycle } from "./issue-lifecycle-C4Zj0WmE.js";
10
- import { d as isTerminalIssueStage, o as init_agents, u as getIssueStageSync } from "./agents-C5rWYhb6.js";
11
- import { n as ensureSessionContextBriefingFile, r as init_briefing_freshness } from "./briefing-freshness-DHmCSLar.js";
12
- import { o as getPricingSync, s as init_cost, t as calculateCostSync } from "./cost-Bgcub5kW.js";
13
- import { $ as operatorInterventionEvent, $n as getAgentDir, An as getProviderExportsForModel, Bn as dismissDevChannelsDialog, Dr as init_pty_supervisor_locate, Er as writePtyToken, F as init_tier_escalation, Fr as getAgentRuntimeState, G as resumeAgent, Gt as assertWorkspaceStackHealthyForSpawn, H as restartAgent, Hr as checkCodexAuthStatus, Ht as BRIDGE_TOKEN_HEADER, Ir as getAgentRuntimeStateSync, Jt as init_spawn_prep, Mn as init_provider_health, Mt as deliverAgentMessage, Nn as validateProviderHealth, Nt as deliverAgentPermissionDecision, On as determineModel, Or as resolvePtySupervisorScriptPath, P as decideEscalation, Pr as waitForReadySignal, Q as init_operator_interventions, Qt as init_staffing, Rr as saveAgentRuntimeState, Rt as setAgentDeliveryMethod, Sr as writeAgentStateJsonSync, Tr as init_pty_token, Un as writeChannelsBridgeMcpConfig, Ur as init_codex_auth, Ut as init_bridge_token, V as recoverAgent, Wt as writeBridgeTokenSync, X as messageAgent, Xt as transitionIssueToInProgress, Yn as clearAgentTroubled, _r as saveAgentStateSync, b as init_agents$1, bn as init_ohmypi_fifo, cn as getAgentRuntimeBaseCommand, dn as getProviderAuthMode, gn as waitForAcpHostReady, gr as saveAgentState, i as listRunningAgents, it as getSessionId, jr as normalizeAgentId, kr as clearReadySignal, nn as resolveStaffing, nt as getLatestSessionId, ot as saveSessionId, pn as init_runtime_command, pt as stopAgent, qn as clearAgentPaused, r as listAgentStates, rr as getAgentStateSync, rt as getLatestSessionIdSync, sn as getAcpLauncherFields, tn as resolveIssueWorkModel, tr as getAgentState, tt as getActivity, ur as markAgentStoppedState, vn as init_pi_fifo, vr as setAgentPaused, xn as ohmypiFifoPaths, xr as wipeAgentStateDirs, yn as piFifoPaths } from "./queries-DHJm7bTd.js";
14
- import { a as performHandoff, i as checkAllTriggers, s as getAgentHealth, t as getCloisterService } from "./service-Br9rpBNA.js";
15
- import { o as init_persistent_logger, s as logAgentLifecycleSync } from "./session-history-BUyK29eq.js";
16
- import { t as init_behavior } from "./behavior-CfIg6pKp.js";
17
- import { a as init_tracker_config, t as getGitHubConfig } from "./tracker-config-DZ8Zn2nQ.js";
18
- import { n as init_issue_service_singleton, r as issue_service_singleton_exports } from "./issue-service-singleton-DmCh7EHj.js";
19
- import { o as getInternalTokenSync, s as init_internal_token } from "./internal-token-DvMTQSOS.js";
20
- import { a as PAN_DIRNAME, i as PAN_CONTINUE_FILENAME, p as init_types } from "./types-hraoaQIp.js";
21
- import { l as resolveWorkspaceRepoRootsSync, o as resolvePrimaryWorkspaceRepoDirSync, r as init_project_repos } from "./project-repos-C0nuoBGv.js";
22
- import { a as generateXBriefFilename, o as init_lifecycle } from "./lifecycle-CTdOWYMi.js";
23
- import { f as readTierOverrides, g as serializeXBriefDocument, h as recordTierPromotion, m as readWorkspacePlanSync, o as init_io, r as findPlan, u as readPlan } from "./io-VHvc0Ssp.js";
24
- import { B as removeFavorite, E as hasOtherActiveConversationOnTmuxSession, F as markConversationEnded, G as setConversationHarness, K as setConversationModel, M as listConversations, P as markConversationActive, Q as updateConversationDeliveryMethod, S as getConversationByName, W as setConversationEffort, g as backfillConversationModel, h as archiveConversation, k as init_conversations, nt as updateLastAttached, rt as updateSpawnError, x as getConversationById, y as createConversation } from "./conversations-BUpYsOZg.js";
25
- import { n as recordFeatureRegistryLifecycle, t as init_feature_registry_population } from "./feature-registry-population--YUXU999.js";
26
- import { d as generateLauncherScriptSync, f as init_launcher_generator, g as requireModelOverrideSync, h as normalizeModelOverrideSync, m as init_model_validation, p as MODEL_ID_PATTERN } from "./tmux-dedup-DbN6MGzM.js";
27
- import { a as init_claude_permissions, o as resolvePermissionModeSync, r as getClaudePermissionFlagsStringSync, t as BYPASS_PERMISSION_MODE } from "./claude-permissions-CN0cSCPp.js";
28
- import { E as init_layers, I as workspaceContextFile, k as piGlobalContextFile } from "./assemble-DnffNpOo.js";
29
- import { i as prepareHarnessLaunch, r as init_harness_binary } from "./harness-binary-DqkftwTb.js";
30
- import { a as getWorkspaceStackHealth, s as init_stack_health } from "./stack-health-DqSqx0zv.js";
31
- import { l as init_dag, o as getDispatchableItems } from "./dag-ombYYt4s.js";
32
- import { n as resolveHarness, t as init_harness_resolve } from "./harness-resolve-CqMqM1Mb.js";
33
- import { a as loadCloisterConfigSync, r as init_config } from "./config-B2IMcBxx.js";
34
- import { c as isStateMigrated, o as init_state_home } from "./state-home-BYV7qZTW.js";
35
- import { a as init_lifecycle_io, c as updatePlanStatus, s as transitionXBriefOnMain } from "./lifecycle-io-D-lGdzK3.js";
36
- import { _ as init_codex_conversation_parser, b as parseAcpConversationMessages, c as parseEntireConversation, d as init_pi_conversation_parser, g as parseOhmypiConversationMessages, m as init_ohmypi_conversation_parser, p as parsePiConversationMessages, t as init_conversation_service, v as parseCodexConversationMessages, y as init_acp_conversation_parser } from "./conversation-service-5aCnq1zR.js";
37
- import { _ as normalizeAwaitingInputPrompt, d as getAgentPendingQuestions$1, f as getAgentWorkspace$1, h as detectAwaitingInputForAgent, m as scanPendingInputsPromise, o as getRuntimeForAgent, p as isBlockedOnPendingInput, s as computeAgentEnrichment, u as getAgentJsonlPath$1, v as parseCodexApprovalPrompt } from "./stuck-remediation-mkLC6G_t.js";
38
- import { B as getBook, H as liveOrderIssueLookup, T as resolveLiveFlywheelRunId, w as readFlywheelLaunchMetadata, y as getFlywheelRunDir, z as computeBookProgress } from "./flywheel-BiT3odRb.js";
39
- import { Ft as getResourceConfig, Lt as getSystemHealthSnapshot, Ot as classifyMemoryPressure } from "./deacon-hi9KLPLT.js";
40
- import { o as stopWorkspaceDocker, r as init_workspace_manager } from "./workspace-manager-CwO-Hek7.js";
41
- import { a as init_jsonl_parser, o as normalizeModelName } from "./jsonl-parser-DJOH_O-w.js";
42
- import { r as init_in_flight_guard, t as createInFlightGuard } from "./in-flight-guard-Bq3epG58.js";
43
- import { a as loadWorkspaceMetadataSync } from "./workspace-metadata-CQv00QwK.js";
4
+ import { d as getOverdeckDatabaseSync, f as init_infra } from "./infra-BDQDRopn.js";
5
+ import { B as sendKeysAsync, D as killSession, H as sessionExists, J as init_pane_choice_menu, M as listSessionNames, N as listSessions, T as isHarnessProcessAlive, U as sessionExistsSync, V as sendRawKeystroke, W as setOption, X as paneHasBlockingChoiceMenu, at as buildChildEnvWithoutTmuxSync, g as findManagedServerPidSync, i as capturePane, m as exactPaneTarget, o as capturePaneText, ot as init_child_env, rt as BLANKED_PROVIDER_ENV, s as createSession, w as init_tmux } from "./tmux-CfDHob9M.js";
6
+ import { a as init_event_store, n as getEventStore } from "./event-store-CrHcVC5_.js";
7
+ import { N as normalizeChannelReplyPayload, T as DomainEvent, n as COMPOSER_COMMAND_MANIFEST, s as getHarnessBehavior, t as init_src } from "./src-B948bGVR.js";
8
+ import { C as setReviewStatusSync, Q as stateToOverdeckParamsForDb, Y as init_agent_state_sync, d as getReviewStatusSync, h as loadReviewStatuses, o as clearWorkspaceStuck, p as init_review_status, q as AGENT_COLUMNS_FOR_DB } from "./review-status-CwhA9wmd.js";
9
+ import { a as EventStoreService, c as ReadModelService, d as getClosedIssueIdsForReadSource, f as init_read_model, i as init_issue_lifecycle, s as init_domain_services, t as IssueLifecycle } from "./issue-lifecycle-BXfzxFCD.js";
10
+ import { n as logAgentLifecycleSync, t as init_persistent_logger } from "./persistent-logger-CBj016pT.js";
11
+ import { d as isTerminalIssueStage, o as init_agents, u as getIssueStageSync } from "./agents-CtACUuVG.js";
12
+ import { n as ensureSessionContextBriefingFile, r as init_briefing_freshness } from "./briefing-freshness-CUerZqWd.js";
13
+ import { o as getPricingSync, s as init_cost, t as calculateCostSync } from "./cost-Aat8HfO_.js";
14
+ import { $ as operatorInterventionEvent, $n as getAgentDir, An as getProviderExportsForModel, Ar as resolvePtySupervisorScriptPath, Bn as dismissDevChannelsDialog, Br as saveAgentRuntimeState, Dr as init_pty_token, Er as init_resume_contract, F as init_tier_escalation, G as resumeAgent, Gr as init_codex_auth, Gt as assertWorkspaceStackHealthyForSpawn, H as restartAgent, Ht as BRIDGE_TOKEN_HEADER, Ir as waitForReadySignal, Jt as init_spawn_prep, Lr as getAgentRuntimeState, Mn as init_provider_health, Mt as deliverAgentMessage, Nn as validateProviderHealth, Nr as normalizeAgentId, Nt as deliverAgentPermissionDecision, On as determineModel, Or as writePtyToken, P as decideEscalation, Q as init_operator_interventions, Qt as init_staffing, Rr as getAgentRuntimeStateSync, Rt as setAgentDeliveryMethod, Sr as writeAgentStateJsonSync, Tr as buildResumeContract, Un as writeChannelsBridgeMcpConfig, Ut as init_bridge_token, V as recoverAgent, Wr as checkCodexAuthStatus, Wt as writeBridgeTokenSync, X as messageAgent, Xt as transitionIssueToInProgress, Yn as clearAgentTroubled, _r as saveAgentStateSync, b as init_agents$1, bn as init_ohmypi_fifo, cn as getAgentRuntimeBaseCommand, dn as getProviderAuthMode, gn as waitForAcpHostReady, gr as saveAgentState, i as listRunningAgents, it as getSessionId, jr as clearReadySignal, kr as init_pty_supervisor_locate, nn as resolveStaffing, nt as getLatestSessionId, ot as saveSessionId, pn as init_runtime_command, pt as stopAgent, qn as clearAgentPaused, r as listAgentStates, rr as getAgentStateSync, rt as getLatestSessionIdSync, sn as getAcpLauncherFields, tn as resolveIssueWorkModel, tr as getAgentState, tt as getActivity, ur as markAgentStoppedState, vn as init_pi_fifo, vr as setAgentPaused, xn as ohmypiFifoPaths, xr as wipeAgentStateDirs, yn as piFifoPaths } from "./queries-DCX27GRr.js";
15
+ import { a as performHandoff, i as checkAllTriggers, s as getAgentHealth, t as getCloisterService } from "./service-BzFG0Us_.js";
16
+ import { t as init_behavior } from "./behavior-B7biGtFT.js";
17
+ import { a as init_tracker_config, t as getGitHubConfig } from "./tracker-config-CHbrjg6m.js";
18
+ import { n as init_issue_service_singleton, r as issue_service_singleton_exports } from "./issue-service-singleton-F3A5VP6M.js";
19
+ import { o as getInternalTokenSync, s as init_internal_token } from "./internal-token-BG6yQKNL.js";
20
+ import { a as PAN_DIRNAME, i as PAN_CONTINUE_FILENAME, p as init_types } from "./types-D2ETIB8T.js";
21
+ import { l as resolveWorkspaceRepoRootsSync, o as resolvePrimaryWorkspaceRepoDirSync, r as init_project_repos } from "./project-repos-BOpBzkO6.js";
22
+ import { a as generateXBriefFilename, o as init_lifecycle } from "./lifecycle-DOgGnpIv.js";
23
+ import { f as readTierOverrides, g as serializeXBriefDocument, h as recordTierPromotion, m as readWorkspacePlanSync, o as init_io, r as findPlan, u as readPlan } from "./io-C0NV7y6C.js";
24
+ import { B as removeFavorite, E as hasOtherActiveConversationOnTmuxSession, F as markConversationEnded, G as setConversationHarness, K as setConversationModel, M as listConversations, P as markConversationActive, Q as updateConversationDeliveryMethod, S as getConversationByName, W as setConversationEffort, g as backfillConversationModel, h as archiveConversation, k as init_conversations, nt as updateLastAttached, rt as updateSpawnError, x as getConversationById, y as createConversation } from "./conversations-D7lR670u.js";
25
+ import { n as recordFeatureRegistryLifecycle, t as init_feature_registry_population } from "./feature-registry-population-DhswNiXx.js";
26
+ import { C as init_launcher_generator, D as requireModelOverrideSync, E as normalizeModelOverrideSync, S as generateLauncherScriptSync, T as init_model_validation, w as MODEL_ID_PATTERN, x as normalizeFlywheelRunId, y as init_provenance } from "./auto-spawn-consent-BooqhC3L.js";
27
+ import { a as init_claude_permissions, o as resolvePermissionModeSync, r as getClaudePermissionFlagsStringSync, t as BYPASS_PERMISSION_MODE } from "./claude-permissions-DYVLnX9t.js";
28
+ import { E as init_layers, I as workspaceContextFile, k as piGlobalContextFile } from "./assemble-DsqK9OAq.js";
29
+ import { i as prepareHarnessLaunch, r as init_harness_binary } from "./harness-binary-CnBHpd57.js";
30
+ import { a as getWorkspaceStackHealth, s as init_stack_health } from "./stack-health-Bf2WdG4E.js";
31
+ import { l as init_dag, o as getDispatchableItems } from "./dag-5QlmH0oC.js";
32
+ import { n as resolveHarness, t as init_harness_resolve } from "./harness-resolve-BVj6sI8m.js";
33
+ import { a as loadCloisterConfigSync, r as init_config } from "./config-ktAVnp4s.js";
34
+ import { c as isStateMigrated, o as init_state_home } from "./state-home-B4EWfIxF.js";
35
+ import { a as init_lifecycle_io, c as updatePlanStatus, s as transitionXBriefOnMain } from "./lifecycle-io-1XSeczTr.js";
36
+ import { _ as init_codex_conversation_parser, b as parseAcpConversationMessages, c as parseEntireConversation, d as init_pi_conversation_parser, g as parseOhmypiConversationMessages, m as init_ohmypi_conversation_parser, p as parsePiConversationMessages, t as init_conversation_service, v as parseCodexConversationMessages, y as init_acp_conversation_parser } from "./conversation-service-CZiUE8Uw.js";
37
+ import { _ as normalizeAwaitingInputPrompt, d as getAgentPendingQuestions$1, f as getAgentWorkspace$1, h as detectAwaitingInputForAgent, m as scanPendingInputsPromise, o as getRuntimeForAgent, p as isBlockedOnPendingInput, s as computeAgentEnrichment, u as getAgentJsonlPath$1, v as parseCodexApprovalPrompt } from "./stuck-remediation-DmY5UJLg.js";
38
+ import { B as getBook, H as liveOrderIssueLookup, T as resolveLiveFlywheelRunId, w as readFlywheelLaunchMetadata, y as getFlywheelRunDir, z as computeBookProgress } from "./flywheel-CTVY3yCG.js";
39
+ import { Bt as getSystemHealthSnapshot, Rt as getResourceConfig, jt as classifyMemoryPressure } from "./deacon-B1LD5cJU.js";
40
+ import { o as stopWorkspaceDocker, r as init_workspace_manager } from "./workspace-manager-CXfrw4rR.js";
41
+ import { a as init_jsonl_parser, o as normalizeModelName } from "./jsonl-parser-BXiGANOh.js";
42
+ import { r as init_in_flight_guard, t as createInFlightGuard } from "./in-flight-guard-nXEKoxI7.js";
43
+ import { a as loadWorkspaceMetadataSync } from "./workspace-metadata-eHSj_NsP.js";
44
44
  import { basename, delimiter, dirname, isAbsolute, join, resolve } from "node:path";
45
45
  import { Cause, Data, Effect, Layer, Option, Schema, Stream } from "effect";
46
46
  import { join as join$1 } from "path";
@@ -90,18 +90,19 @@ init_tier_table();
90
90
  init_js_yaml();
91
91
  init_config_yaml();
92
92
  init_child_env();
93
+ init_pane_choice_menu();
93
94
  init_tmux();
94
95
  init_infra();
95
96
  init_event_store();
96
97
  init_src();
97
98
  init_agent_state_sync();
99
+ init_persistent_logger();
98
100
  init_agents();
99
101
  init_read_model();
100
102
  init_briefing_freshness();
101
103
  init_domain_services();
102
104
  init_cost();
103
105
  init_behavior();
104
- init_persistent_logger();
105
106
  init_tracker_config();
106
107
  init_project_repos();
107
108
  init_lifecycle();
@@ -196,6 +197,7 @@ function httpHandler(effect) {
196
197
  init_conversations();
197
198
  init_pty_supervisor_locate();
198
199
  init_pty_token();
200
+ init_resume_contract();
199
201
  init_feature_registry_population();
200
202
  init_model_validation();
201
203
  init_provider_health();
@@ -208,6 +210,7 @@ init_runtime_command();
208
210
  init_stack_health();
209
211
  init_launcher_generator();
210
212
  init_dag();
213
+ init_provenance();
211
214
  init_staffing();
212
215
  init_spawn_prep();
213
216
  init_harness_resolve();
@@ -827,7 +830,7 @@ async function resolveCodexRolloutPath(agentId, opts = {}) {
827
830
  const agentDir = join(opts.agentsDirOverride ?? join(getOverdeckHome(), "agents"), agentId);
828
831
  const codexHome = join(agentDir, "codex-home");
829
832
  if (!await pathExists$1(codexHome)) return null;
830
- const { findRolloutPath, findLatestRollout } = await import("./codex-BdEsUFWh.js");
833
+ const { findRolloutPath, findLatestRollout } = await import("./codex-rnJN3v3_.js");
831
834
  const threadId = (await readOptional(join(agentDir, "codex-thread-id")))?.trim();
832
835
  if (threadId) {
833
836
  const rollout = findRolloutPath(codexHome, threadId);
@@ -926,6 +929,7 @@ function spawnPanCli(args, options = {}) {
926
929
  //#endregion
927
930
  //#region ../../lib/work-agent-lifecycle.ts
928
931
  init_agents$1();
932
+ init_paths();
929
933
  init_tmux();
930
934
  async function pathExists(path) {
931
935
  try {
@@ -940,9 +944,11 @@ function getWorkAgentLifecycleStateSync(agentOrIssueId) {
940
944
  const agentState = getAgentStateSync(agentId);
941
945
  const runtimeState = getAgentRuntimeStateSync(agentId);
942
946
  const hasAgentState = !!agentState;
943
- const hasSavedSession = !!getLatestSessionIdSync(agentId);
947
+ const sessionId = getLatestSessionIdSync(agentId) ?? null;
948
+ const hasSavedSession = !!sessionId;
944
949
  const hasLiveTmuxSession = sessionExistsSync(agentId);
945
950
  const hasWorkspace = !!agentState?.workspace && existsSync(agentState.workspace);
951
+ const hasResumableTranscript = !sessionId || !!agentState?.harness && agentState.harness !== "claude-code" || !agentState?.workspace || claudeSessionTranscriptExists(agentState.workspace, sessionId);
946
952
  const agentStatus = agentState?.status || "unknown";
947
953
  const runtime = runtimeState?.state || "uninitialized";
948
954
  const isCompleted = runtimeState?.resolution === "completed";
@@ -953,7 +959,7 @@ function getWorkAgentLifecycleStateSync(agentOrIssueId) {
953
959
  const isRunningButStuck = isRunning && (runtime === "idle" || runtime === "suspended");
954
960
  const hasResumableBackingState = hasAgentState && hasWorkspace && !isPlaceholder;
955
961
  const isOrphaned = !hasLiveTmuxSession && (hasSavedSession && !hasResumableBackingState || hasAgentState && (!hasWorkspace || isPlaceholder));
956
- const requiresSessionResetBeforeFreshStart = hasSavedSession && !hasLiveTmuxSession && hasResumableBackingState && (isStopped || isCrashed);
962
+ const requiresSessionResetBeforeFreshStart = hasSavedSession && hasResumableTranscript && !hasLiveTmuxSession && hasResumableBackingState && (isStopped || isCrashed);
957
963
  let recommendedAction = "start";
958
964
  let reason;
959
965
  if (isRunningButStuck) {
@@ -971,6 +977,9 @@ function getWorkAgentLifecycleStateSync(agentOrIssueId) {
971
977
  } else if (requiresSessionResetBeforeFreshStart) {
972
978
  recommendedAction = "resume";
973
979
  reason = `Agent ${agentId} has a resumable Claude session. Use 'pan resume ${agentOrIssueId}' to continue it, or 'pan start ${agentOrIssueId} --fresh' to start a new session (e.g. to switch model).`;
980
+ } else if (hasSavedSession && !hasResumableTranscript && hasResumableBackingState && (isStopped || isCrashed)) {
981
+ recommendedAction = "start";
982
+ reason = `Agent ${agentId} has a saved Claude session id but its transcript is missing on disk (jsonl-missing). Start Agent will create a fresh session in the existing workspace.`;
974
983
  } else if (hasAgentState && !hasSavedSession && isStopped) {
975
984
  recommendedAction = "start";
976
985
  reason = `Agent ${agentId} is stopped and has no saved Claude session. Start Agent will create a fresh session in the existing workspace.`;
@@ -983,6 +992,7 @@ function getWorkAgentLifecycleStateSync(agentOrIssueId) {
983
992
  hasAgentState,
984
993
  hasLiveTmuxSession,
985
994
  hasSavedSession,
995
+ hasResumableTranscript,
986
996
  hasWorkspace,
987
997
  isPlaceholder,
988
998
  isOrphaned,
@@ -994,9 +1004,9 @@ function getWorkAgentLifecycleStateSync(agentOrIssueId) {
994
1004
  runtimeState: runtime,
995
1005
  agentStatus,
996
1006
  canStartFresh: (!hasLiveTmuxSession || hasLiveTmuxSession && isStopped) && (!requiresSessionResetBeforeFreshStart || isOrphaned),
997
- canResumeSession: !isRunning && hasSavedSession && hasResumableBackingState && (isStopped || isCrashed),
1007
+ canResumeSession: !isRunning && hasSavedSession && hasResumableTranscript && hasResumableBackingState && (isStopped || isCrashed),
998
1008
  canRestartWithContext: hasAgentState && hasWorkspace,
999
- canResetSession: hasSavedSession && hasResumableBackingState,
1009
+ canResetSession: hasSavedSession && hasResumableTranscript && hasResumableBackingState,
1000
1010
  requiresSessionResetBeforeFreshStart,
1001
1011
  recommendedAction,
1002
1012
  reason
@@ -1007,9 +1017,11 @@ async function getWorkAgentLifecycleStateSnapshot(agentOrIssueId) {
1007
1017
  const agentState = await Effect.runPromise(getAgentState(agentId));
1008
1018
  const runtimeState = await Effect.runPromise(getAgentRuntimeState(agentId));
1009
1019
  const hasAgentState = !!agentState;
1010
- const hasSavedSession = !!await Effect.runPromise(getLatestSessionId(agentId));
1020
+ const sessionId = await Effect.runPromise(getLatestSessionId(agentId)) ?? null;
1021
+ const hasSavedSession = !!sessionId;
1011
1022
  const hasLiveTmuxSession = await Effect.runPromise(sessionExists(agentId));
1012
1023
  const hasWorkspace = !!agentState?.workspace && await pathExists(agentState.workspace);
1024
+ const hasResumableTranscript = !sessionId || !!agentState?.harness && agentState.harness !== "claude-code" || !agentState?.workspace || claudeSessionTranscriptExists(agentState.workspace, sessionId);
1013
1025
  const agentStatus = agentState?.status || "unknown";
1014
1026
  const runtime = runtimeState?.state || "uninitialized";
1015
1027
  const isCompleted = runtimeState?.resolution === "completed";
@@ -1020,7 +1032,7 @@ async function getWorkAgentLifecycleStateSnapshot(agentOrIssueId) {
1020
1032
  const isRunningButStuck = isRunning && (runtime === "idle" || runtime === "suspended");
1021
1033
  const hasResumableBackingState = hasAgentState && hasWorkspace && !isPlaceholder;
1022
1034
  const isOrphaned = !hasLiveTmuxSession && (hasSavedSession && !hasResumableBackingState || hasAgentState && (!hasWorkspace || isPlaceholder));
1023
- const requiresSessionResetBeforeFreshStart = hasSavedSession && !hasLiveTmuxSession && hasResumableBackingState && (isStopped || isCrashed);
1035
+ const requiresSessionResetBeforeFreshStart = hasSavedSession && hasResumableTranscript && !hasLiveTmuxSession && hasResumableBackingState && (isStopped || isCrashed);
1024
1036
  let recommendedAction = "start";
1025
1037
  let reason;
1026
1038
  if (isRunningButStuck) {
@@ -1038,6 +1050,9 @@ async function getWorkAgentLifecycleStateSnapshot(agentOrIssueId) {
1038
1050
  } else if (requiresSessionResetBeforeFreshStart) {
1039
1051
  recommendedAction = "resume";
1040
1052
  reason = `Agent ${agentId} has a resumable Claude session. Use 'pan resume ${agentOrIssueId}' to continue it, or 'pan start ${agentOrIssueId} --fresh' to start a new session (e.g. to switch model).`;
1053
+ } else if (hasSavedSession && !hasResumableTranscript && hasResumableBackingState && (isStopped || isCrashed)) {
1054
+ recommendedAction = "start";
1055
+ reason = `Agent ${agentId} has a saved Claude session id but its transcript is missing on disk (jsonl-missing). Start Agent will create a fresh session in the existing workspace.`;
1041
1056
  } else if (hasAgentState && !hasSavedSession && isStopped) {
1042
1057
  recommendedAction = "start";
1043
1058
  reason = `Agent ${agentId} is stopped and has no saved Claude session. Start Agent will create a fresh session in the existing workspace.`;
@@ -1050,6 +1065,7 @@ async function getWorkAgentLifecycleStateSnapshot(agentOrIssueId) {
1050
1065
  hasAgentState,
1051
1066
  hasLiveTmuxSession,
1052
1067
  hasSavedSession,
1068
+ hasResumableTranscript,
1053
1069
  hasWorkspace,
1054
1070
  isPlaceholder,
1055
1071
  isOrphaned,
@@ -1061,9 +1077,9 @@ async function getWorkAgentLifecycleStateSnapshot(agentOrIssueId) {
1061
1077
  runtimeState: runtime,
1062
1078
  agentStatus,
1063
1079
  canStartFresh: (!hasLiveTmuxSession || hasLiveTmuxSession && isStopped) && (!requiresSessionResetBeforeFreshStart || isOrphaned),
1064
- canResumeSession: !isRunning && hasSavedSession && hasResumableBackingState && (isStopped || isCrashed),
1080
+ canResumeSession: !isRunning && hasSavedSession && hasResumableTranscript && hasResumableBackingState && (isStopped || isCrashed),
1065
1081
  canRestartWithContext: hasAgentState && hasWorkspace,
1066
- canResetSession: hasSavedSession && hasResumableBackingState,
1082
+ canResetSession: hasSavedSession && hasResumableTranscript && hasResumableBackingState,
1067
1083
  requiresSessionResetBeforeFreshStart,
1068
1084
  recommendedAction,
1069
1085
  reason
@@ -1343,7 +1359,11 @@ async function launchPanCommandDetached(input, dependencies = {}) {
1343
1359
  "ignore",
1344
1360
  spawnLogHandle.fd,
1345
1361
  spawnLogHandle.fd
1346
- ]
1362
+ ],
1363
+ env: {
1364
+ ...process.env,
1365
+ ...input.env
1366
+ }
1347
1367
  });
1348
1368
  let spawned = false;
1349
1369
  let settleSpawn;
@@ -1535,6 +1555,27 @@ function buildPanStartArgs(input) {
1535
1555
  * owns process/log lifecycle; this route-compatible wrapper preserves the
1536
1556
  * original behavior by waiting for a successful child exit.
1537
1557
  */
1558
+ const INTERNAL_STARTED_BY_TOKENS = new Set([
1559
+ "operator:cli:pan-start",
1560
+ "operator:cli:pan-plan",
1561
+ "planning-auto-handoff",
1562
+ "orphan-proposed-reconciler",
1563
+ "workspace-rebuild-recovery",
1564
+ "resume-agent"
1565
+ ]);
1566
+ function resolveRequestedStartedBy(value, internalRequest = false) {
1567
+ if (!internalRequest) return "operator:dashboard";
1568
+ const token = typeof value === "string" ? value.trim() : "";
1569
+ const flywheelRunId = token.startsWith("flywheel:") ? normalizeFlywheelRunId(token.slice(9)) : void 0;
1570
+ if (flywheelRunId) return `flywheel:${flywheelRunId}`;
1571
+ if (!INTERNAL_STARTED_BY_TOKENS.has(token)) throw new Error("Invalid internal startedBy provenance token.");
1572
+ return token;
1573
+ }
1574
+ async function isInternalAgentRequest(request) {
1575
+ const expected = await readInternalTokenForRequest();
1576
+ if (!expected) return false;
1577
+ return constantTimeTokenEqual(getHeaderFromMap(request.headers, INTERNAL_TOKEN_HEADER), expected);
1578
+ }
1538
1579
  async function spawnPanCommandDetached(input, dependencies = {}) {
1539
1580
  const launch = await launchPanCommandDetached(input, dependencies);
1540
1581
  await launch.completion;
@@ -1673,8 +1714,10 @@ function buildStoppedAgentLifecycle(agentOrIssueId, state, runtimeData) {
1673
1714
  const agentId = normalizeAgentId(agentOrIssueId);
1674
1715
  const hasAgentState = true;
1675
1716
  const hasLiveTmuxSession = false;
1676
- const hasSavedSession = !!runtimeData.claudeSessionId || !!getLatestSessionIdSync(agentId);
1717
+ const sessionId = getLatestSessionIdSync(agentId) ?? runtimeData.claudeSessionId ?? null;
1718
+ const hasSavedSession = !!sessionId;
1677
1719
  const hasWorkspace = typeof state.workspace === "string" && state.workspace.length > 0;
1720
+ const hasResumableTranscript = !sessionId || !!state.harness && state.harness !== "claude-code" || !state.workspace || claudeSessionTranscriptExists(state.workspace, sessionId);
1678
1721
  const agentStatus = state.status || "unknown";
1679
1722
  const runtime = runtimeData.state || "uninitialized";
1680
1723
  const isCompleted = runtimeData.resolution === "completed";
@@ -1685,7 +1728,7 @@ function buildStoppedAgentLifecycle(agentOrIssueId, state, runtimeData) {
1685
1728
  const isRunningButStuck = false;
1686
1729
  const hasResumableBackingState = hasWorkspace && !isPlaceholder;
1687
1730
  const isOrphaned = hasSavedSession && !hasResumableBackingState || !hasWorkspace || isPlaceholder;
1688
- const requiresSessionResetBeforeFreshStart = hasSavedSession && hasResumableBackingState && (isStopped || isCrashed);
1731
+ const requiresSessionResetBeforeFreshStart = hasSavedSession && hasResumableTranscript && hasResumableBackingState && (isStopped || isCrashed);
1689
1732
  let recommendedAction = "start";
1690
1733
  let reason;
1691
1734
  if (isOrphaned) {
@@ -1694,6 +1737,9 @@ function buildStoppedAgentLifecycle(agentOrIssueId, state, runtimeData) {
1694
1737
  } else if (requiresSessionResetBeforeFreshStart) {
1695
1738
  recommendedAction = "resume";
1696
1739
  reason = `Agent ${agentId} has a resumable Claude session. Use 'pan resume ${agentOrIssueId}' to continue it, or 'pan start ${agentOrIssueId} --fresh' to start a new session (e.g. to switch model).`;
1740
+ } else if (hasSavedSession && !hasResumableTranscript && hasResumableBackingState && (isStopped || isCrashed)) {
1741
+ recommendedAction = "start";
1742
+ reason = `Agent ${agentId} has a saved Claude session id but its transcript is missing on disk (jsonl-missing). Start Agent will create a fresh session in the existing workspace.`;
1697
1743
  } else if (!hasSavedSession && isStopped) {
1698
1744
  recommendedAction = "start";
1699
1745
  reason = `Agent ${agentId} is stopped and has no saved Claude session. Start Agent will create a fresh session in the existing workspace.`;
@@ -1703,6 +1749,7 @@ function buildStoppedAgentLifecycle(agentOrIssueId, state, runtimeData) {
1703
1749
  hasAgentState,
1704
1750
  hasLiveTmuxSession,
1705
1751
  hasSavedSession,
1752
+ hasResumableTranscript,
1706
1753
  hasWorkspace,
1707
1754
  isPlaceholder,
1708
1755
  isOrphaned,
@@ -1714,9 +1761,9 @@ function buildStoppedAgentLifecycle(agentOrIssueId, state, runtimeData) {
1714
1761
  runtimeState: runtime,
1715
1762
  agentStatus,
1716
1763
  canStartFresh: !requiresSessionResetBeforeFreshStart || isOrphaned,
1717
- canResumeSession: hasSavedSession && hasResumableBackingState && (isStopped || isCrashed),
1764
+ canResumeSession: hasSavedSession && hasResumableTranscript && hasResumableBackingState && (isStopped || isCrashed),
1718
1765
  canRestartWithContext: hasWorkspace,
1719
- canResetSession: hasSavedSession && hasResumableBackingState,
1766
+ canResetSession: hasSavedSession && hasResumableTranscript && hasResumableBackingState,
1720
1767
  requiresSessionResetBeforeFreshStart,
1721
1768
  recommendedAction,
1722
1769
  reason
@@ -2208,7 +2255,7 @@ const getAgentOutputRoute = HttpRouter.add("GET", "/api/agents/:id/output", http
2208
2255
  } catch {}
2209
2256
  let stdout;
2210
2257
  if (isRemote && vmName) {
2211
- const { getRemoteAgentOutput } = await import("./remote-agents-C1bssi41.js");
2258
+ const { getRemoteAgentOutput } = await import("./remote-agents-kwsEZvXu.js");
2212
2259
  stdout = await getRemoteAgentOutput(id, vmName, parseInt(String(lines), 10) || 100);
2213
2260
  } else stdout = await Effect.runPromise(capturePane(id, parseInt(String(lines), 10) || 100));
2214
2261
  if (!stdout || stdout.trim() === "" || stdout.trim() === "Session not found") {
@@ -3039,7 +3086,7 @@ async function cleanupConversationAttachments(name) {
3039
3086
  * sessions that the lifecycle poller missed. */
3040
3087
  async function cleanupOrphanedConversationAttachments() {
3041
3088
  try {
3042
- const { listConversations } = await import("./conversations-C34dyIb9.js");
3089
+ const { listConversations } = await import("./conversations-DXl5YTf4.js");
3043
3090
  const convNames = new Set(listConversations().map((c) => c.name));
3044
3091
  const root = getConversationAttachmentsRoot();
3045
3092
  await runInBatches((await readdir(root, { withFileTypes: true })).filter((entry) => entry.isDirectory() && !convNames.has(entry.name)).map((entry) => join(root, entry.name)), 10, (path) => rm(path, {
@@ -3649,7 +3696,7 @@ async function spawnConversationSession(tmuxSession, cwd, claudeSessionId, model
3649
3696
  const codexApprovalPolicy = codexPermMode === "full-access" ? "never" : "on-request";
3650
3697
  const codexSandboxMode = codexPermMode === "full-access" ? "danger-full-access" : codexPermMode === "read-only" ? "read-only" : "workspace-write";
3651
3698
  const codexApprovalsReviewer = codexPermMode === "auto-review" ? "auto_review" : void 0;
3652
- const { initCodexHome, extractThreadIdFromRollout } = await import("./codex-BdEsUFWh.js");
3699
+ const { initCodexHome, extractThreadIdFromRollout } = await import("./codex-rnJN3v3_.js");
3653
3700
  initCodexHome(codexHome, {
3654
3701
  trustedDir: cwd,
3655
3702
  approvalPolicy: codexApprovalPolicy,
@@ -3718,7 +3765,7 @@ async function spawnConversationSession(tmuxSession, cwd, claudeSessionId, model
3718
3765
  } catch {}
3719
3766
  console.log(`[claude-invoke] purpose=conversation-session | model=${model || "default"} | source=conversations.ts:spawnConversationSession | session=${tmuxSession} | resume=${resume} | command="${runtimeCommand}"`);
3720
3767
  try {
3721
- const { preTrustDirectory } = await import("./workspace-manager-CDTKjjdU.js");
3768
+ const { preTrustDirectory } = await import("./workspace-manager-B38rFWA1.js");
3722
3769
  preTrustDirectory(cwd);
3723
3770
  } catch {}
3724
3771
  try {
@@ -3735,7 +3782,7 @@ async function spawnConversationSession(tmuxSession, cwd, claudeSessionId, model
3735
3782
  const codexHomeDir = codexFields.codexHome;
3736
3783
  (async () => {
3737
3784
  try {
3738
- const { waitForCodexRollout, extractThreadIdFromRollout, writeThreadId } = await import("./codex-BdEsUFWh.js");
3785
+ const { waitForCodexRollout, extractThreadIdFromRollout, writeThreadId } = await import("./codex-rnJN3v3_.js");
3739
3786
  const rollout = await waitForCodexRollout(codexHomeDir, 12e4);
3740
3787
  if (rollout) {
3741
3788
  const threadId = extractThreadIdFromRollout(rollout);
@@ -3877,6 +3924,7 @@ async function handleConversationResume(name, body, deps) {
3877
3924
  });
3878
3925
  }
3879
3926
  const oldSessionId = conv.claudeSessionId;
3927
+ const resumeCause = conv.status === "ended" ? "operator" : "system";
3880
3928
  const harness = conv.harness ?? "claude-code";
3881
3929
  const modelChanged = !!model && model !== conv.model;
3882
3930
  if (!await validateCwdContainment(conv.cwd)) return jsonResponse({ error: "Invalid cwd" }, { status: 400 });
@@ -3895,6 +3943,13 @@ async function handleConversationResume(name, body, deps) {
3895
3943
  await spawnConversationSession(conv.tmuxSession, conv.cwd, oldSessionId ?? randomUUID$1(), model, effort, conv.issueId ?? void 0, canResume, harness);
3896
3944
  await waitForTmuxSession(conv.tmuxSession);
3897
3945
  await waitForConversationRuntimeReady(conv.tmuxSession, harness, "respawn");
3946
+ const resumeGatePane = await capturePaneText(conv.tmuxSession, 90).catch(() => "");
3947
+ if (resumeGatePane && paneHasBlockingChoiceMenu(resumeGatePane)) console.log(`[conversations] resume contract skipped for ${name} — the harness is showing a blocking choice menu; the operator answers it`);
3948
+ else try {
3949
+ await deliverAgentMessage(conv.tmuxSession, `CONVERSATION RESUME: ${buildResumeContract(resumeCause)}`, "conversation-resume", resolveConversationDeliveryMethod(conv));
3950
+ } catch (err) {
3951
+ console.error(`[conversations] resume contract delivery failed for ${name}:`, err instanceof Error ? err.message : String(err));
3952
+ }
3898
3953
  markConversationActive(name);
3899
3954
  return jsonResponse({
3900
3955
  ...conv,
@@ -4626,7 +4681,7 @@ const postInternalAgentPermissionRequestRoute = HttpRouter.add("POST", "/api/int
4626
4681
  error: "missing agent id"
4627
4682
  }, { status: 400 });
4628
4683
  const request = yield* HttpServerRequest.HttpServerRequest;
4629
- const { INTERNAL_TOKEN_HEADER, getInternalTokenSync } = yield* Effect.promise(() => import("./internal-token-M9omeXM1.js"));
4684
+ const { INTERNAL_TOKEN_HEADER, getInternalTokenSync } = yield* Effect.promise(() => import("./internal-token-BJZa40Ld.js"));
4630
4685
  const expected = getInternalTokenSync();
4631
4686
  if (!expected) return jsonResponse({
4632
4687
  ok: false,
@@ -4913,7 +4968,7 @@ const getAgentHealthHistoryRoute = HttpRouter.add("GET", "/api/agents/:id/health
4913
4968
  const request = yield* HttpServerRequest.HttpServerRequest;
4914
4969
  const urlOpt = HttpServerRequest.toURL(request);
4915
4970
  const hours = Option.isSome(urlOpt) ? urlOpt.value.searchParams.get("hours") ?? "24" : "24";
4916
- const { getHealthHistory } = yield* Effect.promise(() => import("./health-events-_xfTaOUs.js"));
4971
+ const { getHealthHistory } = yield* Effect.promise(() => import("./health-events-Der6bOkm.js"));
4917
4972
  const endTime = /* @__PURE__ */ new Date();
4918
4973
  const startTime = /* @__PURE__ */ new Date(endTime.getTime() - parseInt(hours) * 60 * 60 * 1e3);
4919
4974
  const events = getHealthHistory(id, startTime.toISOString(), endTime.toISOString());
@@ -4928,7 +4983,7 @@ function emitAgentRuntimeEvent(id, body, timestamp) {
4928
4983
  return Effect.gen(function* () {
4929
4984
  let eventBody = body;
4930
4985
  if (body["kind"] === "linear_mcp_auth_required" || body["kind"] === "linear_mcp_auth_healthy") {
4931
- const { AgentStateService } = yield* Effect.promise(() => import("./agent-state-service-hZpxIw1E.js"));
4986
+ const { AgentStateService } = yield* Effect.promise(() => import("./agent-state-service-DFO6qvHp.js"));
4932
4987
  const snapshot = yield* (yield* AgentStateService).get(id);
4933
4988
  eventBody = {
4934
4989
  ...body,
@@ -4963,7 +5018,7 @@ function emitAgentRuntimeEvent(id, body, timestamp) {
4963
5018
  detail: String(decoded.failure)
4964
5019
  }, { status: 400 })
4965
5020
  };
4966
- const { AgentStateService } = yield* Effect.promise(() => import("./agent-state-service-hZpxIw1E.js"));
5021
+ const { AgentStateService } = yield* Effect.promise(() => import("./agent-state-service-DFO6qvHp.js"));
4967
5022
  yield* (yield* AgentStateService).emit(decoded.success);
4968
5023
  return {
4969
5024
  ok: true,
@@ -5045,7 +5100,7 @@ const getAgentRuntimeRoute = HttpRouter.add("GET", "/api/agents/:id/runtime", ht
5045
5100
  success: false,
5046
5101
  error: "missing agent id"
5047
5102
  }, { status: 400 });
5048
- const { AgentStateService } = yield* Effect.promise(() => import("./agent-state-service-hZpxIw1E.js"));
5103
+ const { AgentStateService } = yield* Effect.promise(() => import("./agent-state-service-DFO6qvHp.js"));
5049
5104
  const snapshot = yield* (yield* AgentStateService).get(id);
5050
5105
  if (!snapshot) return jsonResponse({
5051
5106
  success: false,
@@ -5230,8 +5285,8 @@ function createAgentStopHandler(lifecycleEvent) {
5230
5285
  yield* stopAgent(id);
5231
5286
  if (stateBeforeStop?.issueId) yield* Effect.promise(async () => {
5232
5287
  try {
5233
- const { resolveProjectFromIssueSync } = await import("./projects-B03Wr-xc.js");
5234
- const { findWorkspacePath } = await import("./archive-planning-0FJ6Xd3b.js");
5288
+ const { resolveProjectFromIssueSync } = await import("./projects-_n3Zui6K.js");
5289
+ const { findWorkspacePath } = await import("./archive-planning-BHCd_eL5.js");
5235
5290
  const issueLower = stateBeforeStop.issueId.toLowerCase();
5236
5291
  const workspacePath = findWorkspacePath(resolveProjectFromIssueSync(stateBeforeStop.issueId)?.projectPath ?? process.cwd(), issueLower);
5237
5292
  if (workspacePath) {
@@ -5371,7 +5426,7 @@ const postAgentUnpauseRoute = HttpRouter.add("POST", "/api/agents/:id/unpause",
5371
5426
  if ((yield* getWorkAgentLifecycleState(id)).canResumeSession && updatedState.troubled !== true) {
5372
5427
  resumeTriggered = true;
5373
5428
  yield* Effect.promise(() => appendAgentLifecycleLog(id, "agent.unpause_immediate_resume_triggered"));
5374
- import("./resume-u9byntrq.js").then(({ resumeAgent }) => resumeAgent(id)).then((result) => {
5429
+ import("./resume-DXIIfJNk.js").then(({ resumeAgent }) => resumeAgent(id)).then((result) => {
5375
5430
  if (!result.success) console.warn(`[agents] immediate resume after unpause failed for ${id}: ${result.error}`);
5376
5431
  }).catch((err) => console.warn(`[agents] immediate resume after unpause errored for ${id}:`, err));
5377
5432
  }
@@ -6658,18 +6713,72 @@ const writeAutoStartXBrief = (projectRoot, workspacePath, issue) => Effect.tryPr
6658
6713
  //#region routes/agents/spawn-helpers.ts
6659
6714
  init_child_env();
6660
6715
  init_agents$1();
6716
+ function buildAgentStartPlaceholder(input) {
6717
+ return {
6718
+ state: {
6719
+ id: input.agentSessionName,
6720
+ issueId: input.issueId,
6721
+ workspace: input.workspacePath,
6722
+ role: input.role,
6723
+ ...input.effectiveHarness ? { harness: input.effectiveHarness } : {},
6724
+ model: "pending-work-spawn",
6725
+ status: "starting",
6726
+ startedAt: input.startedAt,
6727
+ startedBy: input.startedBy,
6728
+ hostOverride: input.allowHost || void 0
6729
+ },
6730
+ event: {
6731
+ type: "agent.started",
6732
+ timestamp: input.startedAt,
6733
+ payload: {
6734
+ agentId: input.agentSessionName,
6735
+ issueId: input.issueId,
6736
+ agent: {
6737
+ id: input.agentSessionName,
6738
+ issueId: input.issueId,
6739
+ workspace: input.workspacePath,
6740
+ status: "starting",
6741
+ startedAt: input.startedAt,
6742
+ role: input.role,
6743
+ startedBy: input.startedBy,
6744
+ ...input.effectiveHarness ? { runtime: input.effectiveHarness } : {}
6745
+ }
6746
+ }
6747
+ }
6748
+ };
6749
+ }
6750
+ function buildContainerStartState(input) {
6751
+ return {
6752
+ id: input.agentSessionName,
6753
+ issueId: input.issueId,
6754
+ ...input.effectiveHarness ? { harness: input.effectiveHarness } : {},
6755
+ model: "pending-container-start",
6756
+ status: input.status,
6757
+ startedAt: input.startedAt,
6758
+ workspace: input.workspacePath,
6759
+ role: input.role,
6760
+ startedBy: input.startedBy,
6761
+ hostOverride: input.allowHost || void 0
6762
+ };
6763
+ }
6764
+ async function requestWorkStartAfterContainers(input) {
6765
+ const activityId = await input.spawnPanCommand(input.args, input.workspacePath);
6766
+ await input.markWorkStartAccepted();
6767
+ await input.updateIssueStatus();
6768
+ return activityId;
6769
+ }
6661
6770
  function handleRemoteAgentSpawn(input) {
6662
6771
  return Effect.gen(function* () {
6663
- const { issueId, workspacePath, workspaceMetadata, spawnModel, projectPath, spawnGuardrails, lifecycle } = input;
6664
- const { spawnRemoteAgent, checkRemoteSpendCap } = yield* Effect.promise(() => import("./remote-agents-C1bssi41.js"));
6665
- const { createFlyProviderFromConfig } = yield* Effect.promise(() => import("./remote-CVGUhXMV.js"));
6666
- const { loadConfigSync: loadPanConfig } = yield* Effect.promise(() => import("./config-DV-grfQc.js"));
6772
+ const { issueId, workspacePath, workspaceMetadata, spawnModel, startedBy, autoSpawnConsentRequired, projectPath, spawnGuardrails, lifecycle } = input;
6773
+ const { spawnRemoteAgent, checkRemoteSpendCap } = yield* Effect.promise(() => import("./remote-agents-kwsEZvXu.js"));
6774
+ const { createFlyProviderFromConfig } = yield* Effect.promise(() => import("./remote-CVPCc7Vy.js"));
6775
+ const { loadConfigSync: loadPanConfig } = yield* Effect.promise(() => import("./config-R793W0yA.js"));
6667
6776
  const panConfig = loadPanConfig();
6668
6777
  const spendCap = checkRemoteSpendCap(panConfig);
6669
6778
  if (!spendCap.allowed) return jsonResponse({ error: spendCap.message }, { status: 429 });
6670
6779
  const fly = createFlyProviderFromConfig(panConfig.remote);
6671
6780
  yield* Effect.promise(() => fly.syncAllCredentials(workspaceMetadata.vmName));
6672
- const { buildWorkAgentPrompt, getTrackerContext } = yield* Effect.promise(() => import("./work-agent-prompt-C-vuP3_J.js"));
6781
+ const { buildWorkAgentPrompt, getTrackerContext } = yield* Effect.promise(() => import("./work-agent-prompt-Csb3fbVR.js"));
6673
6782
  const trackerContext = yield* Effect.promise(() => getTrackerContext(issueId, workspacePath));
6674
6783
  const agentPrompt = yield* Effect.promise(() => buildWorkAgentPrompt({
6675
6784
  issueId,
@@ -6687,6 +6796,8 @@ function handleRemoteAgentSpawn(input) {
6687
6796
  workspace: workspaceMetadata,
6688
6797
  prompt: agentPrompt,
6689
6798
  model: spawnModel,
6799
+ startedBy,
6800
+ autoSpawnConsentRequired,
6690
6801
  tier: fly.getResiliencyTier()
6691
6802
  }));
6692
6803
  yield* saveAgentState({
@@ -6697,7 +6808,8 @@ function handleRemoteAgentSpawn(input) {
6697
6808
  model: spawnModel,
6698
6809
  status: "starting",
6699
6810
  startedAt: state.startedAt,
6700
- harness: "claude-code"
6811
+ harness: "claude-code",
6812
+ startedBy
6701
6813
  });
6702
6814
  updateRegistryForAgentStart(state.issueId, workspacePath, state.id);
6703
6815
  yield* Effect.promise(() => Effect.runPromise(lifecycle.transitionTo(issueId, "in_progress").pipe(Effect.catch(() => Effect.void))));
@@ -6709,7 +6821,8 @@ function handleRemoteAgentSpawn(input) {
6709
6821
  model: spawnModel,
6710
6822
  status: state.status,
6711
6823
  startedAt: state.startedAt,
6712
- harness: "claude-code"
6824
+ harness: "claude-code",
6825
+ startedBy
6713
6826
  }, {
6714
6827
  type: "agent.started",
6715
6828
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
@@ -6723,7 +6836,8 @@ function handleRemoteAgentSpawn(input) {
6723
6836
  model: spawnModel,
6724
6837
  status: state.status,
6725
6838
  startedAt: state.startedAt,
6726
- lastActivity: state.lastActivity
6839
+ lastActivity: state.lastActivity,
6840
+ startedBy
6727
6841
  }
6728
6842
  }
6729
6843
  });
@@ -6751,7 +6865,7 @@ function handleRemoteAgentSpawn(input) {
6751
6865
  }
6752
6866
  function handleContainerOrchestration(input) {
6753
6867
  return Effect.gen(function* () {
6754
- const { issueId, workspacePath, devScript, agentSessionName, role, effectiveHarness, allowHost, spawnModel, spawnGuardrails, projectPath, eventStore, spawnPanCommand, updateIssueStatus } = input;
6868
+ const { issueId, workspacePath, devScript, agentSessionName, role, effectiveHarness, startedBy, allowHost, spawnModel, spawnGuardrails, projectPath, eventStore, spawnPanCommand, markWorkStartAccepted, updateIssueStatus } = input;
6755
6869
  if (existsSync(workspacePath) && existsSync(devScript)) {
6756
6870
  let dockerRunning = false;
6757
6871
  try {
@@ -6820,17 +6934,17 @@ function handleContainerOrchestration(input) {
6820
6934
  const earlyAgentId = agentSessionName;
6821
6935
  const earlyStateDir = join(homedir(), ".overdeck", "agents", earlyAgentId);
6822
6936
  yield* Effect.promise(() => mkdir(earlyStateDir, { recursive: true }));
6823
- saveAgentStateSync({
6824
- id: earlyAgentId,
6937
+ saveAgentStateSync(buildContainerStartState({
6938
+ agentSessionName: earlyAgentId,
6825
6939
  issueId,
6826
- ...effectiveHarness ? { harness: effectiveHarness } : {},
6827
- model: "pending-container-start",
6828
- status: "starting",
6829
- startedAt: (/* @__PURE__ */ new Date()).toISOString(),
6830
- workspace: workspacePath,
6940
+ workspacePath,
6831
6941
  role,
6832
- hostOverride: allowHost || void 0
6833
- });
6942
+ effectiveHarness,
6943
+ startedBy,
6944
+ allowHost,
6945
+ status: "starting",
6946
+ startedAt: (/* @__PURE__ */ new Date()).toISOString()
6947
+ }));
6834
6948
  updateRegistryForAgentStart(issueId, workspacePath, earlyAgentId);
6835
6949
  yield* Effect.promise(() => appendAgentLifecycleLog(earlyAgentId, "agent.start_waiting_for_containers", {
6836
6950
  issueId,
@@ -6888,16 +7002,17 @@ function handleContainerOrchestration(input) {
6888
7002
  waitedMs: Date.now() - startTime
6889
7003
  });
6890
7004
  if (!healthy) {
6891
- saveAgentStateSync({
6892
- id: earlyAgentId,
7005
+ saveAgentStateSync(buildContainerStartState({
7006
+ agentSessionName: earlyAgentId,
6893
7007
  issueId,
6894
- ...effectiveHarness ? { harness: effectiveHarness } : {},
6895
- model: "pending-container-start",
7008
+ workspacePath,
7009
+ role,
7010
+ effectiveHarness,
7011
+ startedBy,
7012
+ allowHost,
6896
7013
  status: "error",
6897
- startedAt: (/* @__PURE__ */ new Date()).toISOString(),
6898
- workspace: workspacePath,
6899
- role
6900
- });
7014
+ startedAt: (/* @__PURE__ */ new Date()).toISOString()
7015
+ }));
6901
7016
  return;
6902
7017
  }
6903
7018
  for (const nmDir of [join(workspacePath, "node_modules"), join(workspacePath, "src", "dashboard", "frontend", "node_modules")]) try {
@@ -6922,14 +7037,19 @@ function handleContainerOrchestration(input) {
6922
7037
  emitStartAgentPhase(issueId, "spawn", "start", "starting local work agent after containers became healthy", { workspacePath });
6923
7038
  emitStartAgentPhase(issueId, "spawn", "success", "local work agent spawn requested after container startup", {
6924
7039
  workspacePath,
6925
- activityId: await spawnPanCommand(buildPanStartArgs({
6926
- issueId,
6927
- model: spawnModel,
6928
- harness: effectiveHarness,
6929
- allowHost
6930
- }), workspacePath)
7040
+ activityId: await requestWorkStartAfterContainers({
7041
+ args: buildPanStartArgs({
7042
+ issueId,
7043
+ model: spawnModel,
7044
+ harness: effectiveHarness,
7045
+ allowHost
7046
+ }),
7047
+ workspacePath,
7048
+ spawnPanCommand,
7049
+ markWorkStartAccepted,
7050
+ updateIssueStatus
7051
+ })
6931
7052
  });
6932
- await updateIssueStatus();
6933
7053
  } catch (err) {
6934
7054
  const errorMessage = err instanceof Error ? err.message : String(err);
6935
7055
  emitStartAgentPhase(issueId, "spawn", "failure", errorMessage, { workspacePath });
@@ -6938,15 +7058,17 @@ function handleContainerOrchestration(input) {
6938
7058
  error: errorMessage
6939
7059
  }).catch(() => void 0);
6940
7060
  try {
6941
- saveAgentStateSync({
6942
- id: earlyAgentId,
7061
+ saveAgentStateSync(buildContainerStartState({
7062
+ agentSessionName: earlyAgentId,
6943
7063
  issueId,
6944
- model: "pending-container-start",
7064
+ workspacePath,
7065
+ role,
7066
+ effectiveHarness,
7067
+ startedBy,
7068
+ allowHost,
6945
7069
  status: "error",
6946
- startedAt: (/* @__PURE__ */ new Date()).toISOString(),
6947
- workspace: workspacePath,
6948
- role
6949
- });
7070
+ startedAt: (/* @__PURE__ */ new Date()).toISOString()
7071
+ }));
6950
7072
  } catch {}
6951
7073
  console.error(`[start-agent] Background container startup failed for ${issueId}:`, err);
6952
7074
  }
@@ -7065,14 +7187,23 @@ async function spawnAfterClearingStartGates(input) {
7065
7187
  }
7066
7188
  }
7067
7189
  const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect.gen(function* () {
7068
- const authError = rejectUnsafeDashboardMutationRequest(yield* HttpServerRequest.HttpServerRequest);
7190
+ const request = yield* HttpServerRequest.HttpServerRequest;
7191
+ const authError = rejectUnsafeDashboardMutationRequest(request);
7069
7192
  if (authError) return authError;
7070
7193
  const body = yield* readJsonBody$1;
7071
7194
  const eventStore = yield* EventStoreService;
7072
7195
  const lifecycle = yield* IssueLifecycle;
7073
7196
  yield* ReadModelService;
7074
7197
  const { issueId, projectId } = body;
7198
+ const internalRequest = yield* Effect.promise(() => isInternalAgentRequest(request));
7199
+ let startedBy;
7200
+ try {
7201
+ startedBy = resolveRequestedStartedBy(body.startedBy, internalRequest);
7202
+ } catch (error) {
7203
+ return jsonResponse({ error: error instanceof Error ? error.message : String(error) }, { status: 400 });
7204
+ }
7075
7205
  const autoStart = body.auto === true;
7206
+ const autoSpawnConsentRequired = internalRequest && body.autoSpawnConsentRequired === true;
7076
7207
  const guardrailAcknowledged = body.guardrailAcknowledged === true;
7077
7208
  const offBook = body.offBook === true;
7078
7209
  const requestedHostOverride = body.host === true || body.allowHost === true;
@@ -7389,7 +7520,7 @@ const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect
7389
7520
  console.warn(`[start-agent] Failed to set plan.status=running (non-fatal): ${planStatusErr?.message ?? planStatusErr}`);
7390
7521
  }
7391
7522
  try {
7392
- const { appendSessionEntry, getProjectConfigFromWorkspacePath, resolveProjectForIssue } = await import("./record-CtroO946.js");
7523
+ const { appendSessionEntry, getProjectConfigFromWorkspacePath, resolveProjectForIssue } = await import("./record-BTwWhtBb.js");
7393
7524
  await appendSessionEntry(resolveProjectForIssue(issueId) ?? getProjectConfigFromWorkspacePath(workspacePath), issueId, {
7394
7525
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
7395
7526
  reason: "start",
@@ -7414,6 +7545,8 @@ const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect
7414
7545
  workspacePath,
7415
7546
  workspaceMetadata,
7416
7547
  spawnModel,
7548
+ startedBy,
7549
+ autoSpawnConsentRequired,
7417
7550
  projectPath,
7418
7551
  spawnGuardrails,
7419
7552
  lifecycle
@@ -7507,7 +7640,11 @@ const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect
7507
7640
  role,
7508
7641
  workspacePath,
7509
7642
  args,
7510
- cwd
7643
+ cwd,
7644
+ env: {
7645
+ OVERDECK_AGENT_STARTED_BY: startedBy,
7646
+ OVERDECK_AUTO_SPAWN_CONSENT_REQUIRED: autoSpawnConsentRequired ? "1" : "0"
7647
+ }
7511
7648
  })
7512
7649
  }));
7513
7650
  if (!admitted.check.decision.eligible || !admitted.result) throw new OrderDispatchReservationError(admitted.check);
@@ -7524,48 +7661,29 @@ const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect
7524
7661
  agentSessionName,
7525
7662
  role,
7526
7663
  effectiveHarness,
7664
+ startedBy,
7527
7665
  allowHost,
7528
7666
  spawnModel,
7529
7667
  spawnGuardrails,
7530
7668
  projectPath,
7531
7669
  eventStore,
7532
7670
  spawnPanCommand,
7671
+ markWorkStartAccepted,
7533
7672
  updateIssueStatus
7534
7673
  });
7535
- if (containerResponse) {
7536
- if (containerResponse.status >= 200 && containerResponse.status < 300) yield* Effect.promise(markWorkStartAccepted);
7537
- return containerResponse;
7538
- }
7674
+ if (containerResponse) return containerResponse;
7539
7675
  const placeholderStartedAt = (/* @__PURE__ */ new Date()).toISOString();
7540
- const placeholderState = {
7541
- id: agentSessionName,
7676
+ const { state: placeholderState, event: placeholderEvent } = buildAgentStartPlaceholder({
7677
+ agentSessionName,
7542
7678
  issueId,
7543
- workspace: workspacePath,
7679
+ workspacePath,
7544
7680
  role,
7545
- ...effectiveHarness ? { harness: effectiveHarness } : {},
7546
- model: "pending-work-spawn",
7547
- status: "starting",
7548
- startedAt: placeholderStartedAt,
7549
- hostOverride: allowHost || void 0
7550
- };
7551
- const hasLiveTmuxSession = yield* sessionExists(agentSessionName).pipe(Effect.catch(() => Effect.succeed(true)));
7552
- const placeholderClaim = yield* claimAgentStartPlaceholderProgram(placeholderState, {
7553
- type: "agent.started",
7554
- timestamp: placeholderStartedAt,
7555
- payload: {
7556
- agentId: agentSessionName,
7557
- issueId,
7558
- agent: {
7559
- id: agentSessionName,
7560
- issueId,
7561
- workspace: workspacePath,
7562
- status: "starting",
7563
- startedAt: placeholderStartedAt,
7564
- role,
7565
- ...effectiveHarness ? { runtime: effectiveHarness } : {}
7566
- }
7567
- }
7568
- }, hasLiveTmuxSession);
7681
+ effectiveHarness,
7682
+ startedBy,
7683
+ allowHost,
7684
+ startedAt: placeholderStartedAt
7685
+ });
7686
+ const placeholderClaim = yield* claimAgentStartPlaceholderProgram(placeholderState, placeholderEvent, yield* sessionExists(agentSessionName).pipe(Effect.catch(() => Effect.succeed(true))));
7569
7687
  if (!placeholderClaim.claimed) {
7570
7688
  yield* Effect.promise(() => appendAgentLifecycleLog(agentSessionName, "agent.start_placeholder_blocked", {
7571
7689
  issueId,
@@ -7847,14 +7965,14 @@ function firePostMergeLifecycle(issueId, options) {
7847
7965
  const normalizedIssueId = parsedIssueId.normalized.toUpperCase();
7848
7966
  const started = postMergeGuard.run(normalizedIssueId, async () => {
7849
7967
  const projectPath = getProjectPathForIssue(parsedIssueId.prefix);
7850
- const { postMergeLifecycle } = await import("./merge-agent-DrXa1CpW.js");
7968
+ const { postMergeLifecycle } = await import("./merge-agent-C1-9zbP_.js");
7851
7969
  const lifecycleOptions = {
7852
7970
  ...options?.verifiedMergedRef ? { verifiedMergedRef: options.verifiedMergedRef } : {},
7853
7971
  ...options?.verifiedMergedRepos?.length ? { verifiedMergedRepos: options.verifiedMergedRepos } : {}
7854
7972
  };
7855
7973
  await postMergeLifecycle(normalizedIssueId, projectPath, options?.sourceBranch, Object.keys(lifecycleOptions).length > 0 ? lifecycleOptions : void 0);
7856
7974
  console.log(`[merge] post-merge lifecycle completed for ${normalizedIssueId}`);
7857
- const { runMergeTrainReconcile } = await import("./merge-train-DTEMyIu4.js");
7975
+ const { runMergeTrainReconcile } = await import("./merge-train-DvLcAn1G.js");
7858
7976
  const outcomes = await runMergeTrainReconcile(normalizedIssueId);
7859
7977
  if (outcomes.length > 0) console.log(`[merge-train] reconciled ${outcomes.length} sibling(s) after ${normalizedIssueId}: ` + outcomes.map((o) => `${o.issueId}=${o.result}`).join(", "));
7860
7978
  }, (err) => console.error(`[merge] post-merge lifecycle failed for ${normalizedIssueId}:`, err));
@@ -7875,15 +7993,15 @@ init_io();
7875
7993
  init_domain_services();
7876
7994
  init_tmux();
7877
7995
  const getSpecialistsRoute = HttpRouter.add("GET", "/api/specialists", httpHandler(Effect.gen(function* () {
7878
- const { getAllSpecialistStatus, getAllProjectSpecialistStatuses } = yield* Effect.promise(() => import("./specialists-Tdezg_6N.js"));
7996
+ const { getAllSpecialistStatus, getAllProjectSpecialistStatuses } = yield* Effect.promise(() => import("./specialists-CH6ah6D-.js"));
7879
7997
  return jsonResponse({
7880
7998
  specialists: yield* Effect.promise(() => getAllSpecialistStatus()),
7881
7999
  projects: yield* Effect.promise(() => getAllProjectSpecialistStatuses())
7882
8000
  });
7883
8001
  })));
7884
8002
  const postSpecialistsResetAllRoute = HttpRouter.add("POST", "/api/specialists/reset-all", httpHandler(Effect.gen(function* () {
7885
- const { getAllSpecialists, isRunning, getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-Tdezg_6N.js"));
7886
- const { clearHookSync } = yield* Effect.promise(() => import("./hooks-BnJsxlSq.js"));
8003
+ const { getAllSpecialists, isRunning, getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-CH6ah6D-.js"));
8004
+ const { clearHookSync } = yield* Effect.promise(() => import("./hooks-BJNal-bs.js"));
7887
8005
  const specialists = getAllSpecialists();
7888
8006
  const results = [];
7889
8007
  for (const specialist of specialists) {
@@ -7939,7 +8057,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
7939
8057
  }
7940
8058
  console.log(`[specialists/done] ${specialist} signaling ${status} for ${normalizedIssueId}`);
7941
8059
  if (specialist === "merge") {
7942
- const { reportSpecialistCompletion } = yield* Effect.promise(() => import("./specialist-completion-Br48eiDP.js"));
8060
+ const { reportSpecialistCompletion } = yield* Effect.promise(() => import("./specialist-completion-z6v3ZqJE.js"));
7943
8061
  if (yield* reportSpecialistCompletion(normalizedIssueId, {
7944
8062
  status,
7945
8063
  notes
@@ -7992,7 +8110,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
7992
8110
  if (project && failedItemId) {
7993
8111
  const workspacePath = join(project.projectPath, "workspaces", `feature-${normalizedIssueId.toLowerCase()}`);
7994
8112
  if (existsSync(workspacePath)) {
7995
- const { onInspectComplete } = await import("./inspect-agent-BVwDrVrz.js");
8113
+ const { onInspectComplete } = await import("./inspect-agent-CPqXI81t.js");
7996
8114
  await Effect.runPromise(onInspectComplete(project.projectKey, normalizedIssueId, failedItemId, "failed", workspacePath, notes));
7997
8115
  }
7998
8116
  }
@@ -8003,7 +8121,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
8003
8121
  }
8004
8122
  yield* Effect.promise(async () => {
8005
8123
  try {
8006
- const { getTmuxSessionName, updateRunMetadata, makeSpecialistRegistryKey } = await import("./specialists-Tdezg_6N.js");
8124
+ const { getTmuxSessionName, updateRunMetadata, makeSpecialistRegistryKey } = await import("./specialists-CH6ah6D-.js");
8007
8125
  const projectKey = resolveProjectFromIssueSync(normalizedIssueId)?.projectKey;
8008
8126
  const tmuxSession = projectKey ? getTmuxSessionName(`${specialist}-agent`, projectKey, normalizedIssueId) : getTmuxSessionName(`${specialist}-agent`);
8009
8127
  saveAgentRuntimeState(tmuxSession, {
@@ -8022,7 +8140,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
8022
8140
  });
8023
8141
  console.log(`[specialists/done] Cleared registry lock for ${registryKey} (${projectKey})`);
8024
8142
  }
8025
- const { updateSpecialistHandoffStatus } = await import("./specialist-handoff-logger-DK-GTz4s.js");
8143
+ const { updateSpecialistHandoffStatus } = await import("./specialist-handoff-logger-CmpZYJMB.js");
8026
8144
  if (await Effect.runPromise(updateSpecialistHandoffStatus(normalizedIssueId, `${specialist}-agent`, status === "passed" ? "completed" : "failed", status === "passed" ? "success" : "failure"))) console.log(`[specialists/done] Updated handoff log: ${specialist}-agent ${normalizedIssueId} → ${status}`);
8027
8145
  } catch (err) {
8028
8146
  console.error(`[specialists/done] Error managing specialist state:`, err);
@@ -8034,7 +8152,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
8034
8152
  if (project) {
8035
8153
  const workspacePath = join(project.projectPath, "workspaces", `feature-${normalizedIssueId.toLowerCase()}`);
8036
8154
  if (existsSync(workspacePath)) {
8037
- const { formatAnchorShort, snapshotWorkspaceHeadsPromise } = await import("./git-utils-CI6cwyyC.js");
8155
+ const { formatAnchorShort, snapshotWorkspaceHeadsPromise } = await import("./git-utils-CedsVume.js");
8038
8156
  const headAnchor = await snapshotWorkspaceHeadsPromise(normalizedIssueId, workspacePath);
8039
8157
  if (headAnchor) {
8040
8158
  setReviewStatusSync(normalizedIssueId, { reviewedAtCommit: headAnchor });
@@ -8048,7 +8166,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
8048
8166
  });
8049
8167
  if (specialist === "inspect" && status === "passed") yield* Effect.promise(async () => {
8050
8168
  try {
8051
- const { onInspectComplete } = await import("./inspect-agent-BVwDrVrz.js");
8169
+ const { onInspectComplete } = await import("./inspect-agent-CPqXI81t.js");
8052
8170
  const project = resolveProjectFromIssueSync(normalizedIssueId);
8053
8171
  if (project) {
8054
8172
  const workspacePath = join(project.projectPath, "workspaces", `feature-${normalizedIssueId.toLowerCase()}`);
@@ -8064,7 +8182,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
8064
8182
  if (project) {
8065
8183
  if (existsSync(join(project.projectPath, "workspaces", `feature-${normalizedIssueId.toLowerCase()}`))) {
8066
8184
  setReviewStatusSync(normalizedIssueId, { testStatus: "passed" });
8067
- const { initEventStore } = await import("./event-store-ELqkVOn0.js");
8185
+ const { initEventStore } = await import("./event-store-5UKzh9Jf.js");
8068
8186
  await (await initEventStore()).appendAsync({
8069
8187
  type: "test.passed",
8070
8188
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
@@ -8117,8 +8235,8 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
8117
8235
  if (notes?.toLowerCase().includes("conflict")) yield* Effect.promise(async () => {
8118
8236
  try {
8119
8237
  const workAgentId = `agent-${normalizedIssueId.toLowerCase()}`;
8120
- const { sessionExists } = await import("./tmux-DQ6jB76i.js");
8121
- const { messageAgent, spawnAgent, getAgentStateSync } = await import("./agents-BKKkxKgK.js");
8238
+ const { sessionExists } = await import("./tmux-Ctk6RV5l.js");
8239
+ const { messageAgent, spawnAgent, getAgentStateSync } = await import("./agents-Dnn4XgdB.js");
8122
8240
  if (await Effect.runPromise(sessionExists(workAgentId))) {
8123
8241
  await messageAgent(workAgentId, `MERGE CONFLICT: The merge-agent could not rebase your branch onto main due to conflicts. Please fix this now:\n\n1. git fetch origin main\n2. git rebase origin/main\n3. Resolve any conflicts (git add <file> && git rebase --continue)\n4. git push --force-with-lease\n5. Resubmit: curl -s -X POST http://localhost:3011/api/review/${normalizedIssueId}/request -H "Content-Type: application/json" -d "{}"\n\nConflict details: ${notes}`);
8124
8242
  console.log(`[specialists/done] Sent rebase instructions to ${workAgentId}`);
@@ -8132,7 +8250,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
8132
8250
  try {
8133
8251
  const project = resolveProjectFromIssueSync(normalizedIssueId);
8134
8252
  const workspacePath = project ? join(project.projectPath, "workspaces", `feature-${normalizedIssueId.toLowerCase()}`) : void 0;
8135
- const { deliverReviewVerdictFeedback } = await import("./review-verdict-feedback-BPDn4li_.js");
8253
+ const { deliverReviewVerdictFeedback } = await import("./review-verdict-feedback-qRohbFG2.js");
8136
8254
  const result = await Effect.runPromise(deliverReviewVerdictFeedback({
8137
8255
  issueId: normalizedIssueId,
8138
8256
  verdict: status === "failed" ? "failed" : "blocked",
@@ -8152,7 +8270,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
8152
8270
  if (project) {
8153
8271
  const workspacePath = join(project.projectPath, "workspaces", `feature-${normalizedIssueId.toLowerCase()}`);
8154
8272
  if (existsSync(workspacePath)) {
8155
- const { formatAnchorShort, snapshotWorkspaceHeadsPromise } = await import("./git-utils-CI6cwyyC.js");
8273
+ const { formatAnchorShort, snapshotWorkspaceHeadsPromise } = await import("./git-utils-CedsVume.js");
8156
8274
  const reviewedAtCommit = await snapshotWorkspaceHeadsPromise(normalizedIssueId, workspacePath);
8157
8275
  if (reviewedAtCommit) {
8158
8276
  setReviewStatusSync(normalizedIssueId, { reviewedAtCommit });
@@ -8192,7 +8310,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
8192
8310
  });
8193
8311
  })));
8194
8312
  const postSpecialistsLogsCleanupAllRoute = HttpRouter.add("POST", "/api/specialists/logs/cleanup-all", httpHandler(Effect.gen(function* () {
8195
- const { cleanupAllLogsSync } = yield* Effect.promise(() => import("./specialist-logs-Cl5-hqT8.js"));
8313
+ const { cleanupAllLogsSync } = yield* Effect.promise(() => import("./specialist-logs-BorrIu0x.js"));
8196
8314
  const results = cleanupAllLogsSync();
8197
8315
  return jsonResponse({
8198
8316
  success: true,
@@ -8202,7 +8320,7 @@ const postSpecialistsLogsCleanupAllRoute = HttpRouter.add("POST", "/api/speciali
8202
8320
  });
8203
8321
  })));
8204
8322
  const getSpecialistsProjectsRoute = HttpRouter.add("GET", "/api/specialists/projects", httpHandler(Effect.gen(function* () {
8205
- const { getAllProjectSpecialistStatuses } = yield* Effect.promise(() => import("./specialists-Tdezg_6N.js"));
8323
+ const { getAllProjectSpecialistStatuses } = yield* Effect.promise(() => import("./specialists-CH6ah6D-.js"));
8206
8324
  return jsonResponse(yield* Effect.promise(() => getAllProjectSpecialistStatuses()));
8207
8325
  })));
8208
8326
  const postSpecialistWakeRoute = HttpRouter.add("POST", "/api/specialists/:name/wake", httpHandler(Effect.gen(function* () {
@@ -8246,7 +8364,7 @@ const postSpecialistReportStatusRoute = HttpRouter.add("POST", "/api/specialists
8246
8364
  "blocked",
8247
8365
  "failed"
8248
8366
  ].includes(status)) {
8249
- const { getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-Tdezg_6N.js"));
8367
+ const { getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-CH6ah6D-.js"));
8250
8368
  saveAgentRuntimeState(getTmuxSessionName(name), {
8251
8369
  state: "idle",
8252
8370
  lastActivity: (/* @__PURE__ */ new Date()).toISOString()
@@ -8368,7 +8486,7 @@ const postProjectSpecialistKillRoute = HttpRouter.add("POST", "/api/specialists/
8368
8486
  const issueId = params["issueId"];
8369
8487
  const type = params["type"];
8370
8488
  if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
8371
- const { getTmuxSessionName, makeSpecialistRegistryKey, getRunMetadata } = yield* Effect.promise(() => import("./specialists-Tdezg_6N.js"));
8489
+ const { getTmuxSessionName, makeSpecialistRegistryKey, getRunMetadata } = yield* Effect.promise(() => import("./specialists-CH6ah6D-.js"));
8372
8490
  const tmuxSession = getRunMetadata(project, makeSpecialistRegistryKey(type, issueId)).tmuxSession ?? getTmuxSessionName(type, project, issueId);
8373
8491
  yield* Effect.promise(() => Effect.runPromise(killSession(tmuxSession)).catch(() => {}));
8374
8492
  saveAgentRuntimeState(tmuxSession, {
@@ -8395,7 +8513,7 @@ const getProjectSpecialistRunsRoute = HttpRouter.add("GET", "/api/specialists/:p
8395
8513
  if (limitParam) limit = parseInt(limitParam, 10);
8396
8514
  if (offsetParam) offset = parseInt(offsetParam, 10);
8397
8515
  }
8398
- const { listRunLogsSync } = yield* Effect.promise(() => import("./specialist-logs-Cl5-hqT8.js"));
8516
+ const { listRunLogsSync } = yield* Effect.promise(() => import("./specialist-logs-BorrIu0x.js"));
8399
8517
  return jsonResponse(listRunLogsSync(project, type, {
8400
8518
  limit,
8401
8519
  offset
@@ -8406,7 +8524,7 @@ const getProjectSpecialistRunStreamRoute = HttpRouter.add("GET", "/api/specialis
8406
8524
  const project = params["project"];
8407
8525
  const type = params["type"];
8408
8526
  const runId = params["runId"];
8409
- const { getRunLogPath, isRunLogActive } = yield* Effect.promise(() => import("./specialist-logs-Cl5-hqT8.js"));
8527
+ const { getRunLogPath, isRunLogActive } = yield* Effect.promise(() => import("./specialist-logs-BorrIu0x.js"));
8410
8528
  const logPath = getRunLogPath(project, type, runId);
8411
8529
  if (!existsSync(logPath)) return jsonResponse({ error: "Run log not found" }, { status: 404 });
8412
8530
  const encoder = new TextEncoder();
@@ -8465,7 +8583,7 @@ const getProjectSpecialistRunRoute = HttpRouter.add("GET", "/api/specialists/:pr
8465
8583
  const project = params["project"];
8466
8584
  const type = params["type"];
8467
8585
  const runId = params["runId"];
8468
- const { getRunLogSync, parseLogMetadata } = yield* Effect.promise(() => import("./specialist-logs-Cl5-hqT8.js"));
8586
+ const { getRunLogSync, parseLogMetadata } = yield* Effect.promise(() => import("./specialist-logs-BorrIu0x.js"));
8469
8587
  const content = getRunLogSync(project, type, runId);
8470
8588
  if (!content) return jsonResponse({ error: "Run log not found" }, { status: 404 });
8471
8589
  return jsonResponse({
@@ -8479,7 +8597,7 @@ const postProjectSpecialistRunTerminateRoute = HttpRouter.add("POST", "/api/spec
8479
8597
  const project = params["project"];
8480
8598
  const type = params["type"];
8481
8599
  if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
8482
- const { terminateSpecialist } = yield* Effect.promise(() => import("./specialists-Tdezg_6N.js"));
8600
+ const { terminateSpecialist } = yield* Effect.promise(() => import("./specialists-CH6ah6D-.js"));
8483
8601
  yield* Effect.promise(() => terminateSpecialist(project, type));
8484
8602
  return jsonResponse({
8485
8603
  success: true,
@@ -8491,7 +8609,7 @@ const postProjectSpecialistGracePauseRoute = HttpRouter.add("POST", "/api/specia
8491
8609
  const project = params["project"];
8492
8610
  const type = params["type"];
8493
8611
  if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
8494
- const { pauseGracePeriod } = yield* Effect.promise(() => import("./specialists-Tdezg_6N.js"));
8612
+ const { pauseGracePeriod } = yield* Effect.promise(() => import("./specialists-CH6ah6D-.js"));
8495
8613
  if (pauseGracePeriod(project, type)) return jsonResponse({
8496
8614
  success: true,
8497
8615
  message: "Grace period paused"
@@ -8503,7 +8621,7 @@ const postProjectSpecialistGraceResumeRoute = HttpRouter.add("POST", "/api/speci
8503
8621
  const project = params["project"];
8504
8622
  const type = params["type"];
8505
8623
  if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
8506
- const { resumeGracePeriod } = yield* Effect.promise(() => import("./specialists-Tdezg_6N.js"));
8624
+ const { resumeGracePeriod } = yield* Effect.promise(() => import("./specialists-CH6ah6D-.js"));
8507
8625
  if (resumeGracePeriod(project, type)) return jsonResponse({
8508
8626
  success: true,
8509
8627
  message: "Grace period resumed"
@@ -8515,7 +8633,7 @@ const postProjectSpecialistGraceExitRoute = HttpRouter.add("POST", "/api/special
8515
8633
  const project = params["project"];
8516
8634
  const type = params["type"];
8517
8635
  if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
8518
- const { exitGracePeriod } = yield* Effect.promise(() => import("./specialists-Tdezg_6N.js"));
8636
+ const { exitGracePeriod } = yield* Effect.promise(() => import("./specialists-CH6ah6D-.js"));
8519
8637
  exitGracePeriod(project, type);
8520
8638
  return jsonResponse({
8521
8639
  success: true,
@@ -8527,7 +8645,7 @@ const getProjectSpecialistGraceRoute = HttpRouter.add("GET", "/api/specialists/:
8527
8645
  const project = params["project"];
8528
8646
  const type = params["type"];
8529
8647
  if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
8530
- const { getGracePeriodState } = yield* Effect.promise(() => import("./specialists-Tdezg_6N.js"));
8648
+ const { getGracePeriodState } = yield* Effect.promise(() => import("./specialists-CH6ah6D-.js"));
8531
8649
  const state = getGracePeriodState(project, type);
8532
8650
  if (state) return jsonResponse(state);
8533
8651
  else return jsonResponse({ error: "No active grace period" }, { status: 404 });
@@ -8536,7 +8654,7 @@ const getProjectSpecialistContextRoute = HttpRouter.add("GET", "/api/specialists
8536
8654
  const params = yield* HttpRouter.params;
8537
8655
  const project = params["project"];
8538
8656
  const type = params["type"];
8539
- const { loadContextDigest } = yield* Effect.promise(() => import("./specialist-context-cVbGnTa3.js"));
8657
+ const { loadContextDigest } = yield* Effect.promise(() => import("./specialist-context-CrA5azkJ.js"));
8540
8658
  const digest = loadContextDigest(project, type);
8541
8659
  if (digest) return jsonResponse({ digest });
8542
8660
  else return jsonResponse({ error: "No context digest found" }, { status: 404 });
@@ -8545,7 +8663,7 @@ const postProjectSpecialistContextRegenerateRoute = HttpRouter.add("POST", "/api
8545
8663
  const params = yield* HttpRouter.params;
8546
8664
  const project = params["project"];
8547
8665
  const type = params["type"];
8548
- const { regenerateContextDigest } = yield* Effect.promise(() => import("./specialist-context-cVbGnTa3.js"));
8666
+ const { regenerateContextDigest } = yield* Effect.promise(() => import("./specialist-context-CrA5azkJ.js"));
8549
8667
  const digest = yield* Effect.promise(() => regenerateContextDigest(project, type));
8550
8668
  if (digest) return jsonResponse({
8551
8669
  digest,
@@ -8564,7 +8682,7 @@ const postProjectSpecialistCompleteRoute = HttpRouter.add("POST", "/api/speciali
8564
8682
  "blocked"
8565
8683
  ].includes(status)) return jsonResponse({ error: "Valid status (passed/failed/blocked) is required" }, { status: 400 });
8566
8684
  if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
8567
- const { signalSpecialistCompletion } = yield* Effect.promise(() => import("./specialists-Tdezg_6N.js"));
8685
+ const { signalSpecialistCompletion } = yield* Effect.promise(() => import("./specialists-CH6ah6D-.js"));
8568
8686
  signalSpecialistCompletion(project, type, {
8569
8687
  status,
8570
8688
  notes
@@ -8598,8 +8716,8 @@ const postProjectSpecialistLogsCleanupRoute = HttpRouter.add("POST", "/api/speci
8598
8716
  const params = yield* HttpRouter.params;
8599
8717
  const project = params["project"];
8600
8718
  const type = params["type"];
8601
- const { cleanupOldLogsSync } = yield* Effect.promise(() => import("./specialist-logs-Cl5-hqT8.js"));
8602
- const { getSpecialistRetention } = yield* Effect.promise(() => import("./projects-B03Wr-xc.js"));
8719
+ const { cleanupOldLogsSync } = yield* Effect.promise(() => import("./specialist-logs-BorrIu0x.js"));
8720
+ const { getSpecialistRetention } = yield* Effect.promise(() => import("./projects-_n3Zui6K.js"));
8603
8721
  const retention = getSpecialistRetention(project);
8604
8722
  const deleted = cleanupOldLogsSync(project, type, {
8605
8723
  maxDays: retention.max_days,
@@ -8620,7 +8738,7 @@ const postProjectReviewRestartRoute = HttpRouter.add("POST", "/api/specialists/:
8620
8738
  const project = params["project"];
8621
8739
  const issueId = params["issueId"];
8622
8740
  const { model, harness } = yield* readJsonBody;
8623
- const { killAllReviewerSessions } = yield* Effect.promise(() => import("./review-agent-CD4RCI0Y.js"));
8741
+ const { killAllReviewerSessions } = yield* Effect.promise(() => import("./review-agent-UpAM4DmT.js"));
8624
8742
  const killResult = yield* killAllReviewerSessions(project, issueId);
8625
8743
  const projectConfig = resolveProjectFromIssueSync(issueId);
8626
8744
  if (!projectConfig) return jsonResponse({ error: `Cannot resolve project for ${issueId}` }, { status: 404 });
@@ -8636,7 +8754,7 @@ const postProjectReviewRestartRoute = HttpRouter.add("POST", "/api/specialists/:
8636
8754
  }));
8637
8755
  branch = stdout.trim() || primaryRepo.sourceBranch;
8638
8756
  } catch {}
8639
- const { spawnReviewRoleForIssue } = yield* Effect.promise(() => import("./review-agent-CD4RCI0Y.js"));
8757
+ const { spawnReviewRoleForIssue } = yield* Effect.promise(() => import("./review-agent-UpAM4DmT.js"));
8640
8758
  const prUrl = getReviewStatusSync(issueId)?.prUrl;
8641
8759
  const result = yield* spawnReviewRoleForIssue({
8642
8760
  issueId,
@@ -8785,6 +8903,6 @@ const specialistsProjectRouteLayer = Layer.mergeAll(getProjectSpecialistStatusRo
8785
8903
  */
8786
8904
  const specialistsRouteLayer = Layer.mergeAll(specialistsLegacyRouteLayer, specialistsProjectRouteLayer);
8787
8905
  //#endregion
8788
- export { composerCommandConfirmationFromBody as $, resolveAllowedHarness as A, cleanupUnreferencedConversationAttachments as B, handleConversationCreate as C, isTrustedOriginForHost as Ct, handleConversationStop as D, getDefaultCwd as Dt, handleConversationResume as E, httpHandler as Et, tmuxSessionExists as F, isManagedConversationAttachmentPath as G, extractConversationAttachmentPaths as H, waitForPiTuiReady as I, composerCommandResultHttpStatus as J, removeConversationAttachment as K, waitForTmuxSession as L, spawnConversationSession as M, startConversationModelBackfill as N, handleConversationSwitchModel as O, jsonResponse as Ot, stopConversationRuntime as P, ComposerCommandConfirmationError as Q, cleanupConversationAttachments as R, conversationSessionAliveFromState as S, getHeaderFromMap as St, handleConversationRestartAll as T, validateOriginHeaders as Tt, getConversationAttachmentsRoot as U, ensureConversationAttachmentDir as V, hasConversationAttachment as W, resolvePolicy as X, handleComposerCommandMessage as Y, ComposerCommandParseError as Z, isPiControlChannelHarness as _, rejectUnauthorizedDashboardRequest as _t, agentsRouteLayer as a, panCliInvocation as at, validateConversationControlAckOrigin as b, isRespawnPending as bt, codexConversationPendingInput as c, resolveAcpTranscriptPath as ct, handleConversationCodexApproval as d, resolveCodexRolloutPath as dt, evaluateSpawnGuardrails as et, handleConversationCompact as f, resolveJsonlPath as ft, handleConversationThinkingLevel as g, hasDashboardInternalToken as gt, handleConversationPlanAction as h, dashboardSessionCookieHeader as ht, validateSpecialistAutoCompleteMetadata as i, getWorkAgentLifecycleStateSync as it, shouldReportUnresolvedLiveSession as j, isInsideGitWorkTree as k, jsonStringResponse as kt, deliverConversationViaControlChannel as l, resolveAgentHarness as lt, handleConversationDeliveryMethod as m, dashboardCsrfToken as mt, _serverManagedMerges as n, resolveAgentGitInfo as nt, saveAgentStateAndEmitEvent as o, spawnPanCli as ot, handleConversationControlAck as p, resolvePiSessionPath as pt, runInBatches as q, firePostMergeLifecycle as r, resolveConversationGitInfo as rt, saveAgentStateAndEmitEventProgram as s, readLauncherPinnedSessionId as st, specialistsRouteLayer as t, invalidateAgentsCache as tt, handleConversationAbort as u, resolveClaudeSessionId as ut, pickDeliverAs as v, rejectUnauthorizedDashboardSessionMintRequest as vt, handleConversationDelete as w, validateOrigin as wt, conversationNeedsRunningRepair as x, waitForSessionRespawn as xt, resolveConversationDeliveryMethod as y, rejectUnsafeDashboardMutationRequest as yt, cleanupOrphanedConversationAttachments as z };
8906
+ export { composerCommandConfirmationFromBody as $, resolveAllowedHarness as A, jsonResponse as At, cleanupUnreferencedConversationAttachments as B, handleConversationCreate as C, waitForSessionRespawn as Ct, handleConversationStop as D, validateOriginHeaders as Dt, handleConversationResume as E, validateOrigin as Et, tmuxSessionExists as F, isManagedConversationAttachmentPath as G, extractConversationAttachmentPaths as H, waitForPiTuiReady as I, composerCommandResultHttpStatus as J, removeConversationAttachment as K, waitForTmuxSession as L, spawnConversationSession as M, startConversationModelBackfill as N, handleConversationSwitchModel as O, httpHandler as Ot, stopConversationRuntime as P, ComposerCommandConfirmationError as Q, cleanupConversationAttachments as R, conversationSessionAliveFromState as S, isRespawnPending as St, handleConversationRestartAll as T, isTrustedOriginForHost as Tt, getConversationAttachmentsRoot as U, ensureConversationAttachmentDir as V, hasConversationAttachment as W, resolvePolicy as X, handleComposerCommandMessage as Y, ComposerCommandParseError as Z, isPiControlChannelHarness as _, dashboardSessionCookieHeader as _t, agentsRouteLayer as a, resolveConversationGitInfo as at, validateConversationControlAckOrigin as b, rejectUnauthorizedDashboardSessionMintRequest as bt, codexConversationPendingInput as c, spawnPanCli as ct, handleConversationCodexApproval as d, resolveAgentHarness as dt, evaluateSpawnGuardrails as et, handleConversationCompact as f, resolveClaudeSessionId as ft, handleConversationThinkingLevel as g, dashboardCsrfToken as gt, handleConversationPlanAction as h, resolvePiSessionPath as ht, validateSpecialistAutoCompleteMetadata as i, resolveAgentGitInfo as it, shouldReportUnresolvedLiveSession as j, jsonStringResponse as jt, isInsideGitWorkTree as k, getDefaultCwd as kt, deliverConversationViaControlChannel as l, readLauncherPinnedSessionId as lt, handleConversationDeliveryMethod as m, resolveJsonlPath as mt, _serverManagedMerges as n, isInternalAgentRequest as nt, saveAgentStateAndEmitEvent as o, getWorkAgentLifecycleStateSync as ot, handleConversationControlAck as p, resolveCodexRolloutPath as pt, runInBatches as q, firePostMergeLifecycle as r, resolveRequestedStartedBy as rt, saveAgentStateAndEmitEventProgram as s, panCliInvocation as st, specialistsRouteLayer as t, invalidateAgentsCache as tt, handleConversationAbort as u, resolveAcpTranscriptPath as ut, pickDeliverAs as v, hasDashboardInternalToken as vt, handleConversationDelete as w, getHeaderFromMap as wt, conversationNeedsRunningRepair as x, rejectUnsafeDashboardMutationRequest as xt, resolveConversationDeliveryMethod as y, rejectUnauthorizedDashboardRequest as yt, cleanupOrphanedConversationAttachments as z };
8789
8907
 
8790
- //# sourceMappingURL=specialists-CNfYO3G2.js.map
8908
+ //# sourceMappingURL=specialists-2yLmqph9.js.map