@overdeck/desktop 0.45.23 → 0.45.24

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 +2 -0
  2. package/package.json +1 -1
  3. package/server/{acceptance-criteria-DOA0KgXx.js → acceptance-criteria-DDCnXF58.js} +2 -2
  4. package/server/{advancing-selfheal-BBu6DSNm.js → advancing-selfheal-BVwW4qRn.js} +6 -6
  5. package/server/{agent-gc-BV1q_2EV.js → agent-gc-CHcnvonI.js} +4 -4
  6. package/server/agent-state-Bc3tzUC8.js +3 -0
  7. package/server/{agent-state-service-HoK8U4jW.js → agent-state-service-BsgWxZuB.js} +5 -5
  8. package/server/{agent-state-service-CnzFKSAQ.js → agent-state-service-D5UGKIJL.js} +1 -1
  9. package/server/{agents-B4Bjbkfv.js → agents-EbI0zCJl.js} +4 -4
  10. package/server/agents-wi9NWzs2.js +3 -0
  11. package/server/{archive-planning-zkJb3BeM.js → archive-planning-BZDgzoEj.js} +1 -1
  12. package/server/{archive-planning-DYrYojxl.js → archive-planning-Du25Jtst.js} +4 -4
  13. package/server/{artifact-index-jobs-C-xy7Z5v.js → artifact-index-jobs-CbEDfCDu.js} +2 -2
  14. package/server/assemble-J2ZZ2C15.js +339 -0
  15. package/server/{backlog-auto-trigger-GtG71X8H.js → backlog-auto-trigger-2R2jog7n.js} +3 -3
  16. package/server/{behavior-B_-4EKF3.js → behavior-B3exJ42O.js} +2 -2
  17. package/server/{briefing-freshness-DWdW7vUm.js → briefing-freshness-D1wzUIWv.js} +2 -2
  18. package/server/{build-info-DgTqZkL5.js → build-info-CZk_TITh.js} +1 -1
  19. package/server/{build-info-BT096lEl.js → build-info-Ie_D0_BT.js} +3 -3
  20. package/server/{checkpoint-manager-DDqcGyu8.js → checkpoint-manager-BI1Wxoku.js} +2 -2
  21. package/server/{checkpoint-manager-B7Bt29J0.js → checkpoint-manager-DwbQoqrC.js} +1 -1
  22. package/server/checkpoint-worker.js +1 -1
  23. package/server/{checkpoints-CpgCjAlN.js → checkpoints-BJIs5QIA.js} +1 -1
  24. package/server/{checkpoints-C-AXLfYT.js → checkpoints-CQB1h765.js} +2 -2
  25. package/server/{claude-hooks-provision-C8wdRnN1.js → claude-hooks-provision-8Ngo8TpT.js} +1 -1
  26. package/server/{claude-hooks-provision-but-_qGY.js → claude-hooks-provision-D8GXF3_s.js} +2 -2
  27. package/server/{claude-permissions-H_5wHQZQ.js → claude-permissions-DNWEVV6z.js} +2 -2
  28. package/server/{claude-settings-overlay-CbSz0Dvb.js → claude-settings-overlay-CEdaqpWI.js} +2 -2
  29. package/server/{claude-settings-overlay-BTENVmYf.js → claude-settings-overlay-DWy-Bb4Y.js} +1 -1
  30. package/server/cli-B86rejVV.js +3 -0
  31. package/server/{cli-vBeXbPrq.js → cli-RoOx5DUf.js} +9 -9
  32. package/server/{cliproxy-Bgb2XCqi.js → cliproxy-C8a1vtTU.js} +2 -2
  33. package/server/{cliproxy-DW0V86F8.js → cliproxy-fHfIeiGd.js} +1 -1
  34. package/server/{close-issue-Dn_4c4G8.js → close-issue-DoOifFIK.js} +5 -5
  35. package/server/{closed-issue-reaper-hANY_ehE.js → closed-issue-reaper-Bk3SU4RC.js} +9 -9
  36. package/server/{closed-issue-reaper-CWpY2uBw.js → closed-issue-reaper-CktPXo8m.js} +1 -1
  37. package/server/{codex-TmSi-yTv.js → codex-BZXGhUVB.js} +7 -7
  38. package/server/{codex-Dg7Is5yb.js → codex-GcHuUF-k.js} +1 -1
  39. package/server/{codex-parser-C4gSH-IR.js → codex-parser-CFZ1_1Jl.js} +2 -2
  40. package/server/{config-CCvjQf27.js → config-BZ0sHTju.js} +2 -2
  41. package/server/{config-DjLOdbgT.js → config-CKxYiCmX.js} +2 -2
  42. package/server/{config-DUIhMN_T.js → config-DzV30TOm.js} +1 -1
  43. package/server/{config-yaml-DvyMuOle.js → config-yaml-DySPNmKN.js} +23 -9
  44. package/server/{conflict-gate-CmrYpa47.js → conflict-gate-BaCVrH-N.js} +3 -3
  45. package/server/{conflict-gate-BSJkNTdp.js → conflict-gate-BhAY7TUd.js} +1 -1
  46. package/server/context-layers-BrPmE__h.js +4 -0
  47. package/server/context-layers-igZ4FI4_.js +37 -0
  48. package/server/{control-settings-aP1ANIlI.js → control-settings-BQp7_4uD.js} +4 -4
  49. package/server/{conversation-compaction-CNbTLB86.js → conversation-compaction-CgrR8YYp.js} +8 -8
  50. package/server/{conversation-compaction-DiG5zWQq.js → conversation-compaction-eQB5CkOe.js} +1 -1
  51. package/server/{conversation-service-Up7FEzIC.js → conversation-service-BLd3MYsG.js} +1 -1
  52. package/server/{conversation-service-Du-MTNpJ.js → conversation-service-DPJ71F33.js} +329 -19
  53. package/server/{conversations-DbOs1e9Q.js → conversations-6AfUfbwc.js} +5 -5
  54. package/server/{conversations-6mPANqvL.js → conversations-CAsJF9kh.js} +1 -1
  55. package/server/{cost-Ca0YTWDw.js → cost-B2ddP6wq.js} +2 -2
  56. package/server/{cost-CW4WSe72.js → cost-R-m6Yi-W.js} +3 -3
  57. package/server/{cost-sync-C0VdGme1.js → cost-sync-BsN6ER0n.js} +3 -3
  58. package/server/{dag-CdOjJVDT.js → dag-B1ucnjDU.js} +2 -2
  59. package/server/{dangerous-git-ops-CT-IypG3.js → dangerous-git-ops-BXqeWVSf.js} +1 -1
  60. package/server/dashboard-db-worker.js +7 -7
  61. package/server/{deacon-pRnyD5w9.js → deacon-CU_cAYSR.js} +254 -144
  62. package/server/{deacon-DYSEJb48.js → deacon-kiQrb4ZT.js} +3 -3
  63. package/server/{deacon-nudge-log-Bjg8U4Y9.js → deacon-nudge-log-6wVqAaqz.js} +3 -3
  64. package/server/{deacon-swarm-DftYRDo8.js → deacon-swarm-BXZZ1Z2-.js} +13 -13
  65. package/server/deacon-swarm-C-GwfjJy.js +2 -0
  66. package/server/deacon.js +8 -8
  67. package/server/{deploy-patrol-Bjsho_ha.js → deploy-patrol-AiFoP8dw.js} +6 -6
  68. package/server/{deploy-window-DeP_OIRk.js → deploy-window-C3F-tihF.js} +6 -6
  69. package/server/{deploy-window-CM6W1-c6.js → deploy-window-DkZraDyj.js} +1 -1
  70. package/server/{dev-supervisor-BpMoHlkR.js → dev-supervisor-bcOWqdQE.js} +2 -2
  71. package/server/{devcontainer-renderer-CtUgrVKW.js → devcontainer-renderer-_d6XhyND.js} +3 -3
  72. package/server/dist-Bzy0y69j.js +3 -0
  73. package/server/{dist-DyRx4cI7.js → dist-Cb_0uvpS.js} +1 -1
  74. package/server/{docker-BK7HIcBj.js → docker-DcMTFTUC.js} +2 -2
  75. package/server/{dod-BrSfUHm0.js → dod-C6n9RV3G.js} +1 -1
  76. package/server/{ensure-devcontainer-DRqaAkBR.js → ensure-devcontainer-BZgOhRo7.js} +1 -1
  77. package/server/{ensure-devcontainer-DseivYEy.js → ensure-devcontainer-DNi-ono3.js} +4 -4
  78. package/server/{esm-shims-CbI3BVkl.js → esm-shims-OSHAYaS1.js} +1 -1
  79. package/server/{event-store-tdiY5eDZ.js → event-store-CQL6NeqB.js} +3 -3
  80. package/server/{event-store-Cr5PQwFC.js → event-store-EV2cMiXj.js} +1 -1
  81. package/server/{events-CvvGK6LT.js → events-BTdrdEq8.js} +1 -1
  82. package/server/{events-CC1dgUpx.js → events-DTfAe4My.js} +3 -3
  83. package/server/{factory-CynerjXO.js → factory-CFibJuaw.js} +4 -4
  84. package/server/{feature-registry-population-B0pmAz0a.js → feature-registry-population-DKZFMbFt.js} +4 -4
  85. package/server/{feature-registry-storage-_wUBRD3J.js → feature-registry-storage-BdPuLcBX.js} +2 -2
  86. package/server/{features-Dhxz-wLc.js → features-ez2271oH.js} +2 -2
  87. package/server/{feedback-target-CPS15Vte.js → feedback-target-7mqqwrX6.js} +7 -7
  88. package/server/{feedback-target-iygZwmMc.js → feedback-target-CoFDHiM8.js} +1 -1
  89. package/server/{feedback-writer-C9b6ccN1.js → feedback-writer-CY5L1lB7.js} +5 -5
  90. package/server/{feedback-writer-qmiMbqTZ.js → feedback-writer-D3a22RCd.js} +1 -1
  91. package/server/flywheel-DHrgCphM.js +1084 -0
  92. package/server/flywheel-DzGtWnJ1.js +477 -0
  93. package/server/flywheel-SVF02Jpq.js +2 -0
  94. package/server/{flywheel-merge-order-DxbQKE1d.js → flywheel-merge-order-UU0tiUld.js} +9 -8
  95. package/server/{flywheel-merge-order-C-6zRLvM.js → flywheel-merge-order-UUcsCDb6.js} +1 -1
  96. package/server/{forge-Ch9gCFod.js → forge-CNFnyqps.js} +2 -2
  97. package/server/forge-DXnS_YFH.js +2 -0
  98. package/server/{from-CJ_aH5jD.js → from-kNxT0bZC.js} +1 -1
  99. package/server/{fts-db-CKgg0VKg.js → fts-db-CE46vDkZ.js} +2 -2
  100. package/server/{fts-operations-BrL_VTRr.js → fts-operations-CqY6zl-i.js} +2 -2
  101. package/server/{git-utils-BVa07a4a.js → git-utils-CRw2zLPC.js} +68 -3
  102. package/server/git-utils-D0_yhCgF.js +3 -0
  103. package/server/{github-app-CMBdIFBQ.js → github-app-C3QrAUd0.js} +18 -7
  104. package/server/{github-app-CPfoFAdV.js → github-app-ClZ2lk8D.js} +1 -1
  105. package/server/{github-client--XVlDpwM.js → github-client-BnIsSrEN.js} +2 -2
  106. package/server/{github-client-B4QsdE-X.js → github-client-DfQYVUaw.js} +1 -1
  107. package/server/{github-pr-lookup-BRbDW-qk.js → github-pr-lookup-D16NGsSO.js} +2 -2
  108. package/server/{harness-binary-CVio2m-u.js → harness-binary-DPUi-Pv8.js} +32 -6
  109. package/server/{harness-resolve-qHJBhy3Z.js → harness-resolve-3lNZkyT4.js} +18 -9
  110. package/server/{health-events-C9B8y1Hm.js → health-events-BBcTYQKU.js} +2 -2
  111. package/server/{health-events-CpfvuVmm.js → health-events-BDOHby5Q.js} +1 -1
  112. package/server/{hooks-DUXw8A0-.js → hooks-CKZgXlJb.js} +2 -2
  113. package/server/{hooks-ltecuFqZ.js → hooks-DPVX1rwQ.js} +1 -1
  114. package/server/{hume-BEq0bUDg.js → hume-Cz8igP9E.js} +2 -2
  115. package/server/hume-ccTf4wTX.js +3 -0
  116. package/server/{idle-stack-reaper-D7w9t3fE.js → idle-stack-reaper-CuLF0j2H.js} +1 -1
  117. package/server/{idle-stack-reaper-w1ISSlhs.js → idle-stack-reaper-DDIRwxUY.js} +2 -2
  118. package/server/{in-flight-guard-aQ1IxeI3.js → in-flight-guard-CAAkqPLu.js} +2 -2
  119. package/server/{infra-CzaSOgul.js → infra-BEqFxlJc.js} +14 -4
  120. package/server/{injection-DZ0PfYa4.js → injection-C8aiVJrF.js} +191 -183
  121. package/server/{injection-oNZeoDhL.js → injection-CPUIqNhI.js} +1 -1
  122. package/server/{inspect-agent-DJKLWcVT.js → inspect-agent-BLuJ1AkT.js} +135 -79
  123. package/server/inspect-agent-Brtz0URj.js +2 -0
  124. package/server/{internal-token-DXdfprGr.js → internal-token-BrcU6qfe.js} +1 -1
  125. package/server/{internal-token-Bb4XeV2x.js → internal-token-s0-oKybJ.js} +2 -2
  126. package/server/{io-B3_AHDfr.js → io-C9kF1wtJ.js} +3 -3
  127. package/server/{issue-closed-zhdvQicO.js → issue-closed-CDJk4pIp.js} +7 -7
  128. package/server/{issue-lifecycle-Dy4vd0Oa.js → issue-lifecycle-B8sZHVHh.js} +1 -1
  129. package/server/{issue-lifecycle-CreaCkjW.js → issue-lifecycle-ojZAzDBP.js} +21 -21
  130. package/server/{issue-service-singleton-DabvBWUp.js → issue-service-singleton-BvJ09SaR.js} +1 -1
  131. package/server/{issue-service-singleton-B5ushCvE.js → issue-service-singleton-Yx5DdmVJ.js} +8 -8
  132. package/server/{issues-B6ToV6x1.js → issues-BMmP_77e.js} +2 -2
  133. package/server/{jsonl-parser-Dhflo1SH.js → jsonl-parser-BXSlHwEh.js} +3 -3
  134. package/server/{label-cleanup-BKPJm4Hv.js → label-cleanup-B0UJwnv5.js} +3 -3
  135. package/server/{label-reconciler-DdWbHEBu.js → label-reconciler-B4iOAjlC.js} +4 -4
  136. package/server/{launcher-generator-CHVm7bGT.js → launcher-generator-BBWG_SiS.js} +101 -7
  137. package/server/{lifecycle-io-D8iNBcux.js → lifecycle-io-BREGpnLk.js} +5 -5
  138. package/server/{lifecycle-io-Bsnr2K4F.js → lifecycle-io-DPo7x11I.js} +1 -1
  139. package/server/{lifecycle-sycO16hj.js → lifecycle-xmBfK2GJ.js} +6 -6
  140. package/server/{lifecycle-DfeyBDwA.js → lifecycle-yPd___5E.js} +2 -2
  141. package/server/{linear-client-D4zqMnX7.js → linear-client-BsuUvkdA.js} +2 -2
  142. package/server/{linear-client-DqhDQO9k.js → linear-client-CTskEeT_.js} +1 -1
  143. package/server/memory-fts-worker.js +1 -1
  144. package/server/{merge-DK23JEdS.js → merge-B1DiziGU.js} +1 -1
  145. package/server/{merge-C_ZEhbqI.js → merge-CefQNAnq.js} +3 -3
  146. package/server/{merge-agent-XrB80vfT.js → merge-agent-4WOWlSYA.js} +28 -28
  147. package/server/{merge-agent-BQM3a8z5.js → merge-agent-CKkgIBPB.js} +1 -1
  148. package/server/{merge-batch-Bwoyr8Je.js → merge-batch-ClFn2T-y.js} +1 -1
  149. package/server/merge-ops-CR44oU9-.js +2 -0
  150. package/server/{merge-rebase-C1KIVr0s.js → merge-rebase-BfaTyXsw.js} +2 -2
  151. package/server/merge-set-DJ8-UErs.js +83 -0
  152. package/server/{merge-set-DnSYdBEp.js → merge-set-bUqbm3yc.js} +1 -1
  153. package/server/{merge-sync-SSv3E-pl.js → merge-sync-BJYeOODr.js} +1 -1
  154. package/server/{merge-sync-DZ9dojJn.js → merge-sync-VPV28g0g.js} +2 -2
  155. package/server/{merge-train-DxDfBTjr.js → merge-train-CHopycP0.js} +3 -3
  156. package/server/{merge-train-deps-CyYQUksx.js → merge-train-deps-D1cOZzy2.js} +4 -4
  157. package/server/{merge-verification-CSizH3HY.js → merge-verification-BkaOqPsw.js} +4 -4
  158. package/server/{multipart-parser-Dt8YPN5S.js → multipart-parser-duPAfSBw.js} +2 -2
  159. package/server/{no-resume-mode-Cx3K0hHi.js → no-resume-mode-Nw29vaFb.js} +1 -1
  160. package/server/node_modules/.package-lock.json +8 -8
  161. package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/package.json +3 -3
  162. package/server/node_modules/undici/README.md +5 -0
  163. package/server/node_modules/undici/docs/docs/api/Client.md +4 -0
  164. package/server/node_modules/undici/docs/docs/api/Dispatcher.md +6 -0
  165. package/server/node_modules/undici/docs/docs/api/Interceptors.md +59 -0
  166. package/server/node_modules/undici/docs/docs/api/MockAgent.md +27 -0
  167. package/server/node_modules/undici/docs/docs/api/MockPool.md +28 -1
  168. package/server/node_modules/undici/docs/docs/index.md +5 -0
  169. package/server/node_modules/undici/lib/core/request.js +1 -1
  170. package/server/node_modules/undici/lib/core/util.js +6 -1
  171. package/server/node_modules/undici/lib/dispatcher/agent.js +3 -3
  172. package/server/node_modules/undici/lib/dispatcher/client-h1.js +31 -6
  173. package/server/node_modules/undici/lib/dispatcher/client-h2.js +34 -43
  174. package/server/node_modules/undici/lib/handler/cache-handler.js +93 -5
  175. package/server/node_modules/undici/lib/handler/cache-revalidation-handler.js +10 -0
  176. package/server/node_modules/undici/lib/handler/redirect-handler.js +5 -2
  177. package/server/node_modules/undici/lib/handler/retry-handler.js +6 -4
  178. package/server/node_modules/undici/lib/interceptor/cache.js +21 -4
  179. package/server/node_modules/undici/lib/interceptor/decompress.js +4 -0
  180. package/server/node_modules/undici/lib/mock/mock-interceptor.js +25 -7
  181. package/server/node_modules/undici/lib/mock/mock-utils.js +39 -10
  182. package/server/node_modules/undici/lib/util/cache.js +49 -7
  183. package/server/node_modules/undici/lib/web/fetch/body.js +2 -1
  184. package/server/node_modules/undici/lib/web/fetch/response.js +1 -3
  185. package/server/node_modules/undici/package.json +2 -2
  186. package/server/node_modules/undici/types/client.d.ts +2 -2
  187. package/server/node_modules/undici/types/dispatcher.d.ts +3 -3
  188. package/server/node_modules/undici/types/mock-interceptor.d.ts +5 -1
  189. package/server/{orphan-proposed-reconciler-neK8dHQk.js → orphan-proposed-reconciler-BvKkWMJQ.js} +12 -12
  190. package/server/{orphan-proposed-reconciler-BTkDrl4R.js → orphan-proposed-reconciler-CTSGcK8p.js} +1 -1
  191. package/server/package-lock.json +9 -9
  192. package/server/package.json +1 -1
  193. package/server/{pan-dir-DeVUgwA7.js → pan-dir-B0c3w0Ya.js} +3 -3
  194. package/server/{paths-_zEts6wc.js → paths-D-xWGHdh.js} +2 -2
  195. package/server/{pickup-Dd0Znxxy.js → pickup-DUCLWrJY.js} +17 -16
  196. package/server/{pipeline-membership-0HaEGDlH.js → pipeline-membership-mY3GprlK.js} +7 -7
  197. package/server/{pipeline-notifier-6iCJplFZ.js → pipeline-notifier-BJr8gQX6.js} +1 -1
  198. package/server/{pipeline-notifier-D0ykk59O.js → pipeline-notifier-BXkJzDC4.js} +2 -2
  199. package/server/{project-pipelines-2sK1apsO.js → project-pipelines-C0MWUeCU.js} +2 -2
  200. package/server/project-repos-B6GycDh9.js +94 -0
  201. package/server/project-repos-DXKQsc_m.js +3 -0
  202. package/server/{projects-9SkRpES9.js → projects-vjjcmiN8.js} +1 -1
  203. package/server/{prompts-Dp4Tpk39.js → prompts-DxzFXuLl.js} +2 -2
  204. package/server/{providers-DV7ec8l7.js → providers-qQAwGQDW.js} +7 -7
  205. package/server/{providers-DKkBXhxU.js → providers-u4Ga0jOr.js} +1 -1
  206. package/server/public/assets/{chunk-BO2N2NFS-CltymLRg.js → chunk-BO2N2NFS-BamJdinX.js} +4 -4
  207. package/server/public/assets/{diagram-OG6HWLK6-D2f6pjgA.js → diagram-OG6HWLK6-DfOB8-w4.js} +1 -1
  208. package/server/public/assets/{dist-DEmlBBNQ.js → dist-ByIuzMQW.js} +3 -3
  209. package/server/public/assets/{dist-BWR4qFiV.js → dist-D7zYSEA6.js} +1 -1
  210. package/server/public/assets/{ganttDiagram-6RSMTGT7-DnfiViPK.js → ganttDiagram-6RSMTGT7-EdmRyXL3.js} +1 -1
  211. package/server/public/assets/{highlighted-body-OFNGDK62-B8Wrmj9H.js → highlighted-body-OFNGDK62-MerOfTX8.js} +1 -1
  212. package/server/public/assets/{index-CsSuZQBI.js → index-CWeMerGO.js} +146 -144
  213. package/server/public/assets/{index-CUr1xv8w.css → index-CenuJ3Cw.css} +1 -1
  214. package/server/public/assets/{linear-C9zFQpkX.js → linear-BBbArIcK.js} +1 -1
  215. package/server/public/assets/mermaid-GHXKKRXX-CpPWAFwE.js +1 -0
  216. package/server/public/assets/{pieDiagram-4H26LBE5-lR8H7Yjd.js → pieDiagram-4H26LBE5-BKIddiJN.js} +1 -1
  217. package/server/public/assets/{prod-B1jCQihw.js → prod-B8vYiu52.js} +4 -4
  218. package/server/public/assets/{quadrantDiagram-W4KKPZXB-CVQ2guem.js → quadrantDiagram-W4KKPZXB-D6RtoULk.js} +1 -1
  219. package/server/public/assets/{sankeyDiagram-5OEKKPKP-eD1RB4gm.js → sankeyDiagram-5OEKKPKP-CLrCedZX.js} +1 -1
  220. package/server/public/assets/{xychartDiagram-2RQKCTM6-ChEC6dQn.js → xychartDiagram-2RQKCTM6-hznR8DYl.js} +1 -1
  221. package/server/public/index.html +2 -2
  222. package/server/{pull-requests--Ib2jTgy.js → pull-requests-7N8WKseP.js} +1 -1
  223. package/server/{pull-requests-CXIhdCYD.js → pull-requests-_lHueOHW.js} +3 -3
  224. package/server/{queries-6d7Cdtm7.js → queries-CjNIf-Ub.js} +576 -166
  225. package/server/{rally-B708-nZn.js → rally-CyWT_lNO.js} +3 -3
  226. package/server/{rally-api-nY0ZANw3.js → rally-api-C8e_1JRi.js} +2 -2
  227. package/server/{rally-api-yjQ0TfHd.js → rally-api-ClOSd-Tt.js} +1 -1
  228. package/server/{rally-client-B1EJhfV0.js → rally-client-lc-nokqr.js} +4 -4
  229. package/server/{rally-client-CULK2XAY.js → rally-client-sgtVqzNU.js} +1 -1
  230. package/server/rally-zhhtXuDP.js +3 -0
  231. package/server/{reap-terminal-sessions-MWnqdLCJ.js → reap-terminal-sessions-7KeHv1R1.js} +1 -1
  232. package/server/{reap-terminal-sessions-N3BTkmX_.js → reap-terminal-sessions-BtHPo6Xc.js} +1 -1
  233. package/server/rebuild-stack-CFvcBHsS.js +4 -0
  234. package/server/{rebuild-stack-Dp4eLkt4.js → rebuild-stack-lwtsW0GO.js} +26 -35
  235. package/server/{reconstruct-cache-uWbZfjms.js → reconstruct-cache-C3Ui7ojV.js} +6 -6
  236. package/server/{record-t6V-3Dcj.js → record-CN0pj4_5.js} +1 -1
  237. package/server/{record-update-DACtKh6_.js → record-update-bLJxAXH4.js} +1 -1
  238. package/server/{record-update-Dq0t2uBG.js → record-update-dE1Aw83j.js} +2 -2
  239. package/server/{recovery-trip-BJtIQuag.js → recovery-trip-BvRWfUXM.js} +2 -2
  240. package/server/{release-engine-DZpmGGzb.js → release-engine-Cx48W7z8.js} +5 -5
  241. package/server/{release-set-hnXd_kga.js → release-set-CQfuN9-v.js} +3 -3
  242. package/server/{remote-Br-ZWVIP.js → remote-C_2hasl7.js} +3 -3
  243. package/server/{remote-4tiENDaI.js → remote-ChgimyYa.js} +3 -3
  244. package/server/{remote-agents-nmty1mLu.js → remote-agents-By1ige5O.js} +6 -6
  245. package/server/{remote-agents-CRCg1L4H.js → remote-agents-CA3Ihlxj.js} +1 -1
  246. package/server/{remote-completion-BbWNd10K.js → remote-completion-fVe9e_3u.js} +12 -12
  247. package/server/resume-BFv1PGpA.js +3 -0
  248. package/server/{review-agent-sKkE1FEL.js → review-agent-CIGOQYBD.js} +29 -25
  249. package/server/{review-agent-DJRO8EG8.js → review-agent-DNboMyW4.js} +1 -1
  250. package/server/{review-artifacts-BLbSC4ke.js → review-artifacts-nRDPuMxd.js} +5 -5
  251. package/server/{review-context-BgX3lcCx.js → review-context-2uj-YQ8J.js} +69 -25
  252. package/server/{review-status-C6n6-9f_.js → review-status-btEYlaxA.js} +1 -1
  253. package/server/{review-status-enrichment-tbOn_A_u.js → review-status-enrichment-Dci-ZwEt.js} +3 -3
  254. package/server/{review-status-A7quS5KJ.js → review-status-kZj_KyCk.js} +42 -26
  255. package/server/{review-status-sync-BhSQ0d0l.js → review-status-sync-BTOpxtTC.js} +10 -5
  256. package/server/{review-status-sync-To3-iS-N.js → review-status-sync-DSDK3OMy.js} +1 -1
  257. package/server/{review-verdict-feedback-CTRNtzXO.js → review-verdict-feedback-CCjVA7Uk.js} +6 -6
  258. package/server/{review-verdict-feedback-C1Kg8n7t.js → review-verdict-feedback-CTd4QMBu.js} +1 -1
  259. package/server/{rollup-B53Y81xK.js → rollup-BKQC7jp4.js} +1 -1
  260. package/server/{rollup-WA0VD-Rr.js → rollup-FGsKki9R.js} +8 -8
  261. package/server/{scanner-D2743cp8.js → scanner-CnqEZeDy.js} +41 -14
  262. package/server/{sequence-io-Cg0zYj_E.js → sequence-io-D909zgeH.js} +4 -4
  263. package/server/{sequencer-agent-BGY8gjg-.js → sequencer-agent-CzkcK6P5.js} +5 -5
  264. package/server/server.js +2194 -341
  265. package/server/{service-DCpB_SGd.js → service-CLeAoU6G.js} +51 -50
  266. package/server/{session-fork-BQ8_6H32.js → session-fork-CHI1XvL9.js} +2 -2
  267. package/server/{session-history-CVZDpS3c.js → session-history-BT3IvqhC.js} +4 -4
  268. package/server/settings-66A6uvIA.js +2 -0
  269. package/server/{settings-BZ5m1UCl.js → settings-BTMvpNFU.js} +3 -3
  270. package/server/{settings-ylxwqwQG.js → settings-C0zgxOGf.js} +2 -2
  271. package/server/{shadow-engineering-BlxG6Xye.js → shadow-engineering-BJfgm-hX.js} +2 -2
  272. package/server/{shadow-state-Dh-HzF2J.js → shadow-state-7a-524T8.js} +2 -2
  273. package/server/{shadow-state-C2_epgx2.js → shadow-state-DnDyjujH.js} +1 -1
  274. package/server/{shadow-utils-4bvjn9b3.js → shadow-utils-Db3oroFG.js} +2 -2
  275. package/server/{ship-log-ClSMIzZX.js → ship-log-D9MlVzYU.js} +1 -1
  276. package/server/{smart-compaction-CHIxLr_d.js → smart-compaction-CV2ukKND.js} +1 -1
  277. package/server/{smart-compaction-r4pHQBIr.js → smart-compaction-KCYScAU1.js} +7 -7
  278. package/server/{spawn-planning-session-DWAorh2B.js → spawn-planning-session-DKpdFyOC.js} +30 -23
  279. package/server/{spawn-planning-session-KC_UduxD.js → spawn-planning-session-qUC2VWu3.js} +1 -1
  280. package/server/{specialist-completion-BXhav38U.js → specialist-completion-Ky9wCDpb.js} +1 -1
  281. package/server/{specialist-context-DtrYvGJ-.js → specialist-context-Bn3dCGS2.js} +5 -5
  282. package/server/{specialist-handoff-logger-C45ouoZ6.js → specialist-handoff-logger-CMEwYxa2.js} +2 -2
  283. package/server/{specialist-logs-DJ3RzKxW.js → specialist-logs-C5p8G7tx.js} +3 -3
  284. package/server/{specialists-JVO00bs7.js → specialists-CC4r-c2s.js} +776 -347
  285. package/server/{specialists-D5fRZXmN.js → specialists-CShuVGWT.js} +1 -1
  286. package/server/{specialists-DVj0hvaL.js → specialists-DM6bWjsi.js} +1 -1
  287. package/server/{specialists-DyFeedjn.js → specialists-jiuuyVkp.js} +21 -19
  288. package/server/specs-C8Wsn2XO.js +3 -0
  289. package/server/{src-CG9mCkP6.js → src-CXmtj0im.js} +6 -6
  290. package/server/{src-CMTQGyCK.js → src-CdmnTM2m.js} +5 -5
  291. package/server/{src-U7_kTPEE.js → src-DtcUOZCq.js} +111 -18
  292. package/server/stack-health-Bn3o8FBX.js +3 -0
  293. package/server/{stack-health-puygdaMd.js → stack-health-DxSdG9cW.js} +63 -9
  294. package/server/{stale-task-claims-BbFwCTb0.js → stale-task-claims-KJKxxiiQ.js} +4 -4
  295. package/server/{staleness-Cbl_w4Bw.js → staleness-CT34nwr9.js} +1 -1
  296. package/server/{staleness-Bpy41ngS.js → staleness-DPm7ClwA.js} +1 -1
  297. package/server/{state-home-CIGjwNfJ.js → state-home-Cn_Qu8IX.js} +2 -2
  298. package/server/{state-migrate-Dkzaxvny.js → state-migrate-BGg2ZaOt.js} +4 -4
  299. package/server/{stuck-remediation-CzEov_fq.js → stuck-remediation-DYuPRYYw.js} +300 -23
  300. package/server/{stuck-remediation-sY_MHHgQ.js → stuck-remediation-s9_2qfi6.js} +1 -1
  301. package/server/{substrate-bug-weights-service-BH66lhm7.js → substrate-bug-weights-service-B-FwCs5V.js} +3 -3
  302. package/server/{summary-fork-DHhJIsAL.js → summary-fork-D1RAk9rJ.js} +78 -12
  303. package/server/{summary-fork-D8bXjCr7.js → summary-fork-DpcxN9tf.js} +2 -2
  304. package/server/supervisor/{injection-budget-C1iPirFS.js → injection-budget-Csw5tqfJ.js} +2 -41
  305. package/server/supervisor/pty-supervisor.js +2 -1
  306. package/server/supervisor/pty-token-x-ea28Us.js +43 -0
  307. package/server/supervisor-FTJAIsAK.js +2 -0
  308. package/server/{supervisor-BO-Zk_h-.js → supervisor-wM4ooB5O.js} +3 -3
  309. package/server/{swarm-readiness-CQ_fwUWF.js → swarm-readiness-DlP_UjHq.js} +3 -3
  310. package/server/{system-prerequisites-Bza0ffAh.js → system-prerequisites-DUDj1YHf.js} +56 -29
  311. package/server/{teardown-workspace-CEgauF4U.js → teardown-workspace-DeTTImn-.js} +15 -15
  312. package/server/{test-agent-queue-DXDt0Xa-.js → test-agent-queue-MbxX5vqq.js} +6 -6
  313. package/server/{test-verdict-CmUBK5cT.js → test-verdict-bWYBtqBg.js} +1 -1
  314. package/server/{test-verdict-DFjjIHR5.js → test-verdict-gscuksPv.js} +1 -1
  315. package/server/{tldr-daemon-DL566HbH.js → tldr-daemon-BYFkts95.js} +1 -1
  316. package/server/{tldr-daemon-BDtLOIlO.js → tldr-daemon-C-69c3OI.js} +2 -2
  317. package/server/{tmux-DoThH6aj.js → tmux-B6z7h_vZ.js} +1 -1
  318. package/server/{tmux-ftABRAmc.js → tmux-R7N7y-Mh.js} +2 -2
  319. package/server/{token-CsOhvw42.js → token-BK6t8BIT.js} +2 -2
  320. package/server/token-util-DuPuNriz.js +3 -0
  321. package/server/{token-util-CTmczIfW.js → token-util-DxXu-vd1.js} +1 -1
  322. package/server/{tracker-config-B4itFzDo.js → tracker-config-G6latr8C.js} +2 -2
  323. package/server/{tracker-utils-BePq_oj-.js → tracker-utils-B4ylXZQK.js} +1 -1
  324. package/server/{tracker-utils-tnxxqROg.js → tracker-utils-DHv5pSDT.js} +2 -2
  325. package/server/{traefik-connect-m73vGebA.js → traefik-connect-Df2uXPsQ.js} +1 -1
  326. package/server/{tunnel-B2vxjx_b.js → tunnel-CDVKJpRv.js} +3 -3
  327. package/server/{tunnel-Cgj-IGIl.js → tunnel-DGdUkGoZ.js} +1 -1
  328. package/server/{types-BBNjPcqU.js → types-5M0lupud.js} +1 -1
  329. package/server/{uat-train-cKfM-_WW.js → uat-train-B05BWkp-.js} +1 -1
  330. package/server/{uat-train-CuEn0t9M.js → uat-train-DDSrSoV1.js} +25 -25
  331. package/server/validate-IfDGkaVR.js +177 -0
  332. package/server/{validation-CIi6pnI2.js → validation-CC9OPqJZ.js} +1 -1
  333. package/server/{validation-B5JxoPUS.js → validation-Dw1pzDzr.js} +4 -4
  334. package/server/{verification-artifact-C-lIHfUa.js → verification-artifact-B3itKTxu.js} +1 -1
  335. package/server/{verification-artifact-BcnIbigL.js → verification-artifact-TVFSz_q1.js} +1 -1
  336. package/server/{verification-runner-CDj4lD4t.js → verification-runner-BW4HOKAz.js} +1 -1
  337. package/server/{verification-runner-Br0S_Ous.js → verification-runner-CkgX6EtI.js} +91 -106
  338. package/server/{vtt-parser-DKpNNW5i.js → vtt-parser-DYPbKcIJ.js} +1 -1
  339. package/server/{work-agent-prompt-Yb2bd3Fq.js → work-agent-prompt-Du8Vh2aJ.js} +9 -9
  340. package/server/workflows-BQu4RFQ-.js +2 -0
  341. package/server/{workflows-C9WmILql.js → workflows-mbQzh6mQ.js} +18 -18
  342. package/server/{workspace-DuUdndHe.js → workspace--8tnhDI0.js} +1 -1
  343. package/server/{workspace-BVl4rihN.js → workspace-BPUws1-_.js} +3 -3
  344. package/server/{workspace-config-cEGcO6UT.js → workspace-config-CIVWZOQr.js} +1 -1
  345. package/server/{workspace-manager-hLUv3ADC.js → workspace-manager-CBhNdzE4.js} +66 -15
  346. package/server/workspace-manager-CWT55qeI.js +3 -0
  347. package/server/{workspace-metadata-DNpMixRq.js → workspace-metadata-BzHnwwX4.js} +1 -1
  348. package/server/{workspace-metadata-CskwzzhL.js → workspace-metadata-_WygnyoX.js} +2 -2
  349. package/server/{workspaces-hWvy9eKs.js → workspaces-Do_9J0LQ.js} +130 -111
  350. package/sync-sources/hooks/record-cost-event.js +6 -4
  351. package/sync-sources/skills/okf/README.md +11 -3
  352. package/sync-sources/skills/okf/SKILL.md +12 -1
  353. package/sync-sources/skills/okf/docs/USAGE.md +15 -0
  354. package/sync-sources/skills/okf/references/overdeck.md +28 -0
  355. package/sync-sources/skills/pan-flywheel/SKILL.md +18 -1
  356. package/sync-sources/skills/pan-knowledge/SKILL.md +10 -0
  357. package/sync-sources/skills/pan-orders/SKILL.md +33 -0
  358. package/sync-sources/skills/pan-start/SKILL.md +4 -0
  359. package/sync-sources/templates/traefik/dynamic/overdeck.yml.template +10 -0
  360. package/server/agent-state-Bg0lhqwj.js +0 -3
  361. package/server/agents-FlIgQ3ql.js +0 -3
  362. package/server/cli-BsVIHwzC.js +0 -3
  363. package/server/context-layers-B3Nt58jl.js +0 -4
  364. package/server/context-layers-ZYFcWiyc.js +0 -165
  365. package/server/deacon-swarm-9jRLS5Ke.js +0 -2
  366. package/server/dist-Bd3vn0Hw.js +0 -3
  367. package/server/flywheel-DMCUzDWg.js +0 -2
  368. package/server/flywheel-DSSpWmqF.js +0 -522
  369. package/server/flywheel-DcBkQvgE.js +0 -207
  370. package/server/forge-B-ZWyTRm.js +0 -2
  371. package/server/git-utils-Dry_Ka_D.js +0 -3
  372. package/server/hume-B_DbflNM.js +0 -3
  373. package/server/inspect-agent-ch-F-5Ci.js +0 -2
  374. package/server/layers-DzxSTGNA.js +0 -93
  375. package/server/merge-blockers-BsFjGrQ8.js +0 -41
  376. package/server/merge-ops-DlB1IM0Y.js +0 -2
  377. package/server/merge-set-DLz0MkGT.js +0 -139
  378. package/server/public/assets/mermaid-GHXKKRXX-BUAB8hqt.js +0 -1
  379. package/server/rally-njs_mJrt.js +0 -3
  380. package/server/rebuild-stack-kA7XngID.js +0 -3
  381. package/server/resume-CcKqnTvE.js +0 -3
  382. package/server/settings-D0OSwos5.js +0 -2
  383. package/server/specs-nN45DG2X.js +0 -3
  384. package/server/stack-health-Df0YEZKa.js +0 -3
  385. package/server/supervisor-BPy-o1A8.js +0 -2
  386. package/server/token-util-DrHg8abn.js +0 -3
  387. package/server/workflows-D90rMOya.js +0 -2
  388. package/server/workspace-manager-ZTdJAy9M.js +0 -3
@@ -1,45 +1,46 @@
1
1
  import { n as __esmMin, o as __toESM } from "./rolldown-runtime-DNCzzKnI.js";
2
- import { B as getProviderEnvSync, Br as getOverdeckHome, C as TIERED_EXECUTION_DIFFICULTIES, D as resolveTieredExecutionEnabled, Ft as resolveProjectForIssue, G as setupCredentialFileAuthSync, Gr as sessionFilePath, H as init_providers, It as writeAgentHarnessModelSync, K as ensureOpenAICompatibleProxyRunning, L as clearCredentialFileAuthSync, Mt as readIssueRecordForWorkspaceSync, Nr as encodeClaudeProjectDir, Nt as readIssueRecordSync, O as resolveTieredExecutionEnabledForIssue, Ot as init_record, Qn as resolveBareNumericIdSync, R as getBuiltInDefaultHarness, S as DEFAULT_TIERED_EXECUTION_CONFIG, T as init_tier_table, Tn as init_projects, Ur as packageRoot, V as getProviderForModelSync, Vr as init_paths, Wr as resolveOhmypiExtensionPath, Yn as init_issue_id, dt as fnv1a32, er as require_dist, et as init_roles, f as loadConfigSync, fn as findProjectByPathSync, ft as init_percent, gn as getIssuePrefix, hr as AGENTS_DIR, in as shouldCommitLegacyWorkspaceArtifacts, ir as FsError, it as getModelCapabilitySync, l as isClaudeCodeChannelsMcpEnabled, lt as resolveModelIdSync, mr as init_errors, nn as init_state_read_home, nr as ClaudeCredentialParseError, ot as hasModelCapabilitySync, q as init_openai_compatible_proxy, st as init_model_capabilities, t as init_config_yaml, tt as resolveModel, u as isTldrEnabledSync, ut as fmix32, vn as getProjectSwarmHotspots, yn as getProjectSync, zn as resolveProjectFromIssueSync } from "./config-yaml-DvyMuOle.js";
2
+ import { B as getProviderEnvSync, Br as getOverdeckHome, C as TIERED_EXECUTION_DIFFICULTIES, D as resolveTieredExecutionEnabled, Ft as resolveProjectForIssue, G as setupCredentialFileAuthSync, Gr as sessionFilePath, H as init_providers, Hr as isDevMode, It as writeAgentHarnessModelSync, K as ensureOpenAICompatibleProxyRunning, L as clearCredentialFileAuthSync, Mt as readIssueRecordForWorkspaceSync, Nr as encodeClaudeProjectDir, Nt as readIssueRecordSync, O as resolveTieredExecutionEnabledForIssue, Ot as init_record, Qn as resolveBareNumericIdSync, R as getBuiltInDefaultHarness, S as DEFAULT_TIERED_EXECUTION_CONFIG, T as init_tier_table, Tn as init_projects, Ur as packageRoot, V as getProviderForModelSync, Vr as init_paths, Wr as resolveOhmypiExtensionPath, Yn as init_issue_id, dt as fnv1a32, er as require_dist, et as init_roles, f as loadConfigSync, fn as findProjectByPathSync, ft as init_percent, gn as getIssuePrefix, hr as AGENTS_DIR, in as shouldCommitLegacyWorkspaceArtifacts, ir as FsError, it as getModelCapabilitySync, l as isClaudeCodeChannelsMcpEnabled, lt as resolveModelIdSync, mr as init_errors, nn as init_state_read_home, nr as ClaudeCredentialParseError, ot as hasModelCapabilitySync, q as init_openai_compatible_proxy, st as init_model_capabilities, t as init_config_yaml, tt as resolveModel, u as isTldrEnabledSync, ut as fmix32, vn as getProjectSwarmHotspots, yn as getProjectSync, zn as resolveProjectFromIssueSync } from "./config-yaml-DySPNmKN.js";
3
3
  import { a as init_activity_logger, n as emitActivityEntrySync, r as emitActivityTtsSync } from "./activity-logger-DDlOIAML.js";
4
- import { d as getOverdeckDatabaseSync, f as init_infra } from "./infra-CzaSOgul.js";
5
- import { $ as init_child_env, A as listPaneValues, D as killSession, E as isPaneDead, H as sessionExists, O as killSessionSync, P as listSessionsSync, R as sendEscapeKeyAsync, U as sessionExistsSync, V as sendRawKeystroke, W as setOption, X as BLANKED_PROVIDER_ENV, a as capturePaneSync, c as createSessionSync, i as capturePane, m as exactPaneTarget, s as createSession, w as init_tmux, z as sendKeys } from "./tmux-ftABRAmc.js";
6
- import { a as init_event_store, i as initEventStore } from "./event-store-tdiY5eDZ.js";
7
- import { a as OHMYPI_BEHAVIOR, o as getHarnessBehavior } from "./src-U7_kTPEE.js";
8
- import { D as listOverdeckAgentStatesSync, E as init_agent_state_sync, O as saveOverdeckAgentStateSync, T as getOverdeckAgentStateSync, h as resetPipelineVerdictsForWorkStartSync, l as init_review_status } from "./review-status-A7quS5KJ.js";
9
- import { i as countAgentsByStatus, o as init_agents$1 } from "./agents-B4Bjbkfv.js";
10
- import { n as ensureSessionContextBriefingFile, r as init_briefing_freshness } from "./briefing-freshness-DWdW7vUm.js";
11
- import { o as getPricingSync, s as init_cost } from "./cost-Ca0YTWDw.js";
12
- import { _ as init_tier_metrics, g as estimateFeedDeliveryTokens, v as recordTierFeedDelivery } from "./cost-sync-C0VdGme1.js";
13
- import { a as persistCurrentSessionId, d as isAgentStateServiceInProcess, i as logLauncherSessionPinned, l as getRuntimeSnapshot, n as createFreshSessionIdentity, o as init_persistent_logger, r as init_session_history, s as logAgentLifecycleSync, u as init_agent_runtime_mirror } from "./session-history-CVZDpS3c.js";
14
- import { t as init_behavior } from "./behavior-B_-4EKF3.js";
15
- import { i as ensureInternalTokenSync, s as init_internal_token, t as INTERNAL_TOKEN_HEADER } from "./internal-token-Bb4XeV2x.js";
4
+ import { d as getOverdeckDatabaseSync, f as init_infra } from "./infra-BEqFxlJc.js";
5
+ import { $ as init_child_env, A as listPaneValues, D as killSession, E as isPaneDead, H as sessionExists, O as killSessionSync, P as listSessionsSync, R as sendEscapeKeyAsync, U as sessionExistsSync, V as sendRawKeystroke, W as setOption, X as BLANKED_PROVIDER_ENV, a as capturePaneSync, c as createSessionSync, i as capturePane, m as exactPaneTarget, s as createSession, w as init_tmux, z as sendKeys } from "./tmux-R7N7y-Mh.js";
6
+ import { a as init_event_store, i as initEventStore } from "./event-store-CQL6NeqB.js";
7
+ import { a as OHMYPI_BEHAVIOR, o as getHarnessBehavior } from "./src-DtcUOZCq.js";
8
+ import { D as listOverdeckAgentStatesSync, E as init_agent_state_sync, O as saveOverdeckAgentStateSync, T as getOverdeckAgentStateSync, h as resetPipelineVerdictsForWorkStartSync, l as init_review_status } from "./review-status-kZj_KyCk.js";
9
+ import { i as countAgentsByStatus, o as init_agents$1 } from "./agents-EbI0zCJl.js";
10
+ import { n as ensureSessionContextBriefingFile, r as init_briefing_freshness } from "./briefing-freshness-D1wzUIWv.js";
11
+ import { o as getPricingSync, s as init_cost } from "./cost-B2ddP6wq.js";
12
+ import { _ as init_tier_metrics, g as estimateFeedDeliveryTokens, v as recordTierFeedDelivery } from "./cost-sync-BsN6ER0n.js";
13
+ import { a as persistCurrentSessionId, d as isAgentStateServiceInProcess, i as logLauncherSessionPinned, l as getRuntimeSnapshot, n as createFreshSessionIdentity, o as init_persistent_logger, r as init_session_history, s as logAgentLifecycleSync, u as init_agent_runtime_mirror } from "./session-history-BT3IvqhC.js";
14
+ import { t as init_behavior } from "./behavior-B3exJ42O.js";
15
+ import { i as ensureInternalTokenSync, s as init_internal_token, t as INTERNAL_TOKEN_HEADER } from "./internal-token-s0-oKybJ.js";
16
16
  import { i as readReviewStatusMap, n as init_review_status_source, r as isRoleTerminal } from "./review-status-source-CxuEjLGg.js";
17
- import { m as readWorkspacePlanSync, o as init_io } from "./io-B3_AHDfr.js";
18
- import { c as bridgeGeminiAuthToCliproxy, d as getCliproxyAuthDir, g as getCliproxyLogPath, l as decodeJwtPayload$1, p as getCliproxyClientEnv, s as bridgeCodexAuthToCliproxySync, v as init_cliproxy } from "./cliproxy-Bgb2XCqi.js";
19
- import { L as normalizeHarness, R as reactivateConversationForSpawn, S as getConversationByName, k as init_conversations, y as createConversation } from "./conversations-DbOs1e9Q.js";
20
- import { n as recordFeatureRegistryLifecycle, t as init_feature_registry_population } from "./feature-registry-population-B0pmAz0a.js";
21
- import { a as readCavemanVariant, n as init_workspace } from "./workspace-BVl4rihN.js";
22
- import { a as requireModelOverrideSync, i as normalizeModelOverrideSync, n as init_launcher_generator, o as shellQuoteModelIdSync, r as init_model_validation, t as generateLauncherScriptSync } from "./launcher-generator-CHVm7bGT.js";
23
- import { a as init_claude_permissions, r as getClaudePermissionFlagsStringSync } from "./claude-permissions-H_5wHQZQ.js";
24
- import { h as workspaceContextFile, o as init_layers } from "./layers-DzxSTGNA.js";
25
- import { a as extractThreadIdFromRollout, c as initCodexHome, l as init_codex, o as findLatestRollout } from "./codex-TmSi-yTv.js";
26
- import { n as init_harness_binary, r as prepareHarnessLaunch } from "./harness-binary-CVio2m-u.js";
27
- import { f as init_config, m as loadConfigSync$1 } from "./config-CCvjQf27.js";
28
- import { a as getFlywheelActiveRunIdSync, s as init_control_settings } from "./control-settings-aP1ANIlI.js";
29
- import { n as createTrackerFromConfig, r as init_factory, t as createTracker } from "./factory-CynerjXO.js";
30
- import { a as init_stack_health, i as getWorkspaceStackHealth } from "./stack-health-puygdaMd.js";
31
- import { i as createActiveSlice, l as init_dag, o as getDispatchableItems, s as groupItemsByWave } from "./dag-CdOjJVDT.js";
32
- import { c as generateFixedPointPromptSync, f as initHookSync, n as checkHookSync, p as init_hooks } from "./hooks-DUXw8A0-.js";
33
- import { n as resolveHarness, t as init_harness_resolve } from "./harness-resolve-qHJBhy3Z.js";
34
- import { a as loadCloisterConfigSync, r as init_config$1 } from "./config-DjLOdbgT.js";
35
- import { t as init_reap_terminal_sessions } from "./reap-terminal-sessions-N3BTkmX_.js";
36
- import { c as isStateMigrated, o as init_state_home } from "./state-home-CIGjwNfJ.js";
37
- import { n as provisionClaudeHooks, t as init_claude_hooks_provision } from "./claude-hooks-provision-but-_qGY.js";
38
- import { a as init_lifecycle_io, t as appendContinueSessionEntryForIssue } from "./lifecycle-io-D8iNBcux.js";
39
- import { r as init_swarm_readiness, t as analyzeSwarmReadiness } from "./swarm-readiness-CQ_fwUWF.js";
17
+ import { m as readWorkspacePlanSync, o as init_io } from "./io-C9kF1wtJ.js";
18
+ import { c as bridgeGeminiAuthToCliproxy, d as getCliproxyAuthDir, g as getCliproxyLogPath, l as decodeJwtPayload$1, p as getCliproxyClientEnv, s as bridgeCodexAuthToCliproxySync, v as init_cliproxy } from "./cliproxy-C8a1vtTU.js";
19
+ import { L as normalizeHarness, R as reactivateConversationForSpawn, S as getConversationByName, k as init_conversations, y as createConversation } from "./conversations-6AfUfbwc.js";
20
+ import { n as recordFeatureRegistryLifecycle, t as init_feature_registry_population } from "./feature-registry-population-DKZFMbFt.js";
21
+ import { a as readCavemanVariant, n as init_workspace } from "./workspace-BPUws1-_.js";
22
+ import { a as normalizeModelOverrideSync, i as init_model_validation, n as init_launcher_generator, o as requireModelOverrideSync, s as shellQuoteModelIdSync, t as generateLauncherScriptSync } from "./launcher-generator-BBWG_SiS.js";
23
+ import { a as init_claude_permissions, r as getClaudePermissionFlagsStringSync } from "./claude-permissions-DNWEVV6z.js";
24
+ import { E as init_layers, I as workspaceContextFile, P as resolveWorkspaceContextFile, c as init_render, i as workspaceContextWithoutProjectLayer, l as renderGlobalLayer, r as init_assemble, u as renderProjectLayer, v as init_harness, y as renderForHarness } from "./assemble-J2ZZ2C15.js";
25
+ import { a as extractThreadIdFromRollout, c as initCodexHome, l as init_codex, o as findLatestRollout } from "./codex-BZXGhUVB.js";
26
+ import { i as prepareHarnessLaunch, r as init_harness_binary } from "./harness-binary-DPUi-Pv8.js";
27
+ import { f as init_config, m as loadConfigSync$1 } from "./config-BZ0sHTju.js";
28
+ import { a as getFlywheelActiveRunIdSync, s as init_control_settings } from "./control-settings-BQp7_4uD.js";
29
+ import { n as createTrackerFromConfig, r as init_factory, t as createTracker } from "./factory-CFibJuaw.js";
30
+ import { a as getWorkspaceStackHealth, s as init_stack_health } from "./stack-health-DxSdG9cW.js";
31
+ import { i as createActiveSlice, l as init_dag, o as getDispatchableItems, s as groupItemsByWave } from "./dag-B1ucnjDU.js";
32
+ import { c as generateFixedPointPromptSync, f as initHookSync, n as checkHookSync, p as init_hooks } from "./hooks-CKZgXlJb.js";
33
+ import { n as resolveHarness, t as init_harness_resolve } from "./harness-resolve-3lNZkyT4.js";
34
+ import { a as loadCloisterConfigSync, r as init_config$1 } from "./config-CKxYiCmX.js";
35
+ import { t as init_reap_terminal_sessions } from "./reap-terminal-sessions-BtHPo6Xc.js";
36
+ import { c as isStateMigrated, o as init_state_home } from "./state-home-Cn_Qu8IX.js";
37
+ import { n as provisionClaudeHooks, t as init_claude_hooks_provision } from "./claude-hooks-provision-D8GXF3_s.js";
38
+ import { a as init_lifecycle_io, t as appendContinueSessionEntryForIssue } from "./lifecycle-io-BREGpnLk.js";
39
+ import { i as init_git_utils, o as renderWorkspaceGitShowPromise } from "./git-utils-CRw2zLPC.js";
40
+ import { r as init_swarm_readiness, t as analyzeSwarmReadiness } from "./swarm-readiness-DlP_UjHq.js";
40
41
  import { dirname, join, relative } from "node:path";
41
42
  import { Data, Duration, Effect, FileSystem } from "effect";
42
- import { appendFileSync, existsSync, mkdirSync, readFileSync, statSync, statfsSync, unlinkSync, writeFileSync } from "fs";
43
+ import { appendFileSync, existsSync, mkdirSync, readFileSync, rmSync, statSync, statfsSync, unlinkSync, writeFileSync } from "fs";
43
44
  import { basename as basename$1, dirname as dirname$1, join as join$1, resolve as resolve$1 } from "path";
44
45
  import { homedir } from "os";
45
46
  import { cpus as cpus$1, loadavg as loadavg$1, platform as platform$1, totalmem as totalmem$1 } from "node:os";
@@ -1827,6 +1828,33 @@ var init_agent_state = __esmMin((() => {
1827
1828
  function buildDefaultResumeContinueMessage(issueId) {
1828
1829
  return `You are resuming work on ${issueId}. Read .pan/continue.json for context and pick up where you left off — do not wait for further instructions.`;
1829
1830
  }
1831
+ /** Completed marker check: the agent dir's own markers, or the workspace's. */
1832
+ function hasCompletionMarkerForAgent(state) {
1833
+ const agentDir = getAgentDir(state.id);
1834
+ if (existsSync(join$1(agentDir, "completed")) || existsSync(join$1(agentDir, "completed.processed"))) return true;
1835
+ const workspace = state.workspace;
1836
+ if (workspace && (existsSync(join$1(workspace, ".pan", "completed")) || existsSync(join$1(workspace, ".pan", "completed.processed")))) return true;
1837
+ return false;
1838
+ }
1839
+ /**
1840
+ * PAN-2974 (root cause B): the resume kickoff is phase-aware. Telling an agent
1841
+ * whose work was already handed off (completed marker) to "pick up where you
1842
+ * left off — do not wait for further instructions" makes it re-drive pipeline
1843
+ * stages on its own authority — 2026-07-21 MIN-882: a post-reboot resume
1844
+ * re-ran verification, restored config, and fired `pan review request` /
1845
+ * `pan review restart` while the operator was mid-UAT on finished work.
1846
+ * A handed-off agent gets a PASSIVE restore instead; only agents that crashed
1847
+ * mid-implementation get the aggressive kickoff.
1848
+ */
1849
+ function buildResumeContinueMessage(state) {
1850
+ const issueId = state.issueId;
1851
+ if (hasCompletionMarkerForAgent(state)) return [
1852
+ `Your session for ${issueId} was restored after a restart.`,
1853
+ `The work was already handed off — a completed marker exists. Do NOT re-drive pipeline stages (review, test, verify, merge) on your own authority.`,
1854
+ `Stay available for the operator and act only on new instructions.`
1855
+ ].join(" ");
1856
+ return buildDefaultResumeContinueMessage(issueId);
1857
+ }
1830
1858
  async function buildResumeMessageForAgent(state, fallbackMessage, callerMessage) {
1831
1859
  if (state.role !== "work" || state.kickoffDelivered !== false) return {
1832
1860
  message: callerMessage ?? fallbackMessage,
@@ -2656,6 +2684,34 @@ var init_claude_auth = __esmMin((() => {
2656
2684
  });
2657
2685
  }));
2658
2686
  //#endregion
2687
+ //#region ../../lib/acp/context.ts
2688
+ function materializeAcpContextFile(agentDir, workspace) {
2689
+ const sections = [renderGlobalLayer("acp", isDevMode())];
2690
+ const project = findProjectByPathSync(workspace);
2691
+ if (project) sections.push(renderProjectLayer(project.path, "acp"));
2692
+ const workspaceFile = resolveWorkspaceContextFile(workspace);
2693
+ if (existsSync$1(workspaceFile)) {
2694
+ const workspaceContent = readFileSync$1(workspaceFile, "utf8");
2695
+ const workspaceOnly = project ? workspaceContextWithoutProjectLayer(workspaceContent) : workspaceContent;
2696
+ sections.push(renderForHarness(workspaceOnly, "acp").trim());
2697
+ }
2698
+ const content = sections.filter((section) => section.trim().length > 0).join(SECTION_SEPARATOR);
2699
+ const contextPath = join(agentDir, "acp-context.md");
2700
+ mkdirSync$1(dirname(contextPath), { recursive: true });
2701
+ writeFileSync$1(contextPath, `${content.trim()}\n`, { mode: 384 });
2702
+ return contextPath;
2703
+ }
2704
+ var SECTION_SEPARATOR;
2705
+ var init_context = __esmMin((() => {
2706
+ init_assemble();
2707
+ init_harness();
2708
+ init_layers();
2709
+ init_render();
2710
+ init_paths();
2711
+ init_projects();
2712
+ SECTION_SEPARATOR = "\n\n---\n\n";
2713
+ }));
2714
+ //#endregion
2659
2715
  //#region ../../lib/runtimes/ohmypi-fifo.ts
2660
2716
  /**
2661
2717
  * oh-my-pi (omp) RPC named-pipe lifecycle (PAN-1989).
@@ -2815,6 +2871,8 @@ async function writeLauncherScriptAtomic(launcherScript, content) {
2815
2871
  await rename$1(tmp, launcherScript);
2816
2872
  }
2817
2873
  async function claudeSystemPromptFiles(workspace, harness) {
2874
+ const behavior = getHarnessBehavior(harness);
2875
+ if (behavior.contextLayerKind === "acp") return [];
2818
2876
  const files = [];
2819
2877
  const contextFile = workspaceContextFile(workspace);
2820
2878
  try {
@@ -2824,14 +2882,13 @@ async function claudeSystemPromptFiles(workspace, harness) {
2824
2882
  if (!isNodeNotFound(error)) throw error;
2825
2883
  }
2826
2884
  files.push(await ensureSessionContextBriefingFile());
2827
- const behavior = getHarnessBehavior(harness);
2828
2885
  if (behavior.contextLayerKind === "pi") {
2829
- const { piGlobalContextFile } = await import("./context-layers-B3Nt58jl.js");
2886
+ const { piGlobalContextFile } = await import("./context-layers-BrPmE__h.js");
2830
2887
  const globalFile = piGlobalContextFile();
2831
2888
  if (existsSync(globalFile)) files.unshift(globalFile);
2832
2889
  }
2833
2890
  if (behavior.contextLayerKind === "codex") {
2834
- const { codexGlobalContextFile } = await import("./context-layers-B3Nt58jl.js");
2891
+ const { codexGlobalContextFile } = await import("./context-layers-BrPmE__h.js");
2835
2892
  const globalFile = codexGlobalContextFile();
2836
2893
  if (existsSync(globalFile)) files.unshift(globalFile);
2837
2894
  }
@@ -2887,6 +2944,18 @@ async function getOhmypiLauncherFields(agentId, model) {
2887
2944
  model
2888
2945
  };
2889
2946
  }
2947
+ function getAcpLauncherFields(agentId, model, workspace, binaryPath, _role) {
2948
+ return {
2949
+ harness: "acp",
2950
+ acpAgentId: agentId,
2951
+ acpProvider: getProviderForModelSync(model).name,
2952
+ acpWorkspace: workspace,
2953
+ acpBinaryPath: binaryPath,
2954
+ acpContextFile: materializeAcpContextFile(getAgentDir(agentId), workspace),
2955
+ model,
2956
+ unsetProviderEnv: true
2957
+ };
2958
+ }
2890
2959
  function getCodexLauncherFields(agentId, model, workspacePath, role) {
2891
2960
  const codexHome = join$1(homedir(), ".overdeck", "agents", agentId, "codex-home");
2892
2961
  const codexConfig = loadConfigSync().config.codex;
@@ -3048,12 +3117,45 @@ async function waitForCodexAppServerReady(agentId, timeoutSec = 30, deps = {}) {
3048
3117
  const detail = lastError ? ` Last status error: ${lastError}` : ` Last state: ${lastState}.`;
3049
3118
  throw new Error(`Timed out waiting for Codex app-server readiness for ${agentId}.${detail}`);
3050
3119
  }
3120
+ async function waitForAcpHostReady(agentId, timeoutSec = 30, deps = {}) {
3121
+ const now = deps.now ?? (() => Date.now());
3122
+ const sleep = deps.sleep ?? ((ms) => new Promise((resolveSleep) => setTimeout(resolveSleep, ms)));
3123
+ const sessionExistsForAgent = deps.sessionExists ?? (async (id) => Effect.runPromise(sessionExists(id)));
3124
+ const readText = deps.readText ?? ((path) => readFileSync(path, "utf8"));
3125
+ const pathExists = deps.pathExists ?? existsSync;
3126
+ const agentDir = getAgentDir(agentId);
3127
+ const sessionIdPath = join$1(agentDir, "acp-session-id");
3128
+ const errorPath = join$1(agentDir, "acp-launch-error");
3129
+ const tokenPath = join$1(agentDir, "acp-token");
3130
+ const socketPath = join$1(getOverdeckHome(), "sockets", `acp-${agentId}.sock`);
3131
+ const deadline = now() + timeoutSec * 1e3;
3132
+ while (now() < deadline) {
3133
+ if (pathExists(errorPath)) {
3134
+ const launchError = readText(errorPath).trim();
3135
+ if (launchError) throw new Error(`ACP host ${agentId} failed to start: ${launchError}`);
3136
+ }
3137
+ if (!await sessionExistsForAgent(agentId)) throw new Error(`ACP host session ${agentId} exited before readiness.`);
3138
+ try {
3139
+ const sessionId = readText(sessionIdPath).trim();
3140
+ const token = readText(tokenPath).trim();
3141
+ if (sessionId && token && pathExists(socketPath)) return;
3142
+ } catch (error) {
3143
+ if (!isNodeNotFound(error)) throw error;
3144
+ }
3145
+ await sleep(500);
3146
+ }
3147
+ throw new Error(`Timed out waiting for ACP host readiness for ${agentId}.`);
3148
+ }
3051
3149
  async function waitForPromptReady(agentId, harness, timeoutSec = 30) {
3052
3150
  const readinessKind = harness === "codex" && loadConfigSync().config.codex?.transport !== "tui" ? "codex-app-server-ready" : getHarnessBehavior(harness).readinessKind;
3053
3151
  if (readinessKind === "codex-app-server-ready") {
3054
3152
  await waitForCodexAppServerReady(agentId, timeoutSec);
3055
3153
  return true;
3056
3154
  }
3155
+ if (readinessKind === "acp-host-ready") {
3156
+ await waitForAcpHostReady(agentId, timeoutSec);
3157
+ return true;
3158
+ }
3057
3159
  if (readinessKind === "codex-tui-prompt") return waitForCodexTuiReady(agentId, timeoutSec);
3058
3160
  return waitForReadySignal(agentId, timeoutSec);
3059
3161
  }
@@ -3081,7 +3183,7 @@ async function injectPiPromptTimeMemory(agentId, prompt) {
3081
3183
  agentRole: agentState.role ?? "work",
3082
3184
  agentHarness: agentState.harness ?? "claude-code"
3083
3185
  };
3084
- const { injectPromptTimeMemory } = await import("./injection-oNZeoDhL.js");
3186
+ const { injectPromptTimeMemory } = await import("./injection-CPUIqNhI.js");
3085
3187
  const result = await injectPromptTimeMemory({
3086
3188
  prompt,
3087
3189
  identity,
@@ -3115,7 +3217,7 @@ async function injectPiConversationMemory(opts, prompt) {
3115
3217
  agentRole: "work",
3116
3218
  agentHarness: "ohmypi"
3117
3219
  };
3118
- const { injectPromptTimeMemory } = await import("./injection-oNZeoDhL.js");
3220
+ const { injectPromptTimeMemory } = await import("./injection-CPUIqNhI.js");
3119
3221
  const result = await injectPromptTimeMemory({
3120
3222
  prompt,
3121
3223
  identity,
@@ -3176,6 +3278,7 @@ async function getAgentRuntimeBaseCommand(model, agentName, agentDefinition, har
3176
3278
  const behavior = getHarnessBehavior(harness);
3177
3279
  if (behavior.launchCommandKind === "ohmypi-rpc") return `omp --mode rpc --model ${quotedModel}`;
3178
3280
  if (behavior.launchCommandKind === "codex-work-tui") return `codex`;
3281
+ if (behavior.launchCommandKind === "acp-host") return "acp-host";
3179
3282
  if (process.env.OVERDECK_TEST_HARNESS_COMMAND) return process.env.OVERDECK_TEST_HARNESS_COMMAND;
3180
3283
  const provider = getProviderForModelSync(validatedModel);
3181
3284
  const nameFlag = agentName ? ` --name ${agentName}` : "";
@@ -3273,6 +3376,7 @@ async function getRoleRuntimeBaseCommand(model, agentName, role, harness = "clau
3273
3376
  return `omp --mode rpc --model ${quotedModel}`;
3274
3377
  }
3275
3378
  if (behavior.launchCommandKind === "codex-work-tui") return `codex`;
3379
+ if (behavior.launchCommandKind === "acp-host") return "acp-host";
3276
3380
  if (process.env.OVERDECK_TEST_HARNESS_COMMAND) return process.env.OVERDECK_TEST_HARNESS_COMMAND;
3277
3381
  const provider = getProviderForModelSync(validatedModel);
3278
3382
  const requestedDefinitionPath = roleAgentDefinitionPath(role, subRole);
@@ -3297,6 +3401,7 @@ var init_runtime_command = __esmMin((() => {
3297
3401
  init_briefing_freshness();
3298
3402
  init_claude_auth();
3299
3403
  init_layers();
3404
+ init_context();
3300
3405
  init_behavior();
3301
3406
  init_codex();
3302
3407
  init_ohmypi_fifo();
@@ -3639,20 +3744,25 @@ async function transitionIssueToInReview(issueId, workspacePath) {
3639
3744
  async function buildAgentLaunchConfig(opts) {
3640
3745
  const model = requireModelOverrideSync(opts.model);
3641
3746
  try {
3642
- const { injectOverdeckInfraDeny } = await import("./claude-settings-overlay-BTENVmYf.js");
3747
+ const { injectOverdeckInfraDeny } = await import("./claude-settings-overlay-DWy-Bb4Y.js");
3643
3748
  await Effect.runPromise(injectOverdeckInfraDeny(opts.workspace));
3644
3749
  } catch (err) {
3645
3750
  console.warn(`[agents] injectOverdeckInfraDeny failed for ${opts.agentId} (non-fatal): ${err instanceof Error ? err.message : err}`);
3646
3751
  }
3647
- const providerEnv = await getProviderEnvForModel(model);
3648
- const provider = getProviderForModelSync(model);
3649
- if (provider.authType === "credential-file") setupCredentialFileAuthSync(provider, opts.workspace);
3650
- else clearCredentialFileAuthSync(opts.workspace);
3651
- const providerExports = await getProviderExportsForModel(model);
3652
- const launchRole = opts.isPlanning ? "plan" : opts.role;
3653
3752
  const behavior = getHarnessBehavior(opts.harness);
3753
+ const isAcp = behavior.launchCommandKind === "acp-host";
3754
+ const providerEnv = isAcp ? {} : await getProviderEnvForModel(model);
3755
+ if (!isAcp) {
3756
+ const provider = getProviderForModelSync(model);
3757
+ if (provider.authType === "credential-file") setupCredentialFileAuthSync(provider, opts.workspace);
3758
+ else clearCredentialFileAuthSync(opts.workspace);
3759
+ }
3760
+ const providerExports = isAcp ? void 0 : await getProviderExportsForModel(model);
3761
+ const launchRole = opts.isPlanning ? "plan" : opts.role;
3654
3762
  const piLauncherFields = behavior.usesRpcFifo ? await getOhmypiLauncherFields(opts.agentId, model) : {};
3655
3763
  const codexLauncherFields = behavior.usesCodexHome ? getCodexLauncherFields(opts.agentId, model, opts.workspace, launchRole) : {};
3764
+ if (isAcp && !opts.harnessBinaryPath) throw new Error("ACP launch requires the executable path resolved by preflight");
3765
+ const acpLauncherFields = isAcp ? getAcpLauncherFields(opts.agentId, model, opts.workspace, opts.harnessBinaryPath, launchRole) : {};
3656
3766
  if (opts.spawnMode === "resume" && opts.resumeSessionId) return {
3657
3767
  launcherContent: generateLauncherScriptSync({
3658
3768
  role: launchRole,
@@ -3663,7 +3773,7 @@ async function buildAgentLaunchConfig(opts) {
3663
3773
  providerExports,
3664
3774
  baseCommand: behavior.launchCommandKind !== "claude-code" ? await getAgentRuntimeBaseCommand(model, opts.agentId, launchRole, opts.harness) : `claude ${getClaudePermissionFlagsStringSync()}${roleSystemPromptInjectionSync(roleAgentDefinitionPath(launchRole))}`,
3665
3775
  resumeSessionId: opts.resumeSessionId,
3666
- model: behavior.launchCommandKind !== "claude-code" || providerExports.includes("ANTHROPIC_BASE_URL") ? model : void 0,
3776
+ model: behavior.launchCommandKind !== "claude-code" || providerExports?.includes("ANTHROPIC_BASE_URL") ? model : void 0,
3667
3777
  extraArgs: behavior.launchCommandKind !== "claude-code" ? void 0 : `--name ${opts.agentId}`,
3668
3778
  appendSystemPromptFiles: await claudeSystemPromptFiles(opts.workspace, opts.harness),
3669
3779
  extraEnvExports: opts.extraEnvExports,
@@ -3671,7 +3781,8 @@ async function buildAgentLaunchConfig(opts) {
3671
3781
  supervisorScriptPath: opts.supervisorScriptPath,
3672
3782
  promptInline: opts.promptInline,
3673
3783
  ...piLauncherFields,
3674
- ...codexLauncherFields
3784
+ ...codexLauncherFields,
3785
+ ...acpLauncherFields
3675
3786
  }),
3676
3787
  providerEnv
3677
3788
  };
@@ -3695,6 +3806,7 @@ async function buildAgentLaunchConfig(opts) {
3695
3806
  promptInline: opts.promptInline,
3696
3807
  ...piLauncherFields,
3697
3808
  ...codexLauncherFields,
3809
+ ...acpLauncherFields,
3698
3810
  ...opts.channelsBridgeMcpConfig ? {
3699
3811
  channelsBridgeMcpConfig: opts.channelsBridgeMcpConfig,
3700
3812
  channelsBridgeServerName: opts.channelsBridgeServerName ?? "overdeck-bridge"
@@ -3720,7 +3832,7 @@ async function retrieveSpawnTimeMemoryContext(input) {
3720
3832
  agentRole: input.role,
3721
3833
  agentHarness: input.harness
3722
3834
  };
3723
- const { injectPromptTimeMemory } = await import("./injection-oNZeoDhL.js");
3835
+ const { injectPromptTimeMemory } = await import("./injection-CPUIqNhI.js");
3724
3836
  return (await injectPromptTimeMemory({
3725
3837
  prompt: input.prompt,
3726
3838
  identity,
@@ -3811,7 +3923,7 @@ async function assertWorkspaceStackHealthyForSpawn(issueId, role, allowHost = fa
3811
3923
  record.attempts += 1;
3812
3924
  spawnStackRebuildState.set(normalizedIssue, record);
3813
3925
  console.log(`[agents] Workspace stack for ${normalizedIssue} unhealthy (${details}) — rebuilding before spawn (attempt ${record.attempts}/${SPAWN_STACK_REBUILD_MAX_ATTEMPTS})`);
3814
- const { rebuildWorkspaceStack } = await import("./rebuild-stack-kA7XngID.js");
3926
+ const { rebuildWorkspaceStack } = await import("./rebuild-stack-CFvcBHsS.js");
3815
3927
  const result = await Effect.runPromise(rebuildWorkspaceStack(issueId, { onProgress: (m) => console.log(`[agents] ${normalizedIssue} stack rebuild: ${m}`) })).catch((err) => ({
3816
3928
  success: false,
3817
3929
  error: err instanceof Error ? err.message : String(err)
@@ -4198,22 +4310,27 @@ async function appendChannelDeliveryLog(agentId, entry) {
4198
4310
  await (await import("fs/promises")).appendFile(join$1(dir, `bridge-${agentId}.log`), `${line}\n`, "utf-8");
4199
4311
  } catch {}
4200
4312
  }
4201
- function readAppServerTokenSync(agentId) {
4313
+ function readSocketTokenSync(agentId, filename) {
4202
4314
  try {
4203
- const tokenPath = join$1(overdeckHomeForSockets(), "agents", agentId, "appserver-token");
4315
+ const tokenPath = join$1(overdeckHomeForSockets(), "agents", agentId, filename);
4204
4316
  if (!existsSync(tokenPath)) return null;
4205
4317
  return readFileSync(tokenPath, "utf-8").trim() || null;
4206
4318
  } catch {
4207
4319
  return null;
4208
4320
  }
4209
4321
  }
4322
+ function readAppServerTokenSync(agentId) {
4323
+ return readSocketTokenSync(agentId, "appserver-token");
4324
+ }
4325
+ function readAcpTokenSync(agentId) {
4326
+ return readSocketTokenSync(agentId, "acp-token");
4327
+ }
4210
4328
  /**
4211
4329
  * POST a JSON body to a Unix-domain socket using node:net + a hand-rolled
4212
4330
  * minimal HTTP/1.1 request. Resolves on a 200-class response, rejects on any
4213
- * error including socket-not-found, connection refused, write timeout, or
4214
- * non-2xx status. Kept tiny on purpose: this is a hot path, only one caller,
4215
- * and the whole point of a fallback to tmux is that we do not need a robust
4216
- * HTTP client here.
4331
+ * error including socket-not-found, connection refused, an optional client
4332
+ * timeout, or non-2xx status. Kept tiny on purpose because this is a hot path
4333
+ * and these local protocol hosts need only a narrow HTTP client.
4217
4334
  */
4218
4335
  async function postUnixSocketJson(socketPath, body, timeoutMs, token, tokenHeader = BRIDGE_TOKEN_HEADER) {
4219
4336
  const payload = JSON.stringify(body);
@@ -4264,10 +4381,12 @@ async function postUnixSocketJson(socketPath, body, timeoutMs, token, tokenHeade
4264
4381
  finishErr(/* @__PURE__ */ new Error(`socket POST: status ${status}: ${responseBody.slice(0, 100)}`));
4265
4382
  });
4266
4383
  });
4267
- timeout = setTimeout(() => {
4268
- req.destroy(/* @__PURE__ */ new Error("socket POST timeout"));
4269
- }, timeoutMs);
4270
- timeout.unref?.();
4384
+ if (timeoutMs !== void 0) {
4385
+ timeout = setTimeout(() => {
4386
+ req.destroy(/* @__PURE__ */ new Error("socket POST timeout"));
4387
+ }, timeoutMs);
4388
+ timeout.unref?.();
4389
+ }
4271
4390
  req.on("error", (err) => {
4272
4391
  finishErr(err);
4273
4392
  });
@@ -4277,8 +4396,9 @@ async function postUnixSocketJson(socketPath, body, timeoutMs, token, tokenHeade
4277
4396
  }
4278
4397
  /**
4279
4398
  * Single delivery primitive for orchestrator-to-work-agent messages. Auto mode
4280
- * tries the PTY supervisor socket, then legacy Channels MCP, then tmux. Explicit
4281
- * socket methods are strict and throw instead of falling back.
4399
+ * tries persistent protocol hosts, the PTY supervisor socket, legacy Channels
4400
+ * MCP, then tmux. Explicit socket methods and ACP targets are strict: ACP prompts
4401
+ * cannot fall back to terminal injection because only session/prompt reaches the agent.
4282
4402
  */
4283
4403
  async function deliverAgentMessage(agentId, message, caller = "unknown", deliveryMethod) {
4284
4404
  const normalizedId = normalizeAgentId(agentId);
@@ -4292,6 +4412,8 @@ async function deliverAgentMessage(agentId, message, caller = "unknown", deliver
4292
4412
  } catch {
4293
4413
  resolvedMethod ??= "auto";
4294
4414
  }
4415
+ const isAcpTarget = state?.harness === "acp";
4416
+ if (isAcpTarget && resolvedMethod !== "auto") throw new Error(`MessageDeliveryFailed: ACP delivery failed for ${normalizedId} (${caller}): ACP requires authenticated host RPC delivery`);
4295
4417
  if (resolvedMethod === "tmux") {
4296
4418
  await assertTmuxTargetCanReceive(normalizedId, caller);
4297
4419
  await Effect.runPromise(sendKeys(normalizedId, message));
@@ -4301,7 +4423,7 @@ async function deliverAgentMessage(agentId, message, caller = "unknown", deliver
4301
4423
  };
4302
4424
  }
4303
4425
  let appServerFailure;
4304
- if (resolvedMethod === "auto") {
4426
+ if (resolvedMethod === "auto" && !isAcpTarget) {
4305
4427
  const appServerSocketPath = join$1(overdeckHomeForSockets(), "sockets", `appserver-${normalizedId}.sock`);
4306
4428
  if (existsSync(appServerSocketPath)) {
4307
4429
  const appServerToken = readAppServerTokenSync(normalizedId);
@@ -4327,6 +4449,39 @@ async function deliverAgentMessage(agentId, message, caller = "unknown", deliver
4327
4449
  }
4328
4450
  }
4329
4451
  }
4452
+ let acpFailure;
4453
+ if (resolvedMethod === "auto") {
4454
+ const acpSocketPath = join$1(overdeckHomeForSockets(), "sockets", `acp-${normalizedId}.sock`);
4455
+ const acpSocketExists = existsSync(acpSocketPath);
4456
+ if (isAcpTarget || acpSocketExists) {
4457
+ const acpToken = readAcpTokenSync(normalizedId);
4458
+ if (!acpSocketExists) acpFailure = "socket-missing";
4459
+ else if (!acpToken) acpFailure = "acp-token-missing";
4460
+ else try {
4461
+ await postUnixSocketJson(acpSocketPath, {
4462
+ op: "message",
4463
+ content: message,
4464
+ meta: { caller }
4465
+ }, 8e3, acpToken);
4466
+ await appendChannelDeliveryLog(normalizedId, {
4467
+ path: "acp",
4468
+ caller
4469
+ });
4470
+ return {
4471
+ ok: true,
4472
+ path: "acp"
4473
+ };
4474
+ } catch (err) {
4475
+ acpFailure = `socket-post-failed: ${err instanceof Error ? err.message : String(err)}`;
4476
+ }
4477
+ await appendChannelDeliveryLog(normalizedId, {
4478
+ path: "acp",
4479
+ reason: acpFailure,
4480
+ caller
4481
+ });
4482
+ throw new Error(`MessageDeliveryFailed: ACP delivery failed for ${normalizedId} (${caller}): ${acpFailure}`);
4483
+ }
4484
+ }
4330
4485
  let supervisorFailure;
4331
4486
  if (resolvedMethod === "auto" || resolvedMethod === "supervisor") {
4332
4487
  const supervisorSocketPath = join$1(overdeckHomeForSockets(), "sockets", `pty-${normalizedId}.sock`);
@@ -4383,6 +4538,7 @@ async function deliverAgentMessage(agentId, message, caller = "unknown", deliver
4383
4538
  reason: channelFailure,
4384
4539
  caller,
4385
4540
  ...appServerFailure ? { appServer: appServerFailure } : {},
4541
+ ...acpFailure ? { acp: acpFailure } : {},
4386
4542
  ...supervisorFailure ? { "pty-supervisor": supervisorFailure } : {},
4387
4543
  ...channelFailure ? { channels: channelFailure } : {}
4388
4544
  });
@@ -4915,6 +5071,12 @@ function stopAgentSync(agentId) {
4915
5071
  killSessionSync(normalizedId);
4916
5072
  }
4917
5073
  killLauncherProcessSync(normalizedId);
5074
+ try {
5075
+ rmSync(join$1(AGENTS_DIR, normalizedId, "git-guard"), {
5076
+ recursive: true,
5077
+ force: true
5078
+ });
5079
+ } catch {}
4918
5080
  const state = getAgentStateSync(normalizedId);
4919
5081
  if (state) {
4920
5082
  if (!state.id) state.id = normalizedId;
@@ -4969,6 +5131,14 @@ var init_termination = __esmMin((() => {
4969
5131
  throw cause;
4970
5132
  }
4971
5133
  }).pipe(Effect.catch(() => Effect.void));
5134
+ yield* Effect.promise(async () => {
5135
+ try {
5136
+ await rm$1(join$1(AGENTS_DIR, normalizedId, "git-guard"), {
5137
+ recursive: true,
5138
+ force: true
5139
+ });
5140
+ } catch {}
5141
+ });
4972
5142
  const state = yield* getAgentState(normalizedId);
4973
5143
  if (state) {
4974
5144
  if (!state.id) state.id = normalizedId;
@@ -5054,18 +5224,18 @@ async function spawnRun(issueId, role, options = {}) {
5054
5224
  let reapWarmIdle = false;
5055
5225
  const advancing = role === "review" || role === "test" || role === "ship";
5056
5226
  try {
5057
- const { isPaneDead } = await import("./tmux-DoThH6aj.js");
5227
+ const { isPaneDead } = await import("./tmux-B6z7h_vZ.js");
5058
5228
  if (await Effect.runPromise(isPaneDead(agentId))) reapWarmIdle = true;
5059
5229
  else if (advancing) {
5060
- const { getReviewStatusSync } = await import("./review-status-C6n6-9f_.js");
5061
- const { isRoleTerminal } = await import("./reap-terminal-sessions-MWnqdLCJ.js");
5230
+ const { getReviewStatusSync } = await import("./review-status-btEYlaxA.js");
5231
+ const { isRoleTerminal } = await import("./reap-terminal-sessions-7KeHv1R1.js");
5062
5232
  const status = getReviewStatusSync(issueId);
5063
5233
  reapWarmIdle = !!status && isRoleTerminal(role, status);
5064
5234
  }
5065
5235
  } catch {}
5066
5236
  if (!reapWarmIdle) throw new Error(`Role run ${agentId} already running. Use 'pan tell' to message it.`);
5067
5237
  console.log(`[spawn] ${agentId} is warm-idle from the previous cycle — reaping it for the new ${role} dispatch (PAN-2579)`);
5068
- const { killSession } = await import("./tmux-DoThH6aj.js");
5238
+ const { killSession } = await import("./tmux-B6z7h_vZ.js");
5069
5239
  await Effect.runPromise(killSession(agentId)).catch(() => {});
5070
5240
  }
5071
5241
  await assertWorkspaceStackHealthyForSpawn(issueId, role, options.allowHost, workspace);
@@ -5075,11 +5245,12 @@ async function spawnRun(issueId, role, options = {}) {
5075
5245
  role,
5076
5246
  model: selectedModel
5077
5247
  });
5248
+ const isAcp = getHarnessBehavior(resolvedHarness).launchCommandKind === "acp-host";
5078
5249
  const harnessLaunch = await prepareHarnessLaunch(resolvedHarness);
5079
5250
  assertCodexNativeAuthForSpawn(resolvedHarness, listAgentStates());
5080
5251
  await ensureLifecycleHooksBeforeLaunch(agentId, resolvedHarness);
5081
5252
  if (getProviderForModelSync(selectedModel).name === "openai" && await getProviderAuthMode(selectedModel) === "subscription") {
5082
- const { isCliproxyRunning } = await import("./cliproxy-DW0V86F8.js");
5253
+ const { isCliproxyRunning } = await import("./cliproxy-fHfIeiGd.js");
5083
5254
  if (!await Effect.runPromise(isCliproxyRunning())) throw new Error("CLIProxyAPI sidecar is not running. GPT subscription role runs route through a local cliproxy process managed by `pan up`. Run `pan up` (or restart the dashboard) before spawning a GPT role run.");
5084
5255
  }
5085
5256
  const state = {
@@ -5102,6 +5273,7 @@ async function spawnRun(issueId, role, options = {}) {
5102
5273
  const shouldDeliverPromptViaTmux = shouldRegisterConversation && resolvedHarness === "claude-code";
5103
5274
  const shouldDeliverPromptViaPi = shouldRegisterConversation && resolvedHarness === "ohmypi";
5104
5275
  const shouldDeliverPromptViaCodexTui = shouldRegisterConversation && resolvedHarness === "codex";
5276
+ const shouldDeliverPromptViaAcp = resolvedHarness === "acp";
5105
5277
  const prompt = options.prompt ? await withSpawnTimeMemoryContext({
5106
5278
  prompt: options.prompt,
5107
5279
  issueId,
@@ -5112,26 +5284,29 @@ async function spawnRun(issueId, role, options = {}) {
5112
5284
  }) : "";
5113
5285
  let promptFile;
5114
5286
  const tracksKickoffDelivery = role === "flywheel";
5115
- if (prompt && (tracksKickoffDelivery || !shouldDeliverPromptViaTmux && !shouldDeliverPromptViaPi && !shouldDeliverPromptViaCodexTui)) {
5287
+ if (prompt && !shouldDeliverPromptViaAcp && (tracksKickoffDelivery || !shouldDeliverPromptViaTmux && !shouldDeliverPromptViaPi && !shouldDeliverPromptViaCodexTui)) {
5116
5288
  promptFile = join$1(getAgentDir(agentId), "initial-prompt.md");
5117
5289
  await writeFile$1(promptFile, prompt);
5118
- if (tracksKickoffDelivery) {
5119
- state.kickoffDelivered = false;
5120
- await Effect.runPromise(saveAgentState(state));
5121
- }
5122
5290
  }
5123
- const provider = getProviderForModelSync(selectedModel);
5124
- if (provider.authType === "credential-file") setupCredentialFileAuthSync(provider, workspace);
5125
- else clearCredentialFileAuthSync(workspace);
5126
- const providerExports = await getProviderExportsForModel(selectedModel);
5127
- const providerEnv = await getProviderEnvForModel(selectedModel);
5291
+ if (prompt && tracksKickoffDelivery) {
5292
+ state.kickoffDelivered = false;
5293
+ await Effect.runPromise(saveAgentState(state));
5294
+ }
5295
+ if (!isAcp) {
5296
+ const provider = getProviderForModelSync(selectedModel);
5297
+ if (provider.authType === "credential-file") setupCredentialFileAuthSync(provider, workspace);
5298
+ else clearCredentialFileAuthSync(workspace);
5299
+ }
5300
+ const providerExports = isAcp ? void 0 : await getProviderExportsForModel(selectedModel);
5301
+ const providerEnv = isAcp ? {} : await getProviderEnvForModel(selectedModel);
5128
5302
  const piLauncherFields = resolvedHarness === "ohmypi" ? await getOhmypiLauncherFields(agentId, selectedModel) : {};
5129
5303
  const codexLauncherFields = resolvedHarness === "codex" ? getCodexLauncherFields(agentId, selectedModel, workspace, role) : {};
5304
+ const acpLauncherFields = isAcp ? getAcpLauncherFields(agentId, selectedModel, workspace, harnessLaunch.binaryPath, role) : {};
5130
5305
  let sessionId;
5131
5306
  let rawSessionId;
5132
5307
  if (shouldRegisterConversation) {
5133
- rawSessionId = options.resumeSessionId ?? randomUUID();
5134
- try {
5308
+ rawSessionId = isAcp ? options.resumeSessionId : options.resumeSessionId ?? randomUUID();
5309
+ if (!isAcp && rawSessionId) try {
5135
5310
  const agentDir = getAgentDir(agentId);
5136
5311
  await mkdir$1(agentDir, { recursive: true });
5137
5312
  await writeFile$1(join$1(agentDir, "session.id"), rawSessionId, "utf-8");
@@ -5184,14 +5359,15 @@ async function spawnRun(issueId, role, options = {}) {
5184
5359
  reviewSignal: void 0,
5185
5360
  trapHup: void 0,
5186
5361
  ...piLauncherFields,
5187
- ...codexLauncherFields
5362
+ ...codexLauncherFields,
5363
+ ...acpLauncherFields
5188
5364
  });
5189
5365
  const launcherScript = join$1(getAgentDir(agentId), "launcher.sh");
5190
5366
  await writeLauncherScriptAtomic(launcherScript, launcherContent);
5191
5367
  const claudeCmd = `bash ${launcherScript}`;
5192
5368
  console.log(`[claude-invoke] purpose=role-run | role=${role} | model=${state.model} | source=agents.ts:spawnRun | session=${agentId} | command="${claudeCmd}"`);
5193
5369
  try {
5194
- const { preTrustDirectory } = await import("./workspace-manager-ZTdJAy9M.js");
5370
+ const { preTrustDirectory } = await import("./workspace-manager-CWT55qeI.js");
5195
5371
  preTrustDirectory(workspace);
5196
5372
  } catch {}
5197
5373
  clearReadySignal(agentId);
@@ -5216,7 +5392,22 @@ async function spawnRun(issueId, role, options = {}) {
5216
5392
  await Effect.runPromise(setOption(agentId, "destroy-unattached", "off"));
5217
5393
  await Effect.runPromise(setOption(exactPaneTarget(agentId), "remain-on-exit", "on"));
5218
5394
  if (prompt) {
5219
- if (shouldDeliverPromptViaPi) try {
5395
+ if (shouldDeliverPromptViaAcp) try {
5396
+ await waitForPromptReady(agentId, resolvedHarness, 30);
5397
+ const delivery = await deliverAgentMessage(agentId, prompt, "spawnRun:initial-prompt");
5398
+ if (!delivery.ok) throw new Error(delivery.failure ?? `ACP delivery returned ok=false via ${delivery.path}`);
5399
+ if (tracksKickoffDelivery) {
5400
+ state.kickoffDelivered = true;
5401
+ await Effect.runPromise(saveAgentState(state));
5402
+ }
5403
+ } catch (err) {
5404
+ const message = err instanceof Error ? err.message : String(err);
5405
+ console.error(`[${agentId}] ACP prompt delivery failed:`, message);
5406
+ if (tracksKickoffDelivery) await recordKickoffDeliveryFailure(state, issueId, role);
5407
+ await Effect.runPromise(stopAgent(agentId));
5408
+ throw new Error(`Agent ${agentId} kickoff delivery failed: ${message}`);
5409
+ }
5410
+ else if (shouldDeliverPromptViaPi) try {
5220
5411
  await writeOhmypiAgentPrompt(agentId, prompt);
5221
5412
  if (tracksKickoffDelivery) {
5222
5413
  state.kickoffDelivered = true;
@@ -5271,7 +5462,7 @@ async function spawnAgent(options) {
5271
5462
  });
5272
5463
  console.log(`[DEBUG] Selected model: ${selectedModel}`);
5273
5464
  if (getProviderForModelSync(selectedModel).name === "openai" && await getProviderAuthMode(selectedModel) === "subscription") {
5274
- const { isCliproxyRunning } = await import("./cliproxy-DW0V86F8.js");
5465
+ const { isCliproxyRunning } = await import("./cliproxy-fHfIeiGd.js");
5275
5466
  if (!await Effect.runPromise(isCliproxyRunning())) throw new Error("CLIProxyAPI sidecar is not running. GPT subscription agents route through a local cliproxy process managed by `pan up`. Run `pan up` (or restart the dashboard) before spawning a GPT agent.");
5276
5467
  }
5277
5468
  const resolvedHarness = await resolveHarness({
@@ -5279,6 +5470,7 @@ async function spawnAgent(options) {
5279
5470
  role,
5280
5471
  model: selectedModel
5281
5472
  });
5473
+ const isAcp = getHarnessBehavior(resolvedHarness).launchCommandKind === "acp-host";
5282
5474
  const harnessLaunch = await prepareHarnessLaunch(resolvedHarness);
5283
5475
  assertCodexNativeAuthForSpawn(resolvedHarness, listAgentStates());
5284
5476
  await ensureLifecycleHooksBeforeLaunch(agentId, resolvedHarness);
@@ -5301,7 +5493,7 @@ async function spawnAgent(options) {
5301
5493
  if (role === "work") {
5302
5494
  try {
5303
5495
  if (resetPipelineVerdictsForWorkStartSync(options.issueId)) {
5304
- const { resetPostMergeState } = await import("./merge-agent-BQM3a8z5.js");
5496
+ const { resetPostMergeState } = await import("./merge-agent-CKkgIBPB.js");
5305
5497
  resetPostMergeState(options.issueId);
5306
5498
  }
5307
5499
  } catch (err) {
@@ -5312,7 +5504,7 @@ async function spawnAgent(options) {
5312
5504
  });
5313
5505
  }
5314
5506
  if (role === "work") try {
5315
- const { writeStoryFeatureContext } = await import("./work-agent-prompt-Yb2bd3Fq.js");
5507
+ const { writeStoryFeatureContext } = await import("./work-agent-prompt-Du8Vh2aJ.js");
5316
5508
  await writeStoryFeatureContext(options.workspace, options.issueId);
5317
5509
  } catch (ctxErr) {
5318
5510
  console.warn(`[agents] Could not write story feature context for ${options.issueId}: ${ctxErr.message}`);
@@ -5351,17 +5543,15 @@ async function spawnAgent(options) {
5351
5543
  });
5352
5544
  const promptFile = join$1(getAgentDir(agentId), "initial-prompt.md");
5353
5545
  const tracksKickoffDelivery = role === "work" || role === "strike";
5354
- if (prompt) {
5355
- await writeFile$1(promptFile, prompt);
5356
- if (tracksKickoffDelivery) {
5357
- state.kickoffDelivered = false;
5358
- saveAgentStateSync(state);
5359
- }
5546
+ if (prompt && !isAcp) await writeFile$1(promptFile, prompt);
5547
+ if (prompt && tracksKickoffDelivery) {
5548
+ state.kickoffDelivered = false;
5549
+ saveAgentStateSync(state);
5360
5550
  }
5361
5551
  try {
5362
5552
  const venvPath = join$1(options.workspace, ".venv");
5363
5553
  if (isTldrEnabledSync() && existsSync(venvPath)) {
5364
- const { getTldrDaemonServiceSync } = await import("./tldr-daemon-DL566HbH.js");
5554
+ const { getTldrDaemonServiceSync } = await import("./tldr-daemon-BYFkts95.js");
5365
5555
  const tldrService = getTldrDaemonServiceSync(options.workspace, venvPath);
5366
5556
  if (!(await tldrService.getStatus()).running) {
5367
5557
  await tldrService.start(true);
@@ -5391,6 +5581,7 @@ async function spawnAgent(options) {
5391
5581
  useSupervisor: supervisorLaunch.useSupervisor,
5392
5582
  supervisorScriptPath: supervisorLaunch.supervisorScriptPath,
5393
5583
  harness: state.harness ?? "claude-code",
5584
+ harnessBinaryPath: harnessLaunch.binaryPath,
5394
5585
  sessionId: state.sessionId,
5395
5586
  extraEnvExports: [harnessLaunch.pathExport, ...flywheelEnvExports(flywheelEnv)],
5396
5587
  effort: options.effort
@@ -5401,13 +5592,13 @@ async function spawnAgent(options) {
5401
5592
  const claudeCmd = `bash ${launcherScript}`;
5402
5593
  console.log(`[claude-invoke] purpose=work-agent | model=${state.model} | source=agents.ts:spawnAgent | session=${agentId} | command="${claudeCmd}"`);
5403
5594
  try {
5404
- const { preTrustDirectory } = await import("./workspace-manager-ZTdJAy9M.js");
5595
+ const { preTrustDirectory } = await import("./workspace-manager-CWT55qeI.js");
5405
5596
  preTrustDirectory(options.workspace);
5406
5597
  } catch {}
5407
5598
  try {
5408
- const { isGitHubAppConfigured, generateInstallationToken, configureWorkspaceForBot } = await import("./github-app-CPfoFAdV.js");
5599
+ const { isGitHubAppConfigured, generateInstallationToken, configureWorkspaceForBot } = await import("./github-app-ClZ2lk8D.js");
5409
5600
  if (isGitHubAppConfigured()) {
5410
- const { findProjectByPathSync } = await import("./projects-9SkRpES9.js");
5601
+ const { findProjectByPathSync } = await import("./projects-vjjcmiN8.js");
5411
5602
  const ghRepo = findProjectByPathSync(resolve$1(options.workspace, "..", ".."))?.github_repo;
5412
5603
  if (ghRepo) {
5413
5604
  const [owner, repo] = ghRepo.split("/");
@@ -5437,7 +5628,22 @@ async function spawnAgent(options) {
5437
5628
  sessionHarness: resolvedHarness
5438
5629
  });
5439
5630
  const dismissChannelsDialogPromise = channelsBridgeMcpConfig ? dismissDevChannelsDialog(agentId).catch(() => void 0) : null;
5440
- if (prompt && resolvedHarness === "ohmypi") try {
5631
+ if (prompt && isAcp) try {
5632
+ await waitForPromptReady(agentId, resolvedHarness, 30);
5633
+ const delivery = await deliverAgentMessage(agentId, prompt, "spawnAgent:initial-prompt");
5634
+ if (!delivery.ok) throw new Error(delivery.failure ?? `ACP delivery returned ok=false via ${delivery.path}`);
5635
+ if (tracksKickoffDelivery) {
5636
+ state.kickoffDelivered = true;
5637
+ saveAgentStateSync(state);
5638
+ }
5639
+ } catch (err) {
5640
+ const message = err instanceof Error ? err.message : String(err);
5641
+ console.error(`[${agentId}] ACP prompt delivery failed:`, message);
5642
+ if (tracksKickoffDelivery) await recordKickoffDeliveryFailure(state, options.issueId, role);
5643
+ await Effect.runPromise(stopAgent(agentId));
5644
+ throw new Error(`Agent ${agentId} kickoff delivery failed: ${message}`);
5645
+ }
5646
+ else if (prompt && resolvedHarness === "ohmypi") try {
5441
5647
  await writeOhmypiAgentPrompt(agentId, prompt);
5442
5648
  if (tracksKickoffDelivery) {
5443
5649
  state.kickoffDelivered = true;
@@ -5470,7 +5676,7 @@ async function spawnAgent(options) {
5470
5676
  const codexHomeForAgent = join$1(homedir(), ".overdeck", "agents", agentId, "codex-home");
5471
5677
  (async () => {
5472
5678
  try {
5473
- const { waitForCodexRollout, extractThreadIdFromRollout, writeThreadId } = await import("./codex-Dg7Is5yb.js");
5679
+ const { waitForCodexRollout, extractThreadIdFromRollout, writeThreadId } = await import("./codex-GcHuUF-k.js");
5474
5680
  const rollout = await waitForCodexRollout(codexHomeForAgent, 12e4);
5475
5681
  if (rollout) {
5476
5682
  const threadId = extractThreadIdFromRollout(rollout);
@@ -6098,6 +6304,11 @@ function pickFreshestExistingSessionIdSync(agentId, candidates) {
6098
6304
  function getLatestSessionIdSync(agentId) {
6099
6305
  const codexThreadId = resolveCodexThreadIdSync(agentId);
6100
6306
  if (codexThreadId) return codexThreadId;
6307
+ const agentState = getAgentStateSync(agentId);
6308
+ if (agentState?.harness && getHarnessBehavior(agentState.harness).sessionIdSource === "acp-session-id") try {
6309
+ const acpSessionId = readFileSync(join$1(getAgentDir(agentId), "acp-session-id"), "utf-8").trim();
6310
+ if (acpSessionId) return acpSessionId;
6311
+ } catch {}
6101
6312
  const fromSessionFile = getSessionId(agentId);
6102
6313
  if (fromSessionFile) return fromSessionFile;
6103
6314
  const sessionsFile = join$1(getAgentDir(agentId), "sessions.json");
@@ -6119,7 +6330,6 @@ function getLatestSessionIdSync(agentId) {
6119
6330
  if (threadId) return threadId;
6120
6331
  }
6121
6332
  } catch {}
6122
- const agentState = getAgentStateSync(agentId);
6123
6333
  if (agentState?.harness && getHarnessBehavior(agentState.harness).sessionIdSource === "transcript-jsonl") {
6124
6334
  const ohmypiSessionId = resolveLatestOhmypiSessionId(agentId);
6125
6335
  if (ohmypiSessionId) return ohmypiSessionId;
@@ -6200,6 +6410,10 @@ function queueAgentMail(agentId, message, pendingTurnEndDelivery = false) {
6200
6410
  mkdirSync(mailDir, { recursive: true });
6201
6411
  writeFileSync(join$1(mailDir, `${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}${pendingTurnEndDelivery ? ".pending" : ""}.md`), `# Message\n\n${message}\n`);
6202
6412
  }
6413
+ function resolveAgentDeliveryMethod(state) {
6414
+ if (state?.harness === "acp") return "auto";
6415
+ return resilientDeliveryMethod(state?.deliveryMethod);
6416
+ }
6203
6417
  function claimCodexIdleTurn(agentId) {
6204
6418
  try {
6205
6419
  unlinkSync(join$1(getAgentDir(agentId), "turn-completed"));
@@ -6244,7 +6458,11 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
6244
6458
  queueAgentMail(normalizedId, message);
6245
6459
  logAgentLifecycleSync(normalizedId, `messageAgent queued mail without resume: ${gateBlockReason}`);
6246
6460
  console.log(`[agents] Queued message for ${normalizedId}; ${gateBlockReason}`);
6247
- return;
6461
+ return {
6462
+ delivered: false,
6463
+ queuedToMail: true,
6464
+ reason: gateBlockReason
6465
+ };
6248
6466
  }
6249
6467
  if (getAgentRuntimeStateSync(normalizedId)?.state === "suspended") {
6250
6468
  const suspendedGate = decideMessageGate();
@@ -6253,15 +6471,22 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
6253
6471
  queueAgentMail(normalizedId, message);
6254
6472
  logAgentLifecycleSync(normalizedId, `messageAgent queued mail without resume: ${gateBlockReason}`);
6255
6473
  console.log(`[agents] Queued message for ${normalizedId}; ${gateBlockReason}`);
6256
- return;
6474
+ return {
6475
+ delivered: false,
6476
+ queuedToMail: true,
6477
+ reason: gateBlockReason
6478
+ };
6257
6479
  }
6258
6480
  console.log(`[agents] Auto-resuming suspended agent ${normalizedId} to deliver message`);
6259
- const { resumeAgent } = await import("./agents-FlIgQ3ql.js");
6481
+ const { resumeAgent } = await import("./agents-wi9NWzs2.js");
6260
6482
  const result = await resumeAgent(normalizedId, message);
6261
6483
  if (!result.success) throw new Error(`Failed to auto-resume agent: ${result.error}`);
6262
6484
  if (result.messageDelivered === false) throw new Error(`Agent resumed but ready signal did not fire — message not delivered. Feedback is in the mail queue.`);
6263
6485
  await appendTellInterventionForUserSource(normalizedId, caller);
6264
- return;
6486
+ return {
6487
+ delivered: true,
6488
+ queuedToMail: false
6489
+ };
6265
6490
  }
6266
6491
  if (agentState && agentState.status === "stopped") {
6267
6492
  const stoppedGate = decideMessageGate();
@@ -6270,16 +6495,23 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
6270
6495
  queueAgentMail(normalizedId, message);
6271
6496
  logAgentLifecycleSync(normalizedId, `messageAgent queued mail without resume: ${gateBlockReason}`);
6272
6497
  console.log(`[agents] Queued message for ${normalizedId}; ${gateBlockReason}`);
6273
- return;
6498
+ return {
6499
+ delivered: false,
6500
+ queuedToMail: true,
6501
+ reason: gateBlockReason
6502
+ };
6274
6503
  }
6275
6504
  console.log(`[agents] Auto-resuming stopped agent ${normalizedId} to deliver feedback (session exists: ${await Effect.runPromise(sessionExists(normalizedId))})`);
6276
- const { resumeAgent } = await import("./agents-FlIgQ3ql.js");
6505
+ const { resumeAgent } = await import("./agents-wi9NWzs2.js");
6277
6506
  const resumeResult = await resumeAgent(normalizedId, message);
6278
6507
  queueAgentMail(normalizedId, message);
6279
6508
  if (resumeResult.success && resumeResult.messageDelivered !== false) {
6280
6509
  await appendTellInterventionForUserSource(normalizedId, caller);
6281
6510
  console.log(`[agents] Resumed ${normalizedId} and delivered feedback`);
6282
- return;
6511
+ return {
6512
+ delivered: true,
6513
+ queuedToMail: true
6514
+ };
6283
6515
  }
6284
6516
  if (!resumeResult.success) console.warn(`[agents] Resume failed for ${normalizedId}: ${resumeResult.error} — falling back to fresh launch`);
6285
6517
  else console.warn(`[agents] Resume succeeded for ${normalizedId} but message not delivered (ready signal timed out) — falling back to fresh launch`);
@@ -6292,7 +6524,11 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
6292
6524
  message: `${normalizedId}: ${stopMsg}`,
6293
6525
  issueId: agentState.issueId
6294
6526
  });
6295
- return;
6527
+ return {
6528
+ delivered: false,
6529
+ queuedToMail: true,
6530
+ reason: stopMsg
6531
+ };
6296
6532
  }
6297
6533
  const providerEnv = agentState.model ? await getProviderEnvForModel(agentState.model) : {};
6298
6534
  if (agentState.model) {
@@ -6310,7 +6546,7 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
6310
6546
  const resumeModel = agentState.model || "claude-sonnet-4-6";
6311
6547
  const fallbackHarness = agentState.harness ?? "claude-code";
6312
6548
  const harnessLaunch = await prepareHarnessLaunch(fallbackHarness);
6313
- const { assertWorkspaceStackHealthyForSpawn } = await import("./agents-FlIgQ3ql.js");
6549
+ const { assertWorkspaceStackHealthyForSpawn } = await import("./agents-wi9NWzs2.js");
6314
6550
  await assertWorkspaceStackHealthyForSpawn(agentState.issueId || normalizedId.replace(/^agent-/, "").toUpperCase(), resumeRole, agentState.hostOverride === true, agentState.workspace);
6315
6551
  const fallbackPiFields = fallbackHarness === "ohmypi" ? await getOhmypiLauncherFields(normalizedId, resumeModel) : {};
6316
6552
  const fallbackCodexFields = fallbackHarness === "codex" ? getCodexLauncherFields(normalizedId, resumeModel, agentState.workspace, resumeRole) : {};
@@ -6341,7 +6577,10 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
6341
6577
  saveAgentStateSync(agentState);
6342
6578
  const ready = await waitForPromptReady(normalizedId, fallbackHarness, 30);
6343
6579
  const resumeMessage = await buildResumeMessageForAgent(agentState, `You are resuming work on ${agentState.issueId}. Check .pan/feedback/ for specialist feedback that arrived while you were stopped, then continue working.\n\n${message}`, message);
6580
+ let delivered = false;
6581
+ let reason;
6344
6582
  if (resumeMessage.error) {
6583
+ reason = resumeMessage.error;
6345
6584
  console.error(`[agents] Fallback-restarted ${normalizedId} but ${resumeMessage.error}`);
6346
6585
  emitActivityEntrySync({
6347
6586
  source: "work-agent",
@@ -6350,7 +6589,6 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
6350
6589
  issueId: agentState.issueId
6351
6590
  });
6352
6591
  } else if (ready && resumeMessage.message) {
6353
- let delivered = false;
6354
6592
  if (fallbackHarness === "claude-code") {
6355
6593
  const fallbackSessionId = getLatestSessionIdSync(normalizedId);
6356
6594
  if (fallbackSessionId) {
@@ -6360,28 +6598,48 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
6360
6598
  sessionId: fallbackSessionId,
6361
6599
  message: resumeMessage.message,
6362
6600
  caller: "resumeAgent:resume-prompt",
6363
- deliveryMethod: resilientDeliveryMethod(agentState.deliveryMethod)
6601
+ deliveryMethod: resolveAgentDeliveryMethod(agentState)
6364
6602
  });
6365
6603
  delivered = delivery.delivered;
6366
- if (!delivery.delivered) console.error(`[agents] Fallback resume prompt did not land after ${delivery.attempts} delivery attempts`);
6367
- } else console.error(`[agents] Fallback-restarted ${normalizedId} but no session id was recorded — feedback in mail queue`);
6368
- } else delivered = (await deliverAgentMessage(normalizedId, resumeMessage.message, "resumeAgent:resume-prompt", resilientDeliveryMethod(agentState.deliveryMethod))).ok;
6604
+ if (!delivery.delivered) {
6605
+ reason = `resume prompt did not land after ${delivery.attempts} delivery attempts`;
6606
+ console.error(`[agents] Fallback resume prompt did not land after ${delivery.attempts} delivery attempts`);
6607
+ }
6608
+ } else {
6609
+ reason = "no session id was recorded";
6610
+ console.error(`[agents] Fallback-restarted ${normalizedId} but no session id was recorded — feedback in mail queue`);
6611
+ }
6612
+ } else {
6613
+ const delivery = await deliverAgentMessage(normalizedId, resumeMessage.message, "resumeAgent:resume-prompt", resolveAgentDeliveryMethod(agentState));
6614
+ delivered = delivery.ok;
6615
+ if (!delivery.ok) reason = "resume prompt delivery failed";
6616
+ }
6369
6617
  if (delivered) {
6370
6618
  if (resumeMessage.redeliveringKickoff) markKickoffRedelivered(agentState);
6371
6619
  await appendTellInterventionForUserSource(normalizedId, caller);
6372
6620
  console.log(`[agents] Fallback-restarted ${normalizedId} and delivered feedback`);
6373
6621
  }
6374
- } else console.warn(`[agents] Fallback-restarted ${normalizedId} but ready signal not detected — feedback in mail queue`);
6375
- return;
6622
+ } else {
6623
+ reason = "ready signal not detected";
6624
+ console.warn(`[agents] Fallback-restarted ${normalizedId} but ready signal not detected — feedback in mail queue`);
6625
+ }
6626
+ return {
6627
+ delivered,
6628
+ queuedToMail: true,
6629
+ ...reason ? { reason } : {}
6630
+ };
6376
6631
  }
6377
- const { loadRemoteAgentState, sendToRemoteAgent } = await import("./remote-agents-CRCg1L4H.js");
6632
+ const { loadRemoteAgentState, sendToRemoteAgent } = await import("./remote-agents-CA3Ihlxj.js");
6378
6633
  const remoteState = loadRemoteAgentState(normalizedId);
6379
6634
  if (remoteState && remoteState.vmName) {
6380
6635
  console.log(`[agents] Sending message to remote agent ${normalizedId} on ${remoteState.vmName}`);
6381
6636
  await sendToRemoteAgent(normalizedId, remoteState.vmName, message);
6382
6637
  queueAgentMail(normalizedId, message);
6383
6638
  await appendTellInterventionForUserSource(normalizedId, caller);
6384
- return;
6639
+ return {
6640
+ delivered: true,
6641
+ queuedToMail: true
6642
+ };
6385
6643
  }
6386
6644
  const expectedHarness = agentState?.harness ?? "claude-code";
6387
6645
  let appServerState;
@@ -6394,31 +6652,46 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
6394
6652
  logAgentLifecycleSync(normalizedId, "messageAgent queued mail for codex turn-end delivery: agent busy");
6395
6653
  console.log(`[agents] Queued message for ${normalizedId}; codex agent is mid-turn`);
6396
6654
  await appendTellInterventionForUserSource(normalizedId, caller);
6397
- return;
6655
+ return {
6656
+ delivered: true,
6657
+ queuedToMail: true,
6658
+ reason: "queued for turn-end delivery"
6659
+ };
6398
6660
  }
6399
- const deliveryMethod = resilientDeliveryMethod(agentState?.deliveryMethod);
6400
- await deliverAgentMessage(normalizedId, message, `messageAgent:${caller}`, deliveryMethod);
6661
+ const deliveryMethod = resolveAgentDeliveryMethod(agentState);
6662
+ const delivery = await deliverAgentMessage(normalizedId, message, `messageAgent:${caller}`, deliveryMethod);
6401
6663
  queueAgentMail(normalizedId, message);
6402
6664
  await appendTellInterventionForUserSource(normalizedId, caller);
6403
- return;
6665
+ return {
6666
+ delivered: delivery.ok,
6667
+ queuedToMail: true
6668
+ };
6404
6669
  }
6405
6670
  if (!await Effect.runPromise(sessionExists(normalizedId))) throw new Error(`Agent ${normalizedId} not running`);
6406
6671
  const panePids = await Effect.runPromise(listPaneValues(normalizedId, "#{pane_pid}"));
6407
6672
  if (panePids.length > 0 && !await hasAgentRuntimeInSubtree(panePids[0], expectedHarness)) {
6408
6673
  console.warn(`[agents] ${normalizedId} tmux session is a zombie (no ${expectedHarness} runtime) — attempting resume`);
6409
- const { resumeAgent } = await import("./agents-FlIgQ3ql.js");
6674
+ const { resumeAgent } = await import("./agents-wi9NWzs2.js");
6410
6675
  const resumeResult = await resumeAgent(normalizedId, message);
6411
6676
  if (resumeResult.success) {
6412
- if (resumeResult.messageDelivered !== false) await appendTellInterventionForUserSource(normalizedId, caller);
6413
- return;
6677
+ const delivered = resumeResult.messageDelivered !== false;
6678
+ if (delivered) await appendTellInterventionForUserSource(normalizedId, caller);
6679
+ return {
6680
+ delivered,
6681
+ queuedToMail: false
6682
+ };
6414
6683
  }
6415
6684
  throw new Error(`Agent ${normalizedId} session is dead and resume failed: ${resumeResult.error}`);
6416
6685
  }
6417
6686
  if (!await waitForAgentIdle(normalizedId, 5e3)) console.warn(`[agents] ${normalizedId} not at idle prompt after 5s — sending message anyway`);
6418
- const deliveryMethod = resilientDeliveryMethod(agentState?.deliveryMethod);
6419
- await deliverAgentMessage(normalizedId, message, `messageAgent:${caller}`, deliveryMethod);
6687
+ const deliveryMethod = resolveAgentDeliveryMethod(agentState);
6688
+ const delivery = await deliverAgentMessage(normalizedId, message, `messageAgent:${caller}`, deliveryMethod);
6420
6689
  queueAgentMail(normalizedId, message);
6421
6690
  await appendTellInterventionForUserSource(normalizedId, caller);
6691
+ return {
6692
+ delivered: delivery.ok,
6693
+ queuedToMail: true
6694
+ };
6422
6695
  }
6423
6696
  var USER_MESSAGE_INTERVENTION_SOURCES;
6424
6697
  var init_messaging = __esmMin((() => {
@@ -6487,6 +6760,54 @@ var init_context_overflow = __esmMin((() => {
6487
6760
  ];
6488
6761
  }));
6489
6762
  //#endregion
6763
+ //#region ../../lib/agents/session-pointers.ts
6764
+ /**
6765
+ * Clear every mutable pointer that can make a later launch resume an old
6766
+ * session. Claude JSONL transcripts live outside the agent directory and are
6767
+ * deliberately never touched.
6768
+ */
6769
+ async function clearAgentSessionPointers(agentId) {
6770
+ const agentDir = getAgentDir(agentId);
6771
+ const cleared = [];
6772
+ for (const name of [
6773
+ "session.id",
6774
+ "sessions.json",
6775
+ "codex-thread-id",
6776
+ "launcher.sh"
6777
+ ]) {
6778
+ const path = join(agentDir, name);
6779
+ if (!existsSync$1(path)) continue;
6780
+ unlinkSync$1(path);
6781
+ cleared.push(name);
6782
+ }
6783
+ const runtimeFile = join(agentDir, "runtime.json");
6784
+ if (existsSync$1(runtimeFile)) try {
6785
+ const runtime = JSON.parse(readFileSync$1(runtimeFile, "utf-8"));
6786
+ if (Object.prototype.hasOwnProperty.call(runtime, "claudeSessionId")) {
6787
+ delete runtime.claudeSessionId;
6788
+ writeFileSync$1(runtimeFile, JSON.stringify(runtime, null, 2));
6789
+ cleared.push("runtime.json:claudeSessionId");
6790
+ }
6791
+ } catch {}
6792
+ const state = getAgentStateSync(agentId);
6793
+ if (state?.sessionId) {
6794
+ delete state.sessionId;
6795
+ saveAgentStateSync(state);
6796
+ cleared.push("agents.session_id");
6797
+ }
6798
+ await Effect.runPromise(emitAgentEvent(agentId, {
6799
+ kind: "model_set",
6800
+ model: state?.model ?? "unknown",
6801
+ claudeSessionId: null
6802
+ }));
6803
+ cleared.push("runtime.claudeSessionId");
6804
+ return { cleared };
6805
+ }
6806
+ var init_session_pointers = __esmMin((() => {
6807
+ init_agent_runtime();
6808
+ init_agent_state();
6809
+ }));
6810
+ //#endregion
6490
6811
  //#region ../../lib/agents/resume.ts
6491
6812
  /**
6492
6813
  * Resume a suspended agent (PAN-80)
@@ -6519,7 +6840,7 @@ async function buildCompactRecoverySeed(agentId) {
6519
6840
  if (agentState?.workspace && sessionId) {
6520
6841
  const sessionFile = sessionFilePath(agentState.workspace, sessionId);
6521
6842
  try {
6522
- const [{ getConversationCompactionSettings }, { generateSmartSummary }] = await Promise.all([import("./conversation-compaction-DiG5zWQq.js"), import("./smart-compaction-CHIxLr_d.js")]);
6843
+ const [{ getConversationCompactionSettings }, { generateSmartSummary }] = await Promise.all([import("./conversation-compaction-eQB5CkOe.js"), import("./smart-compaction-CV2ukKND.js")]);
6523
6844
  const settings = getConversationCompactionSettings();
6524
6845
  summary = (await Effect.runPromise(generateSmartSummary({
6525
6846
  jsonlPath: sessionFile,
@@ -6530,7 +6851,7 @@ async function buildCompactRecoverySeed(agentId) {
6530
6851
  } catch (err) {
6531
6852
  logAgentLifecycleSync(normalizedId, `compact-recovery smart summary failed (${err instanceof Error ? err.message : String(err)}); trying heuristic fallback`);
6532
6853
  try {
6533
- const { generateFallbackSummary } = await import("./summary-fork-D8bXjCr7.js");
6854
+ const { generateFallbackSummary } = await import("./summary-fork-DpcxN9tf.js");
6534
6855
  summary = await Effect.runPromise(generateFallbackSummary(sessionFile));
6535
6856
  } catch (fallbackErr) {
6536
6857
  logAgentLifecycleSync(normalizedId, `compact-recovery fallback summary failed (${fallbackErr instanceof Error ? fallbackErr.message : String(fallbackErr)}); seeding with reseed instructions only`);
@@ -6655,7 +6976,13 @@ async function resumeAgent(agentId, message, opts) {
6655
6976
  if (legacyHarnessMigrated) resumeDriftReasons.push(`legacy harness ${priorHarness}→${effectiveHarness} (PAN-1797 re-default)`);
6656
6977
  const piDeadRecovery = effectiveHarness === "ohmypi" && !piProcessWasAlive && !compactSeed && resumeDriftReasons.length === 0;
6657
6978
  if (piDeadRecovery) logAgentLifecycleSync(normalizedId, "resumeAgent: dead ohmypi process — fresh-launching for recovery instead of omp --resume (PAN-2009)");
6658
- const shouldResumeSavedSession = !compactSeed && resumeDriftReasons.length === 0 && !piDeadRecovery;
6979
+ const expectedClaudeJsonl = sessionFilePath(agentState.workspace, sessionId);
6980
+ const claudeJsonlMissingRecovery = effectiveHarness === "claude-code" && !compactSeed && resumeDriftReasons.length === 0 && !existsSync(expectedClaudeJsonl);
6981
+ if (claudeJsonlMissingRecovery) {
6982
+ logAgentLifecycleSync(normalizedId, `resumeAgent: saved Claude transcript is missing at ${expectedClaudeJsonl} — clearing stale pointers and fresh-launching (PAN-2895)`);
6983
+ await clearAgentSessionPointers(normalizedId);
6984
+ }
6985
+ const shouldResumeSavedSession = !compactSeed && resumeDriftReasons.length === 0 && !piDeadRecovery && !claudeJsonlMissingRecovery;
6659
6986
  if (sessionRotationRefused({
6660
6987
  compactSeed: Boolean(compactSeed),
6661
6988
  driftReasons: resumeDriftReasons,
@@ -6676,12 +7003,14 @@ async function resumeAgent(agentId, message, opts) {
6676
7003
  }
6677
7004
  const freshSessionId = !shouldResumeSavedSession && effectiveHarness === "claude-code" ? randomUUID() : void 0;
6678
7005
  if (resumeDriftReasons.length > 0) logAgentLifecycleSync(normalizedId, `resumeAgent: starting fresh session instead of --resume because session origin drifted (${resumeDriftReasons.join(", ")})`);
6679
- if (freshSessionId) saveSessionId(normalizedId, freshSessionId);
6680
- else if (!shouldResumeSavedSession) try {
7006
+ if (freshSessionId) {
7007
+ saveSessionId(normalizedId, freshSessionId);
7008
+ agentState.sessionId = freshSessionId;
7009
+ } else if (!shouldResumeSavedSession) try {
6681
7010
  unlinkSync(join$1(getAgentDir(normalizedId), "session.id"));
6682
7011
  } catch {}
6683
7012
  const issueId = agentState.issueId || normalizedId.replace(/^agent-/, "").toUpperCase();
6684
- const defaultResumeMessage = buildDefaultResumeContinueMessage(issueId);
7013
+ const defaultResumeMessage = buildResumeContinueMessage(agentState);
6685
7014
  const resumeMessage = compactSeed ? {
6686
7015
  message: message ? `${compactSeed}\n\n${message}` : compactSeed,
6687
7016
  redeliveringKickoff: false
@@ -6715,6 +7044,7 @@ async function resumeAgent(agentId, message, opts) {
6715
7044
  } : {},
6716
7045
  sessionId: freshSessionId,
6717
7046
  harness: effectiveHarness,
7047
+ harnessBinaryPath: harnessLaunch.binaryPath,
6718
7048
  useSupervisor: supervisorLaunch.useSupervisor,
6719
7049
  supervisorScriptPath: supervisorLaunch.supervisorScriptPath,
6720
7050
  extraEnvExports: [harnessLaunch.pathExport]
@@ -6730,6 +7060,11 @@ async function resumeAgent(agentId, message, opts) {
6730
7060
  CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION: "false",
6731
7061
  ...providerEnv
6732
7062
  } }));
7063
+ if (freshSessionId) await saveAgentRuntimeState(normalizedId, {
7064
+ claudeSessionId: freshSessionId,
7065
+ sessionModel: model,
7066
+ sessionHarness: effectiveHarness
7067
+ });
6733
7068
  let messageDelivered = false;
6734
7069
  if (effectiveHarness === "ohmypi") try {
6735
7070
  await writeOhmypiAgentPrompt(normalizedId, effectiveMessage);
@@ -6739,7 +7074,18 @@ async function resumeAgent(agentId, message, opts) {
6739
7074
  const msg = err instanceof Error ? err.message : String(err);
6740
7075
  console.error(`[resumeAgent] ohmypi prompt delivery failed: ${msg}`);
6741
7076
  }
6742
- else if (effectiveHarness === "codex") {
7077
+ else if (effectiveHarness === "acp") {
7078
+ const delivery = await deliverInitialPromptWithRetry(normalizedId, effectiveMessage, "resumeAgent:acp-continue");
7079
+ messageDelivered = delivery.ok;
7080
+ if (delivery.ok && resumeMessage.redeliveringKickoff) markKickoffRedelivered(agentState);
7081
+ if (!delivery.ok) {
7082
+ await Effect.runPromise(killSession(normalizedId));
7083
+ return {
7084
+ success: false,
7085
+ error: `ACP continue prompt did not land: ${delivery.failure ?? "unknown failure"}`
7086
+ };
7087
+ }
7088
+ } else if (effectiveHarness === "codex") {
6743
7089
  const delivery = await deliverInitialPromptWithRetry(normalizedId, effectiveMessage, "resumeAgent:codex-continue", resilientDeliveryMethod(agentState.deliveryMethod));
6744
7090
  messageDelivered = delivery.ok;
6745
7091
  if (delivery.ok && resumeMessage.redeliveringKickoff) markKickoffRedelivered(agentState);
@@ -6768,6 +7114,9 @@ async function resumeAgent(agentId, message, opts) {
6768
7114
  } else if (piDeadRecovery) {
6769
7115
  console.log(`[agents] Respawned ${normalizedId} fresh because the prior Pi process was dead (archived session ${sessionId})`);
6770
7116
  logAgentLifecycleSync(normalizedId, `resumeAgent SUCCESS: fresh respawn after dead Pi process (archived sessionId=${sessionId}), messageDelivered=${messageDelivered}`);
7117
+ } else if (claudeJsonlMissingRecovery) {
7118
+ console.log(`[agents] Respawned ${normalizedId} fresh because the saved Claude transcript was missing (stale session ${sessionId}${freshSessionId ? `, new session ${freshSessionId}` : ""})`);
7119
+ logAgentLifecycleSync(normalizedId, `resumeAgent SUCCESS: fresh respawn after missing Claude JSONL (stale sessionId=${sessionId}${freshSessionId ? `, newSessionId=${freshSessionId}` : ""}), messageDelivered=${messageDelivered}`);
6771
7120
  } else if (!shouldResumeSavedSession) {
6772
7121
  console.log(`[agents] Respawned ${normalizedId} fresh because session origin drifted (archived session ${sessionId}${freshSessionId ? `, new session ${freshSessionId}` : ""})`);
6773
7122
  logAgentLifecycleSync(normalizedId, `resumeAgent SUCCESS: fresh respawn after origin drift (archived sessionId=${sessionId}${freshSessionId ? `, newSessionId=${freshSessionId}` : ""}), messageDelivered=${messageDelivered}`);
@@ -6850,6 +7199,7 @@ var init_resume = __esmMin((() => {
6850
7199
  init_tmux();
6851
7200
  init_agent_state();
6852
7201
  init_activity();
7202
+ init_session_pointers();
6853
7203
  init_delivery();
6854
7204
  init_identity();
6855
7205
  init_runtime_state();
@@ -6885,7 +7235,7 @@ var init_graceful_restart = __esmMin((() => {
6885
7235
  //#endregion
6886
7236
  //#region ../../lib/agents/recovery.ts
6887
7237
  function resolveRecoveryResumeSessionId(agentId, harness) {
6888
- if (harness !== "codex") return void 0;
7238
+ if (harness !== "codex" && harness !== "acp") return void 0;
6889
7239
  return getLatestSessionIdSync(agentId) ?? void 0;
6890
7240
  }
6891
7241
  async function restartAgent(agentId, opts = {}) {
@@ -6945,6 +7295,7 @@ async function restartAgent(agentId, opts = {}) {
6945
7295
  role: agentState.role,
6946
7296
  isPlanning: agentState.role === "plan",
6947
7297
  harness: effectiveHarness,
7298
+ harnessBinaryPath: harnessLaunch.binaryPath,
6948
7299
  useSupervisor: supervisorLaunch.useSupervisor,
6949
7300
  supervisorScriptPath: supervisorLaunch.supervisorScriptPath,
6950
7301
  extraEnvExports: [harnessLaunch.pathExport]
@@ -6962,18 +7313,20 @@ async function restartAgent(agentId, opts = {}) {
6962
7313
  GIT_SEQUENCE_EDITOR: "false",
6963
7314
  ...providerEnv
6964
7315
  } }));
6965
- const prompt = message || `You are resuming work on ${agentState.issueId}. Read .pan/continue.json for context and pick up where you left off.`;
7316
+ const prompt = message || buildResumeContinueMessage(agentState);
6966
7317
  if (effectiveHarness === "ohmypi") try {
6967
7318
  await writeOhmypiAgentPrompt(normalizedId, prompt);
6968
7319
  } catch (err) {
6969
7320
  const msg = err instanceof Error ? err.message : String(err);
6970
7321
  console.error(`[restartAgent] ohmypi prompt delivery failed for ${normalizedId}: ${msg}`);
6971
7322
  }
6972
- else if (await waitForPromptReady(normalizedId, effectiveHarness, 30)) {
7323
+ else {
7324
+ if (!await waitForPromptReady(normalizedId, effectiveHarness, 30)) throw new Error(`${getHarnessBehavior(effectiveHarness).displayName} did not become ready within 30s for ${normalizedId}`);
6973
7325
  await new Promise((r) => setTimeout(r, 500));
6974
- if (effectiveHarness === "codex") await deliverAgentMessage(normalizedId, prompt, "restartAgent:continue-prompt", resilientDeliveryMethod(agentState.deliveryMethod));
6975
- else await Effect.runPromise(sendKeys(normalizedId, prompt));
6976
- } else console.error(`[restartAgent] ${effectiveHarness === "codex" ? "Codex" : "Claude"} did not become ready within 30s for ${normalizedId}`);
7326
+ if (effectiveHarness === "codex" || effectiveHarness === "acp") {
7327
+ if (!(await deliverAgentMessage(normalizedId, prompt, "restartAgent:continue-prompt", effectiveHarness === "codex" ? resilientDeliveryMethod(agentState.deliveryMethod) : void 0)).ok) throw new Error(`${getHarnessBehavior(effectiveHarness).displayName} continue prompt delivery failed`);
7328
+ } else await Effect.runPromise(sendKeys(normalizedId, prompt));
7329
+ }
6977
7330
  markAgentRunning(agentState);
6978
7331
  saveAgentStateSync(agentState);
6979
7332
  await saveAgentRuntimeState(normalizedId, {
@@ -6984,6 +7337,7 @@ async function restartAgent(agentId, opts = {}) {
6984
7337
  return { success: true };
6985
7338
  } catch (error) {
6986
7339
  const msg = error instanceof Error ? error.message : String(error);
7340
+ await Effect.runPromise(stopAgent(normalizedId)).catch(() => void 0);
6987
7341
  logAgentLifecycleSync(normalizedId, `restartAgent FAILED: ${msg}`);
6988
7342
  return {
6989
7343
  success: false,
@@ -7086,6 +7440,7 @@ async function recoverAgent(agentId, opts = {}) {
7086
7440
  role: recoveryRole,
7087
7441
  isPlanning: recoveryRole === "plan",
7088
7442
  harness: "ohmypi",
7443
+ harnessBinaryPath: harnessLaunch.binaryPath,
7089
7444
  extraEnvExports: [harnessLaunch.pathExport]
7090
7445
  });
7091
7446
  const launcherScript = join$1(getAgentDir(normalizedId), "launcher.sh");
@@ -7109,6 +7464,42 @@ async function recoverAgent(agentId, opts = {}) {
7109
7464
  logAgentLifecycleSync(normalizedId, `recoverAgent SUCCESS: recoveryCount=${health.recoveryCount} (ohmypi)`);
7110
7465
  return state;
7111
7466
  }
7467
+ if (recoveryHarness === "acp") {
7468
+ const resumeSessionId = resolveRecoveryResumeSessionId(normalizedId, recoveryHarness);
7469
+ const { launcherContent, providerEnv: acpProviderEnv } = await buildAgentLaunchConfig({
7470
+ agentId: normalizedId,
7471
+ model: state.model,
7472
+ workspace: state.workspace,
7473
+ role: recoveryRole,
7474
+ isPlanning: recoveryRole === "plan",
7475
+ ...resumeSessionId ? {
7476
+ spawnMode: "resume",
7477
+ resumeSessionId
7478
+ } : {},
7479
+ harness: "acp",
7480
+ harnessBinaryPath: harnessLaunch.binaryPath,
7481
+ extraEnvExports: [harnessLaunch.pathExport]
7482
+ });
7483
+ const launcherScript = join$1(getAgentDir(normalizedId), "launcher.sh");
7484
+ await writeLauncherScriptAtomic(launcherScript, launcherContent);
7485
+ await Effect.runPromise(createSession(normalizedId, state.workspace, `bash ${launcherScript}`, { env: {
7486
+ ...BLANKED_PROVIDER_ENV,
7487
+ OVERDECK_AGENT_ID: normalizedId,
7488
+ OVERDECK_ISSUE_ID: state.issueId || "",
7489
+ OVERDECK_SESSION_TYPE: recoveryRole,
7490
+ CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION: "false",
7491
+ ...acpProviderEnv
7492
+ } }));
7493
+ const delivery = await deliverInitialPromptWithRetry(normalizedId, recoveryPrompt, "recoverAgent:acp-recovery-prompt");
7494
+ if (!delivery.ok) {
7495
+ await Effect.runPromise(stopAgent(normalizedId));
7496
+ throw new Error(`ACP recovery prompt delivery failed for ${normalizedId}: ${delivery.failure ?? "unknown failure"}`);
7497
+ }
7498
+ markAgentRunning(state);
7499
+ saveAgentStateSync(state);
7500
+ logAgentLifecycleSync(normalizedId, `recoverAgent SUCCESS: recoveryCount=${health.recoveryCount} (acp)`);
7501
+ return state;
7502
+ }
7112
7503
  const recoveryCodexFields = recoveryHarness === "codex" ? getCodexLauncherFields(normalizedId, state.model, state.workspace, recoveryRole) : {};
7113
7504
  const recoveryLauncherContent = generateLauncherScriptSync({
7114
7505
  role: recoveryRole,
@@ -7210,6 +7601,7 @@ var init_recovery = __esmMin((() => {
7210
7601
  init_persistent_logger();
7211
7602
  init_providers();
7212
7603
  init_conversations();
7604
+ init_behavior();
7213
7605
  init_tmux();
7214
7606
  init_agent_state();
7215
7607
  init_delivery();
@@ -7481,11 +7873,11 @@ async function renderCommitFeedDiff(workspace, sha, feedConfig = DEFAULT_FEED_CO
7481
7873
  ".",
7482
7874
  ...feedConfig.exclude.map((glob) => `:(exclude)${glob}`)
7483
7875
  ] : [];
7484
- const diff = await gitShow(workspace, sha, pathspecArgs);
7876
+ const diff = await renderWorkspaceGitShowPromise(deps.issueId, workspace, sha, pathspecArgs, gitShow);
7485
7877
  const maxBytes = feedConfig.max_diff_bytes;
7486
7878
  if (maxBytes === null || Buffer.byteLength(diff, "utf-8") <= maxBytes) return diff;
7487
7879
  return [
7488
- (await gitShow(workspace, sha, ["--stat", ...pathspecArgs])).trimEnd(),
7880
+ (await renderWorkspaceGitShowPromise(deps.issueId, workspace, sha, ["--stat", ...pathspecArgs], gitShow)).trimEnd(),
7489
7881
  "",
7490
7882
  `[tiered_execution.feed.max_diff_bytes truncated commit diff: ${Buffer.byteLength(diff, "utf-8")} bytes exceeded ${maxBytes} bytes]`,
7491
7883
  ""
@@ -7527,7 +7919,10 @@ function composeCommitFeedMessage(sha, itemTitle, diff, callout) {
7527
7919
  async function broadcastCommit(options) {
7528
7920
  const feedConfig = options.feedConfig ?? DEFAULT_FEED_CONFIG;
7529
7921
  if (shouldSkipFeedSubject(options.commitSubject ?? options.itemTitle, feedConfig)) return [];
7530
- const renderDiff = options.renderDiff ?? (options.gitShow ? (workspace, sha) => options.gitShow(workspace, sha) : renderCommitFeedDiff);
7922
+ const renderDiff = options.renderDiff ?? ((workspace, sha, config) => renderCommitFeedDiff(workspace, sha, config, {
7923
+ issueId: options.issueId,
7924
+ gitShow: options.gitShow ? (repoPath, repoSha) => options.gitShow(repoPath, repoSha) : void 0
7925
+ }));
7531
7926
  const deliver = options.deliver ?? deliverAgentMessage;
7532
7927
  const recordDelivery = options.recordDelivery ?? recordTierFeedDelivery;
7533
7928
  const now = options.now ?? (() => /* @__PURE__ */ new Date());
@@ -7576,6 +7971,7 @@ async function broadcastCommit(options) {
7576
7971
  }
7577
7972
  var execFileAsync$5, DEFAULT_FEED_CONFIG;
7578
7973
  var init_tier_feed = __esmMin((() => {
7974
+ init_git_utils();
7579
7975
  init_delivery();
7580
7976
  init_tier_metrics();
7581
7977
  init_tier_table();
@@ -7793,13 +8189,19 @@ Rules:
7793
8189
  - Do not use any other endpoint or side channel for the verdict.
7794
8190
  - Only review this commit against this bead's acceptance criteria — compile, lint, and tests are the verification gate's job, and code style is the review convoy's job.`;
7795
8191
  }
7796
- async function getCommitDiff(workspacePath, sha) {
7797
- const { stdout } = await execFileAsync$4("git", ["show", sha], {
7798
- cwd: workspacePath,
7799
- encoding: "utf-8",
7800
- maxBuffer: 10 * 1024 * 1024
8192
+ async function getCommitDiff(issueId, workspacePath, sha) {
8193
+ return renderWorkspaceGitShowPromise(issueId, workspacePath, sha, [], async (repoPath, repoSha, args) => {
8194
+ const { stdout } = await execFileAsync$4("git", [
8195
+ "show",
8196
+ repoSha,
8197
+ ...args
8198
+ ], {
8199
+ cwd: repoPath,
8200
+ encoding: "utf-8",
8201
+ maxBuffer: 10 * 1024 * 1024
8202
+ });
8203
+ return stdout;
7801
8204
  });
7802
- return stdout;
7803
8205
  }
7804
8206
  /**
7805
8207
  * Deliver one subscribed commit to the standing supervisor for review:
@@ -7809,7 +8211,7 @@ async function getCommitDiff(workspacePath, sha) {
7809
8211
  */
7810
8212
  async function deliverCommitForReview(options) {
7811
8213
  const deliver = options.deps?.deliver ?? deliverAgentMessage;
7812
- const diff = await (options.deps?.getDiff ?? getCommitDiff)(options.workspacePath, options.sha);
8214
+ const diff = await (options.deps?.getDiff ?? ((workspacePath, sha) => getCommitDiff(options.issueId, workspacePath, sha)))(options.workspacePath, options.sha);
7813
8215
  const traces = Array.isArray(options.item.metadata?.traces) ? options.item.metadata.traces : [];
7814
8216
  const frText = options.prdMarkdown && traces.length > 0 ? extractTracedFrText(options.prdMarkdown, traces) : void 0;
7815
8217
  const message = buildSupervisorReviewMessage({
@@ -7826,6 +8228,7 @@ async function deliverCommitForReview(options) {
7826
8228
  }
7827
8229
  var SUPERVISOR_SUB_ROLE, execFileAsync$4;
7828
8230
  var init_tier_supervisor = __esmMin((() => {
8231
+ init_git_utils();
7829
8232
  init_delivery();
7830
8233
  init_spawn_prep();
7831
8234
  init_spawn();
@@ -7840,7 +8243,7 @@ var init_tier_supervisor = __esmMin((() => {
7840
8243
  * from `git log <base>..HEAD`, oldest commit first.
7841
8244
  */
7842
8245
  async function replayStandingAgent(target, options = {}) {
7843
- const deps = replayDeps(options.deps);
8246
+ const deps = replayDeps(options.deps, target.issueId);
7844
8247
  const replayTarget = target.kind === "tier" ? {
7845
8248
  ...target,
7846
8249
  ...resolveReplaySlot(target, deps)
@@ -7865,7 +8268,7 @@ async function replayCrashedStandingAgent(target, options = {}) {
7865
8268
  */
7866
8269
  async function compactAtTierRunBoundary(options) {
7867
8270
  if (!shouldReplayCompactAtTierRunBoundary(options.compaction)) return null;
7868
- const deps = replayDeps(options.deps);
8271
+ const deps = replayDeps(options.deps, options.target.issueId);
7869
8272
  const rerouted = resolveReroutedReplayTarget(options.target);
7870
8273
  if (!rerouted) {
7871
8274
  if (options.target.agentId) await deps.stop(options.target.agentId);
@@ -8028,27 +8431,34 @@ async function runGitLog(workspace, base) {
8028
8431
  };
8029
8432
  }).filter((entry) => entry.sha.trim().length > 0);
8030
8433
  }
8031
- async function runGitShow(workspace, sha) {
8032
- const { stdout } = await execFileAsync$3("git", ["show", sha], {
8033
- cwd: workspace,
8034
- encoding: "utf-8",
8035
- maxBuffer: 16 * 1024 * 1024
8434
+ async function runGitShow(issueId, workspace, sha) {
8435
+ return renderWorkspaceGitShowPromise(issueId, workspace, sha, [], async (repoPath, repoSha, args) => {
8436
+ const { stdout } = await execFileAsync$3("git", [
8437
+ "show",
8438
+ repoSha,
8439
+ ...args
8440
+ ], {
8441
+ cwd: repoPath,
8442
+ encoding: "utf-8",
8443
+ maxBuffer: 16 * 1024 * 1024
8444
+ });
8445
+ return stdout;
8036
8446
  });
8037
- return stdout;
8038
8447
  }
8039
- function replayDeps(deps = {}) {
8448
+ function replayDeps(deps = {}, issueId) {
8040
8449
  return {
8041
8450
  spawn: deps.spawn ?? spawnRun,
8042
8451
  deliver: deps.deliver ?? deliverAgentMessage,
8043
8452
  stop: deps.stop ?? stopAgent,
8044
8453
  gitLog: deps.gitLog ?? runGitLog,
8045
- gitShow: deps.gitShow ?? runGitShow,
8046
- renderDiff: deps.renderDiff ?? (deps.gitShow ? (workspace, sha) => deps.gitShow(workspace, sha) : renderCommitFeedDiff),
8454
+ gitShow: deps.gitShow ?? ((workspace, sha) => runGitShow(issueId, workspace, sha)),
8455
+ renderDiff: deps.renderDiff ?? (deps.gitShow ? (workspace, sha) => deps.gitShow(workspace, sha) : (workspace, sha, feedConfig) => renderCommitFeedDiff(workspace, sha, feedConfig, { issueId })),
8047
8456
  listSlotOwnership: deps.listSlotOwnership ?? listSlotOwnership
8048
8457
  };
8049
8458
  }
8050
8459
  var execFileAsync$3, DEFAULT_REPLAY_THRESHOLD;
8051
8460
  var init_tier_replay = __esmMin((() => {
8461
+ init_git_utils();
8052
8462
  init_model_capabilities();
8053
8463
  init_delivery();
8054
8464
  init_spawn();
@@ -8644,7 +9054,7 @@ var init_runtime_census = __esmMin((() => {
8644
9054
  ]);
8645
9055
  runtimeCensusService = createRuntimeCensusService({
8646
9056
  listPanes: async () => {
8647
- const { listAllPaneRecords } = await import("./tmux-DoThH6aj.js");
9057
+ const { listAllPaneRecords } = await import("./tmux-B6z7h_vZ.js");
8648
9058
  return Effect.runPromise(listAllPaneRecords());
8649
9059
  },
8650
9060
  readProcesses: readRuntimeProcessTable
@@ -8798,6 +9208,6 @@ var init_queries = __esmMin((() => {
8798
9208
  });
8799
9209
  }));
8800
9210
  //#endregion
8801
- export { appendActivity as $, recordAgentFailure as $n, OHMYPI_AGENT_READY_TIMEOUT_SECONDS as $t, spawnTierSupervisor as A, writeChannelsBridgeMcpConfig as An, init_codex_auth as Ar, deliverAgentPermissionDecision as At, detectCrashedAgents as B, getAgentDir as Bn, assertWorkspaceStackHealthyForSpawn as Bt, replayCrashedStandingAgent as C, validateProviderHealth as Cn, getAgentRuntimeStateSync as Cr, tryReserveAdvancingSlot as Ct, init_tier_supervisor as D, decideChannelsForWorkAgent as Dn, init_agent_runtime as Dr, init_memory_verdict_cache as Dt, deliverCommitForReview as E, buildDefaultResumeContinueMessage as En, getAgentRuntimeSnapshot as Er, getCachedMemoryVerdict as Et, init_tier_escalation as F, clearAgentPausedSync as Fn, init_transcript_landing as Ft, resumeAgent as G, init_agent_state as Gn, transitionIssueToInProgress as Gt, restartAgent as H, getAgentState as Hn, defaultRunWorkspace as Ht, init_slot_reconcile as I, clearAgentTroubled as In, probeTranscriptSince as It, isContextOverflowTail as J, isRole as Jn, providerDefaultHarnessSync as Jt, init_context_overflow as K, isAgentPaused as Kn, transitionIssueToInReview as Kt, listSlotAssignments as L, clearAgentTroubledSync as Ln, BRIDGE_TOKEN_HEADER as Lt, broadcastCommit as M, SESSION_EXITED_BEFORE_KICKOFF as Mn, init_ohmypi_parser as Mr, deliverResumeMessageWithTranscriptConfirmation as Mt, init_tier_feed as N, __testInternals as Nn, parseOhmypiSessionCostResultSync as Nr, setAgentDeliveryMethod as Nt, loadPrdDraft as O, decideSupervisorForWorkAgent as On, applyCodexAuthBurnFlag as Or, setCachedMemoryVerdict as Ot, decideEscalation as P, clearAgentPaused as Pn, captureTranscriptUserRecordSnapshot as Pt, operatorInterventionEvent as Q, markAgentTroubled as Qn, resolveTier as Qt, reconcileSlotState as R, clearYieldForResumeSync as Rn, init_bridge_token as Rt, contextWindowForModel as S, init_provider_health as Sn, getAgentRuntimeState as Sr, resetPatrolDispatchBudget as St, shouldReplayCompactAtTierRunBoundary as T, init_openai_auth as Tn, saveAgentRuntimeState as Tr, workResumeSlotsAvailable as Tt, buildCompactRecoverySeed as U, getAgentStateFilePath as Un, init_spawn_prep as Ut, recoverAgent as V, getAgentResumeGateBlockReason as Vn, buildAgentLaunchConfig as Vt, init_resume as W, getAgentStateSync as Wn, retrieveSpawnTimeMemoryContext as Wt, messageAgent as X, markAgentRunningState as Xn, resolveStaffing as Xt, init_messaging as Y, markAgentRunning as Yn, resolveImplicitStaffing as Yt, init_operator_interventions as Z, markAgentStoppedState as Zn, init_resolve_tier as Zt, init_linux as _, buildSpawnEnvForModel as _n, isQualifiedAgentId as _r, emergencyBrake as _t, listRunningAgentsSync as a, getRoleRuntimeBaseCommand as an, setAgentPaused as ar, saveSessionId as at, init_agents as b, getProviderExportsForModel as bn, waitForAgentIdle as br, releaseAdvancingSlot as bt, getRuntimeCensus as c, roleAgentDefinitionPath as cn, wipeAgentStateDirs as cr, init_spawn as ct, panePidsForSession as d, piFifoPaths as dn, readAgentHarnessModelRecordSync as dr, init_termination as dt, describeOhmypiSpawnFailure as en, recordAgentFailureSync as er, getActivity as et, refreshRuntimeCensus as f, init_ohmypi_fifo as fn, init_pty_token as fr, stopAgent as ft, LINUX_MEMORY_PRESSURE_DEFAULTS as g, buildCavemanExports as gn, clearReadySignal as gr, describeRunningAgents as gt, init_collector as h, init_claude_auth as hn, resolvePtySupervisorScriptPath as hr, countRunningSwarmSlotsForIssue as ht, listRunningAgents as i, getProviderAuthMode as in, saveAgentStateSync as ir, init_activity as it, supervisorAgentId as j, GOVERNOR_SLOT_PAUSE_REASON_PREFIX as jn, paneShowsCodexAuthBurn as jr, deliverInitialPromptWithRetry as jt, shouldSupervise as k, dismissDevChannelsDialog as kn, checkCodexAuthStatus as kr, deliverAgentMessage as kt, getRuntimeCensusSnapshot as l, waitForPromptReady as ln, writeAgentStateJsonSync as lr, spawnAgent as lt, createHostHealthCollector as m, getClaudeAuthStatus as mn, init_pty_supervisor_locate as mr, countRunningAgents as mt, init_queries as n, getCodexLauncherFields as nn, resetAgentFailureCount as nr, getLatestSessionIdSync as nt, warnOnBareNumericIssueIds as o, init_runtime_command as on, setAgentPausedSync as or, createOhmypiRuntimeSync as ot, runtimeCensusHasHarnessProcess as p, ohmypiFifoPaths as pn, writePtyToken as pr, stopAgentSync as pt, isContextOverflowError as q, isAgentTroubled as qn, init_staffing as qt, listAgentStates as r, getOhmypiLauncherFields as rn, saveAgentState as rr, getSessionId as rt, descendantPidsForSession as s, injectPiConversationMemory as sn, setAgentYieldedSync as sr, init_ohmypi as st, dropLegacyAgentStatesMissingRoleAsync as t, getAgentRuntimeBaseCommand as tn, recordStartupSessionExit as tr, getLatestSessionId as tt, init_runtime_census as u, init_pi_fifo as un, init_agent_record_sync as ur, spawnRun as ut, DARWIN_MEMORY_PRESSURE_DEFAULTS as v, determineModel as vn, normalizeAgentId as vr, getConcurrencyLimits as vt, replayStandingAgent as w, getOpenAIAuthStatus as wn, init_runtime_state as wr, tryReserveSwarmSlot as wt, compactAtTierRunBoundary as x, getProviderTmuxFlags as xn, waitForReadySignal as xr, releaseSwarmSlot as xt, init_darwin as y, getProviderEnvForModel as yn, resolveAgentTargetSync as yr, init_concurrency as yt, autoRecoverAgents as z, decideResumeGate as zn, writeBridgeTokenSync as zt };
9211
+ export { appendActivity as $, isRole as $n, OHMYPI_AGENT_READY_TIMEOUT_SECONDS as $t, spawnTierSupervisor as A, buildDefaultResumeContinueMessage as An, saveAgentRuntimeState as Ar, deliverAgentPermissionDecision as At, detectCrashedAgents as B, clearAgentPausedSync as Bn, assertWorkspaceStackHealthyForSpawn as Bt, replayCrashedStandingAgent as C, getProviderEnvForModel as Cn, normalizeAgentId as Cr, tryReserveAdvancingSlot as Ct, init_tier_supervisor as D, validateProviderHealth as Dn, getAgentRuntimeState as Dr, init_memory_verdict_cache as Dt, deliverCommitForReview as E, init_provider_health as En, waitForReadySignal as Er, getCachedMemoryVerdict as Et, init_tier_escalation as F, writeChannelsBridgeMcpConfig as Fn, init_codex_auth as Fr, init_transcript_landing as Ft, resumeAgent as G, getAgentDir as Gn, transitionIssueToInProgress as Gt, restartAgent as H, clearAgentTroubledSync as Hn, defaultRunWorkspace as Ht, init_slot_reconcile as I, GOVERNOR_SLOT_PAUSE_REASON_PREFIX as In, paneShowsCodexAuthBurn as Ir, probeTranscriptSince as It, isContextOverflowTail as J, getAgentStateFilePath as Jn, providerDefaultHarnessSync as Jt, init_context_overflow as K, getAgentResumeGateBlockReason as Kn, transitionIssueToInReview as Kt, listSlotAssignments as L, SESSION_EXITED_BEFORE_KICKOFF as Ln, init_ohmypi_parser as Lr, BRIDGE_TOKEN_HEADER as Lt, broadcastCommit as M, decideChannelsForWorkAgent as Mn, init_agent_runtime as Mr, deliverResumeMessageWithTranscriptConfirmation as Mt, init_tier_feed as N, decideSupervisorForWorkAgent as Nn, applyCodexAuthBurnFlag as Nr, setAgentDeliveryMethod as Nt, loadPrdDraft as O, getOpenAIAuthStatus as On, getAgentRuntimeStateSync as Or, setCachedMemoryVerdict as Ot, decideEscalation as P, dismissDevChannelsDialog as Pn, checkCodexAuthStatus as Pr, captureTranscriptUserRecordSnapshot as Pt, operatorInterventionEvent as Q, isAgentTroubled as Qn, resolveTier as Qt, reconcileSlotState as R, __testInternals as Rn, parseOhmypiSessionCostResultSync as Rr, init_bridge_token as Rt, contextWindowForModel as S, determineModel as Sn, isQualifiedAgentId as Sr, resetPatrolDispatchBudget as St, shouldReplayCompactAtTierRunBoundary as T, getProviderTmuxFlags as Tn, waitForAgentIdle as Tr, workResumeSlotsAvailable as Tt, buildCompactRecoverySeed as U, clearYieldForResumeSync as Un, init_spawn_prep as Ut, recoverAgent as V, clearAgentTroubled as Vn, buildAgentLaunchConfig as Vt, init_resume as W, decideResumeGate as Wn, retrieveSpawnTimeMemoryContext as Wt, messageAgent as X, init_agent_state as Xn, resolveStaffing as Xt, init_messaging as Y, getAgentStateSync as Yn, resolveImplicitStaffing as Yt, init_operator_interventions as Z, isAgentPaused as Zn, init_resolve_tier as Zt, init_linux as _, materializeAcpContextFile as _n, init_pty_token as _r, emergencyBrake as _t, listRunningAgentsSync as a, getProviderAuthMode as an, recordAgentFailureSync as ar, saveSessionId as at, init_agents as b, buildCavemanExports as bn, resolvePtySupervisorScriptPath as br, releaseAdvancingSlot as bt, getRuntimeCensus as c, injectPiConversationMemory as cn, saveAgentState as cr, init_spawn as ct, panePidsForSession as d, waitForPromptReady as dn, setAgentPausedSync as dr, init_termination as dt, describeOhmypiSpawnFailure as en, markAgentRunning as er, getActivity as et, refreshRuntimeCensus as f, init_pi_fifo as fn, setAgentYieldedSync as fr, stopAgent as ft, LINUX_MEMORY_PRESSURE_DEFAULTS as g, init_context as gn, readAgentHarnessModelRecordSync as gr, describeRunningAgents as gt, init_collector as h, ohmypiFifoPaths as hn, init_agent_record_sync as hr, countRunningSwarmSlotsForIssue as ht, listRunningAgents as i, getOhmypiLauncherFields as in, recordAgentFailure as ir, init_activity as it, supervisorAgentId as j, buildResumeContinueMessage as jn, getAgentRuntimeSnapshot as jr, deliverInitialPromptWithRetry as jt, shouldSupervise as k, init_openai_auth as kn, init_runtime_state as kr, deliverAgentMessage as kt, getRuntimeCensusSnapshot as l, roleAgentDefinitionPath as ln, saveAgentStateSync as lr, spawnAgent as lt, createHostHealthCollector as m, init_ohmypi_fifo as mn, writeAgentStateJsonSync as mr, countRunningAgents as mt, init_queries as n, getAgentRuntimeBaseCommand as nn, markAgentStoppedState as nr, getLatestSessionIdSync as nt, warnOnBareNumericIssueIds as o, getRoleRuntimeBaseCommand as on, recordStartupSessionExit as or, createOhmypiRuntimeSync as ot, runtimeCensusHasHarnessProcess as p, piFifoPaths as pn, wipeAgentStateDirs as pr, stopAgentSync as pt, isContextOverflowError as q, getAgentState as qn, init_staffing as qt, listAgentStates as r, getCodexLauncherFields as rn, markAgentTroubled as rr, getSessionId as rt, descendantPidsForSession as s, init_runtime_command as sn, resetAgentFailureCount as sr, init_ohmypi as st, dropLegacyAgentStatesMissingRoleAsync as t, getAcpLauncherFields as tn, markAgentRunningState as tr, getLatestSessionId as tt, init_runtime_census as u, waitForAcpHostReady as un, setAgentPaused as ur, spawnRun as ut, DARWIN_MEMORY_PRESSURE_DEFAULTS as v, getClaudeAuthStatus as vn, writePtyToken as vr, getConcurrencyLimits as vt, replayStandingAgent as w, getProviderExportsForModel as wn, resolveAgentTargetSync as wr, tryReserveSwarmSlot as wt, compactAtTierRunBoundary as x, buildSpawnEnvForModel as xn, clearReadySignal as xr, releaseSwarmSlot as xt, init_darwin as y, init_claude_auth as yn, init_pty_supervisor_locate as yr, init_concurrency as yt, autoRecoverAgents as z, clearAgentPaused as zn, writeBridgeTokenSync as zt };
8802
9212
 
8803
- //# sourceMappingURL=queries-6d7Cdtm7.js.map
9213
+ //# sourceMappingURL=queries-CjNIf-Ub.js.map